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

CountUnits command

Mon Mar 03, 2008 7:24 pm

Given a command line:

[color="Red"]CountUnits = $Great Plains;0;$USA;-1;<;3[/color]
Parameters are:

[INDENT]$Great Plains where to count the units
0
$USA Which factions units to count
-1
< less than
3 how many units must be found to get a 'true' result
[/INDENT]

I understand this to be "True if USA has less than 3 units in Great Plains."

Questions:
  1. What does the '0' do?
  2. What does the '-1' do?
  3. Is a unit anything that exists as a unit [UID] in the Units folder/database?

Thank you
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)

Tue Mar 04, 2008 9:13 am

0 means you are giving the alias to a region, not an area
-1 means any type and not a particular unit type

3. yes
Image


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

User avatar
Jabberwock
Posts: 2204
Joined: Thu May 31, 2007 12:12 am
Location: Weymouth, MA
Contact: ICQ

Tue Mar 04, 2008 9:18 am

Thank you :)
[color="DimGray"] You deserve to be spanked[/color]

Image

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

Tue Mar 04, 2008 12:29 pm

Pocus wrote:0 means you are giving the alias to a region, not an area
-1 means any type and not a particular unit type

3. yes


Thank you very much! :coeurs: :king:

What are the other valid values for the two variables you define?

I think it's tme to start a section in the Wiki, eh? :niark:
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
Jabberwock
Posts: 2204
Joined: Thu May 31, 2007 12:12 am
Location: Weymouth, MA
Contact: ICQ

Tue Mar 04, 2008 12:58 pm

Too late; but you're welcome to edit what is already there.
[color="DimGray"] You deserve to be spanked[/color]



Image

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

Tue Mar 04, 2008 1:16 pm

Jabberwock wrote:Too late; but you're welcome to edit what is already there.


I sure hope that's a new entry... :siffle:
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
Jabberwock
Posts: 2204
Joined: Thu May 31, 2007 12:12 am
Location: Weymouth, MA
Contact: ICQ

Tue Mar 04, 2008 1:17 pm

:niark: Define new. Thanks for the assist, Rafiki.
[color="DimGray"] You deserve to be spanked[/color]



Image

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

Tue Mar 04, 2008 1:23 pm

Jabberwock wrote: :niark: Define new. Thanks for the assist, Rafiki.


New [in this case] = since Pocus answered the question...... :sourcil:
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
Rafiki
Posts: 5811
Joined: Thu Aug 24, 2006 9:19 am
Location: Oslo, Norway

Tue Mar 04, 2008 2:53 pm

Jabberwock wrote: :niark: Define new. Thanks for the assist, Rafiki.

My pleasure :)

For those looking for it: http://www.ageod.net/aacwwiki/CountUnits
[CENTER]Latest patches: AACW :: NCP :: WIA :: ROP :: RUS :: PON :: AJE
Visit AGEWiki - your increasingly comprehensive source for information about AGE games
[SIGPIC][/SIGPIC]
[/CENTER]

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

Tue Mar 04, 2008 2:59 pm

Is this the 'unit type' definition list?

// SubTypes
$Regular = 0
$Irregular = 1
$Militia = 2
$Cavalry = 3
$Artillery = 4
$Arty = 4
$SupplyType = 5
$Ship = 6

[from \Aliases\SubTypes (of units&models).ini
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 Mar 05, 2008 2:20 pm

lodilefty wrote:Is this the 'unit type' definition list?

// SubTypes
$Regular = 0
$Irregular = 1
$Militia = 2
$Cavalry = 3
$Artillery = 4
$Arty = 4
$SupplyType = 5
$Ship = 6

[from \Aliases\SubTypes (of units&models).ini


yes
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 Mar 05, 2008 2:28 pm

Thank you very much, Sir! :gardavou: :king:
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]

Return to “Modding AGE engine games”

Who is online

Users browsing this forum: No registered users and 5 guests