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

_Regen questions

Sat Feb 21, 2009 11:00 am

Hi folks, I'm a bit puzzled about the _Regen options script. In the example I am using to test it (attached) I have set the StartEvent in the _ON script to zero and have a MinDate of October.

However I trigger the _Regen in May and the following turn the event option appears for the player - ignoring the MinDate. Any idea why this is?

I'm also surprised that the
ChgEvtOccurs evt_nam_GBR_Militia1PW_Check|MaxOccurs|1
Changes the _Check event and not the _ON and _AIActivate MaxOccurs.

A last question - what happens if an option is available to a player but he has not yet used it - but the _Regen event fires - I assume the event is just reset without the player noticing anything?

Thanks for any clarification on _Regen.

Cheers, Chris
Attachments

[The extension xls has been deactivated and can no longer be displayed.]


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

Sat Feb 21, 2009 1:07 pm

Your regen event does not have a mindate, so it will occur every June [turn 5]

ChgEvtOccurs evt_nam_GBR_Militia1PW_Check|MaxOccurs|1
will only affect the one event in bold

Regen can't fire if the option is on because the ActorDisabled will evaluate to false

These are 4 independant, but related events:
_AI is only for the AI, regulates wgen and probability the AI will select the option
_On is only used once, for the very first activation of the option
_check is "the action", checking for the selection, checking the cost, and doing the option
_regen regulates how many more times [if any] the option is activated, and when


It looks like you are trying to tie the availability of this option to another event, or such:
I suggest a mindate [or EvalEvent evt_nam_GBR_Militia1PW_ON|>|0]
in your regen conditions, and a completely separate event to set maxoccurs for the _ON and _AI events....
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
Hobbes
Posts: 4438
Joined: Sat Mar 11, 2006 12:18 am
Location: UK

Sat Feb 21, 2009 2:06 pm

lodilefty wrote:Your regen event does not have a mindate, so it will occur every June [turn 5]

ChgEvtOccurs evt_nam_GBR_Militia1PW_Check|MaxOccurs|1
will only affect the one event in bold

Regen can't fire if the option is on because the ActorDisabled will evaluate to false

These are 4 independant, but related events:
_AI is only for the AI, regulates wgen and probability the AI will select the option
_On is only used once, for the very first activation of the option
_check is "the action", checking for the selection, checking the cost, and doing the option
_regen regulates how many more times [if any] the option is activated, and when


It looks like you are trying to tie the availability of this option to another event, or such:
I suggest a mindate [or EvalEvent evt_nam_GBR_Militia1PW_ON|>|0]
in your regen conditions, and a completely separate event to set maxoccurs for the _ON and _AI events....


Many thanks for that Lodi - it's a great help. My main confusion was that I thought _Regen would work on the AI and ON events.

It's all much clearer now! :thumbsup: :coeurs:

Thanks, Chris

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

Sat Feb 21, 2009 2:41 pm

Hobbes wrote:Many thanks for that Lodi - it's a great help. My main confusion was that I thought _Regen would work on the AI and ON events.

It's all much clearer now! :thumbsup: :coeurs:

Thanks, Chris


To further pontificate, the 'key' to action in the options are the "Actor" commands:

ChangeActorPool turns the option choice as seen in the ledger on or off {using the $gmaOptionMil|MaxUse|[color="Red"]1[/color]|} part of the "monster parameters string" [1 = "on", 0 = "off]

ActorEnabled simply does a "true/false" test on the option described in the parameters, where "on" = true

ActorDisabled tests for "off" = true

and

ChangeOption $gmaOptionDip|FRA_Repl_Militia|1 is used {usually in the _AI event} to "select" the option [event language equivalent of 'clicking' on the option in gameplay]



Also note that the "Actors" are hard coded. In WIA, we only use:
$gmaOptionMil
$gmaOptionDip
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
Hobbes
Posts: 4438
Joined: Sat Mar 11, 2006 12:18 am
Location: UK

Sat Feb 21, 2009 3:36 pm

Thanks Lodi, much appreciated. I'm going to go through my _Regen events - that was the last thing I wasn't sure of.

I've already done quite a bit of testing and everything apart from _Regen is working fine. I now just need to test for balance and make some NM and VP adjustments.

I can see the light!

Thanks very much, Chris

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

Sun Feb 22, 2009 10:54 am

One thing that is still confusing me - why do many _Regen events have a 0 StartEvent such as evt_nam_GBR_More_OntSq_Regen in 1812?

Surely this will never fire? Is it being set to 1 somewhere?

Cheers, Chris

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

Sun Feb 22, 2009 12:55 pm

Hobbes wrote:One thing that is still confusing me - why do many _Regen events have a 0 StartEvent such as evt_nam_GBR_More_OntSq_Regen in 1812?

Surely this will never fire? Is it being set to 1 somewhere?

Cheers, Chris


No. It is set = 0 so you may only build 1 squadron [from the "_ON event]
Event is only there for an easy mod [or change of heart] :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
Hobbes
Posts: 4438
Joined: Sat Mar 11, 2006 12:18 am
Location: UK

Sun Feb 22, 2009 8:22 pm

lodilefty wrote:No. It is set = 0 so you may only build 1 squadron [from the "_ON event]
Event is only there for an easy mod [or change of heart] :blink:


Or to confuse modders :mdr:

Thanks Lodi

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

Sun Feb 22, 2009 9:03 pm

Hobbes wrote:Or to confuse modders :mdr:

Thanks Lodi


Do you mean that is NOT the objective? :wacko:

:neener:
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 12 guests