Author Topic: Game addresses: items, badges, enemy info, MOAR  (Read 52299 times)

jdaster64

  • Badge Maniac
  • Full Member
  • ***
  • Posts: 238
    • Youtube Channel
Game addresses: items, badges, enemy info, MOAR
« on: August 31, 2011, 03:40:49 PM »
The byte at 0x00AFECD7 (or two at 0x00AFECD6) appears to store the amount of coins that you will receive after a battle BEFORE the battle ends.  I ran several tests with Cheat Search, and they all seemed to work correctly for that address only.  Hyper Goombas tended to bring up values of 2-3, whereas Elites ranged from 3-5, which sounds accurate (and again, the values actually proved correct with the Hyper Goombas; I can't be sure about the Wizzerds since I had 999, but 21 for a line of five sounds about right).

Could pending item/badge drops be stored nearby?
I may be on to something big here...  :3

At any rate, I definitely need to test this with Money Money(s) on now...
« Last Edit: December 02, 2011, 04:32:27 PM by WayoshiM »

WayoshiM

  • Badge Maniac
  • Forum Moderator
  • Sr. Member
  • *****
  • Posts: 457
  • Can't keep a Fluttershy down!
    • My Youtube
Re: Very interesting memory address... (drop-related)
« Reply #1 on: August 31, 2011, 04:04:36 PM »
Time to farm Jumpmans and Hammermans?
I've got nothing to say here.

jdaster64

  • Badge Maniac
  • Full Member
  • ***
  • Posts: 238
    • Youtube Channel
Re: Very interesting memory address... (drop-related)
« Reply #2 on: August 31, 2011, 05:13:56 PM »
The best way I can think of to test for a pending-item/badge-drop address would be to load up with power badges and Multibounce, then get a battle with exactly one enemy not in the back holding an item/badge (or multiple holding the same kind of item/badge).  I'll save a state at the first battle in which these conditions are met, then kill off all but the back enemy, and save again at a different state.  Then I'll get rid of the remaining enemy with a Fright Mask, so its drops won't interfere with my results (that's how I found the coin-drop address).  I'll repeat this process until I get an item/badge, then see if repeatedly save-scare-spamming the last enemy will still give me the same item/badge.  If I successfully get that to happen, I'll see what I can do with it in Cheat Search.

If such an address exists, I could make a code that makes enemies always drop a certain item/badge ;D ...although I suppose that's pretty much doable already with item/badge modifier codes.  On the brighter side, I could state-kill-spam and see the results much more quickly, without the need of making a .tas file.

EDIT: Wow, I just realized I can now easily tell the EXACT range of how many coins every enemy drops.  That's serious Stat/Attack-FAQ material, there.
« Last Edit: August 31, 2011, 05:17:26 PM by jdaster64 »

jdaster64

  • Badge Maniac
  • Full Member
  • ***
  • Posts: 238
    • Youtube Channel
Re: Very interesting memory address... (drop-related)
« Reply #3 on: August 31, 2011, 07:13:33 PM »
Well, I killed two Hyper Goombas, one of which was holding a Last Stand, and saved, then got a Last Stand after killing the third.  I re-loaded and killed it again, but didn't get the badge.  So unless in the most trollish of moves that third Goomba dropped the badge, it unfortunately appears that badge drops being pre-determined is out.

Which, incidentally, makes me more skeptical of item/badge drop likelihood being related to the number of the enemies in the battle.  I'll still believe that all enemies' drops have a chance of showing up after battle, but badge drops almost definitely aren't determined upon killing them (I might try the experiment until I get a couple more Last Stands, but the chances of that one being dropped by the third Goomba are quite implausibly low).

Coin drops definitely are, though (well, there is a ludicrously low chance of those values being a coincidence, but it certainly seemed legit to me, seeing as the value changed as soon as each enemy was killed, and the total at the end matched the number of coins dropped exactly four times).  That's so strange...

Curse you and your emulator-unfriendly item-drop routines, IS.
« Last Edit: August 31, 2011, 07:20:21 PM by jdaster64 »

WayoshiM

  • Badge Maniac
  • Forum Moderator
  • Sr. Member
  • *****
  • Posts: 457
  • Can't keep a Fluttershy down!
    • My Youtube
Re: Very interesting memory address... (drop-related)
« Reply #4 on: August 31, 2011, 09:37:54 PM »
It's possible it's determined afterwards since I think there's a max of 1 item/badge per battle, whereas coins is per enemy.
I've got nothing to say here.

jdaster64

  • Badge Maniac
  • Full Member
  • ***
  • Posts: 238
    • Youtube Channel
Re: Very interesting memory address... (drop-related)
« Reply #5 on: August 31, 2011, 10:18:18 PM »
Hmm... the 32-bit address before it, 00AFECD0, seems to do strange stuff when I try to edit it in the Dolphin debugger.  I changed it from 1 to 4, and I ended up running away from the battle I was in instead of winning.

Nothing in the immediate area screams "Last Stand", either.

EDIT: Hmm.  Changing it to 2 made the enemy not drop any coins (although I did pick up the Last Stand, interestingly enough).
EDIT again: Hmmmm. Changing it to 3 made me immediately re-engage the same enemy set, badge and all.

From the looks of it, this address dictates which after-battle script is followed.  1 makes the battle end normally, 2 ends it with no coins dropped, and 4 ends it as if you ran away.  Every other number I've entered makes the battle re-start immediately.
« Last Edit: August 31, 2011, 10:39:03 PM by jdaster64 »

WayoshiM

  • Badge Maniac
  • Forum Moderator
  • Sr. Member
  • *****
  • Posts: 457
  • Can't keep a Fluttershy down!
    • My Youtube
Re: Very interesting memory address... (drop-related)
« Reply #6 on: August 31, 2011, 10:45:04 PM »
That's a funny test integer
I've got nothing to say here.

jdaster64

  • Badge Maniac
  • Full Member
  • ***
  • Posts: 238
    • Youtube Channel
Re: Very interesting memory address... (drop-related)
« Reply #7 on: August 31, 2011, 10:53:26 PM »
YESSSSSS I found something that's sure to be useful!!!

[removed] had the string "00000110", the number for Last Stand, and leaving the battle and changing the string to "00000111" made the Hyper Goomba that was holding a Last Stand hold Last Stand P!  I'll have to snoop around that address a bit more...

EDIT: Lol, "00000112" made it hold a Defend Plus, which did in fact increase its DEF.

EDIT:
[removed]

Note that none of these values appear until after the last enemy is killed.  Maybe someone with coding knowledge and/or Dolphin-debugger knowledge could figure out from whence it pulls these values.
« Last Edit: November 29, 2011, 05:43:26 PM by jdaster64 »

jdaster64

  • Badge Maniac
  • Full Member
  • ***
  • Posts: 238
    • Youtube Channel
Re: Very interesting memory address... (drop-related)
« Reply #8 on: August 31, 2011, 11:22:06 PM »
Okay, summary of what I found from the Memory Viewer in the Dolphin Debugger:

[removed]
« Last Edit: November 29, 2011, 05:43:37 PM by jdaster64 »

WayoshiM

  • Badge Maniac
  • Forum Moderator
  • Sr. Member
  • *****
  • Posts: 457
  • Can't keep a Fluttershy down!
    • My Youtube
Re: Very interesting memory address... (drop-related)
« Reply #9 on: August 31, 2011, 11:29:32 PM »
Now we're talking. If you can figure out where the badge strings are coming from, that will probably lead to a map of enemies to a set of badges they can hold in battle - and maybe related / right there, what badges they can drop after battle. Then we can have a 100% confirmed Badge Drop FAQ.
I've got nothing to say here.

jdaster64

  • Badge Maniac
  • Full Member
  • ***
  • Posts: 238
    • Youtube Channel
Re: Very interesting memory address... (drop-related)
« Reply #10 on: August 31, 2011, 11:36:38 PM »
I just posted on the forums of some guys that would be more experienced than me in that regard.  I'll fiddle around with the Code Viewer a bit myself as well, if I can figure out how to search it.

In the meantime,


If only it were that easy.  Those can be stolen with Ms. Mowz, BTW.

Also,


On a related note, we should troll the GameFAQs forums with a picture of a Badge Bandit holding a Lucky Day.  Or, even better, a video of a Lucky Day being dropped with none visible in the battle.
« Last Edit: August 31, 2011, 11:47:39 PM by jdaster64 »

milesluigi

  • Miles Luigiworth
  • Administrator
  • Hero Member
  • *****
  • Posts: 551
    • Techyoshi.com
Re: Very interesting memory address... (drop-related)
« Reply #11 on: September 01, 2011, 12:04:26 AM »
AHHHHHH! That Elite Wizzerd image is scary.

Regardless, you managed to figure out a potential (and I emphasize potential here, there's more work to do) way to figure out badge drops without decompiling the game.

Let me start playing with those codes tomorrow (well, later today. It's 12:09am.) I'm in for trolling gamefaqs.com.
« Last Edit: September 01, 2011, 12:15:33 AM by milesluigi »

WayoshiM

  • Badge Maniac
  • Forum Moderator
  • Sr. Member
  • *****
  • Posts: 457
  • Can't keep a Fluttershy down!
    • My Youtube
Re: Very interesting memory address... (drop-related)
« Reply #12 on: September 01, 2011, 12:26:18 AM »
LOL at quintuple Stopwatches and trolling.
I've got nothing to say here.

jdaster64

  • Badge Maniac
  • Full Member
  • ***
  • Posts: 238
    • Youtube Channel
Re: Very interesting memory address... (drop-related)
« Reply #13 on: September 01, 2011, 01:39:42 AM »
BTW, if you want to edit any of the things above, change the second 0 in the address to a "4" and fill in whatever value you choose.  Note that hearts, flowers, and coins don't count above 32 (20 hex).

Note that all of the addresses only apply to the first battle in a screen, such as the three Hyper Goombas in Twilight Trail, or any battle in the Pit of 100 Trials (as there is never any more than one battle per screen).  For the others, you'll have to shift the address by some multiple of 0x0340; some trial and error will be required, obviously.  The coin drop code works for any battle that allows coins to be dropped, though.

Also, if you want to use the debug version of Dolphin, simply create a shortcut to your preferred version anywhere, then under "Properties"->"Target", add " -d" (space, hyphen, 'd') to the end of the filename.

It should look like this:
"C:\Users\Jdaster64\Desktop\...\Dolphin.exe" -d

Then simply click on the shortcut and it will automatically open in Debug mode.
« Last Edit: November 29, 2011, 05:44:11 PM by jdaster64 »

WayoshiM

  • Badge Maniac
  • Forum Moderator
  • Sr. Member
  • *****
  • Posts: 457
  • Can't keep a Fluttershy down!
    • My Youtube
Re: Very interesting memory address... (drop-related)
« Reply #14 on: September 01, 2011, 11:08:51 AM »
Note that hearts, flowers, and coins don't count above 32 (20 hex).
As confirmed by a "Stack Way Too Many" video.
I've got nothing to say here.