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

Improved Command: SelMostNumGroup

Wed May 21, 2008 4:17 pm

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.
Image


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

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

Wed May 28, 2008 1:05 pm

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?
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
PhilThib
Posts: 13705
Joined: Tue Oct 18, 2005 5:21 pm
Location: Meylan (France)

Wed May 28, 2008 1:18 pm

It fits the instruction in all cases :sourcil: :king: :indien:
Image

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

Wed May 28, 2008 1:56 pm

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?
Image


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

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

Wed May 28, 2008 2:17 pm

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! :king: I really want to create an event that depletes large Army stacks!
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
Pocus
Posts: 25673
Joined: Wed Oct 19, 2005 7:37 am
Location: Lyon (France)

Wed May 28, 2008 3:30 pm

done!
Image


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

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

Wed May 28, 2008 3:45 pm

Pocus wrote:done!


:king:

Um, I'm a bit slow today... :bonk:

could you give an example? :nuts:
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
Pocus
Posts: 25673
Joined: Wed Oct 19, 2005 7:37 am
Location: Lyon (France)

Wed May 28, 2008 4:21 pm

Conditions
SelMostNumGroup = CPCount
EvalSubUnitCount = >=|8
Actions
Image


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

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

Wed May 28, 2008 5:19 pm

Pocus wrote:Conditions
SelMostNumGroup = CPCount
EvalSubUnitCount = >=|8
Actions


Thank you! :king: :coeurs:
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
aryaman
Posts: 738
Joined: Thu May 18, 2006 6:19 pm

Wed May 28, 2008 6:43 pm

lodilefty wrote:Yes please! :king: 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?

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

Wed May 28, 2008 7:50 pm

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
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
Pocus
Posts: 25673
Joined: Wed Oct 19, 2005 7:37 am
Location: Lyon (France)

Thu May 29, 2008 9:28 am

yes, although the first genmsg can be a problem, but the insertion is automatic
Image


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

User avatar
aryaman
Posts: 738
Joined: Thu May 18, 2006 6:19 pm

Fri May 30, 2008 12:03 pm

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...

Return to “Modding AGE engine games”

Who is online

Users browsing this forum: No registered users and 1 guest