Author Topic: Hex Cheats  (Read 2863 times)

Offline delgado

  • Newbie
  • *
  • Posts: 1
Hex Cheats
« on: August 07, 2007, 04:20:39 PM »
I need to know how to do some hex cheats for this game. So I can change my resources, etc, in my save games.  Anyone know the lines of code I need to change?

Offline CK9

  • Administrator
  • Hero Member
  • *****
  • Posts: 6226
    • http://www.outpost2.net/~ck9
Hex Cheats
« Reply #1 on: August 07, 2007, 05:08:35 PM »
We do not promote the use of cheating in any form in this community.  However, if you wish to know, I'm sure someone in one of the IRC channels would be more than happy to help,
CK9 in outpost
Iamck in runescape (yes, I still play...sometimes...)
srentiln in minecraft (I like legos, and I like computer games...it was only a matter of time...) and youtube...
xdarkinsidex on deviantart

yup, I have too many screen names

Offline Hooman

  • Administrator
  • Hero Member
  • *****
  • Posts: 4955
Hex Cheats
« Reply #2 on: August 07, 2007, 08:06:02 PM »
Have you at least tried searching for the values you want to change?
 

Offline Brazilian Fan

  • Sr. Member
  • ****
  • Posts: 302
Hex Cheats
« Reply #3 on: August 08, 2007, 04:22:14 PM »
I think there are some topics in the OPU Wiki that would help you, like the save game file format.

Offline Hooman

  • Administrator
  • Hero Member
  • *****
  • Posts: 4955
Hex Cheats
« Reply #4 on: August 08, 2007, 07:02:37 PM »
Yes, that would help, although, it's only the map data section of the saved games. The section of code is shared between map loading and saved game loading, but there is additional code for saved game loading. We've never really bothered to figure out all of the saved game format. Much of it is just a memory dump of structures used in memory, and we don't know the memory format of many things. Granted, we do at least know the ordering in which various objects are saved/loaded. (But the info isn't posted outside of the OllyDbg .udd file, at least not yet).


At any rate, it really shouldn't be too hard to just search for the value you need to change, and edit that value. If there is more than one search result, it shouldn't take too long to narrow it down. Especially not if you have a few saved games to compare with.
 

Offline Brazilian Fan

  • Sr. Member
  • ****
  • Posts: 302
Hex Cheats
« Reply #5 on: August 09, 2007, 06:36:08 AM »
Oh, and assembly knowledge is essential  :heh:  

Offline BlackBox

  • Administrator
  • Hero Member
  • *****
  • Posts: 3093
Hex Cheats
« Reply #6 on: August 09, 2007, 06:51:07 PM »
Quote
Oh, and assembly knowledge is essential  :heh:
I think he just wants to go and change some bytes in a file. Sort of like what a trainer does (but with files on disk). You shouldn't need any assembly knowledge for that.

Offline Brazilian Fan

  • Sr. Member
  • ****
  • Posts: 302
Hex Cheats
« Reply #7 on: August 10, 2007, 06:31:44 AM »
Yea, but changing values randomly to see the results isn't a very good idea :P . He could take a look at the loading process  :D  

Offline Hooman

  • Administrator
  • Hero Member
  • *****
  • Posts: 4955
Hex Cheats
« Reply #8 on: August 10, 2007, 10:29:38 PM »
I've edited saved game files for countless games without ever looking at their code with a debugger/disassembler. It's simply not required for most simple edits. Unless the game uses a cryptic format or some kind of unknown compression (like the sheets vol) there is usually no need to resort to assembly.


The easiest way to edit saved game files, is to play, save a game, and write down the current value of what you want to change (like money), and then just search the saved game file for that value. Often you'll find exactly one place in the file with that value. If you find more than one, then you do this to a few saved game files and compare the search results. Usually that sort of thing won't move around in the file, at least not if you're always playing the same player (such as in singleplayer, when you're always the first player).


Sometimes you'll always have at least two possibilities. Like how money counters are made to move slowly. So there will be the actual amount you have, and then the current value displayed. Like how in C&C your money counter rolls towards your current value. If the value is stable, these two may be the same. Try editing the file to change them one at a time to see which is the real one, and which is the display one. (A backup of the saved game file is an especially good idea for this sort of thing. I once had a game delete a saved game file it thought was corrupt).

The bigger problem is if you don't find the value anywhere in the file. It could be the money is always a multiple of a certain value. In which case, divide by that value and search again. I think Warcraft II might have used that idea for the money in the gold mines. (Always a multiple of 100?).

It seldom gets more complicated than any of that. Although, if it does, there are techniques for the more comlicated ways too. Outpost 2 is simple though, in that it just stores the raw ore values into the file. A simple search and replace will do the job.


Btw, I've switched to HxD as my hex editor of choice now. I was having trouble loading large files under XVI32, due to it's use of virtual memory. It also seems to load the whole file when it was opened, which took a while for the larger ones. I don't have that issue with HxD. At any rate, either of the two can easily be used to edit ore in Outpost 2 saved game files. They're both free downloads. Just in case you don't feel like writing the dirt simple code to do the cheating yourself.
« Last Edit: August 10, 2007, 10:31:23 PM by Hooman »

Offline Brazilian Fan

  • Sr. Member
  • ****
  • Posts: 302
Hex Cheats
« Reply #9 on: August 12, 2007, 07:37:25 PM »
I remember now, used the same seek-'n-replace  :P technique to change some missile storage in F22-Raptor  :heh: