Difference between revisions of "DIPLOM.DAT"

From UFOpaedia
Jump to navigation Jump to search
m
m
Line 30: Line 30:
 
<tr><td>30 (0x1E)</td><td>Non zero (1 when game sets it) means that the country will sign pact at end of month</td></tr>
 
<tr><td>30 (0x1E)</td><td>Non zero (1 when game sets it) means that the country will sign pact at end of month</td></tr>
 
<tr><td>32 (0x20)</td><td>Unknown, fixed?, all values multiples of 5</td></tr>
 
<tr><td>32 (0x20)</td><td>Unknown, fixed?, all values multiples of 5</td></tr>
<tr><td>34 (0x22)</td><td>Funding Cap (ranges 2k to 10k, equates to 2-10M)</td></tr>
+
<tr><td>34 (0x22)</td><td>Funding cap (ranges 2k to 10k, equates to 2-10M)</td></tr>
 
</table>
 
</table>
 
</center>
 
</center>

Revision as of 22:22, 1 March 2007

This file contains the information about how much money the various nations are giving you in funding, both current and for the graph, among other things. It is 576 bytes long, split into 16 records of 36 bytes long, one for each country. The record start points, by country are:

Offset
dec (hex)
CountryOffset
dec (hex)
Country
0 (0x0000)USA 288 (0x0120)Japan
36 (0x0024)Russia 324 (0x0144)India
72 (0x0048)UK 360 (0x0168)Brazil
108 (0x006C)France 396 (0x018C)Australia
144 (0x0090)Germany 432 (0x01B0)Nigeria
180 (0x00B4)Italy 468 (0x01D4)South Africa
216 (0x00D8)Spain 504 (0x01F8)Egypt
252 (0x00FC)China 540 (0x021C)Canada

Within each record, their are several pieces of information, they are all signed 2 byte numeric fields:

Offset
dec (hex)
Meaning
0 (0x00)Pointer to country name in string table (starts at 602 (0x025A), increase 1 each record)
2 (0x02)Satisfaction Rating, 3 is happy, 2 is average, 1 is unhappy, 0 will sign pact/stop funding
4 to 26 (0x04 to 0x1A)Funding values (in $k) starts with Jan, runs to Dec
28 (0x1C)Funding change (in $k)
30 (0x1E)Non zero (1 when game sets it) means that the country will sign pact at end of month
32 (0x20)Unknown, fixed?, all values multiples of 5
34 (0x22)Funding cap (ranges 2k to 10k, equates to 2-10M)

Note that Satisfaction rating does not seem to drop to 2 any month a country doesnt increase funding, so not sure of the extra relationship here, but 0 always results in them stopping funding at the end of the month (I think you still get paid the one last time, as you are always seeing next months budget effectively). Possibly happy countries can randomly decide to not increase funding anyway. Setting this value to 2 or 1 before month end doesnt seem to affect the funding change either, setting it 0 will though, at least when you have a good score.

Speculative: bytes 32 to 33 are what is used to base the starting Funding on, it initially randomly gets a value from 100-200% of the value listed for each country. For game balance reasons it then scales the entire result so that it comes to approximately 6 million, with an error from rounding probably, this can sometimes push a country slightly higher or lower than the original range would have allowed it to. Changing these values seems to have no in game effect anyway.

Country32 to 33 (0x20 to 0x21)Funding Cap Country32 to 33 (0x20 to 0x21)Funding Cap
USA 60010000kJapan 40010000k
Russia 2308000kIndia 1505000k
UK 2407000kBrazil 3004000k
France 3208000kAustralia 2805000k
Germany 2509000kNigeria 1802000k
Italy 1606000kSouth Africa 3103000k
Spain 1405000kEgypt 1602000k
China 2457000kCanada 1104000k

According to these values, the maximum theoretical funding you can get is 95M per month, if you can max out all 16 countries budgets.

Note that you can manually insert a monthly funding number into the current month for any country, and it will award you that amount at the end of the month. If funding for that country increases (changes?) it will apply the funding cap to next months budget, and then it will remain at the cap from then on (unless you do badly and it drops), so to permanently increase funding beyond these limits the cap has to be modified. If funding is static for that month, it just copies the value across without applying the funding cap.