Page 1 of 1
Improved Command: SelMostNumGroup
Posted: Wed May 21, 2008 4:17 pm
by Pocus
This old command, dating back from BOA1, is useful to select the biggest stack on map you have.
It has been improved with 2 options:
SelMostNumGroup = [;NoSelGroup] [;Area AreaUID] [;CPCount] [;EvenFixed] [;NAVAL]
EvenFixed means that even fixed stacks can be selected (default no)
NAVAL means you want to select fleets (default land)
Lone Leaders are never counted in any case as a valid unit.
Posted: Wed May 28, 2008 1:05 pm
by lodilefty
I am trying to create 'Sanitation is Poor' event as a variation on 'epidemics'.
I want to select the largest Army, and apply the losses only if that group exceeds 4 CP.
Is the attached event going to do this?
Posted: Wed May 28, 2008 1:18 pm
by PhilThib
Posted: Wed May 28, 2008 1:56 pm
by Pocus
lodilefty wrote:I am trying to create 'Sanitation is Poor' event as a variation on 'epidemics'.
I want to select the largest Army, and apply the losses only if that group exceeds 4 CP.
Is the attached event going to do this?
bad syntax!
[] means the parameter is optional.
CPCount is a literal expression meaning you count by CP and not by unit number.
So at best, you can select the biggest group, by CP count, on a specific area, nothing much more.
What I can do is to add to the list of selected sub-units (the same list used for SelSubUnits/AlterCuSubUnit) the SUs of the group. With that, you can folow with EvalSubUnitCount which can let you enter (or not) the action block depending of the value you put, in SUs.
Interested?
Posted: Wed May 28, 2008 2:17 pm
by lodilefty
Pocus wrote:bad syntax!
[] means the parameter is optional.
CPCount is a literal expression meaning you count by CP and not by unit number.
So at best, you can select the biggest group, by CP count, on a specific area, nothing much more.
What I can do is to add to the list of selected sub-units (the same list used for SelSubUnits/AlterCuSubUnit) the SUs of the group. With that, you can folow with EvalSubUnitCount which can let you enter (or not) the action block depending of the value you put, in SUs.
Interested?
Yes please!

I really want to create an event that depletes large Army stacks!
Posted: Wed May 28, 2008 3:30 pm
by Pocus
done!
Posted: Wed May 28, 2008 3:45 pm
by lodilefty
Pocus wrote:done!
Um, I'm a bit slow today...
could you give an example?

Posted: Wed May 28, 2008 4:21 pm
by Pocus
Conditions
SelMostNumGroup = CPCount
EvalSubUnitCount = >=|8
Actions
Posted: Wed May 28, 2008 5:19 pm
by lodilefty
Pocus wrote:Conditions
SelMostNumGroup = CPCount
EvalSubUnitCount = >=|8
Actions
Thank you!

Posted: Wed May 28, 2008 6:43 pm
by aryaman
lodilefty wrote:Yes please!

I really want to create an event that depletes large Army stacks!
That is a really interesting feature, how do you plan to use it?
Posted: Wed May 28, 2008 7:50 pm
by lodilefty
aryaman wrote:That is a really interesting feature, how do you plan to use it?
I hope his is correct:
SelectFaction = $USA
StartEvent = evt_nam_USA_Poor_Sanitation|999|1|NULL|NULL|NULL|NULL
Conditions
MinDate = 1791/01/01
Probability = 50
SelectFaction = $USA
SelectFaction = $USA
SelMostNumGroup = CPCount;EvenFixed
GenMsg
EvalSubUnitCount = >=;10
Actions
GenMsg
ChgGroupHealth = -10
ChgGroupCoh = -40
EndEvent
Posted: Thu May 29, 2008 9:28 am
by Pocus
yes, although the first genmsg can be a problem, but the insertion is automatic
Posted: Fri May 30, 2008 12:03 pm
by aryaman
I think that command could be very useful in NCP to prevent too large stacks, and especially to avoid the "Davout effect", players lumping together everything in a huge corps under Davout, selecting a high CP number but also a high probability (say 90%) so that players know that if they stack together forces too large they will suffer sanitation problems.
It could also prevent a "Hannibal effect" in "PW mod...