Questions about modding the exe
Posted: Tue Oct 25, 2005 2:41 pm
Hallo everbody,
I have read most of the posts here, and I would like to ask a few questions about the process of modding the game.
Firstly, I assume that the exe allocates a chunk of memory for the game status, and this chunk is what gets saved out when you save your game. Under this assumption, that chunk of memory has to be initialised when a new game starts, and gets filled in with further data as the game progresses. The values must come from the executable. So this imples some basic correspondence between known patterns of values (from the save file format) and patterns of values buried in the exe.
How do you go about identifying the bytes in the exe which control the factors you want to change? Dmitry's OCL made finding table entries for various data points (techs, buildings, equipment etc) very easy, but you seem to have moved well beyond that.
How do you handle the switches? Is it a jump to a command line parser which then modifies the exe in memory? Or have you actually got source code for the v1.40 build?
I can read through the disassembly of the exe (although my x86 is very rusty) but without a symbol table it's extremely hard to trace which procedures are responsible for which calculations. If you are not working from source code, how are you modifying the game's procedures?
And finally, can I help? I'm not sure what skills I could offer, but I would like to try. What are the main issues waiting to be resolved? (OK, I expect that's a BIG question...)
I reinstalled MoO2 a few days ago after my son asked me what the best game ever was. No contest there! I Googled around, and was delighted to find that it still has an active and intelligent following. Siron helpfully pointed me here from his blog. I still have all the stuff I downloaded years ago - I'm checking through it (my filing was a bit chaotic back then) to see if any of it has relevance today. Once that's out of the way, I'll start looking more seriously at the correspondences between the codespec and the disassembly.
I have read most of the posts here, and I would like to ask a few questions about the process of modding the game.
Firstly, I assume that the exe allocates a chunk of memory for the game status, and this chunk is what gets saved out when you save your game. Under this assumption, that chunk of memory has to be initialised when a new game starts, and gets filled in with further data as the game progresses. The values must come from the executable. So this imples some basic correspondence between known patterns of values (from the save file format) and patterns of values buried in the exe.
How do you go about identifying the bytes in the exe which control the factors you want to change? Dmitry's OCL made finding table entries for various data points (techs, buildings, equipment etc) very easy, but you seem to have moved well beyond that.
How do you handle the switches? Is it a jump to a command line parser which then modifies the exe in memory? Or have you actually got source code for the v1.40 build?
I can read through the disassembly of the exe (although my x86 is very rusty) but without a symbol table it's extremely hard to trace which procedures are responsible for which calculations. If you are not working from source code, how are you modifying the game's procedures?
And finally, can I help? I'm not sure what skills I could offer, but I would like to try. What are the main issues waiting to be resolved? (OK, I expect that's a BIG question...)
I reinstalled MoO2 a few days ago after my son asked me what the best game ever was. No contest there! I Googled around, and was delighted to find that it still has an active and intelligent following. Siron helpfully pointed me here from his blog. I still have all the stuff I downloaded years ago - I'm checking through it (my filing was a bit chaotic back then) to see if any of it has relevance today. Once that's out of the way, I'll start looking more seriously at the correspondences between the codespec and the disassembly.