Mods Repo Gear Shop JAGalaxy.com FB Page IRC Channel

Who's Online
6 registered (smeagol, Hanakin, AnotherWorld, 3 invisible), 23 Guests and 32 Spiders online.
Key: Admin, Global Mod, Mod
Topic Options
Rate This Topic
#300758 - 02/03/2012 JA2 git repository available

Misanthropos
private 1st class
Registered: 07/10/2009
Posts: 13
Hi Bearpitters!

Some time ago I added a patch for trons last SVN tree, fixing
a bug with the shopkeepers money (if you transfered it directly to the banks account).

I don't have the time to continue his development, at least not the
extend he had in mind (completely objectoriented), but I do like to fix
some bugs and I like to share those with you.

Most likely I am going to fix some more bugs in the future.
I'd be happy to merge bug fixes from YOU too widegrin

Therefore I offer a git repository for those of you interested.

To just see and/or download the tree you could use this:
http://yeti.homeip.net/gitweb/

To access it via git however you would need to supply me with
a public ssh key and a username.
I'd also be interested in pull requests, if you fixed a bug.

Here is how you'd get the tree:

git clone gitolite@yeti.homeip.net:ja2

cheers

Misanthropos


Top
#301046 - 05/03/2012 Re: JA2 git repository available [Re: Misanthropos]

mgl

master sgt
Registered: 29/12/2007
Posts: 281
Loc: France
I remember your patch. I think it kept the now dead code to remove the cash from the mouse pointer. The original code was never reached because of a lost parent screen id. You removed the cash from the mouse pointer in another way but kept the unreachable code.

I'm myself inactive on stracciatella and I think most of the old coders are too (bbun, Mythrell, sunshine...). sunshine might have some unreleased bug fixes that could interest you.
Top
#301152 - 06/03/2012 Re: JA2 git repository available [Re: mgl]

Misanthropos
private 1st class
Registered: 07/10/2009
Posts: 13
Hi there!

Thank you for your hints - I applied some fixes you and sunshine were talking about in the shopkeeper money issue thread.

I did not know of any parent windows and to me it looks like there is none. Can you point me to this unused code you mentioned? The patch works just nicely since nowhere else that money item is handled after the money transfer.

There is however another issue no so obvious to see but maybe related to the same problem. If you, for example buy cermic plates from a shopkeeper and apply them directly to you armor... the game crashes normally.

Glad to see some interest ;-)
Maybe I am going to have an Android phone - the patches applied to that tree would be interesting aswell.

cheers

Misanthropos
Top
#301169 - 06/03/2012 Re: JA2 git repository available [Re: Misanthropos]

mgl

master sgt
Registered: 29/12/2007
Posts: 281
Loc: France
Originally Posted By: Misanthropos
I did not know of any parent windows and to me it looks like there is none. Can you point me to this unused code you mentioned?

Well, the term is not "parent window" but "current screen", in the global guiCurrentScreen variable.

I explained the bug in the "Bug in shopkeeper interface" thread here. I copy and paste my message from this thread for convenience:
Originally Posted By: mgl
Back to the topic, on the "deposit money" problem in the shopkeeper interface, the function "EndItempointer()" has the code to manage it (I don't remember in which file it is). The code is activated if the current screen ("guiCurrentScreen" variable) is "SHOPKEEPER_INTERFACE_SCREEN". Unfortunately, the "current screen" is the Yes/No message box which asks if you really want to deposit money. When the screens were managed with flags, a memory of the shopkeeper interface existed there and the code tested it rather than the current screen.

According to my message, there must be an "if (guiCurrentScreen == SHOPKEEPER_INTERFACE_SCREEN)" statement in the EndItemPointer() function which deletes the money on the mouse pointer. The dead code is there because the test can never be true because the yes/no message box changed the value of guiCurrentScreen to its own id.

I didn't check the code to see if it's possible, but a lazy fix would be to try to set guiCurrentScreen to SHOPKEEPER_INTERFACE_SCREEN just before the call to the EndItemPointer() function, to cancel the change done by the message box, and set it back to its original value just after.

A more elaborated fix would be to give a unique screen id to the "Do you really want to deposit money" yes/no message box created by the shopkeeper interface and use this unique id in the EndItemPointer() function. Screen ids are important now that Tron removed the bitmask value which managed the screens before. But an id like "generic yes/no message box" is totally useless. Moreover, the useful id of its parent screen is lost with the new system.
Top
#301495 - 11/03/2012 Re: JA2 git repository available [Re: mgl]

Misanthropos
private 1st class
Registered: 07/10/2009
Posts: 13
The "Do you really want to deposit money" question is superfluous if not disturbing. Another approach could be to just add the money to the account and destroy the moving object, since you can always get money back at any time.
It would ease the fix for the shopkeeper but could still be a problem on other issues...

Any inputs on that idea?

Misan
Top
#301991 - 19/03/2012 Re: JA2 git repository available [Re: Misanthropos]

civ
master sgt
Registered: 13/02/2006
Posts: 303
Hi,

I am working on a bug-fixing, exploit-disabling, atmosphere-enhancing mini-mod based on stracciatella from time to time. Lately, I have activated air strikes, which has to be tested with a complete playthrough sometime. I do not keep track of all my bug-fixes. However, I remember a problem with money deposit in the last waltnut-version. I am sure, I have done something about that. To be sure, You could tell me how to reproduce the bug, so I can check it with my current executable. I upload or send the code anywhere You tell me, as long as I do not need to provide additional information or install software. I know, I might not be able to complete my mod. Some things would be a pitty to be lost.
_________________________
civ
Top
#304029 - 29/04/2012 Re: JA2 git repository available [Re: civ]

selaux
Civilian
Registered: 29/04/2012
Posts: 1
Hi,

What about moving this repository to GitHub. It's most certainly a more public place, has a bugtracker and engages developers to contribute. This would make it possible to reenable stracciatella development, which is kind of on ice at the moment. I would do it myself, but I'm not a C developer.

selaux
Top
#304078 - 30/04/2012 Re: JA2 git repository available [Re: selaux]

Misanthropos
private 1st class
Registered: 07/10/2009
Posts: 13
Hi there!

I did not have a GitHub account, but selaux has a point...

You can find the code on GitHub now too:

https://github.com/misanthropos/ja2

@sunshine: to reproduce the moneykeeper bug just go to any shopkeeper, sell something, and place the money directly to the dollar sign for the bank. You will notice the money is still a moving item and you can repeat adding that ammount to the bank repeatedly. I fixed that too, but it is not a good solution.

The problem still exists with other items at shopkeepers.... e.g. you can crash the game by going to Franz, buy some ceramic plates and still in the shopkeepermenu add them to you armor...

There is one other nasty bug: if a blood tiger steps on a mine and dies in combat mode, the game stay in a loop forever.... - I can supply a savegame if someone wants to fix that. This event is never handled at all in the game code....

cheers

Misan









Edited by Misanthropos (30/04/2012)
Top
#304089 - 30/04/2012 Re: JA2 git repository available [Re: Misanthropos]

civ
master sgt
Registered: 13/02/2006
Posts: 303
The money bug is definitely fixed in my exec, without remainders. This must be one of the first things I have done, before any log.

The mines are nasty! I have fixed the continuation of time without sight-check for when a horde of red shirts approaches your defence through a well place mine field. They used to end up in the midlle of the entrenchment, when the explosion animation had finished - not quite the point.

The bloodcat issue is new to me. I somewhat try to avoid ambushes and seldomly get the chance to fight them, even more rarely with mines. I put it on my list.
_________________________
civ
Top
#304466 - 06/05/2012 Re: JA2 git repository available [Re: civ]

Misanthropos
private 1st class
Registered: 07/10/2009
Posts: 13
sunshine, can you supply me with your modifications? maybe you like to upload your source to github aswell?

pls check your private messages - i left you my email, if you wish to send me the code privately.

cheers

Misan
Top
#304475 - 06/05/2012 Re: JA2 git repository available [Re: Misanthropos]

civ
master sgt
Registered: 13/02/2006
Posts: 303
You should have got mail. It is a huge file, so please notify me, if it is stuck.
_________________________
civ
Top
#305257 - 28/05/2012 Re: JA2 git repository available [Re: Misanthropos]

civ
master sgt
Registered: 13/02/2006
Posts: 303
Hi,

I have uploaded my messy code. Here You are: https://github.com/hb029/JA-2-Stracciatella

GitHub seems to be a great opportunity to work somewhat more professionally. I wonder whether You can merge Your code with mine now? Automatically? I am a newbie to subversion systems. My logging is distributed over FIXME and Changelog as You will see.
_________________________
civ
Top
#305369 - 30/05/2012 Re: JA2 git repository available [Re: civ]

bnolsen
private
Registered: 21/05/2012
Posts: 5
checking in the executables and object files isn't a good idea. you want to remove those.
Top
#305391 - 30/05/2012 Re: JA2 git repository available [Re: bnolsen]

civ
master sgt
Registered: 13/02/2006
Posts: 303
Thanks for the hint. The repository is more light-weight now.
_________________________
civ
Top
#305467 - 01/06/2012 Re: JA2 git repository available [Re: civ]

bnolsen
private
Registered: 21/05/2012
Posts: 5
there seem to be some serious bugs in this version, esp on strat screen. It seems in some cases the doctor/patient flip. Additionally my character in the first slot was unable to become a patient or select repair. There were other small bugs but i don't recall them offhand. Maintenace is fun isn't it?
Top
#305479 - 01/06/2012 Re: JA2 git repository available [Re: bnolsen]

civ
master sgt
Registered: 13/02/2006
Posts: 303
Please be more specific on the cases, when doctor and patient flip. I have never encountered such a bug. What happens, when the patient does not have a medic kit? Apart from that I must admit, that my git-repository contains a serious change of game rules.

There are airstrikes less minutes before the army walks into towns as it takes to retreat and return - it scares of heroic defenders. Every stat based performance is capped at 85 points (Chance to hit < 85% - no save shot, Chance to diffuse < 85% - no save mine field, Max. item status by repair < 85% - new is better than fixed, Max. health status by doctoring < 85% - medicine is no magic, etc.). Movement on the strategic map has changed in that chancellation of routes is disallowed - no cornering, no fooling with enemy patrol groups. Retreat is disabled - patrols will get you sleeping or with your back on the wall. Time warp is disabled - caused many bugs, changes the flow. Every militia killed no matter by whom counts as a civilian killed by the player - for his mum you killed their son by recruiting him to the green shirts, heroic defence starts to make sense. Mercs drop their equipment instantly as they walk off - no hire and fire for mule service to Drassen and Omerta. Pressing "d" in strategic screen lets mercs drop all their luggage - very alike "e" in JA1. Shots without sight always miss except for game physics reasons - spotter and sniper are too efficient te be designed intentionally. Moving targets penalize the aim-points of offenders, not directly the chance to hit - 20 tiles moved, every aimpoint is lost. Rocket rifles are stronger - it does no longer take 20 HEAP rockets to break a tank. etc.

These changes are my personal way of enjoying Jagged Alliance and anyone is free to switch off, what feels odd to him. I marked most changes with the code tag "//HB:". Please read the notes in the changelogs for more infos. GIT allows everyone to suggest changes to the code base. If we do not consent, open Your own branch please. I service no maintenance as the code is there to read, copy and change. This is no release for end users but a code mine for anyone interested in my bugfixes.


Edited by sunshine (01/06/2012)
_________________________
civ
Top
#305683 - 07/06/2012 Re: JA2 git repository available [Re: civ]

Misanthropos
private 1st class
Registered: 07/10/2009
Posts: 13
@bnolsen: savefiles do help a lot :-D

@sunshine: one of the interesting features is having differences of the source revisions. I will have a look on your code, especially if you managed to fix a bug. It might be possible to merge two branches.. with some effort where codesnippets could clash....

the //HB hint I will check :-D


cheers

Misan
Top
#306714 - 01/07/2012 Re: JA2 git repository available [Re: Misanthropos]

grantek
Civilian
Registered: 01/07/2012
Posts: 1
Hi, I've recently been doing a playthrough of JA2 using your git version of Stracciatella, and I've hit a bug that was preventing my progress.

The save file is here:
http://www.2shared.com/file/a_i1Op-5/ja2-misanthropos-explosion-han.html
(the problem occurs in the opponents' turn if you end the players' turn without doing anything)

I'm in the top-left square of Alma (H13) raiding the military building there, and there's a mysterious explosion that blows out the northwest wall where Sergeant is. I have no idea what causes it, but it happens during or shortly after battle, so I think it might be related to the enemy raising alarms. I've searched the area and found nothing to cause the explosion, but it consistently happens in all the versions of JA2 I've tried so I'm willing to think it's part of the game code.

The problem in your git master version is that it causes the enemy AI to hang. The red "Opponents' turn" bar at the top of the screen pauses after the explosion, and never returns or continues. I spent some time in-game trying different tactics to avoid the explosion or set up different circumstances around it (people getting injured in the explosion etc.), but it always causes the same AI hang.

I tried using the 12.1 release of tron's Stracciatella, the explosion occurred and the game crashed with:
ERROR: caught unhandled exception:
Opening file failed

I ran the game with strace and found some failed unlinks that looked odd just before the game created error.sav:
unlink("Temp/sm_H13.DAT") = -1 ENOENT (No such file or directory)
unlink("Temp/l_H13.DAT") = -1 ENOENT (No such file or directory)

I then tried latest subversion Straciatella from tron's site and it worked fine. The explosion occurred, but the game continued and I was able to save and reload with no problems after the explosion.

I've compiled and run all three versions on Ubuntu 12.04 64-bit. I tried some Windows versions of Straciatella and vanilla JA2 using Wine, but the save games weren't compatible with those.

Hopefully the comments between Tron's 12.1 release and the current subversion code help in tracking this down, and thanks for maintaining the git repository smile
Top

Moderator:  mgl, Off_Topic, Tron 

Forum Stats
11518 Members
88 Forums
7628 Topics
137639 Posts

Max Online: 345 @ 01/05/2012
Copyright 2000-2013 Bear's Pit