| View previous topic :: View next topic |
| Author |
Message |
Sahfais Newbie cheater
Reputation: 0
Joined: 12 Jun 2011 Posts: 15
|
Posted: Wed Jun 15, 2011 4:33 pm Post subject: Modifying an address based on another address' value |
|
|
I have to modify an address by +20 at a specific moment depending on the value of another pointer (which is a string), and change it back when the pointer no longer contains the value. Did a quick search and couldn't find anything of much help.
If that description was a bit confusing I basically mean this:
if (x = "class")
y = y+20
z = 1
if z = 1 && x != "class"
y = y-20
z = 0
|
|
| Back to top |
|
 |
lucidity Advanced Cheater
Reputation: 0
Joined: 16 Feb 2011 Posts: 91
|
Posted: Wed Jun 15, 2011 5:15 pm Post subject: |
|
|
Exactly how you would add them depends on the language you're doing it in.
If you want to add the decimal number 20 to a value, then you would probably convert the address to decimal and do normal addition.
If your language supports adding hex, then you would add 0x14 (not 20), since 0x14 is the hexadecimal equivalent of the decimal number 20.
Hope this helps.
_________________
» Antec Twelve Hundred Full Tower » EVGA E760 CLASSIFIED » EVGA GeForce GTX 580 SuperClocked 1536MB » i7-980XE » CORSAIR DOMINATOR 6GB PC3 12800 DDR3 » OS: Intel X25-M SSD » Game Storage: Raid-0 2 x WD VelociRaptor 10000 RPM » CE Cache Drive: 500GB WD Caviar » Power Supply: OCZ Z Series Gold 1000W |
|
| Back to top |
|
 |
Sahfais Newbie cheater
Reputation: 0
Joined: 12 Jun 2011 Posts: 15
|
Posted: Thu Jun 16, 2011 1:21 am Post subject: |
|
|
My initial aim was to do it entirely through assembly, but after a bit more fiddling I see this probably isn't going to be the case. The image is a bit more descriptive so I felt the need to include it!
dl.dropbox[dot]com/u/15530379/classexmp.png
Each menu option is assigned an int that externally references it. I'm currently modifying the pointer directly through an external program, but it seems a little awkward due to cross-platform issues, and with the game presenting its own menu. My other option was, for instance, a series of conditional statements:
if (text string = "a")
entry line = 21
else if (text string = "b")
entry line = 22
And so on. I realised that simply adding 20 doesn't work due to the fact that the address is also used for other menu button (oops). I'm not even too sure where I should start with an Assembly script for something like the above, so I should probably drop that idea.
|
|
| Back to top |
|
 |
lucidity Advanced Cheater
Reputation: 0
Joined: 16 Feb 2011 Posts: 91
|
Posted: Thu Jun 16, 2011 5:21 am Post subject: |
|
|
| Sahfais wrote: | | it seems a little awkward due to cross-platform issues |
Different platforms have different ways of handling memory. I've never tried, but I'm 95% sure you aren't going to have an easy time making cheats for more than one platform (Windows, Mac, Linux). If you mean more than one version of windows, I don't think the "awkwardness" would apply.
Does Barbarian have a value of 0 for that top memory location you show?
You could always just send keystrokes and check the current text equivalent:
| Code: | While(textString <> "Rogue")
PressKey("Down")
textString = _getNewClassTextString()
End While |
I would look for a "Collection" or "Enum" or "HashMap" in your language, rather than chaining ~20+ if/else conditions together. These are common methodologies for storing values to cross-reference (enum included since you're using numeric values anyhow).
_________________
» Antec Twelve Hundred Full Tower » EVGA E760 CLASSIFIED » EVGA GeForce GTX 580 SuperClocked 1536MB » i7-980XE » CORSAIR DOMINATOR 6GB PC3 12800 DDR3 » OS: Intel X25-M SSD » Game Storage: Raid-0 2 x WD VelociRaptor 10000 RPM » CE Cache Drive: 500GB WD Caviar » Power Supply: OCZ Z Series Gold 1000W |
|
| Back to top |
|
 |
Sahfais Newbie cheater
Reputation: 0
Joined: 12 Jun 2011 Posts: 15
|
Posted: Thu Jun 16, 2011 2:06 pm Post subject: |
|
|
A '0' or invalid value returns Barbarian, and it then increments by 1 for each entry.
dl.dropbox[dot]com/u/15530379/baseprestigeclasses.png
As you can see from every entry under the Wizard, the game only supports "Prestige" classes after its vanilla release (which means you can't take them at level 1, but once the requirements are met). A class with no requirements at all can still only be taken at level 2, hence the reason for such a silly workaround. There have been quite a lot of attempts to sort this out by other members of the community but they always tend to involve selecting a different class at level 1 and then having the class altered, which is a bit of a stretch for new players.
|
|
| Back to top |
|
 |
lucidity Advanced Cheater
Reputation: 0
Joined: 16 Feb 2011 Posts: 91
|
Posted: Thu Jun 16, 2011 2:16 pm Post subject: |
|
|
Your question has pseudo code with "x" and "y" vars... can you explain in words what you're trying to do?
Trying to select a class only if it is available? trying to hack the game so they are all accessible?
If these specifics don't matter, then what is your question? Sounds like more of a statement.
"I have to..."
Well then do it!
_________________
» Antec Twelve Hundred Full Tower » EVGA E760 CLASSIFIED » EVGA GeForce GTX 580 SuperClocked 1536MB » i7-980XE » CORSAIR DOMINATOR 6GB PC3 12800 DDR3 » OS: Intel X25-M SSD » Game Storage: Raid-0 2 x WD VelociRaptor 10000 RPM » CE Cache Drive: 500GB WD Caviar » Power Supply: OCZ Z Series Gold 1000W |
|
| Back to top |
|
 |
Sahfais Newbie cheater
Reputation: 0
Joined: 12 Jun 2011 Posts: 15
|
Posted: Thu Jun 16, 2011 4:10 pm Post subject: |
|
|
At first I was trying to make all of them accessible, but I've had a lot of trouble getting that working. My less complicated idea was basically to add my custom classes and have them stored like this:
20 - custom 1
21 - custom 2
etc
Then you'd pick the class at 0 - Barbarian - it'd add 20 to the class value, and you'd end with the custom 1 class with the value = 20. Does that make sense?
|
|
| Back to top |
|
 |
lucidity Advanced Cheater
Reputation: 0
Joined: 16 Feb 2011 Posts: 91
|
Posted: Thu Jun 16, 2011 4:12 pm Post subject: |
|
|
Why wouldn't you just make it so you can select any one you want?
_________________
» Antec Twelve Hundred Full Tower » EVGA E760 CLASSIFIED » EVGA GeForce GTX 580 SuperClocked 1536MB » i7-980XE » CORSAIR DOMINATOR 6GB PC3 12800 DDR3 » OS: Intel X25-M SSD » Game Storage: Raid-0 2 x WD VelociRaptor 10000 RPM » CE Cache Drive: 500GB WD Caviar » Power Supply: OCZ Z Series Gold 1000W |
|
| Back to top |
|
 |
Sahfais Newbie cheater
Reputation: 0
Joined: 12 Jun 2011 Posts: 15
|
Posted: Thu Jun 16, 2011 4:13 pm Post subject: |
|
|
I've had -so- many issues getting that to work that I found this method a heck of a lot easier. Granted, it's less of a fix and more of a workaround.
|
|
| Back to top |
|
 |
lucidity Advanced Cheater
Reputation: 0
Joined: 16 Feb 2011 Posts: 91
|
Posted: Thu Jun 16, 2011 4:19 pm Post subject: |
|
|
It would be the real solution imo; find the value which dictates whether or not they should be unlocked and change it.
Almost always the simplest solution is the best.
_________________
» Antec Twelve Hundred Full Tower » EVGA E760 CLASSIFIED » EVGA GeForce GTX 580 SuperClocked 1536MB » i7-980XE » CORSAIR DOMINATOR 6GB PC3 12800 DDR3 » OS: Intel X25-M SSD » Game Storage: Raid-0 2 x WD VelociRaptor 10000 RPM » CE Cache Drive: 500GB WD Caviar » Power Supply: OCZ Z Series Gold 1000W |
|
| Back to top |
|
 |
Sahfais Newbie cheater
Reputation: 0
Joined: 12 Jun 2011 Posts: 15
|
Posted: Thu Jun 16, 2011 6:31 pm Post subject: |
|
|
I'm so glad you told me to go back and do that.
I found an address that is '0' when a class is a base class, and '1' for a prestige class. Froze it at 0 and every class is selectable. There are a few issues, namely the class names and the 'OK' button are still greyed out, but I don't think they're enough of a problem to really care about at the moment. I can probably edit the 'OK' button by simply editing the .gui tga files and removing the text chunk of it.
Once I find the static address for it I think I can just write a basic patcher for it.
Seems I was just skipping over something that was, in fact, far simpler than I thought!
|
|
| Back to top |
|
 |
lucidity Advanced Cheater
Reputation: 0
Joined: 16 Feb 2011 Posts: 91
|
|
| Back to top |
|
 |
Sahfais Newbie cheater
Reputation: 0
Joined: 12 Jun 2011 Posts: 15
|
Posted: Thu Jun 16, 2011 10:55 pm Post subject: |
|
|
The address' byte value and in CE continually swaps between "??" and 0/1, making it rather annoying to freeze (the address also does the same) - I assume this means it operates on a timer? I figure if I freeze it before it's accessed it should be fine, but I haven't tried it yet.
I also managed to find eight multilevel pointers that all reference the same address, which is something I haven't seen before (granted, I don't have a huge amount of experience with CE, but still). Does it actually matter which one I select if they all seem to function identically when frozen at 0? Should I be thinking about freezing ALL of them for the patch file?
|
|
| Back to top |
|
 |
lucidity Advanced Cheater
Reputation: 0
Joined: 16 Feb 2011 Posts: 91
|
Posted: Fri Jun 17, 2011 4:06 am Post subject: |
|
|
| Quote: | | The address' byte value and in CE continually swaps between "??" and 0/1, making it rather annoying to freeze (the address also does the same) - I assume this means it operates on a timer? |
Can't you freeze it and change it to whatever you want? (You should've done this in the tutorial)
As for pointer validity - Restart the game and rescan, perhaps even restart your computer and rescan. Once you've really filtered them, I usually just use the first one in the list.
_________________
» Antec Twelve Hundred Full Tower » EVGA E760 CLASSIFIED » EVGA GeForce GTX 580 SuperClocked 1536MB » i7-980XE » CORSAIR DOMINATOR 6GB PC3 12800 DDR3 » OS: Intel X25-M SSD » Game Storage: Raid-0 2 x WD VelociRaptor 10000 RPM » CE Cache Drive: 500GB WD Caviar » Power Supply: OCZ Z Series Gold 1000W |
|
| Back to top |
|
 |
Sahfais Newbie cheater
Reputation: 0
Joined: 12 Jun 2011 Posts: 15
|
Posted: Fri Jun 17, 2011 10:48 am Post subject: |
|
|
The pointer is only an active address once I'm up to that menu screen - before that it's '????????' which means I can't freeze it. Unless there's another method I didn't learn in the tutorial. Either that or I'm just silly.
I'm up to my 9th re-scan (I isolated these eight on my 4th) and there's six still there, so I'm curious if I should just keep going or use the first.
EDIT: It looks like sometimes the game uses the other pointers instead...?
I can freeze the top one at 0 and open and close the menu a few times, and it'll stop working. Then the others have to be frozen at 0 for it to function. Looks like I have to do the lot.
EDIT EDIT: Seems if I do it enough times that none of the pointers on the list are active... looks like I'm missing something. Possibly grabbing the wrong pointers.
|
|
| Back to top |
|
 |
|