Dumb question
-migrated-
Dumb question Posted on: 01/25/2011 10:12pm
Quote Post
How do you make something 9999 in an AS3 game with hexedit. Like if lives are
24 02

how do I make that value 9999?
Re: Dumb question Posted on: 01/25/2011 10:27pm
Quote Post
Never let a computer tell me shit.
short answer, you cant. the best you could feasibly do is 127 with 24 7f

full answer, you can get close. you will need to look through the code and find a constant pool int close in value to what you want.

so instead of like 24 02, it would be like 2d 84....



I use this AoB tool to make all the AoBs I post. Try the online version if you dont feel like downloading it.
"Obviously, windows are central to Windows. They are so important that they named the operating system after them. But what is a window?"

Re: Dumb question Posted on: 01/28/2011 10:22am
Quote Post
Quote from: "kolonelkadat"
short answer, you cant
Not totally accurate. You can do it in some games, but it requires changing the logic flow of the game instead of tweaking the variables. We can change 24 02 ?? to 25 0F 27 if we can manage to find a way to harvest a byte from the surrounding code without killing it. Needless to say, this is very difficult, but not impossible.

Oh... and, if you can do it, this might push an AoB to being 10 or 15 bytes. Crazy long.

Another oh.
Quote from: "toot"
AS3 game with hexedit
If you're in a hex editor and you're making a... don't know the term for it... a copy of the game with the cheats built in? Anyway, you can insert a single hex byte and just change it, as long as you modify any jumps that would jump passed that byte. This is much easier than trying to use CE to do it.
Re: Dumb question Posted on: 01/29/2011 5:58pm
Quote Post
Quote from: "toot"
How do you make something 9999 in an AS3 game with hexedit. Like if lives are
24 02

how do I make that value 9999?
If you are making a pre hack for an AS3 game, use yogda to change pushbyte(0x24) to pushshort(0x25), save the swf and it will take care of recompiling.
Re: Dumb question Posted on: 02/03/2011 2:02pm
Quote Post
Prehack, eehhh, you Might say That, But I am just trying to Learn as3 bytecodes, and Hex seemed like the best way to do it.
Re: Dumb question Posted on: 02/03/2011 2:16pm
Quote Post
Max value a pushbyte command can have is 7f = 127
If you're aiming for higher, then you need to use more elaborate methods. Personally, I'd change what the variable is used for, not its value.

For example, changing money to a trillion billion is nice, but wouldn't it be nicer if upgrades don't cost money? Or if your damage will instead of being weaponDamage * strength be weaponDamage * 200?

In the last case, the raw data would look something like this:
getproperty weaponDamage (66 03 01)
getproperty strength (66 03 02)
multiply (a2)
setproperty damage (61 03 03)

So, instead of getproperty strength (which in this example is 66 03 02), we can use the pushshort command to push 200:
25 c8 01
Which will turn the logic into:

getproperty weaponDamage (66 03 01)
pushshort 200 (25 c8 01)
multiply
setproperty damage (61 03 03)