View Full Version : ping: 3ric
nilodor
09-08-2003, 09:23 PM
Is there anyway to edit city data in FOF4? Is it stored the same way as the player data?
Of course it's possible. Just a matter of how you do it.
The city data is stored in a *.fga file, somewhere towards the end. If you can do a string search with a hex editor you can find a string "CitiesDataFile04", which marks the beginning of that block of data.
That block ends when you come upon the string "PSeasoDataFile04", and it consists of chunks 46 bytes long, the number of chunks is the same as the number of cities in the FOF4 hcnames.dll file (not the TCY one, it's much much larger). The order of the cities is the same.
The bytes have these values:
Data Type Byte Obs
Population short 2 *10000
Growth short 2 % (-100 & /10)
AvgIncome short 2 *100
PovertyLevel short 2 % (/10)
CompetitionEntrtainmnt short 2 %
SeptemberHighTemp short 2
SeptemberLowTemp short 2
SeptemberHumidity short 2
DecemberHighTemp short 2
DecemberLowTemp short 2
DecemberHumidity short 2
90DegreesDaysPerYear short 2
SnowDaysPerYear short 2
StormDaysPerYear short 2
Elevation short 2 feet
short 2
short 2
short 2
short 2
short 2
DesireNewTeam short 2 %
short 2
short 2
46
Hope everything's clear so far.
cuervo72
09-09-2003, 08:56 AM
Is there anything for city coordinates, for determining "there are x teams within a radius of x miles"?
Maybe one or two of the unknown variables? I haven't done any further research to find out.
vBulletin v3.6.0, Copyright ©2000-2026, Jelsoft Enterprises Ltd.