Editing Prices For Stuff
Posted 16 August 2006 - 01:01 AM
So I tried it, and it worked!
It even shows the new order in the UFOpaedia...but in the base buy/sell, transfer, and equip craft screens, it still sez AP ammo for the first ammo slot...so I changed the order of the ammo labels in ENGLISH.DAT, and now it even labels them properly!
But there is still 1 little problem...the prices are still the same as before the edit. Now I realize that this isn't a major deal, probably not amounting to more than $10000 over the course of the entire game...but I do use these guns through the entire game (if not on the aliens, then on the terrain!!), and it irks me...
So, does anyone know where the prices for stuff you can buy/sell are located? Failing that, any ideas on how they would be stored? (as some prices are in excess of 65K, would the game use three bytes to store them? or just use two bytes and multiply by 10?)
Any insights or informed opinions welcomed...
Posted 16 August 2006 - 07:05 AM
These values are in the geoscape.exe portion of the game.
I realise that 3,000 will probably show up elsewhere, so look for it and try to match it up against the selling price of $2,250 (0x08 ca (i.e. ca 08 (202, 8))), which should be adjacent if not nearby the purchase price.
Once you've found this, you should be able to spot the other items as well.
edit: If I'm mistaken, and they're only stored as 32-bit integers (4 bytes), just pad your numbers with a few extra 0's accordingly.
Edited by NKF, 16 August 2006 - 07:10 AM.
Number of members: 1
Posted 19 August 2006 - 10:29 AM
PURCHASE.DAT, located in your savegame directory, contains the buying and selling prices for all items in the game...but only for that savegame. If you start a new game, it will have the default values (pulled, I assume, from GEOSCAPE.EXE, which is why I wanted to mod them there...)
In any case, this allows me to modify the prices for the respective ammos back to their proper values...at least for that game (the other changes I made, to OBDATA.DAT, ENGLISH.DAT, and ENGLISH2.DAT, are global changes that WILL effect new games...so I have to mod PURCHASE.DAT every time I start a new game to get the right prices for the changed ammos...but thats not too often, I'll just have to remember to do it...)
I'll keep trying to find the values in GEOSCAPE.EXE, when the mood takes me, but for now, I've fixed my problem, so I think I'll play the game instead
I did do a fair amount of work disecting the PURCHASE.DAT file, which had no entry in the XCom Wiki, so I added one
P.S. For those who might have wondered, prices over $65K are stored as three bytes = 24 bits = ~16.7M possible values, or ~8.4M if its a signed integer...plenty enuff for any prices in XCom!