Harvest Moon 64 Farm Statistics Math Equation Help

Discussion in 'Nintendo Game Development' started by BigIVIO, Dec 29, 2015.

  1. Zoinkity

    Zoinkity Site Supporter 2015

    Joined:
    Feb 18, 2012
    Messages:
    499
    Likes Received:
    108
    As far as used ROM the USA cart used 0xFFF700 of 0x1000000, but none of the game was compressed either. That said, I don't think there was a risk of overrunning rdram at any point and like you stated, virtually everything is not only present but translated. Have a feeling the real problem was they had a deadline and budget for release and this is just what we happen to get.
    It's crazy there's three different J revisions. That could have a big impact on the budget.

    I'll see how many of those features can be added in easily. What's the GS code to bring up the mempak menu?
     
    Last edited: Jan 9, 2016
  2. BigIVIO

    BigIVIO Active Member

    Joined:
    Dec 30, 2013
    Messages:
    25
    Likes Received:
    4
    They may have several revisions because I believe they originally intended to release this for the N64 DD that, of course, never really never took off, but who knows. The GS code is 801D6275 0001 with that cheat active a menu pops up when you insert a memory pack into a controller, but it wont actually save to the memory pack. I've never tried this on an emulator, just the console.
     
  3. BigIVIO

    BigIVIO Active Member

    Joined:
    Dec 30, 2013
    Messages:
    25
    Likes Received:
    4
    Just tried the controller pack cheat, its been awhile since I tested it. With it active and a controller pack loaded in memory you can scroll down past the first four diary entries to see the controller pack entries screen. Its also fully translated.
     
  4. BigIVIO

    BigIVIO Active Member

    Joined:
    Dec 30, 2013
    Messages:
    25
    Likes Received:
    4
    Any luck deciphering the remaining addresses in this list? My assumption based on my previous work is that in no particular order the following addresses relate to Ann, Elli, Karen, Maria, Popuri, Cliff, Gray, Harris, Jeff, and Kai:
    801FB812
    801FB819
    801FB820
    801FB827
    801FB82E
    801FB835
    801FB83C
    801FB843
    801FB84A
    801FB851

    801FB85F = Childs Affection Level
    801FB86D = Horse Happiness Level
    801FB96A = player happiness level
    801FB8AC = Number of Chickens Owned

    The remaining value Im not sure about:
    801FB94E

    I feel as though figuring out what determines the value for 801FB94E is the key to determining the discrepancies between my results as it is the only value that doesn't align with my previous findings.
     
    Last edited: Jan 11, 2016
  5. -=FamilyGuy=-

    -=FamilyGuy=- Site Supporter 2049

    Joined:
    Mar 3, 2007
    Messages:
    3,033
    Likes Received:
    891
  6. BigIVIO

    BigIVIO Active Member

    Joined:
    Dec 30, 2013
    Messages:
    25
    Likes Received:
    4
    Yes, this is true, but they shouldn't vary as much as they are. I think there is a value I was overlooking that helps determine the percentage completion despite my best efforts.
     
    -=FamilyGuy=- likes this.
  7. Zoinkity

    Zoinkity Site Supporter 2015

    Joined:
    Feb 18, 2012
    Messages:
    499
    Likes Received:
    108
    I'll try to narrow those down.

    The way sprites are displayed is a little...odd. There's the file ID, sprite set, then index in the set of an individual frame. So, for the three buttons on the side you'd use (0x84, 1, x) for "delete", (0x84, 3, x) for "move", and (0x84, 6, x) for "details". This is handled in ASM at 800B60E4, and adding in another button basically means rewriting the routine. That isn't very hard, but sort of thought of a better idea.
    [edit] The basic buttons are, but looks like J adds the details button some other way. The routine doesn't look any different. Looks like its added by 800B4160, which is uncalled in E.

    I'm going to try writing a script to just take all the resources from the English version and drop them into Japan v.2. Might or might not work, but would be interesting to try. Covers all the possible dropped features at least ;*)
     
    Last edited: Jan 11, 2016
  8. BigIVIO

    BigIVIO Active Member

    Joined:
    Dec 30, 2013
    Messages:
    25
    Likes Received:
    4
    I assume the script will overwrite all the J-resources or is that not necessary? If it works that would be amazing. I'm gonna owe you one of these player's guides I'm making when it's done, that's for sure.

    You can see some pictures of it here throughout the thread: http://nintendoage.com/forum/messageview.cfm?catid=22&threadid=150010

    I plan on it being ~200 pages and to have around 100 copies printed. I may make it available as an ebook as well.
     
  9. BigIVIO

    BigIVIO Active Member

    Joined:
    Dec 30, 2013
    Messages:
    25
    Likes Received:
    4
    Ok after taking a look at the values again for the game completion/ farm statistics the value that I am missing from my original research into this has to be whatever is calculated in address 801FB94E. If the value at address 801FB94E is = 255 as most values are in this game (and all the other values that were multiplied by 0.39215686 are = 255) then the total % achievable prior to the truncation of the double value is 100.1892602482572% which means after truncation it would display on the screen as 100%.

    801FB851 I'm fairly sure is Kai's affection value
     
  10. BigIVIO

    BigIVIO Active Member

    Joined:
    Dec 30, 2013
    Messages:
    25
    Likes Received:
    4
    Any luck with the script? I started testing every scene in the game to see if it alters the percentages in any way (this is tough to do without accidentally increasing other variables so I have tested them all 3 times with the potentially altered values pre-maxed and accounted for). So far I have found at least one thing that adds to the percentage completion that I had not identified previously, Restoring the Vineyard adds 0.12857151%. This may indicate that some scenes determine that last variable. If this is correct and we could assume that each scene adds the same amount to the percentage completion, there would be ~12 scenes that add to this value including the vineyard. I will start testing the rest.
     
  11. Zoinkity

    Zoinkity Site Supporter 2015

    Joined:
    Feb 18, 2012
    Messages:
    499
    Likes Received:
    108
    You shift one file and everything else must shift too. Originally I thought there were hundreds of instances to change but turns out thousands (and that's just starting at name-birthday.res). Need a few more days.
     
  12. BigIVIO

    BigIVIO Active Member

    Joined:
    Dec 30, 2013
    Messages:
    25
    Likes Received:
    4
    Sounds like just about anything I've ever coded. It always seems like it will be easier than it ends up being. I've now tested every scene, nothing alters the completion aside from the vineyard scene... I'm almost 100% positive this last factor has to do with natural in game progression such as going to festivals, winning festivals, unlocking items, etc. I am kinda stumped how to test it though outside of maxing every know value out and then playing through the entire first three years. I have tested this by just using gs codes to force items into my possession but it doesn't alter the completion. The only difference between my games used to test what alters the % completion and the game I played to develop/test a strategy for obtaining the party picture is I actually played the game as it was intended and it came out with the highest % completion. I might test this theory, but I'm gonna try to finish the first 120pgs of the guide first (currently at ~90pgs). I spent a few hundred hours over the last few months trying to figure out this last factor now. Need to take a break from investigating it so I don't burn out on the guide in it's entirety.
     
  13. Zoinkity

    Zoinkity Site Supporter 2015

    Joined:
    Feb 18, 2012
    Messages:
    499
    Likes Received:
    108
    The script finally can insert things. It's honestly stunning arbitrarily replacing all of the game's resources works at all, much less that there's so few problems. Files spanning "name-birthday" to "manual" were inserted, minus a couple that would cause issues.
    [edit]Should note that nothing else in the resource section is any different, that's why only that range ;*)

    • The USA version does not include the map. In J the map is found just before the font in the directory. It would be nontrivial to add it back in to E. Its filesize would have rolled E over the 32MB mark, though they could have left it in by either adding compression to the game in any capacity or not padding all the files to QW boundries.
    • As suspected bookshelves and TV both have more entries than in E. They're the only cases where there are more entries, though some files mix entries up and others use more or fewer frames in each entry.
    • The title screen is one that mixes things up. That's a bit of a mess.
    • If you look at the image dump, in "sprites/logos", image 3 is a small white block. In J the first logo is built using images 1, 3, 4, and 5, so replacing this file causes it to alternate between Natsume and a small white block due to the way frames are set on screen.
    • There's some minor formatting errors, such as positions of labels on the screen. This can be fixed with little effort.
    • About the only major issue is that menus, such as the one allowing you to sleep or read your journal, are very badly broken. Dialog, however, is not.

    Incidentally, save files are completely compatible. Mempacks do look for a matching game ID, despite the storage format not being the least bit different.

    [edit]Turns out a fat-fingered a value. Except for a corrupt line on one image on the title screen and the way strings are set for save file entries it's working just fine. Coding a solution for the strings. Seasons need to be more than one char, and USA removed the year.
     
    Last edited: Jan 19, 2016
  14. BigIVIO

    BigIVIO Active Member

    Joined:
    Dec 30, 2013
    Messages:
    25
    Likes Received:
    4
    Well no matter what you are able to do I appreciate all the effort you have put in so far. It has helped a ton. If you get the time to finish identifying the factors of the farm statistics equation I would greatly appreciate it. I've been investigating it for months now and I'm coming up short on what that extra factor is that you identified in your equation. Thank you again for all your help.
     
  15. Zoinkity

    Zoinkity Site Supporter 2015

    Joined:
    Feb 18, 2012
    Messages:
    499
    Likes Received:
    108
    Forgot to upload this:
    http://www.mediafire.com/download/kjp6ocvw4b5a497/NYWJ2.7z

    That's all the resources unique to J2. I'm not counting system code or any of the codebanks, which in USA that's 0xFF5C0 through 0x159330 ("sprites/player.res") and in J2 0xFFCF0 through 0x1599D0. Resources start with the sprites, then through the dialog, the objects (which I only dumped as raw and never formatted), followed by music.

    The font has one different char in it and the name entry page is missing the arrows for switching pages. Pretty sure they're the only ones that aren't obvious.

    That said, with the exception of the title screen and save select screens you can simply drop resources from one game into the other.

    Probably the most interesting thing would be to backtrace what function loads events. Determining event triggers would be nifty.
     
    Last edited: Jan 23, 2016
    BigIVIO likes this.
  16. Zoinkity

    Zoinkity Site Supporter 2015

    Joined:
    Feb 18, 2012
    Messages:
    499
    Likes Received:
    108
    Figured this would be worth a bump.
    J-calendar is actually an unused menu for a journal entry.
    Looks like when you "wrote in your journal" to save your progress at the end of the day and start the next it would pop up a screen telling you how far along you are with the farm, that day's weather, the date+season, your money, and give you an option to either proceed to the next day or continue with this one.

    The binary is present in all regions, untranslated, but not used in any version of the game. Since this was arranged based on frames it would still tile out properly on-screen, but without knowing where or if code to fill the fields exists it's hard to tell if it could ever be revived. It might utilize some of the format strings from sys.script, but really just speculating.
    2: の日記 [ ] journal
    5: 牧埸 pasture land
    6: 年目 -th year
    7: 春の月 spring moon?/season?
    8: 夏の月 summer moon?/season?
    9: 秋の月 autumn moon?/season?
    10: 冬の月 winter moon?/season?
    11: 日 day
    12 - 18: 日目火水ホ金土 day of week
    19: 天気 weather
    20: お金 money
    22: 牧埸開発度 farm development (percentage)
    23: 戻る back
    24: スタート start
    26: 牧埸の仲間達 farm group accomplishments
    Pretty sure the entry in sys.script with the names + happiness levels was printed in that far right column under label 26.

    The other unused file, J-character names, prints a box with a character's name. Only one box, and only one of the names will appear at a time.
    2: マリ一 Maria
    3: ポプリ Popuri
    4: エリイ Elli
    5: ラン Ann
    6: カレン Karen
    7: ハリス Harris
    8: グレイ Gray
    9: ヅエフ Jeff
    10: クリフ Cliff
    11: カイ Kai
    12: 町長 Mayor
    13: ケンタ&スウ Kent & Stu
    14: リック Rick
    15: バヅル Basil

    Resources are set into slots in a table when you enter an area. You recall a script or sprite using the slot number, then the frame+step or dialog entry depending on the type. Princess Vanilla is set into slot 0x34. She isn't used in any capacity since her slot is never called, and that she isn't loaded into other areas indicates she really wasn't finished (in fact, pretty sure her dialog with other characters is incomplete). However, you can swap her spriteset with other similar characters by changing the resource numbers--although she's missing frames so it won't necessarily be pretty.

    Missing sprites really are missing too. The extractor skips over any sprite with 0 bytesize, and usually if not always they have invalid palettes as well. The pure spritedump probably would be more helpful in some cases if they were arranged into their frames, though it would also make some sets far more confusing. So, the princess really does lack some rotational and animated movement, plus doesn't have dialog box icons. 124 would have been normal, 125 coy, and 126 annoyed.
     
    Gilgamesh likes this.
  17. BigIVIO

    BigIVIO Active Member

    Joined:
    Dec 30, 2013
    Messages:
    25
    Likes Received:
    4
    This is very interesting. It seems like this game could have been significantly better if there had been more time to develop it and more space for the developers to work with. I do wonder why only those 15 characters were in the J-Character names. I wonder if they ran out of space or maybe the mayor, kent, stu, rick, and basil all help determine farm completion (though im sure I've tested those values).

    I really wish they had at least developed more of princess vanilla and/or actually made a sprite for the bovine broadcast hood mentioned by that kid John. Both of those are super interesting and I would love to know more about them.
     
  18. Zoinkity

    Zoinkity Site Supporter 2015

    Joined:
    Feb 18, 2012
    Messages:
    499
    Likes Received:
    108
    Time. "More space to develop it" isn't exactly the issue. Chip sizes ran double the size they had, plus they could have added at least some degree of compression to the game. Even rudimentary LZSS would have saved more than enough space to keep everything in. Maybe I should implement that just for fun ;*)
    In fact, HM64 falls on an incredibly short list of N64 games that didn't use compression.

    [edit]
    Here's a link to a file inserter.
    http://www.mediafire.com/download/anss67xs79th64p/HM64tools.7z

    While indexing stuff realized some more of the non-null files are unlinked. Null files are simple blank, unincluded files that had reserved spots in the filetable. Unindexed files are similar, in that they aren't used but did get linked in since their names resolved during compilation. Here's the complete list; file offsets are from NYWJ2.
    Code:
    0xCA56B0, "misc/Null.res"
    0xCA56C0, "misc/Null.tbl"
    0xCA56D0, "misc/Null.res.idx"
    0xCAB6E0, "misc/Null.res"
    0xCAB6F0, "misc/Null.tbl"
    0xCAB700, "misc/Null.res.idx"
    0xCAB710, "misc/Null.res"
    0xCAB720, "misc/Null.tbl"
    0xCAB730, "misc/Null.res.idx"
    0xCAB740, "misc/Null.res"
    0xCAB750, "misc/Null.tbl"
    0xCAB760, "misc/Null.res.idx"
    0xCADB70, "misc/Null.res"
    0xCADB80, "misc/Null.tbl"
    0xCADB90, "misc/Null.res.idx"
    0xCBEC40, "misc/Null.res"
    0xCBEC50, "misc/Null.tbl"
    0xCC04B0, "misc/red sparkles.res"
    0xCC08C0, "misc/red sparkles.tbl"
    0xCC08E0, "misc/puff.res"
    0xCC2250, "misc/puff.tbl"
    0xCC2D30, "misc/wing.res"
    0xCC40F0, "misc/wing.tbl"
    0xCC99F0, "misc/background/Null.res"
    0xCC9A00, "misc/background/Null.tbl"
    0xCC9A10, "misc/background/Null.res"
    0xCC9A20, "misc/background/Null.tbl"
    0xCEE3E0, "misc/journal.res"
    0xCF1DD0, "misc/journal.tbl"
    0xCF3930, "misc/character select.res"
    0xCF5600, "misc/character select.tbl"
    
    "Journal" and "Character Select" were already covered.
    "Red Sparkles" has one animation resembling confetti, but very well could be a sort of magic or tied to puff:
    [​IMG]
    "Puff" consists of a single animation:
    [​IMG]
    "Wing" consists of two animations:
    [​IMG]
    [​IMG]

    Mind you these are completely unlinked files as opposed to files that are loaded but never used, like Princess Vanilla. Incidentally, she has two animations besides the stillframe entries:
    [​IMG]
    [​IMG]
    Framesets 1-5 are images 1, 3, 4, 5, and 6 respectively; these provide her rotation when standing still, where the caller mirrors the sprite for the opposite side.
    Frameset 6 is a hopping animation while facing toward the screen on the left. Frameset 7 is missing and calls frameset 6, though since mirroring is triggered by code could just be placeholdered for the mirror.
    Frameset 8 is hopping while facing away from the screen stage left. Frameset 9 also is missing and calls frameset 8.
    Frameset 10 is a single-sprite animation lasting roughly 266ms using image 15, handing you an item. Frameset 11 is missing and calls 10.
    Frameset 12 uses image 8, the first step of the animation in frameset 8. She raises her hands in the air, looking toward the screen stage left.

    Oh, and eventually I'll get around to figuring out what each slot in the save file is for. This stuff is just really interesting and got sidetracked with it ;*) You pretty much figured out the order for the happiness indicators.
     
    Last edited: Jan 28, 2016
    Gilgamesh likes this.
  19. BigIVIO

    BigIVIO Active Member

    Joined:
    Dec 30, 2013
    Messages:
    25
    Likes Received:
    4
    Hey I know it's been forever since we were working on this, I'm sure you've been busy with plenty of other stuff, but were you ever able to figure out what that last memory address to achieve 100% completion is?? My guide is nearly complete and it is the only thing I have yet to figure out. I have one last fleeting idea I plan to test this week (it will take me a while to test it unfortunately and will require that I ensure complete control over almost every aspect of the game). My guess is still that it is related to either the passage of in game years or that you have seen all festivals or a festival/cutscene combo.
     
  20. doulomb

    doulomb Robust Member

    Joined:
    Apr 25, 2013
    Messages:
    237
    Likes Received:
    57
    I have no idea what most of this stuff is but I'm so behind getting 100% working on NTSC.

    -doulomb
     
sonicdude10
Draft saved Draft deleted
Insert every image as a...
  1.  0%

Share This Page