Pocus wrote:SelectSubUnits and then EvalSubUnitCount is the way to go. You can select by Domains (which is something intermediary in precision between UnitType (land or naval) and families. SelectSubUnits = Region $myRegion|Domains 0 will be enough to select land units.
Hobbes wrote:Hi Philippe, I tried this without success.
GBR SelectSubUnits Region $Mackinaw|Domains 0
GBR EvalSubUnitCount <|1
CountUnits $Mackinaw|0|$IND|-1|>=|1
With this, the event does not fire when there are no land units. There may be a ship in the harbour but this seems to destroyed or pushed out to sea during the turn so I can't see that this would have an effect.
If I substitute the above with the rather nasty :-
CountUnits $Mackinaw|0|$GBR|0|=|0
CountUnits $Mackinaw|0|$GBR|1|=|0
CountUnits $Mackinaw|0|$GBR|2|=|0
CountUnits $Mackinaw|0|$IND|-1|>=|1
The event fires when the Indians defeat the fort garrison.
Just thought I should mention this - but the event is working fine for me now.
Cheers, Chris
Hobbes wrote:Hi Philippe, I tried this without success.
GBR SelectSubUnits Region $Mackinaw|Domains 0
GBR EvalSubUnitCount <|1
CountUnits $Mackinaw|0|$IND|-1|>=|1
Pocus wrote:Why are you adding CountUnits here?
The Conditions section of the event should consists of a selection (SelectSubUnits ) and then the evaluation of it (EvalSubUnitCount). Should work, if not there is a bug...
the Indians burn the fort before events are considered.
lodilefty wrote:Did you try NULL where you have $Nothing ?
$Nothing will probably evaluate as structure type = 0 [Port], since it is undefined.
Hobbes wrote:Hi folks, is it legit to have more than one CountUnit commands in a single event with different regions :-
CountUnits $Mackinaw|0|$GBR|0|=|0
CountUnits $Le Detroit|0|$GBR|0|=|0
I get some funny results but there may be something else wrong with the event.
Thanks, Chris
lodilefty wrote:Funny? HaHa or wierd
AFAIK this should be OK if it's in Conditions. {Acts as "AND" condition.}
What else is in event and what result are you seeing?
Pocus wrote:Ahem...Something occurred to me. There is a command chain that create structures. It is used massively when you do the setup of a scenario:
CreateStruc
SetType = $City
SetName = Philadelphia
SetLevel = 10
Apply
I'll see if I can add one that remove a structure.
lodilefty wrote:
Will it also let us add a structure [city, port, village] by event?
We can already change structure by event, and can add a fort, depot, stockade or settlement, so this would 'round it out'.
Would it also make sense to add the Settlement, Stockade and Indian Villages to the "Scorched Earth" string?
IMHO, they should be 'treated' same as Fort or Depot...![]()
Pocus wrote:If I remember the code, the scorch rule burn level 1 city (that you call them village or settlement is a pure flavor thing for the code). Not the rest.
And yes, you can add structures with the syntax I gave you. Setup = 1 big event.
Pocus wrote:Ahem...Something occurred to me. There is a command chain that create structures. It is used massively when you do the setup of a scenario:
CreateStruc
SetType = $City
SetName = Philadelphia
SetLevel = 10
Apply
I'll see if I can add one that remove a structure.
[The extension xls has been deactivated and can no longer be displayed.]
Hobbes wrote:Thanks Philippe, it would nice to see the Indians able to take a region if only a few ships are in a harbour.
On another point - I just tried this in an event under Actions :-
CreateStruc NULL
SetType $Settlement
SetName Michilimackinac
SetLevel 1
The event fires OK but no settlement appears.
I've tried this with :-
CreateStruc Region $Mackinaw
and
CreateStruc NULL NULL NULL NULL $Mackinaw
But no luck.
Any ideas? Not sure If I understood how to put this into an event.
Cheers, Chris
P.S. attached the full event. I'm trying to create a settlement in Mackinaw on the first turn Indians exist in the region but no British units.
USA Athens Structure_Settlement 1 NULL NULL NULL $Shawnee 0 1
Return to “Modding AGE engine games”
Users browsing this forum: No registered users and 3 guests