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

ChangeActorPool

Tue Oct 28, 2008 8:37 pm

I notice the option event files have various actor type events. Is there any information on these anywhere? I've not been able to find much but thought I had seen something a few weeks ago.

Also is it possible to deliberatly make a general inactive for a turn? Using RerollActivation?

Many thanks for any help,
Chris

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

Wed Oct 29, 2008 2:06 pm

I can the first mention of ChangeActorPool under AACW patch 1.07f but no mention of how it works?

Modding:
fixed: ChangeActorPool command had a bug.

:confused:
Cheers, Chris

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

Wed Oct 29, 2008 3:49 pm

This command is used a lot in WIA options. :D

And they are working very well in WIA...

What we can't mod are the 'Actors', as they involve hard code.

See Actors.ini under aliases...
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: 4436
Joined: Sat Mar 11, 2006 12:18 am
Location: UK

Wed Oct 29, 2008 7:37 pm

Hi Lodi, I'm really confused about options. I assume I can make unique options for the Pontiac scenario? I thought they were just events triggered by the player clicking on the picture.

Now I've reached the stage were I would like to start creating them I see that the options events have some different commands like ChangeActorPool and I wonder how these work. Looking at the forum I find nothing - just a remark that a bug was fixed in ChangeActorPool in 1.07f.

I really hope that I am able to create unique events triggered by options or all my efforts will have been in vain. :( If you can confirm that I can I will be a happy man! :love: For example one simple option I would like to see would be to build an Indian fire raft which would trigger an event that would have a 30% probability of sinking a ship moored at Detroit.

I'm sure I will be able to work out how the option events work myself eventually if there is no information but I wonder how others came to understand this?

Thanks, Chris

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

Wed Oct 29, 2008 9:05 pm

Maybe this example helps? It is from Optionsmil.sct

This adds a military option via the ChangeActorPool command:

Code: Select all

SelectFaction = $USA
StartEvent = evt_nam_USA_Repl_Supply_ON|1|0|NULL|NULL|NULL|NULL

Conditions
  MinDate = 1775/01/01

Actions
  ChangeActorPool = $gmaOptionMil;MaxUse;1;ResetFreq;0;ImageID;Opt_SYW_britsh_soldiers.png;Title;opt_title_USA_Repl_Supply;MsgString;opt_desc_USA_Repl_Supply;ToolString;opt_hint_USA_Repl_Supply;SubType;[B]USA_Repl_Supply[/B];SParam1;USA
Here is checked if the option is selected and the according actions are triggered.

Code: Select all

SelectFaction = $USA
StartEvent = evt_nam_USA_Repl_Supply_Check|999|0|NULL|NULL|NULL|NULL

Conditions
  CheckOption = $gmaOptionMil;[B]USA_Repl_Supply[/B];=;1
  EvalEngagementPts = >=;15

Actions
  ChgFacEngagementPts = -15

SelectRegion = $Philadelphia

SelectFaction = $USA
SelectRegion = $Philadelphia
  CreateGroup
  Posture = $Defensive
  SetKind = $Land
  Entranch = 0
  InCS = 0
  FixType = 0
  SetName = _genName
  Apply
  CreateUnit
  SetType = $uni_USA_Sup1
  SetName = _genName
  Apply

SelectFaction = $GBR
  GenTextMsg  = opt_notify_USA_GBR_Repl_Supply;1;NULL;NULL;NULL

SelectFaction = $USA
  GenTextMsg  = opt_notify_USA_Repl_Supply;1;NULL;NULL;NULL
  ChangeActorPool = $gmaOptionMil;MaxUse;0;ResetFreq;0;ImageID;Opt_SYW_britsh_soldiers.png;Title;opt_title_USA_Repl_Supply;MsgString;opt_desc_USA_Repl_Supply;ToolString;opt_hint_USA_Repl_Supply;SubType;USA_Repl_Supply;SParam1;USA

EndEvent

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

Wed Oct 29, 2008 10:13 pm

Thank you! From a quick look I assume I can add an event then such as IND_Fire_Raft instead of USA_Repl_Supply to trigger my own event from an option? I'm still not sure if I can make my own events trigger from options or if I can only pick from a stock of existing option fired events?

I think I can work out what ChangeActorPool does but I still find it strange that there is no information on this.

Many thanks, Chris

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

Wed Oct 29, 2008 11:02 pm

From a quick look I assume I can add an event then such as IND_Fire_Raft instead of USA_Repl_Supply to trigger my own event from an option?
Yes, you can do this. :)

I'm still not sure if I can make my own events trigger from options or if I can only pick from a stock of existing option fired events?
You can trigger any event. Create an event which is checked every turn and add as condition

Code: Select all

CheckOption = $gmaOptionMil;IND_Fire_Raft;=;1
to test if the option was selected.

This one:

Code: Select all

EvalEngagementPts = >=;15
checks if there are enough EP to pay for the option.

I think I can work out what ChangeActorPool does but I still find it strange that there is no information on this.
What's why it is good that you are asking. :thumbsup:
So if you have any more questions don't hesitate to post them. :)

Cheers
Norbert

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

Wed Oct 29, 2008 11:06 pm

Yes you can write your own...

I sort of understand the logic flow of the options, and wrote new ones exactly the way you describe: substitute string content in those pesky mega strings that make them work...

Each option has the following event set:
[use 1775 USA buys supply as example]

evt_nam_USA_Repl_Supply_AIActivate
enables the option for the AI, with probability that AI "does it"

evt_nam_USA_Repl_Supply_ON
Activates the option in ledger

evt_nam_USA_Repl_Supply_Check
checks to see if player selected the option this turn, and if there are enough EP [also any other conditions you wish]. If all true, then "does it"
event includes the 'action' and text messages to notify both sides
event de-activates the option

evt_nam_USA_Repl_Supply_Regen
Reactivates the option, per the conditions.
This is where we limit the number of 'reactivations'...

All the 'non-option' event script can be used [probability, ownership of regions, counting units, etc.]. The 'ActorPool' just adds the ability for the play to choose to do it....

Lots of strings to add, logic to check. It only takes one small typo or string error to FUBARR the option. Trust me: been there, did that ;)

Good luck! Advice freely given! Buy your own anti-acids :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: 4436
Joined: Sat Mar 11, 2006 12:18 am
Location: UK

Thu Oct 30, 2008 12:03 am

Oh phew! I can't tell you what a relief this is - I have so many ideas in mind for options and I started thinking that maybe I wouldn't be able to make them.

Thanks chaps, I will study these tomorrow and start making a few.

:coeurs:
Chris

User avatar
jastaV
AGEod Guard of Honor
Posts: 1159
Joined: Mon Apr 14, 2008 9:22 am

Milititary Options: an experiment

Thu Oct 30, 2008 4:09 pm

I uploaded down here an EXL abstract, relative to a military Opitions I'm working on.

1. Military_Options_On

"StartEvent" is set to zero:
StartEvent; 0
It is expected to be later activated by Military_Options_Regen event.
With that I hope to add some randomness to Military Option availability.

2. I tried adding a "Disable" event for the Option:
evt_nam_FRA_MilitaryOption13GC5_Disable
[color="RoyalBlue"]Conditions; NULL
FixedDate; 1813/09/01
Actions; NULL
ChangeActorPool; $gmaOptionMil|MaxUse|0|ResetFreq|0|ImageID|None.png|Title|opt_title_FRA13CG5|MsgString|opt_desc_FRA13CG5|ToolString|opt_hint_FRA13CG5|SubType|FRA_MilitaryOption13GC5|SParam1|FRA[/color]

With this I hope to remove the option from ledgers pages ata fixed date: MaxUse|0 was used in ChangeActorPool.

I'm editing it now ad I have not tested it.... just hope it works!

3. This is a question, indeed!

I'd like to have ChangeActorPool beeing a random event rather thata 100% chance one.
Do you know if is possible to add a Probability check to a ChangeActorPool?

Something like:

ChangeActorPool; [color="Red"]Probability 50[/color]|$gmaOptionMil|MaxUse|0|ResetFreq|0|ImageID|None.png|Title|opt_title_FRA13CG5|MsgString|opt_desc_FRA13CG5|ToolString|opt_hint_FRA13CG5|SubType|FRA_MilitaryOption13GC5|SParam1|FRA

or perhaps: $gmaOptionMil|MaxUse|0|[color="Red"]Probability 50[/color]|ResetFreq|0|ImageID|None.png|Title|opt_title_FRA13CG5|MsgString|opt_desc_FRA13CG5|ToolString|opt_hint_FRA13CG5|SubType|FRA_MilitaryOption13GC5|SParam1|FRA

Thanks in advance for suggestions.
Attachments

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


User avatar
Pocus
Posts: 25659
Joined: Wed Oct 19, 2005 7:37 am
Location: Lyon (France)

Thu Oct 30, 2008 5:42 pm

Hobbes wrote:Oh phew! I can't tell you what a relief this is - I have so many ideas in mind for options and I started thinking that maybe I wouldn't be able to make them.

Thanks chaps, I will study these tomorrow and start making a few.

:coeurs:
Chris


Yes, this is what is good with Options, they use the script engine, which can be expanded what's more to suit more need.
Image


Hofstadter's Law: "It always takes longer than you expect, even when you take into account Hofstadter's law."

User avatar
Pocus
Posts: 25659
Joined: Wed Oct 19, 2005 7:37 am
Location: Lyon (France)

Thu Oct 30, 2008 5:43 pm

JastaV: No you don't change anything in the parameters of the Option (or Actor), but you can instead change the conditions of the events triggering it.
Image


Hofstadter's Law: "It always takes longer than you expect, even when you take into account Hofstadter's law."

User avatar
jastaV
AGEod Guard of Honor
Posts: 1159
Joined: Mon Apr 14, 2008 9:22 am

Thu Oct 30, 2008 5:55 pm

Pocus wrote:JastaV: No you don't change anything in the parameters of the Option (or Actor), but you can instead change the conditions of the events triggering it.



Yes, something like:

[color="RoyalBlue"]Conditions; NULL
ActorDisabled; $gmaOptionMil|FRA_MilitaryOption13GC5
Probability; 50[/color]

I know this one works, with a 50% chance the Option will be available for selection!
Indeed, I was looking for something a bit more complex: side has to activate the option paying for relative costs, but I was seeking for a reduced chance , (50% in the example) to get the option benefit.

Example: you pay full activation cost for getting replacents, but you have a 50% change you will not get any! :neener:

User avatar
jastaV
AGEod Guard of Honor
Posts: 1159
Joined: Mon Apr 14, 2008 9:22 am

Thu Oct 30, 2008 7:21 pm

Pocus wrote:JastaV: No you don't change anything in the parameters of the Option (or Actor), but you can instead change the conditions of the events triggering it.


Guess I have a solution: I'll put a ChgEvtOccurs command in the MilitaryOption_Check

[color="Blue"]ChgEvtOccurs; evt_nam_AddRepl13a|MaxOccurs|1[/color]

Replacemet actual delivery will be linked to probability of evt_nam_AddRepl13a!

It should work!
Ney: The army will not move!
Napoleon: The army will obey me!
Ney: The army will obey to its Generals’ orders!

[SIZE="1"]Fontainebleau, April 1814[/size]

Return to “WIA Mods”

Who is online

Users browsing this forum: No registered users and 9 guests