Home » PLAYER'S HQ 1.13 » JA2 Complete Mods & Sequels » Stracciatella Project (Platform Independent JA2) » Which version shall I use?
Which version shall I use?[message #251552] Fri, 14 May 2010 18:06 Go to next message
fuji is currently offline fuji

 
Messages:10
Registered:May 2010
Hi,

I'm back to JA2 after a few years and discover stracciatella... but I don't know which version to use: I found one version on http://tron.homeunix.org/ja2/ and another one on svn://tron.homeunix.org/ja2/trunk.

They are not the same though and I've different problems:
- on the http version the starting money isn't right (84472 more than supposed to)
- on the svn version the corpses disappear once they hit the ground.

I didn't play much yet since I'd like to know which version I should use.

Cheers guys.

Report message to a moderator

Private
Re: Which version shall I use?[message #251576] Fri, 14 May 2010 22:42 Go to previous messageGo to next message
bbun is currently offline bbun

 
Messages:74
Registered:April 2004
Location: Amsterdam
The SVN repository always contains the latest version (r7063 at the moment).

As for the corpses disappearing as the dead bodies hit the ground: I've seen this issue mentioned often, but only just realized I'm having the same problem in my game. I just never noticed (!)

Hopefully, this bug will be fixed soon.

Report message to a moderator

Corporal
Re: Which version shall I use?[message #251577] Fri, 14 May 2010 22:59 Go to previous messageGo to next message
mgl is currently offline mgl

 
Messages:255
Registered:December 2007
Location: France
It should have been fixed in summer 2009.

If the corpses are right in the official release 0.12.1 and wrong in svn, it may be because one or several ".jsd" files in your game data folder are in the wrong case. Most or all of them are in "$SGPDATADIR/data/tilecache" (SGPDATADIR is set in "config.default").

Since summer 2009, Tron's policy with data files is that they are in lower case, which wasn't the case in release "0.12.1". Convert them. I don't know if "$ make lowercase" still works.

All what I wrote doesn't apply on a case-insensitive OS like Windows.

*Edit*
On Unix, you can do something like that in the "tilecache" folder to convert your files:
tilecache$ for if in $(ls); do mv -f $if $(echo $if | tr [:upper] [:lower]); done

[Updated on: Sat, 15 May 2010 00:06] by Moderator

Report message to a moderator

Master Sergeant
Re: Which version shall I use?[message #251603] Sat, 15 May 2010 11:47 Go to previous messageGo to next message
bbun is currently offline bbun

 
Messages:74
Registered:April 2004
Location: Amsterdam
That fixed it, mgl. Thanks.
make lowercase

Does the job. You have to configure SGPDATADIR in your config.default though.

[Updated on: Sat, 15 May 2010 11:48] by Moderator

Report message to a moderator

Corporal
Re: Which version shall I use?[message #251611] Sat, 15 May 2010 15:34 Go to previous messageGo to next message
fuji is currently offline fuji

 
Messages:10
Registered:May 2010
Sorry guys, I think I swapped the versions: the svn version doesn't start with the correct amount, no problem with the corpses...

For lowercase I also tried 1.13, and there's a script in project/lowercase.sh (just for reference)

[Updated on: Sat, 15 May 2010 15:38] by Moderator

Report message to a moderator

Private
Re: Which version shall I use?[message #251628] Sat, 15 May 2010 18:59 Go to previous messageGo to next message
mgl is currently offline mgl

 
Messages:255
Registered:December 2007
Location: France
I don't see an obvious reason why your starting funds could be right in 0.12.1 and wrong in svn.

The values are different for each difficulty level: 45000 for easy, 35000 for medium and 30000 for hard. Can you tell the 3 you have?

Report message to a moderator

Master Sergeant
Re: Which version shall I use?[message #251629] Sat, 15 May 2010 19:35 Go to previous messageGo to next message
fuji is currently offline fuji

 
Messages:10
Registered:May 2010
Sure, I've got respectively:
129472
119472
114472

"Today's Other Deposits" is the correct value but I've a "Today's Debits" of 84472 for some reasons (in game, the debits actually subtract from my total my, they add just in that case).

Report message to a moderator

Private
Re: Which version shall I use?[message #251659] Sun, 16 May 2010 04:35 Go to previous messageGo to next message
bbun is currently offline bbun

 
Messages:74
Registered:April 2004
Location: Amsterdam
Strange. Could you tell us what operating system you are playing on? Since you grabbed the code from SVN, can we assume you compiled it yourself?

Report message to a moderator

Corporal
Re: Which version shall I use?[message #251680] Sun, 16 May 2010 15:00 Go to previous messageGo to next message
fuji is currently offline fuji

 
Messages:10
Registered:May 2010
I'm on Linux (Debian), and yes, I've compiled it myself.

Report message to a moderator

Private
Re: Which version shall I use?[message #251717] Sun, 16 May 2010 23:12 Go to previous messageGo to next message
mgl is currently offline mgl

 
Messages:255
Registered:December 2007
Location: France
I ran a new game with a debugger today. I saw no problem.

You probably played with that bug now. Did you notice something else wrong with the finances screen ?

Report message to a moderator

Master Sergeant
Re: Which version shall I use?[message #251884] Wed, 19 May 2010 18:02 Go to previous messageGo to next message
fuji is currently offline fuji

 
Messages:10
Registered:May 2010
No, I've no other problem than that one.

Report message to a moderator

Private
Re: Which version shall I use?[message #252001] Sat, 22 May 2010 00:13 Go to previous messageGo to next message
bbun is currently offline bbun

 
Messages:74
Registered:April 2004
Location: Amsterdam
I'm sorry to say, but I can't help out here...

If you're comfortable compiling and reading code, you could try and debug yourself?

Report message to a moderator

Corporal
Re: Which version shall I use?[message #252016] Sat, 22 May 2010 11:22 Go to previous messageGo to next message
lockie is currently offline lockie

 
Messages:3717
Registered:February 2006
Location: Scotland
Quote:
you could try and debug yourself?


Sounds like something a tramp should do Very Happy

Report message to a moderator

Captain

Re: Which version shall I use?[message #252019] Sat, 22 May 2010 11:39 Go to previous messageGo to next message
fuji is currently offline fuji

 
Messages:10
Registered:May 2010
Ok, I can try... shouldn't take more than ten years or so.

EDIT: can I ask you in which file a new game is initialized?

[Updated on: Sat, 22 May 2010 11:45] by Moderator

Report message to a moderator

Private
Re: Which version shall I use?[message #252039] Sat, 22 May 2010 23:02 Go to previous messageGo to next message
mgl is currently offline mgl

 
Messages:255
Registered:December 2007
Location: France
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.

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.

Report message to a moderator

Master Sergeant
Re: Which version shall I use?[message #252049] Sun, 23 May 2010 00:47 Go to previous messageGo to next 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
Re: Which version shall I use?[message #252106] Mon, 24 May 2010 00:17 Go to previous messageGo to next message
mgl is currently offline mgl

 
Messages:255
Registered:December 2007
Location: France
fuji
Does that mean stracciatella can run on a ppc mac? Had I known i would have bothered you way before.

I think the endiannes-independent port is not complete yet. You would have all the bytes coming from the data files swapped.

fuji
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.

The only money event you have is a type "0001h" (2 bytes MSB) at date "05DCh" (4 bytes MSB), the beginning of the game. It's your account being credited $45000. Your balance should be set to 0 when you start a new game, before the $45000 are added to it. I think it's enforced by a C++ exception thrown when the file "finances.dat" doesn't already exist. I don't remember clearly because it was last week, but I believe there is a call to memset() on the "LaptopSaveInfo" structure (I still don't remember its exact name) too to clear your balance and several other things even long before the exception is thrown.

Your balance manages to bet set to 84412 instead. As Gumpy says, "Doo doo doo doo doo doo doo doo". On the finances screen, today's debits are computed from your balance and all the other money events i.e only the $45000 credit and a negative debit of -84412 is guessed to match your balance.

If you can do it, try to see when your balance gets its strange value with a debugger. You should start by watching the finances initialization function in "Build/Laptop/Finances.cc". I don't remember its name, but it may be something simple like "InitFinances()". The variable you want to watch is "LaptopSaveInfo.iBalance" or something like that. If I remember well, the memset() call was done earlier in "Build/Laptop/Laptop.cc" and your balance should already bet set to 0 when you enter the function. Then the function will try to restore your balance value by reading the "finances.dat" file from your savegame, which you don't have because it's a new game. The default behaviour when the file doesn't exist should be to set your balance to 0. Try to print your balance value several time while the function is progressing...

Report message to a moderator

Master Sergeant
Re: Which version shall I use?[message #252146] Mon, 24 May 2010 15:48 Go to previous messageGo to next message
Luchs14 is currently offline Luchs14

 
Messages:14
Registered:July 2002
Location: Vienna
hello,



I was just thinking about unpacking Ja2 again and also would like to use the vanilla release.
It's just that I do not want to use the latest 1.13 versions or something, in my opinion it is much too easy compared to Ja2 1.0 - but there are some details I would like to have in the older versions, the original Ja2: is it somehow achievable to get the permission by the game to load a savegame (e.g. a quicksave) even while the enemy's turn is active in the moment? The original Ja2 does not allow this, but one may load savegames at any time in 1.13 - any ideas how to accomplish that?

Report message to a moderator

Private
Re: Which version shall I use?[message #252149] Mon, 24 May 2010 17:49 Go to previous messageGo to next message
Luchs14 is currently offline Luchs14

 
Messages:14
Registered:July 2002
Location: Vienna
and one more thing: obviously the sampling rate for the audio files has been changed, some sounds are now higher in pitch, I would prefer the old school way with original sounds, is there also some way to change this ..?

Report message to a moderator

Private
Re: Which version shall I use?[message #252151] Mon, 24 May 2010 18:09 Go to previous messageGo to next message
fuji is currently offline fuji

 
Messages:10
Registered:May 2010
Thanks mgl,
I'll try and have a look when I'll get some more time.

Report message to a moderator

Private
Re: Which version shall I use?[message #252178] Mon, 24 May 2010 23:31 Go to previous messageGo to next message
mgl is currently offline mgl

 
Messages:255
Registered:December 2007
Location: France
Luchs14
is it somehow achievable to get the permission by the game to load a savegame (e.g. a quicksave) even while the enemy's turn is active in the moment? The original Ja2 does not allow this, but one may load savegames at any time in 1.13

I think Tron won't change anything that he doesn't see as a bug.

Luchs14
And one more thing: obviously the sampling rate for the audio files has been changed, some sounds are now higher in pitch, I would prefer the old school way with original sounds, is there also some way to change this ..?

Several years ago, Tron found out that some sound samples were played at an incorrect rate. He fixed it. Now some of them sound better, like the Russian 5.45 I think, and some sound worse, like the .45 which sounds like a bottle of champagne would. The only way to change that is to change the code. The wrapper function for sounds is called "Play...JA2Sample()", if you want to look at it.

But the major change is that enemies climb roofs! It was seen as being disabled by mistake in Vanilla and is now enabled.

Report message to a moderator

Master Sergeant
Re: Which version shall I use?[message #252189] Tue, 25 May 2010 01:17 Go to previous messageGo to next message
Luchs14 is currently offline Luchs14

 
Messages:14
Registered:July 2002
Location: Vienna
hello,


thanks very much for the information. I just began a new game today, it seems harder again as it once was. But I haven't seen enemies climb roofs yet, however, nice that this is fixed, they did not do it at all in the original Ja2.

About loading savegames while an enemy's turn: I did not consider this as a bug, I just wanted to know how it may be possible. Surely there is some condition in the source which toggles the permission to load savegames while one is not at turn, I would like to change that for my personal use - I just don't know where exactly. Perhaps Tron could also consider this as a feature, as this does not affect gameplay.


Report message to a moderator

Private
Re: Which version shall I use?[message #252256] Tue, 25 May 2010 23:38 Go to previous messageGo to next message
mgl is currently offline mgl

 
Messages:255
Registered:December 2007
Location: France
Luchs14
About loading savegames while an enemy's turn: I did not consider this as a bug, I just wanted to know how it may be possible.

You can start by searching the keyboard shortcuts in "Build/Tactical/Turn_Based_Input.cc" to find the quick load wrapper function. Then look at bbun's patch to skip militia turns to have an idea of the place where to hook it.

Report message to a moderator

Master Sergeant
Re: Which version shall I use?[message #252452] Thu, 27 May 2010 23:14 Go to previous message
bbun is currently offline bbun

 
Messages:74
Registered:April 2004
Location: Amsterdam
Quickload during enemy turns:
http://www.ja-galaxy-forum.com/board/ubbthreads.php?ubb=showflat&Number=252451&#Post252451

Report message to a moderator

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


Current Time: Fri Jan 10 07:59:59 GMT+2 2025

Total time taken to generate the page: 0.02369 seconds