Page 1 of 1

Editing events: need help!

Posted: Mon Sep 15, 2008 1:37 pm
by jastaV
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!

Posted: Mon Sep 15, 2008 1:46 pm
by lodilefty
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...

Posted: Mon Sep 15, 2008 6:20 pm
by jastaV
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] ?

Posted: Mon Sep 15, 2008 6:27 pm
by Barker
looking at the original posting is spaces relavent in conjunction with syntax....i mean word ; word
word; word
word; word

Posted: Mon Sep 15, 2008 6:43 pm
by Primasprit
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.





Posted: Mon Sep 15, 2008 6:44 pm
by Primasprit
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.