User avatar
Hobbes
Posts: 4437
Joined: Sat Mar 11, 2006 12:18 am
Location: UK

Order of events?

Wed Feb 18, 2009 8:21 pm

Hi folks, I had the feeling that if I had one event above another the event above would fire first and then I could use EvalEvent evt_nam_*|=|1
in an event positioned below in the spreadsheet to decide if it had fired.

After a lot of frustrating testing it seems to me that you have to wait until the following turn to use the EvalEvent procedure for any events that fire in the same turn regardless of the order they are in in the spreadsheet.

Can anyone confirm this? Argh - if it's the case it will explain a lot of odd results I have had - and I will have to have a good look through all my events.

I think it will be a shame if I can't find a way to have one event influence another in the same turn. :confused:

Thanks, Chris

User avatar
lodilefty
Posts: 7616
Joined: Sat Aug 11, 2007 3:27 pm
Location: Finger Lakes, NY GMT -5 US Eastern

Wed Feb 18, 2009 9:33 pm

Hobbes wrote:Hi folks, I had the feeling that if I had one event above another the event above would fire first and then I could use EvalEvent evt_nam_*|=|1
in an event positioned below in the spreadsheet to decide if it had fired.

After a lot of frustrating testing it seems to me that you have to wait until the following turn to use the EvalEvent procedure for any events that fire in the same turn regardless of the order they are in in the spreadsheet.

Can anyone confirm this? Argh - if it's the case it will explain a lot of odd results I have had - and I will have to have a good look through all my events.

I think it will be a shame if I can't find a way to have one event influence another in the same turn. :confused:

Thanks, Chris



AFAIK, correct. Effect is next turn.
Confirmed with options for elite replacements: show up next turn....

Shame? In a way, yes, biy it is what it is.....
Always ask yourself: "Am I part of the Solution?" If you aren't, then you are part of the Problem!
[CENTER][/CENTER]
[CENTER]Visit AGEWiki - your increasingly comprehensive source for information about AGE games[/CENTER]

[CENTER]Rules for new members[/CENTER]
[CENTER]Forum Rules[/CENTER]

[CENTER]Help desk: support@slitherine.co.uk[/CENTER]

User avatar
Primasprit
Posts: 1614
Joined: Mon Jun 19, 2006 7:44 pm
Location: Germany

Wed Feb 18, 2009 9:54 pm

Actually it should work the same turn too. To be 100% sure I run a test:

Code: Select all

StartEvent = evt_nam_TestA|999|0|NULL|NULL|NULL|NULL
Conditions
Actions
EndEvent


StartEvent = evt_nam_TestB|999|0|NULL|NULL|NULL|NULL
Conditions
   EvalEvent  = evt_nam_TestA;=;1
Actions
EndEvent
It worked:

Code: Select all

--------------START OF SCRIPT----------------
Line 1:  SelectFactions, 1 Faction selected: Great Britain
Line 2:  Started processing event: evt_nam_TestA
Line 2:  This event is not yet referenced, base number of allowed occurences 999
Line 6:  Entering triggered actions for event evt_nam_TestA
Line 9:  Finished processing event: evt_nam_TestA
Line 9:  ------------------------------
Line 12:  SelectFactions, 1 Faction selected: Great Britain
Line 13:  Started processing event: evt_nam_TestB
Line 13:  This event is not yet referenced, base number of allowed occurences 999
Line 16:  EvalEvent evaluated: Checking evt_nam_TestA 1 equal to 1 True
Line 18:  Entering triggered actions for event evt_nam_TestB
Line 21:  Finished processing event: evt_nam_TestB
Line 21:  ------------------------------
Cheers
Norbert :cwboy:

User avatar
lodilefty
Posts: 7616
Joined: Sat Aug 11, 2007 3:27 pm
Location: Finger Lakes, NY GMT -5 US Eastern

Wed Feb 18, 2009 10:07 pm

Primasprit wrote:Actually it should work the same turn too. To be 100% sure I run a test:

Code: Select all

StartEvent = evt_nam_TestA|999|0|NULL|NULL|NULL|NULL
Conditions
Actions
EndEvent


StartEvent = evt_nam_TestB|999|0|NULL|NULL|NULL|NULL
Conditions
   EvalEvent  = evt_nam_TestA;=;1
Actions
EndEvent
It worked:

Code: Select all

--------------START OF SCRIPT----------------
Line 1:  SelectFactions, 1 Faction selected: Great Britain
Line 2:  Started processing event: evt_nam_TestA
Line 2:  This event is not yet referenced, base number of allowed occurences 999
Line 6:  Entering triggered actions for event evt_nam_TestA
Line 9:  Finished processing event: evt_nam_TestA
Line 9:  ------------------------------
Line 12:  SelectFactions, 1 Faction selected: Great Britain
Line 13:  Started processing event: evt_nam_TestB
Line 13:  [B][color="Red"]This event is not yet referenced[/color][/B], base number of allowed occurences 999
Line 16:  EvalEvent evaluated: Checking evt_nam_TestA 1 equal to 1 True
Line 18:  Entering triggered actions for event evt_nam_TestB
Line 21:  Finished processing event: evt_nam_TestB
Line 21:  ------------------------------
Cheers
Norbert :cwboy:


Please run another turn. I suspect something different happens once an event has been referenced.....

..at least, that's what I've seen with the options events :blink:
Always ask yourself: "Am I part of the Solution?" If you aren't, then you are part of the Problem!
[CENTER][/CENTER]

[CENTER]Visit AGEWiki - your increasingly comprehensive source for information about AGE games[/CENTER]



[CENTER]Rules for new members[/CENTER]

[CENTER]Forum Rules[/CENTER]



[CENTER]Help desk: support@slitherine.co.uk[/CENTER]

User avatar
Primasprit
Posts: 1614
Joined: Mon Jun 19, 2006 7:44 pm
Location: Germany

Wed Feb 18, 2009 10:23 pm

Works too:

Code: Select all

--------------START OF SCRIPT----------------
Line 0:  Started processing event: evt_nam_TestA
Line 0:  Event already referenced, current occurences 0 Max allowed: 999   <<Active>>
Line 2:  Entering triggered actions for event evt_nam_TestA
Line 3:  Finished processing event: evt_nam_TestA
Line 3:  ------------------------------
Line 6:  Started processing event: evt_nam_TestB
Line 6:  Event already referenced, current occurences 0 Max allowed: 999   <<Active>>
Line 8:  EvalEvent evaluated: Checking evt_nam_TestA 1 equal to 1 True
Line 9:  Entering triggered actions for event evt_nam_TestB
Line 10:  Finished processing event: evt_nam_TestB
Line 10:  ------------------------------
Cheers
Norbert

User avatar
Hobbes
Posts: 4437
Joined: Sat Mar 11, 2006 12:18 am
Location: UK

Thu Feb 19, 2009 8:43 am

It certainly doesn't work when I try a simple test. Can the order be random?
I'll check my log.

Cheers, Chris

User avatar
Hobbes
Posts: 4437
Joined: Sat Mar 11, 2006 12:18 am
Location: UK

Thu Feb 19, 2009 10:07 am

:bonk: It seems my problem was something else. I was testing to see if an event was 1 or 0 on turn 1 when the event had not yet been processed - it seems in this case it does not eval to 0.

Thanks, Chris

User avatar
lodilefty
Posts: 7616
Joined: Sat Aug 11, 2007 3:27 pm
Location: Finger Lakes, NY GMT -5 US Eastern

Thu Feb 19, 2009 2:06 pm

hehe, and my problem is events that start the turn with Max occurances = 0, get that set = 1, but don't activate until next turn even though they follow the event that increase the value... [Elite/Regular options for example, numerous others]
Always ask yourself: "Am I part of the Solution?" If you aren't, then you are part of the Problem!
[CENTER][/CENTER]

[CENTER]Visit AGEWiki - your increasingly comprehensive source for information about AGE games[/CENTER]



[CENTER]Rules for new members[/CENTER]

[CENTER]Forum Rules[/CENTER]



[CENTER]Help desk: support@slitherine.co.uk[/CENTER]

User avatar
lodilefty
Posts: 7616
Joined: Sat Aug 11, 2007 3:27 pm
Location: Finger Lakes, NY GMT -5 US Eastern

Thu Feb 19, 2009 2:07 pm

Hobbes wrote: :bonk: It seems my problem was something else. I was testing to see if an event was 1 or 0 on turn 1 when the event had not yet been processed - it seems in this case it does not eval to 0.

Thanks, Chris


yeah, it evaluates to "huh? where? what event?" :wacko:
Always ask yourself: "Am I part of the Solution?" If you aren't, then you are part of the Problem!
[CENTER][/CENTER]

[CENTER]Visit AGEWiki - your increasingly comprehensive source for information about AGE games[/CENTER]



[CENTER]Rules for new members[/CENTER]

[CENTER]Forum Rules[/CENTER]



[CENTER]Help desk: support@slitherine.co.uk[/CENTER]

User avatar
Primasprit
Posts: 1614
Joined: Mon Jun 19, 2006 7:44 pm
Location: Germany

Thu Feb 19, 2009 3:46 pm

Some savegames/event files which illustrate the problems would be nice. :)

Cheers
Norbert

User avatar
lodilefty
Posts: 7616
Joined: Sat Aug 11, 2007 3:27 pm
Location: Finger Lakes, NY GMT -5 US Eastern

Thu Feb 19, 2009 4:32 pm

Primasprit wrote:Some savegames/event files which illustrate the problems would be nice. :)

Cheers
Norbert


OK, did you guys sneak a fix into the latest test pre-beta?

It seems to work OK now:

SelectFactions, 1 Faction selected: Great Britain
Line 780: Started processing event: evt_nam_GBR_Elite_Regular_Check
Line 780: Event already referenced, current occurences 0 Max allowed: 999 <<Active>>
Line 783: CheckOption evaluated: GBR_Elite_Regular Checking value (the request) 1 equal to (Value found) 1 True
Line 784: EvalEngagementPts: Great Britain EngagementPts: 21 against 13 - Operator: >= Result: True
Line 786: Entering triggered actions for event evt_nam_GBR_Elite_Regular_Check
Line 787: ChgFacEngagementPts Great Britain New Nb. of Engagement Points are 8
Line 788: Set Event Occurs command: evt_nam_GBR_Elite Max Occurences: 1 Current Occurences: 0
Line 789: Set Event Occurs command: evt_nam_GBR_Elite Max Occurences: 1 Current Occurences: 0
Line 790: Set Event Occurs command: evt_nam_GBR_Regular Max Occurences: 1 Current Occurences: 0
Line 791: Set Event Occurs command: evt_nam_GBR_Regular Max Occurences: 1 Current Occurences: 0
Line 793: SelectFactions, 1 Faction selected: United States of America
Line 794: GenTextMsg Message Generated: opt_notify_GBR_USA_Elite_Regular
Line 796: SelectFactions, 1 Faction selected: Great Britain
Line 797: GenTextMsg Message Generated: opt_notify_GBR_Elite_Regular
Line 798: ChangeActorPool Great Britain Actor entry 5025 has been deleted
Line 800: Finished processing event: evt_nam_GBR_Elite_Regular_Check
Line 800: ------------------------------
Line 802: SelectFactions, 1 Faction selected: Great Britain
Line 803: Started processing event: evt_nam_GBR_Elite_Regular_Regen
Line 803: Event already referenced, current occurences 0 Max allowed: 2 <<Active>>
Line 806: Min date evaluated: 1776/01/01 converted to turn 2113 current turn 2140 True
Line 807: ActorDisabled : True
Line 808: Probability evaluated: Probability 40 rolled 49 False
Line 813: Finished processing event: evt_nam_GBR_Elite_Regular_Regen
Line 813: ------------------------------
Line 815: SelectFactions, 1 Faction selected: Great Britain
Line 816: Started processing event: evt_nam_GBR_Elite
Line 816: Event already referenced, current occurences 0 Max allowed: 1 <<Active>>
Line 819: Probability evaluated: Probability 25 rolled 97 False
Line 824: Finished processing event: evt_nam_GBR_Elite
Line 824: ------------------------------
Line 826: SelectFactions, 1 Faction selected: Great Britain
Line 827: Started processing event: evt_nam_GBR_Regular
Line 827: Event already referenced, current occurences 0 Max allowed: 1 <<Active>>
Line 830: Probability evaluated: Probability 75 rolled 80 False
Line 835: Finished processing event: evt_nam_GBR_Regular


Edit: hehe, I did find a logical script error: the 'Elite/Regular' replacements option gives endless tries until success, vs. just a single try...... :bonk:
Always ask yourself: "Am I part of the Solution?" If you aren't, then you are part of the Problem!
[CENTER][/CENTER]

[CENTER]Visit AGEWiki - your increasingly comprehensive source for information about AGE games[/CENTER]



[CENTER]Rules for new members[/CENTER]

[CENTER]Forum Rules[/CENTER]



[CENTER]Help desk: support@slitherine.co.uk[/CENTER]

Return to “Modding AGE engine games”

Who is online

Users browsing this forum: No registered users and 23 guests