Difference between revisions of "DIPLOM.DAT"

From UFOpaedia
Jump to navigation Jump to search
(Putting in some basic info, needs cleaning up soon)
 
(added more value meanings to 0x02 and 0x00)
Line 31: Line 31:
 
<th {{StdDescTable_Heading}}>'''Offset<br/>dec (hex)'''</th><th {{StdDescTable_Heading}}>'''Meaning'''</th>
 
<th {{StdDescTable_Heading}}>'''Offset<br/>dec (hex)'''</th><th {{StdDescTable_Heading}}>'''Meaning'''</th>
 
</tr>
 
</tr>
<tr><td>0 (0x00)</td><td>ID of some sort? Starts at 90, increase 1 for each country</td></tr>
+
<tr><td>0 (0x00)</td><td>Pointer to country name in string table (starts at 90 (0x5A), increase 1 each record) </td></tr>
 
<tr><td>1 (0x01)</td><td>Unknown, 2        </td></tr>
 
<tr><td>1 (0x01)</td><td>Unknown, 2        </td></tr>
<tr><td>2 (0x02)</td><td>Allegiance Setting, 3 at start/normally, 0 if signed pact  </td></tr>
+
<tr><td>2 (0x02)</td><td>Satisfaction Rating, 3 is happy, 2 is average, 1 is unhappy, 0 will sign pact/stop funding   </td></tr>
 
<tr><td>3 (0x03)</td><td>Unknown, 0      </td></tr>
 
<tr><td>3 (0x03)</td><td>Unknown, 0      </td></tr>
<tr><td>4 to 27 (0x04 to 0x1B)</td><td>12 x 2 byte pairs, Funding values (in $k) starts with Jan, runs to Dec</td></tr>
+
<tr><td>4 to 27 (0x04 to 0x1B)</td><td>12 x signed 2 byte pairs, Funding values (in $k) starts with Jan, runs to Dec</td></tr>
 
<tr><td>28 to 29 (0x1C to 0x1D)</td><td>2 byte value, Funding change (in $k) </td></tr>
 
<tr><td>28 to 29 (0x1C to 0x1D)</td><td>2 byte value, Funding change (in $k) </td></tr>
 
<tr><td>30 to 31 (0x1E to 0x1F)</td><td>Unknown, maybe 2 byte, nearly always 0, can be 1</td></tr>
 
<tr><td>30 to 31 (0x1E to 0x1F)</td><td>Unknown, maybe 2 byte, nearly always 0, can be 1</td></tr>
<tr><td>32 to 33 (0x20 to 0x21)</td><td>Unknown, fixed?, probable 2 byte value - all values multiples of 5</td></tr>
+
<tr><td>32 to 33 (0x20 to 0x21)</td><td>Unknown, fixed?, probable signed 2 byte value - all values multiples of 5</td></tr>
<tr><td>34 to 35 (0x22 to 0x23)</td><td>2 byte, funding cap (ranges 2k to 10k, equates to 2-10M)</td></tr>
+
<tr><td>34 to 35 (0x22 to 0x23)</td><td>signed 2 byte, funding cap (ranges 2k to 10k, equates to 2-10M)</td></tr>
 
</table>
 
</table>
 +
 +
Note: Changing 0x00 will allow you to be funded by 'Alien Base' on the graphs and funding screens (change to 0x33 for that), and such.
  
 
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.
 
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.

Revision as of 08:19, 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)
Country
0 (0x0000)USA
36 (0x0024)Russia
72 (0x0048)UK
108 (0x006C)France
144 (0x0090)Germany
180 (0x00B4)Italy
216 (0x00D8)Spain
252 (0x00FC)China
288 (0x0120)Japan
324 (0x0144)India
360 (0x0168)Brazil
396 (0x018C)Australia
432 (0x01B0)Nigeria
468 (0x01D4)South Africa
504 (0x01F8)Egypt
540 (0x021C)Canada

Within each record, their are several sections of information:

Offset
dec (hex)
Meaning
0 (0x00)Pointer to country name in string table (starts at 90 (0x5A), increase 1 each record)
1 (0x01)Unknown, 2
2 (0x02)Satisfaction Rating, 3 is happy, 2 is average, 1 is unhappy, 0 will sign pact/stop funding
3 (0x03)Unknown, 0
4 to 27 (0x04 to 0x1B)12 x signed 2 byte pairs, Funding values (in $k) starts with Jan, runs to Dec
28 to 29 (0x1C to 0x1D)2 byte value, Funding change (in $k)
30 to 31 (0x1E to 0x1F)Unknown, maybe 2 byte, nearly always 0, can be 1
32 to 33 (0x20 to 0x21)Unknown, fixed?, probable signed 2 byte value - all values multiples of 5
34 to 35 (0x22 to 0x23)signed 2 byte, funding cap (ranges 2k to 10k, equates to 2-10M)

Note: Changing 0x00 will allow you to be funded by 'Alien Base' on the graphs and funding screens (change to 0x33 for that), and such.

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
USA 60010000k
Russia 2308000k
UK 2407000k
France 3208000k
Germany 2509000k
Italy 1606000k
Spain 1405000k
China 2457000k
Japan 40010000k
India 1505000k
Brazil 3004000k
Australia 2805000k
Nigeria 1802000k
South Africa 3103000k
Egypt 1602000k
Canada 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.