Home » PLAYER'S HQ 1.13 » JA2 Complete Mods & Sequels » Stracciatella Project (Platform Independent JA2) » Which version shall I use?
Re: Which version shall I use?[message #252049] Sun, 23 May 2010 00:47 Go to previous messageGo to previous message
fuji is currently offline fuji

 
Messages:10
Registered:May 2010
mgl
I think it's "Build/Strategic/Game_Init.cc"
Look for "cash" in this file to find where the starting funds are allocated.

The "Finances" screen and most of the money functions are in "Build/Laptop/Finances.cc".
Look for function names like "GetTodaysBalance()" to find the variable in which your money is stored. Its name is something like "LaptopSaveInfo.Balance".

All the money changes are written in the file "finances.dat" somewhere in "$HOME/.ja2/data/...". I think it's "$HOME/.ja2/data/temp/finances.dat" but I'm not sure. You can see this file only when you are playing. It's removed when you leave the game. Today's debits are guessed from all the other values written in this file. When you start a new game, I think its size is 18 bytes. The first 4 and last 4 bytes are your current money at this point.

Cheers, I'll have a look and see if I can understand


mgl

I already ran a debugger on all of this and didn't notice anything interesting except (for info only) that all the read/write functions depend on your processor's endianness while I was wrongly led to think that they were endianness-independent, guessing from their names. But it's not related to your problem.

Does that mean stracciatella can run on a ppc mac? Had I known i would have bothered you way before.


EDIT: here is my finance.dat: C0 F9 01 00 01 00 DC 05 00 00 C8 AF 00 00 C0 F9 01 00 (new game, novice)
So yeah, my starting money (129472) is the first and last 4 bytes and the actual 45000 are bites 11 and 12.

[Updated on: Sun, 23 May 2010 10:19] by Moderator

Report message to a moderator

Private
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: can ja2 stracciatella support other format music???
Next Topic: [Patch] allow quickload during enemy turns
Goto Forum:
  


Current Time: Sun Jan 26 21:56:57 GMT+2 2025

Total time taken to generate the page: 0.00958 seconds