Difference between revisions of "User talk:Pi Masta"

From UFOpaedia
Jump to navigation Jump to search
(purchase.dat and geoscape.exe notes)
 
m (Pardon my Wiki-noobness, putting info on my User Page)
Line 1: Line 1:
==Base Items store space==
 
Currently the [[General Stores]] page lists the space needed for holding items. I couldn't find anywhere here where these values were found, so I assumed they were gathered empirically. However I knew they had to be stored somewhere together. Also I figured that they would be stored as simple integers and not some floating point number. I noticed that each 'size' would become an integer if you multiplied it by 10, so from that ammo clips of size 0.1 would be stored as 1.
 
  
I dug into GEOSCAPE.EXE and found the pattern of sizes like that listed on the stores page (offset 0x5DB34). However it different some areas, namely the HWP ammo was not with the actual HWPs. Also interesting was that there were gaps of 0's between some items, usually from the different groups like craft weapons, to agent weapons, to alien weapons, etc.
 
 
I got to looking at [[PURCHASE.DAT]] as this seemed to be the only logical place for size information to be. Of particular interest was the so called 'sort' order offset. I really doubted the programmers devoted a byte to help 'sort' the information for display, but given what could be gleaned from that file alone it was a good guess. I'm pretty sure it's an index (which technically does sort it) to at least one array (I surmise others below). I used some python scripts to read in a Purchase.dat file and a hex editor to find the pattern in geoscape.exe.
 
 
Simply by placing the values in an array and having each item in purchase.dat use it's 'sort' value to fetch the record in the array, everything matched up, well almost. The plasma beam and Fusion Ball Launcher were backwards (plasma had 20 space while fusion had 12). I almost gave up but then I thought what if the order is wrong? There isn't much info linking to what item a record is in that file, but I looked at the sell price. Turns out I was right, the sell price of the Fusion Ball Launcher is well known as it's the second runner up for [[Manufacturing Profitability]].
 
 
===Other Possibilities===
 
These items have to index to English.dat somewhere (probably in the executable). My guess is that it is near the array that I found. There is probably other information such as the craft weapon statistics. The gaps between these indexes might make it possible to add new items to the game as well.
 

Revision as of 00:02, 6 March 2007