How do you make a "everything costs 0[currency])" code

Started by Stuff, January 03, 2012, 10:39:01 PM

Previous topic - Next topic

Stuff

Yugioh on the ds has this code. IMO, everything costs 0 is better than inf money because you can buy with 0[currency]. Well that's the only plus to it. I just think it's a good code, but idk how you approach it.
.make Stuff happen.
Dropbox. If you don't have one, get it NOW! +250MB free if you follow my link :p.

Mod code Generator ~50% complete but very usable:
http://dl.dropbox.com/u/24514984/modcodes/modcodes.htm

dcx2

Find your money in memory.  Set read breakpoints on it.  You'll probably get a hit or two, which is probably the game displaying your current amount of money.  Add "SRR0 !=" breakpoint conditions for each hit until you're not getting any more hits and you get a steady stream of skipped BPs.

Then try to buy something that costs more than you have.  (you may have to poke your money to be something smaller than what you have right now).  You'll get a hit.  Look around for something that is comparing your current money value to the cost of the thing you tried to buy.  (EDIT: if they dim things that are too expensive, or otherwise prevent you from selecting those things, then you may have to set a RBP outside the shop and then enter the shop to catch it reading the costs of all the items.  Or you could sell something, because selling means you have more money, which means it has to check again to see what you're allowed to buy)

If you take this route, you may have to also set a WBP on your money and nop it.  Otherwise, if you bought a $100 item with $50, it would let the transaction go through but would give you -$50 (or some obscenely large amount of positive money), which can cause problems if they didn't anticipate this kind of thing happening.

---

Alternatively, there's probably an array of "shop items" in memory.  This array may contain the prices of the items in question.  You can probably find it by doing a string search for one of the item names.  (EDIT: string search will give you a pointer to the string, the table itself probably uses this pointer to reference the string for the item; so once you have a pointer to the item name, search memory for this pointer)  Then you can make an 08 code that patches all the costs so that they're 0.

(EDIT: btw, 0x80000000 = -2,147,483,648 as a signed 32-bit integer, not -0)

Stuff

Quote from: dcx2 on January 03, 2012, 10:45:53 PM
Find your money in memory.  Set read breakpoints on it.  You'll probably get a hit or two, which is probably the game displaying your current amount of money.  Add "SRR0 !=" breakpoint conditions for each hit until you're not getting any more hits and you get a steady stream of skipped BPs.
This could be useful for so many other things >.>. Thanks for that. This will make finding a read/write when there's a constant read/write much easier.

I'll follow these steps right now.

Quote from: dcx2 on January 03, 2012, 10:45:53 PM(EDIT:if they dim things that are too expensive, or otherwise prevent you from selecting those things, then you may have to set a RBP outside the shop and then enter the shop to catch it reading the costs of all the items.  Or you could sell something, because selling means you have more money, which means it has to check again to see what you're allowed to buy)
This reminds me of greyed out options. Are the steps similar for that? (I was reading about unlock codes, but the gestures aren't unlockables. There's just 4 gestures that you can't use while in a quest.)

Quote from: dcx2 on January 03, 2012, 10:45:53 PM(EDIT: btw, 0x80000000 = -2,147,483,648 as a signed 32-bit integer, not -0)
I was using the hex<->float in geckocodes arsenal and it returned -0 for 0x80000000. I thought it was pretty funny, so I put it in my w/e that is. I guess it's some very small negative float since -0 just can't be. Either way it returned -0 and I was dying when I saw that.
.make Stuff happen.
Dropbox. If you don't have one, get it NOW! +250MB free if you follow my link :p.

Mod code Generator ~50% complete but very usable:
http://dl.dropbox.com/u/24514984/modcodes/modcodes.htm

dcx2

Actually 0x80000000 is -0 for a single precision float.  Floats have three pieces; sign bit, mantissa, and exponent.  It's perfectly legal to have -0 for a float.

For greyed out options, I would take a different approach.  The currently selected option will probably exist as a number somewhere in memory.  So I would do unknown search, select a different item, not equal search, go back to first item, equal to first search, etc.  You should eventually find something that, when in MemView auto-update, changes each time you select a different option.  WBP on this should show you what prevents the other options from being selected.

Stuff

Ah >.>. Well it was still funny.

So this is cool. I found the shop checking my money like you said and forced it to branch and I was able to shop with 0z with no funky super positives. But it does reduce you money if you have. There must be some <0 check somewhere to prevent having 0xFFFFFXXXz.

So I remember daijoda found a shop list in Pal that idk what the rest of the data was for. But I did a RBP on buying price and got just 1 hit. twice. It loads the cost and then branches. So this would do
80210818:  3BE00000   li   r31,0

however, it later compares the cost with 0...and makes it 1. So I had to add this forced branch.
80210898:  48000008   b   0x802108a0

Yay. Items cost 0z. This is just for items though. Weapons wouldn't be too hard to find since weapon mod codes has cost in it. I guess armor too. But I think I have to look for that.

So now I'll try the greyed options. I remember finding what looked like the whole menu before...I wish I wrote that down..It had page numbers and "selectedIndex". I think that's what I should look for. But I also remember that it does change for the greyed options too. The options are just greyed and can't be selected. I remember freezing the game trying to access my friends list in quest after I noticed a pattern and that poking 1 to some address would make you "go in". I'm hoping that doesn't mean nothing can be done. But this is gestures. They're disabled for no reason.
.make Stuff happen.
Dropbox. If you don't have one, get it NOW! +250MB free if you follow my link :p.

Mod code Generator ~50% complete but very usable:
http://dl.dropbox.com/u/24514984/modcodes/modcodes.htm

dcx2

Quote from: Stuff on January 04, 2012, 01:26:05 AM
So this is cool. I found the shop checking my money like you said and forced it to branch and I was able to shop with 0z with no funky super positives. But it does reduce you money if you have. There must be some <0 check somewhere to prevent having 0xFFFFFXXXz.

WBP on money would have shown you who was subtracting from your cash, too.

Stuff

ah. That might've worked too. But I wouldn't find a disable choice asm through there. So I'd need to have at least X amount before buying.
.make Stuff happen.
Dropbox. If you don't have one, get it NOW! +250MB free if you follow my link :p.

Mod code Generator ~50% complete but very usable:
http://dl.dropbox.com/u/24514984/modcodes/modcodes.htm

GMO

I've worked on YuGiOh games on GB and GBA for quite some time with you were familar with cmgsccc or codemasters-project.net that type of code was pretty straight forward. 32bit equal search and enter the values of how much each item cost.

300, 200, 10, 50 etc usually comes down to one address. Which YoGiOh game is this by the way?
This also worked on RPGs at shops
http://gamemasterzer0.blogspot.com
For Codes, Guides, & Support Codemasters-Project
USB Gecko Facebook Page - My Wii's 4.1 U | 4.0 E

Stuff

Nah I just wanted to know how you would approach it. I saw the code for the first time in YuGiOh 2011. I went to MH3 to try out what dcx2 described. MH3 does a final check for if the cost is 0 it'll make it 1. So the code would've had to have an extra line. I didn't release it. It became uninteresting.

But your saying 32 bit search. Would it change as I select a different item? Do I have to purchase an item?
.make Stuff happen.
Dropbox. If you don't have one, get it NOW! +250MB free if you follow my link :p.

Mod code Generator ~50% complete but very usable:
http://dl.dropbox.com/u/24514984/modcodes/modcodes.htm

Bully@Wiiplaza

Quote from: GMO on January 20, 2012, 01:17:57 AM
I've worked on YuGiOh games on GB and GBA for quite some time with you were familar with cmgsccc or codemasters-project.net that type of code was pretty straight forward. 32bit equal search and enter the values of how much each item cost.

300, 200, 10, 50 etc usually comes down to one address. Which YoGiOh game is this by the way?
This also worked on RPGs at shops
I might want to do that for Yu-gi-oh! 5D´s Duel Transer (Wii). :p
My Wii hacking site...
http://bullywiihacks.com/

My youtube account with a lot of hacking videos...
http://www.youtube.com/user/BullyWiiPlaza

~Bully

Stuff

In Duel Transer the pack prices are strangely 16bit. I ended up searching for a read/write on my DP instead. That's how I found out it was a halfword.(lhzx I think it was). I guess inf money would be better(maybe) since changing that lhzx only affected the pack shop and not the recipe shop. But I like seeing the game ask me if I really want to purchase X items for $0. lol
.make Stuff happen.
Dropbox. If you don't have one, get it NOW! +250MB free if you follow my link :p.

Mod code Generator ~50% complete but very usable:
http://dl.dropbox.com/u/24514984/modcodes/modcodes.htm