Looking for a bit of help regarding events
- cathar1244
- Posts: 1321
- Joined: Sat Sep 05, 2009 2:16 am
Looking for a bit of help regarding events
Hi all,
I'm looking at a scenario that has crash to desktop problems.
One thing I've seen in a .gam dump of the scenario is this:
<EVENT ID="7" TRIGGER="Turn" CONTINGENCY="29" EFFECT="Rail transport 2" X="22" Y="111" VALUE="50000"/>
So I figured out CONTINGENCY means this event depends of Event 29 triggering.
Except event 29 is not defined.
Does TOAW ignore events like this or could it lead to unstable program behavior?
As a secondary question, I note events like this:
<EVENT ID="12" TRIGGER="1 occupies" CONTINGENCY="4" EFFECT="News only" X="36" Y="172" NEWS="WP captures the Kaiserslautern Reforger hex"/>
So, contingent on Event 4? Yet, viewing it in the event editor in the program makes no mention of the contingency. Is this a by product of the "news only" event type, or again, does it point to something buggy with the event definitions?
Thanks for any suggestions or help.
Cheers
I'm looking at a scenario that has crash to desktop problems.
One thing I've seen in a .gam dump of the scenario is this:
<EVENT ID="7" TRIGGER="Turn" CONTINGENCY="29" EFFECT="Rail transport 2" X="22" Y="111" VALUE="50000"/>
So I figured out CONTINGENCY means this event depends of Event 29 triggering.
Except event 29 is not defined.
Does TOAW ignore events like this or could it lead to unstable program behavior?
As a secondary question, I note events like this:
<EVENT ID="12" TRIGGER="1 occupies" CONTINGENCY="4" EFFECT="News only" X="36" Y="172" NEWS="WP captures the Kaiserslautern Reforger hex"/>
So, contingent on Event 4? Yet, viewing it in the event editor in the program makes no mention of the contingency. Is this a by product of the "news only" event type, or again, does it point to something buggy with the event definitions?
Thanks for any suggestions or help.
Cheers
- golden delicious
- Posts: 4163
- Joined: Tue Sep 05, 2000 8:00 am
- Location: London, Surrey, United Kingdom
RE: Looking for a bit of help regarding events
ORIGINAL: cathar1244
Hi all,
I'm looking at a scenario that has crash to desktop problems.
One thing I've seen in a .gam dump of the scenario is this:
<EVENT ID="7" TRIGGER="Turn" CONTINGENCY="29" EFFECT="Rail transport 2" X="22" Y="111" VALUE="50000"/>
So I figured out CONTINGENCY means this event depends of Event 29 triggering.
Is that right? To me this reads that the event is triggered by Turn 29. If it was event 29 then it would read 'TRIGGER="Event Activated"' or similar.
Does TOAW ignore events like this or could it lead to unstable program behavior?
I doubt this would cause a crash bug, as it's a very easy mistake to make and so would be causing crashes all over the place if it was a problem. The only time I've seen a serious stability problem in a particular scenario, there was a certain unit which was causing the issue; there was something wrong with the connection between the unit and the parent formation (I forget what)- this was an old Spanish Civil War scenario which was doing the rounds nearly 20 years ago.
What's happening when the game crashes? Is it following a certain action by the player or during inter-turn calculations?
As a secondary question, I note events like this:
<EVENT ID="12" TRIGGER="1 occupies" CONTINGENCY="4" EFFECT="News only" X="36" Y="172" NEWS="WP captures the Kaiserslautern Reforger hex"/>
So, contingent on Event 4? Yet, viewing it in the event editor in the program makes no mention of the contingency. Is this a by product of the "news only" event type, or again, does it point to something buggy with the event definitions?
I'd suggest the "contingency" field is simply not used for this trigger type and this field is storing an old value from when the event ID was used for something else. Try changing the event trigger to "Turn" in the editor and see if you see the value of 4 coming through.
"What did you read at university?"
"War Studies"
"War? Huh. What is it good for?"
"Absolutely nothing."
"War Studies"
"War? Huh. What is it good for?"
"Absolutely nothing."
- cathar1244
- Posts: 1321
- Joined: Sat Sep 05, 2009 2:16 am
RE: Looking for a bit of help regarding events
Thanks GD. Yeah, I think you're right about that being the turn number.
Not sure about these crashes. About the time the crashing was noted, a problem was found with garbage collection in memory that was tied to the number of strings used for location names. But some scenarios, like Directive 21, have over 2,000 location names, and as far as I know, don't suffer the crashes to desktop.
In the case of this scenario, the crashes seemed random. Which log do you think might provide the best data (for when a crash occurs) -- the regular TOAW log or one of the others?
This scenario was an extension of one originally done by Bob Cross. I don't think Bob's original version had the crash issue, so it could be tied to new units/formations, events, or perhaps the expansion in location names.
Cheers
Not sure about these crashes. About the time the crashing was noted, a problem was found with garbage collection in memory that was tied to the number of strings used for location names. But some scenarios, like Directive 21, have over 2,000 location names, and as far as I know, don't suffer the crashes to desktop.
In the case of this scenario, the crashes seemed random. Which log do you think might provide the best data (for when a crash occurs) -- the regular TOAW log or one of the others?
This scenario was an extension of one originally done by Bob Cross. I don't think Bob's original version had the crash issue, so it could be tied to new units/formations, events, or perhaps the expansion in location names.
Cheers
- Curtis Lemay
- Posts: 15299
- Joined: Fri Sep 17, 2004 3:12 pm
- Location: Houston, TX
RE: Looking for a bit of help regarding events
No, Contingency is ONLY used with an event trigger. If it is a turn trigger, it uses the TURN field.ORIGINAL: golden delicious
Is that right? To me this reads that the event is triggered by Turn 29.
Yes, the event engine leaves lots of "artifacts," or values apparently set when the event was used for something else, but not discarded (just ignored) once the event is changed. This usually doesn't cause an issue, but could cause an issue if it is then changed BACK to an event that does use that field, and the value in the field is not valid. I'm not so sure that such an issue wouldn't cause a crash.ORIGINAL: golden delicious
I'd suggest the "contingency" field is simply not used for this trigger type and this field is storing an old value from when the event ID was used for something else.
RE: Looking for a bit of help regarding events
ORIGINAL: cathar1244
Thanks GD. Yeah, I think you're right about that being the turn number.
No, it's not. The turn number uses the TURN field, which is absent. The CONTINGENCY field is used for trigger events. That might be causing the crash. Insert a TURN field with an XML editor and see what happens. Note that the turn number in the XML file will be one less than the number displayed in the game...that's how it works for some reason.
- cathar1244
- Posts: 1321
- Joined: Sat Sep 05, 2009 2:16 am
RE: Looking for a bit of help regarding events
Thanks 76mm!
@Curtis -- not sure. I think it was Win10, but will have to verify with those who experienced the crashes.
Cheers
@Curtis -- not sure. I think it was Win10, but will have to verify with those who experienced the crashes.
Cheers
- rhinobones
- Posts: 2224
- Joined: Sun Feb 17, 2002 10:00 am
RE: Looking for a bit of help regarding events
Other than the “Evil Editor” has anyone ever compiled examples of events in an easy-to-read format? I’ve tried to decipher event construction using the XML Editor, but that tends to get confusing very quickly.
Regards
Regards
Colin Wright:
Pre Combat Air Strikes # 64 . . . I need have no concern about keeping it civil
Post by broccolini » Sun Nov 06, 2022
. . . no-one needs apologize for douchebags acting like douchebags
Pre Combat Air Strikes # 64 . . . I need have no concern about keeping it civil
Post by broccolini » Sun Nov 06, 2022
. . . no-one needs apologize for douchebags acting like douchebags
RE: Looking for a bit of help regarding events
While I was working on events in TOAWxml, I created an events spreadsheet which details which triggers use which fields, which effects, etc. The spreadsheet (actually, spreadsheets) shows which triggers/events are in which groups, which fields are involved, how they are labelled in the editor, etc. I have to say that I've found these spreadsheets really helpful when working with events.ORIGINAL: rhinobones
Other than the “Evil Editor” has anyone ever compiled examples of events in an easy-to-read format? I’ve tried to decipher event construction using the XML Editor, but that tends to get confusing very quickly.
Basically there are five groups of triggers which use the same fields, and six groups of events which use the same fields. The exact fields used, and their meaning, depends on the Trigger group plus the Effect group. To make things even less clear, the same fields can be used for different things depending on which Triggers/Events are involved (for instance, "TURN" can mean entry turn or delay, depending on the context), and values in the XML are often one less than values in the editor. Another thing that muddies the water is that the editor seems to leave unused fields in the XML ("event artifacts") rather than cleaning them up, so often your events XML includes entries which are totally irrelevant for the particular event.
IMHO to understand events you need to understand their structure, rather than just see lots of examples, because the examples will only confuse you. Once you understand their structure, however, all will be clear! [8D]
I'd be happy to upload this spreadsheet here, although you'll probably need to study it a bit to understand it.
Here is a screenshot of the master events summary, showing which fields are used for which trigger and effect groups:

- Attachments
-
- eventsmaster.jpg (168.56 KiB) Viewed 650 times
RE: Looking for a bit of help regarding events
While I'm at it, here are the event triggers broken down into trigger groups, and showing fields used for each group. Obviously, if a trigger says something about force 1, it also applies for force 2.


- Attachments
-
- triggergroups.jpg (58.53 KiB) Viewed 648 times
RE: Looking for a bit of help regarding events
Here here are the effects groups. This is pretty much all there is too it...the spreadsheets include a couple more summary sheets, but they don't include anything not included in the master summary posted above.


- Attachments
-
- effectsgroup.jpg (147.2 KiB) Viewed 648 times
RE: Looking for a bit of help regarding events
Actually I'm quoting myself here to correct myself--I forgot that if an event is triggered by a Turn but there is no Turn field, it means that the event is triggered on Turn 1 (ie, Turn 1 - 1 = zero = a null field). Sorry for any confusion.ORIGINAL: 76mm
The turn number uses the TURN field, which is absent. The CONTINGENCY field is used for trigger events. That might be causing the crash. Insert a TURN field with an XML editor and see what happens.
- rhinobones
- Posts: 2224
- Joined: Sun Feb 17, 2002 10:00 am
RE: Looking for a bit of help regarding events
Yes, please post your spreadsheet. Always something new to learn.
Not positive, but what I see seems to take the event information from the Evil Editor and put it into a more concise and readable format. Not quite what I’m looking for but appears to be a very good starting point.
Best Regards
Not positive, but what I see seems to take the event information from the Evil Editor and put it into a more concise and readable format. Not quite what I’m looking for but appears to be a very good starting point.
Best Regards
Colin Wright:
Pre Combat Air Strikes # 64 . . . I need have no concern about keeping it civil
Post by broccolini » Sun Nov 06, 2022
. . . no-one needs apologize for douchebags acting like douchebags
Pre Combat Air Strikes # 64 . . . I need have no concern about keeping it civil
Post by broccolini » Sun Nov 06, 2022
. . . no-one needs apologize for douchebags acting like douchebags
RE: Looking for a bit of help regarding events
Zip file is attached. Actually I didn't start from the Evil Editor but went through every event trigger and event in the in-game editor. As you can imagine, this was a fairly tedious process, but I'm reasonably confident that it is correct.ORIGINAL: rhinobones
Not positive, but what I see seems to take the event information from the Evil Editor and put it into a more concise and readable format.
The two tables included in the file which I've not posted are summaries of the event triggers and effects, but I don't think there's any info in them that is not included in the master summary (which includes both).
Note also that when messing with the XML files you need to pay very strict attention to capitalization--if you get it wrong it definitely won't work, might crash the game. So it's "Cool front" but also "Cease Fire".
- Attachments
-
- TOAWEVENTS.zip
- (24.96 KiB) Downloaded 20 times
RE: Looking for a bit of help regarding events
One more clarification: the summary cells in the trigger and effect summaries are the events' "signature" in the editor, ie which parameters are exposed in the editor--each group uses the same "signature". To see which fields are used in the XML, you have to reference the top line in the master summary.
also, as you'll see, Trigger Groups 1 & 2 only use Effects Group 2.
also, as you'll see, Trigger Groups 1 & 2 only use Effects Group 2.
- cathar1244
- Posts: 1321
- Joined: Sat Sep 05, 2009 2:16 am
RE: Looking for a bit of help regarding events
76mm,
Having trouble reading the tables you've posted here.
Take T1-E2. The table with green cells indicates this should be a combination that uses radius as a value. But when I look at supply radius, it appears to be part of E1. What am I not seeing?
ETA: Okay, I see radius is a value used by both triggers and effects. Complex enough for errors to easily occur when read or manually edited.
Cheers
Having trouble reading the tables you've posted here.
Take T1-E2. The table with green cells indicates this should be a combination that uses radius as a value. But when I look at supply radius, it appears to be part of E1. What am I not seeing?
ETA: Okay, I see radius is a value used by both triggers and effects. Complex enough for errors to easily occur when read or manually edited.
Cheers
RE: Looking for a bit of help regarding events
Indeed. I've tried to bake all of this into the event editor in TOAWxml, as well as cleaning up "event artifacts", but haven't ever gotten much feedback on whether it is working for people.ORIGINAL: cathar1244
Complex enough for errors to easily occur when read or manually edited.
- cathar1244
- Posts: 1321
- Joined: Sat Sep 05, 2009 2:16 am
RE: Looking for a bit of help regarding events
I am looking at this .gam file description of an event:
<EVENT ID="127" TRIGGER="Event activated" CONTINGENCY="16" EFFECT="Theater Option 1" VALUE="10006" NEWS="Authorize nuclear weapons - 100 VP penalty" />
In the event editor, looking at this event, it states that it will in turn activate Event 10007.
Now, I understand TOAW IV has a limit of 10,000 events.
Is there a reason to set an event in this way, or should the VALUE field be set to "9999" ?
Cheers
<EVENT ID="127" TRIGGER="Event activated" CONTINGENCY="16" EFFECT="Theater Option 1" VALUE="10006" NEWS="Authorize nuclear weapons - 100 VP penalty" />
In the event editor, looking at this event, it states that it will in turn activate Event 10007.
Now, I understand TOAW IV has a limit of 10,000 events.
Is there a reason to set an event in this way, or should the VALUE field be set to "9999" ?
Cheers
RE: Looking for a bit of help regarding events
Note that the Effect is "Theater Option 1" rather than "Activate Event". I'm not sure--I either didn't fully explore Theater Options or don't remember if I did--but it is possible that the 10006 figure includes a "prefix" before the event number to indicate which side's Theater Option it is. To check, you might want to check the VALUE fields of other Theater Options (for both sides) to see if they correspond. Also, check event 7 (6?) to see if it makes sense if that is the one being called.
Also, I'm not sure, but IIRC once when I was playing around with events I tried entering an "Activate Event" which did not exist, and the game didn't seem to like that, although I can't remember the details at this point.
The event editor in TOAWxml allows you to filter by Effect (or trigger) if that helps at all...
Also, I'm not sure, but IIRC once when I was playing around with events I tried entering an "Activate Event" which did not exist, and the game didn't seem to like that, although I can't remember the details at this point.
The event editor in TOAWxml allows you to filter by Effect (or trigger) if that helps at all...
- Curtis Lemay
- Posts: 15299
- Joined: Fri Sep 17, 2004 3:12 pm
- Location: Houston, TX
RE: Looking for a bit of help regarding events
This is how Theater Options are removed. If the event to activate is > 9999 (and the text is identical to another TO event) the TO is removed.ORIGINAL: cathar1244
I am looking at this .gam file description of an event:
<EVENT ID="127" TRIGGER="Event activated" CONTINGENCY="16" EFFECT="Theater Option 1" VALUE="10006" NEWS="Authorize nuclear weapons - 100 VP penalty" />
In the event editor, looking at this event, it states that it will in turn activate Event 10007.
Now, I understand TOAW IV has a limit of 10,000 events.
Is there a reason to set an event in this way, or should the VALUE field be set to "9999" ?
Cheers
Inserting events prior to that event can cause the event number to advance past 10000.


