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

Editing events: need help!

Mon Sep 15, 2008 1:37 pm

I need some clarification on syntax used by events!

In Peninsular War scenario we many such an event adding reinforcemets

StartEvent; 1
Conditions; NULL
MinDate; 1810/04/30
Actions; NULL
DescEvent; evt_desc_Renforts_ENG_Apr1810
[color="Red"]AddToRegList; $Santarem|$Lisboa|$Oporto
PickFromRegList; NotEnemy
SelRegInArea; $Area_Portugal|Squared|OwnedCities|CondSkip
SelectRegion; $Gibraltar|CondSkip
PickFromRegList; NotEnemy
SelectRegion; $Palma|$Port Mahon|CondSkip[/color]
Group; LAND
uni_ENG_Leith1; NULL
uni_ENG_Cotton1; NULL
uni_ENG_Bde11; NULL
uni_ENG_Cav10; 1
EndEvent ;NULL


AddToRegList; $Santarem|$Lisboa|$Oporto
PickFromRegList; NotEnemy


It creates a list of 3 Regions and pick one randomly at condition no enemy is present!

SelRegInArea; $Area_Portugal|Squared|OwnedCities|CondSkip
SelectRegion; $Gibraltar|CondSkip
PickFromRegList; NotEnemy


I ignore meaning of Squared, CondSkip commands.
OwnedCities should dictate the ownship of cities in Area_Portugal as a condition.

PickFromRegList; NotEnemy
I suppose it's referring to Owned cities in Area_Portugal plus Gibraltar.


SelectRegion; $Palma|$Port Mahon|CondSkip
SPalma and Port Mahon are the regions selectable for Group of units, (Reinforcement) deployement?

Thanks in advance for clarification!

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

Mon Sep 15, 2008 1:46 pm

jastaV wrote:StartEvent; 1
Conditions; NULL
MinDate; 1810/04/30
Actions; NULL
DescEvent; evt_desc_Renforts_ENG_Apr1810
AddToRegList; $Santarem|$Lisboa|$Oporto
PickFromRegList; NotEnemy

If all are enemy, NULL is returned, event does not occur

..but wait:
jastaV wrote:SelRegInArea; $Area_Portugal|Squared|OwnedCities|CondSkip
SelectRegion; $Gibraltar|CondSkip
PickFromRegList; NotEnemy

Choose frome these the same way:
CondSkip means: "If I have a valid selection, skip this selection commad, otherwise, process it normally"

jastaV wrote:
SelectRegion; $Palma|$Port Mahon|CondSkip


Last chance: Skip of you have a valid [not enemy] region, otherwise try this one.

If all are Enemy, event doesn't occur

This script places hierarchy of regions to select [orefeered regions first], as opposed to

SelectRegion; $Santarem|$Lisboa|$Oporto|$Gibraltar$Palma|$Port Mahon
PickFromRegList; NotEnemy


Which would randomly pick with no hierarchy...
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
jastaV
AGEod Guard of Honor
Posts: 1159
Joined: Mon Apr 14, 2008 9:22 am

Mon Sep 15, 2008 6:20 pm

lodilefty wrote:If all are enemy, NULL is returned, event does not occur

..but wait:

Choose frome these the same way:
CondSkip means: "If I have a valid selection, skip this selection commad, otherwise, process it normally"



Last chance: Skip of you have a valid [not enemy] region, otherwise try this one.

If all are Enemy, event doesn't occur

This script places hierarchy of regions to select [orefeered regions first], as opposed to



Which would randomly pick with no hierarchy...


Thanks for clarifications: it all start having a sence!

What as regard [color="Red"]SQUARED[/color] ?

User avatar
Barker
Major
Posts: 209
Joined: Mon Sep 01, 2008 7:05 pm
Location: Walterboro, South Carolina

Mon Sep 15, 2008 6:27 pm

looking at the original posting is spaces relavent in conjunction with syntax....i mean word ; word
word; word
word; word

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

Mon Sep 15, 2008 6:43 pm

jastaV wrote:What as regard SQUARED ?

All selected regions which have a city have a probability to be picked = to their structure level. If squared, you square the city level.





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

Mon Sep 15, 2008 6:44 pm

Barker wrote:looking at the original posting is spaces relavent in conjunction with syntax....i mean word ; word
word; word
word; word


Spaces doesn't matter in this case.

Return to “Modding AGE engine games”

Who is online

Users browsing this forum: No registered users and 6 guests