Hello all,
it's been years since this beloved game came out and I am sure, that many moved on. For those like me, who still play end enjoy CotN and are maybe even interested in modifying the game, I want to share my insights into manipulation the game's core mechanics bymodifying dat files.
For a very long time, there have only been 2 mods, of which I know, doing the same. And a lot of frustrated questions on how to mod those nasty dat files, as they are not readable nor understandable easily.
So here are my experiences so far:
You can change a lot by editing the right numbers in the right places. This is a painful and time consuming process!
To find out which value corresponds to which action in game, you have to play some trial and error. Change some values and start the game, look out for changes and repeat.
In my opinion, thebest strategy is the following:
1) Get an idea of what you want to change in game - f.e. brick costs of buildings.
2) look at the dat files in the "db" folder in your game-directory and try to find out by their names, which file could include these values - f.e. buildings.dat
3) Open the dat file using a hex-editor. This is the only working method for me - there simply isn't a way to make the files readable otherwise.
4) Look out for hex values, which resemble decimal values corresponding to the values in game - f.e. "25" is the brick cost for building a school in decimal. This means "0F" in hex. There are 13 "0F" values in buildings.dat.
5.) So one of this 13 values of "0F" corresponds to the brick costs of building the school. There are other buildings with the same costs. To identify the correct one, change some of the 13 "0F" values with unique and easy to identify values, like
Hex: Decimal:
DC 220
DD 221
DE 222
DF 223
C8 200
Those are the ones I used. They don't appear to be used otherwise in the dat file and are easy to identify in game.
6) If you changed the values, fire up the game and look at the construction menu. When your school building suddenly costs f.e. 221 bricks to build, you know that "DD" is the value storing the building costs of the school. Repeat this several times until you find the correct value. You can easily find out the building costs of other building using this method.
Be sure to write down you findings and share them with us here!
What I could achieve so far:
- changing the building costs of various buildings and monuments, even adding new resource costs to monuments like food, which were not part of the original building process.
- changing the costs of upgrading your palace/ palace enhancements
- changing the number of farmhouses supported by palace and townhouses
I am sure that there are many more things to discover.
I am really interested to see, if there is any response to this thread and if there are other people around, still playing this game and maybe even interested in modding it.
Please check outmy blog for other mods and news about modding CotN (changing buildings models and enriching them f.e.) or giving your game a modern look using post processing.
Best Regards
Horus
it's been years since this beloved game came out and I am sure, that many moved on. For those like me, who still play end enjoy CotN and are maybe even interested in modifying the game, I want to share my insights into manipulation the game's core mechanics by
For a very long time, there have only been 2 mods, of which I know, doing the same. And a lot of frustrated questions on how to mod those nasty dat files, as they are not readable nor understandable easily.
So here are my experiences so far:
You can change a lot by editing the right numbers in the right places. This is a painful and time consuming process!
To find out which value corresponds to which action in game, you have to play some trial and error. Change some values and start the game, look out for changes and repeat.
In my opinion, the
1) Get an idea of what you want to change in game - f.e. brick costs of buildings.
2) look at the dat files in the "db" folder in your game-directory and try to find out by their names, which file could include these values - f.e. buildings.dat
3) Open the dat file using a hex-editor. This is the only working method for me - there simply isn't a way to make the files readable otherwise.
4) Look out for hex values, which resemble decimal values corresponding to the values in game - f.e. "25" is the brick cost for building a school in decimal. This means "0F" in hex. There are 13 "0F" values in buildings.dat.
5.) So one of this 13 values of "0F" corresponds to the brick costs of building the school. There are other buildings with the same costs. To identify the correct one, change some of the 13 "0F" values with unique and easy to identify values, like
Hex: Decimal:
DC 220
DD 221
DE 222
DF 223
C8 200
Those are the ones I used. They don't appear to be used otherwise in the dat file and are easy to identify in game.
6) If you changed the values, fire up the game and look at the construction menu. When your school building suddenly costs f.e. 221 bricks to build, you know that "DD" is the value storing the building costs of the school. Repeat this several times until you find the correct value. You can easily find out the building costs of other building using this method.
Be sure to write down you findings and share them with us here!
What I could achieve so far:
- changing the building costs of various buildings and monuments, even adding new resource costs to monuments like food, which were not part of the original building process.
- changing the costs of upgrading your palace/ palace enhancements
- changing the number of farmhouses supported by palace and townhouses
I am sure that there are many more things to discover.
I am really interested to see, if there is any response to this thread and if there are other people around, still playing this game and maybe even interested in modding it.
Please check out
Best Regards
Horus