Page 1 of 1

Artillery appearing for the Continentals...question

Posted: Mon Aug 14, 2006 7:09 pm
by Fouche
My opponent who is commanding the Americans is wondering about the artillery that seems to appear (it is 1780 and so far about 3 artillery units have shown up there I believe) in the area of Philadelphia on the coast as it were and he can't get to them since I have control the area (as well as the port). Is that going to be fixed (Have any other players experienced this? I tried searching for this to see if this has been posted before. Sorry for repeating this if it was.)...I mean that these artillery units would appear only in an area/port that the US player actually controls? :tournepas

An update to this...My opponent just told me that this seems to be happening every turn....I will ask him for how long..etc.

Posted: Mon Aug 14, 2006 10:05 pm
by CristoFire-Ice
There seems to be a problem with the artillery reinforcements in this campaign (version 1.09c) for the American side. Pocus is trying to fix it.

Posted: Tue Aug 15, 2006 1:34 pm
by Pocus
Yes, it seems that the events fire multiple time. The bug should be fixed tomorrow (that should be tomorrow morning in the US normally).

Posted: Tue Aug 15, 2006 2:27 pm
by Pocus
I think I understand now how the problem can occurs. There is no bug in the code, and no bug in the scripts too, for a given version of BoA (the bug only appears on games played over several patches).

It only appears in game started some weeks ago, in 1.07 or before I think. The syntax of the events that triggers multiple time (and should not) has been modified in 1.07 (or was it 1.08?).

<you can skip the explaination if not interested>
Before, the events were set to fire continuously (999 occurences max) but the date was hard-coded on a given turn, so in essence they fired once.
In 1.07 or later, for many events, the trigger date in the main campaign has been a bit randomized. The event can fire once, but the date can vary (with a minimum historical date).

The problem is that, in the host file, the max number of occurences (for old PBEM games mostly) is still at 999. But the syntax changed with a minimum trigger date in the event file (and no hard coded date on a single turn).

So the result is that you get multiple time the events.

FIX

The fix is rather simple (editing one file) but I describe lenghtily the process.

If you have the bug and don't want to meddle with the files, send me your savegame and I will repair the problem.

You can fix the problem by changing the max number of occurences from 999 to 1 in the events that should not trigger more than once.

In the save folder of the game to fix, open the HST file (the host file, this is a text file that can be opened with notepad for example).

Seek the string evt_nam_Supply_Hortelez

Now there is a little trap: You can get the string, that describe the event, in the message panel. This is not what you seek. The event description in the message panel is between {Event} and {/Event}

What you seek is the event reference giving you the state of the event, for the script. The data structure is:

{EventState}
Name=evt_nam_Supply_Hortelez1
Occurences=5
MaxOccurs=999
{/EventState}

And as you see, MaxOccurs is at 999. Fix the entry to 1 (and set the number of current occurences to 1 to) this give you:

{EventState}
Name=evt_nam_Supply_Hortelez1
Occurences=1
MaxOccurs=1
{/EventState}

Repeat for evt_nam_Supply_Hortelez2 (just below), if needed, eg:

{EventState}
Name=evt_nam_Supply_Hortelez2
Occurences=1
MaxOccurs=1
{/EventState}

Nota: This is not abnormal to see events with a 999. Replacements and supplies can have that.

.
..
...


Congrats, your first modding lesson is finished ;)

ah...thank you!

Posted: Tue Aug 15, 2006 5:06 pm
by Fouche
Alacrity...speed...decisiveness....that is wonderful...The Emperor could have used you at Waterloo instead of Marshal Grouchy!
Many thanks... :niark: