webspace hosting reseller hosting| web hosting| blog| forum| dating| free hosting| openhost| report abuse
Fax to Email

Unlimited Faxes, No Fees, Dedicated Phone Number

Free Website Templates

Reverse Engineering CotN

(Internal Beancounting)

In general, languagetext.txt is your friend. It has the entire on-line help file contained in it (So you don't need to start the game to check out something from the manual, just look there) and it has the integer value of every text string in the game.

The downside is the internationalization. You can't just search through the .exe for a given text string like "Townhomes". Instead, you have to go to languagetext.txt, find the integer value of that string, convert that to from base 10 to hexidecimal, then search on that value in the .exe.

There's all sorts of juicy files in data/db that look interesting.

dbHousingDecay
dbBirthRateModifiers
dbEducation
dbFarming
dbfinishedgoods

but so far even what should be straight forward files like
dbPalaceEnhancements have not been decoded in meaning by the hex editor crowd yet.

For example, the Palace pool is token value "43129" which is a879 in hex.

So off you go searching for a879. You find it a few places in the executable.  At least I don't see it where I expected to see it, in dbPalaceEnhancements.

So that's where I'm stuck at the moment.

I made friends with someone who creates secondary market programs for car engines that does this stuff all the time. He pointed me to the IDA disassembler

Using IDA I came across this bit:
.rdata:008D78C8 aTownhouseDScor:                        ; DATA XREF: .text:0059764Do
.rdata:008D78C8                 unicode 0, <Townhouse %d score components: common %g, lu>
.rdata:008D78C8                 unicode 0, <xury %g, servants %g, enhancements %g>

Exactly what we expected: Townhome status is Common Goods, Luxury Goods, Housing Enhancements and Servants. Believe "servants" really are farmers. As opposed to those other servants.