User avatar
Hobbes
Posts: 4438
Joined: Sat Mar 11, 2006 12:18 am
Location: UK

SelectSubUnits

Thu Jan 15, 2009 2:01 pm

Hi chaps, I don't think SelectSubUnits can be used to select only fixed units?

Cheers, Chris

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

Thu Jan 15, 2009 6:41 pm

Not for now, right...
Image


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

User avatar
Hobbes
Posts: 4438
Joined: Sat Mar 11, 2006 12:18 am
Location: UK

Sun Feb 08, 2009 1:44 pm

It's difficult to come up with an Indian winter quarters event for Indian units that may or may not be fixed.

Not being able to check if they have been unfixed before sending them home for winter can cause a lot of problems - so it would be great to have a fixed check for SelectSubUnits ;)

I'm sure there is a work around though.
Cheers, Chris

User avatar
Hobbes
Posts: 4438
Joined: Sat Mar 11, 2006 12:18 am
Location: UK

Sun Feb 08, 2009 1:51 pm

I just thought I can use EvalUnqUnit in the event condition to determine if a unit is unfixed. The only snag with this is that I have to have a seperate event for each unique tribe - quite a number of events.

Cheers, Chris

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

Mon Feb 09, 2009 11:16 am

Ok, I added the addition to the command to my list, your ticket is #10, and consider yourself privileged ;)
Image


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

User avatar
Hobbes
Posts: 4438
Joined: Sat Mar 11, 2006 12:18 am
Location: UK

Mon Feb 09, 2009 1:07 pm

:hat:

I do sir!

Thanks, Chris

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

Mon Feb 09, 2009 1:20 pm

Pocus wrote:Ok, I added the addition to the command to my list, your ticket is #10, and consider yourself privileged ;)


...and you do 1 per month? :blink:

:mdr: :mdr: :mdr: :mdr:


Actually, I see you doing 1 per hour. :w00t:
Many thanks. :)
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 Feb 11, 2009 6:12 pm

Depends, some task can take sometime or are recurring :)
Image


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

User avatar
Hobbes
Posts: 4438
Joined: Sat Mar 11, 2006 12:18 am
Location: UK

Sat Mar 21, 2009 11:51 am

Hi Philippe, I screwed up mightily with this one.

2. SelectSubUnits can be used to select only fixed units
http://www.ageod-forum.com/showthread.php?t=13560

I actually needed a change to SelUnqUnit.

The problem is that I have 50 odd Indian units, some active, some fixed and some then unfixed by combat and events. When winter comes and I need to send them back to winter quarters I have no way of knowing if they are still permanently fixed or not. So I have to send all back regardless with a ChangeFixing of 5. In the spring all Indians will become active even if they should be permanently fixed.

After realising I messed up with the change I have written 16 new events that look to see if Indians have been unfixed by event so I have a work around of sorts for the Pontiac scenario but it is very messy and not perfect.

If you ever get time after VGN is released it might be worth adding a fix check to SelUnqUnit though :o

At least the change to SelectSubUnits may be a useful one.

Cheers, Chris

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

Mon Mar 23, 2009 5:54 pm

No problem, it happens :)

But I don't understand why you can't use SelectSubUnits to select all your indians (select all elements of faction tag IND which are raider for example, it should to the trick).
Image


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

User avatar
Hobbes
Posts: 4438
Joined: Sat Mar 11, 2006 12:18 am
Location: UK

Tue Mar 24, 2009 8:38 am

I need a command that looks at the unique name - they all go to different places for winter.

Cheers, Chris

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

Tue Mar 24, 2009 6:39 pm

Ah yes, the shining light of your powerful mind has at last reached me! :)

I'll see what I can do, you butterfly-bringer-of-doom. (private joke).
Image


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

User avatar
Hobbes
Posts: 4438
Joined: Sat Mar 11, 2006 12:18 am
Location: UK

Tue Mar 24, 2009 7:23 pm

Pocus wrote:Ah yes, the shining light of your powerful mind has at last reached me! :)

I'll see what I can do, you butterfly-bringer-of-doom. (private joke).


:love:

you butterfly-bringer-of-doom - a phrase I imagine you never thought you would use :)

Thanks, Chris

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

Wed Mar 25, 2009 5:40 pm

I hesitated in which order I should put the adjectives and names btw. But it will do ;)
Image


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

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

Wed Mar 25, 2009 6:56 pm

Here are two new options (this should summon Lodi and Gray in no time!)

You can select by attributes your elements. So instead of say searching by faction tag you search for a particular attribute. I remind ppl that they can define attributes for their own use (it is better to bound them by * though), like:

*ThisIsMyOwnPrivateAttribute*

With SelectSubUnit(s) you can then use Attributes *Attrib1* *Attrib2* etc. to pick specific elements.

The second option is UniqueName <UniqueName> as in

SelectSubUnit = UniqueName Cherokee Warband

This is completely untested though, so please report troubles... :neener:
Attachments
WIA.rar
(1.15 MiB) Downloaded 210 times
Image


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

User avatar
Hobbes
Posts: 4438
Joined: Sat Mar 11, 2006 12:18 am
Location: UK

Wed Mar 25, 2009 7:49 pm

Pocus wrote:Here are two new options (this should summon Lodi and Gray in no time!)

You can select by attributes your elements. So instead of say searching by faction tag you search for a particular attribute. I remind ppl that they can define attributes for their own use (it is better to bound them by * though), like:

*ThisIsMyOwnPrivateAttribute*

With SelectSubUnit(s) you can then use Attributes *Attrib1* *Attrib2* etc. to pick specific elements.

The second option is UniqueName <UniqueName> as in

SelectSubUnit = UniqueName Cherokee Warband

This is completely untested though, so please report troubles... :neener:


This sounds wonderful - but after a day with internal audit I think I will have to give my brain a rest.

But thank you (I think :thumbsup :) ! :coeurs:

Chris

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

Wed Mar 25, 2009 8:24 pm

Pocus wrote:Here are two new options (this should summon Lodi and Gray in no time!)

You can select by attributes your elements. So instead of say searching by faction tag you search for a particular attribute. I remind ppl that they can define attributes for their own use (it is better to bound them by * though), like:

*ThisIsMyOwnPrivateAttribute*

With SelectSubUnit(s) you can then use Attributes *Attrib1* *Attrib2* etc. to pick specific elements.

The second option is UniqueName <UniqueName> as in

SelectSubUnit = UniqueName Cherokee Warband

This is completely untested though, so please report troubles... :neener:


This command is new? :confused:

We can still use SelUnqSubUnit

and

SelUnqUnit

???
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
Hobbes
Posts: 4438
Joined: Sat Mar 11, 2006 12:18 am
Location: UK

Thu Mar 26, 2009 1:28 pm

Pocus wrote:Here are two new options (this should summon Lodi and Gray in no time!)

You can select by attributes your elements. So instead of say searching by faction tag you search for a particular attribute. I remind ppl that they can define attributes for their own use (it is better to bound them by * though), like:

*ThisIsMyOwnPrivateAttribute*

With SelectSubUnit(s) you can then use Attributes *Attrib1* *Attrib2* etc. to pick specific elements.

The second option is UniqueName <UniqueName> as in

SelectSubUnit = UniqueName Cherokee Warband

This is completely untested though, so please report troubles... :neener:


If I understand this correctly :-

Command SelectSubUnit
Param0 Cherokee Warband|0

Is this the correct format?

This would make SelectSubUnit similar to SelUnqSubUnit but with the ability
to select only fixed?

Cheers, Chris

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

Thu Mar 26, 2009 2:00 pm

I've tried several syntax, with little sucess:

SelectFaction = $GBR
StartEvent = evt_nam_atribute_select|1|1|NULL|NULL|NULL|NULL

Conditions
MinDate = 1620/01/01

Actions
SelectSubUnit = UniqueName Infantry;
SelectSubUnit = Attributes *countercharge*;
GenMsg

EndEvent


First on selects every unit on map :(
Second selects nothing :(

Line 15192: SelectSubUnits 1001548 Braves added, List Count now at: 485
Line 15192: SelectSubUnits finished Regions Selected: 0 SubUnits Selected: 485
Line 15193: SelectSubUnits finished Regions Selected: 0 SubUnits Selected: 0

Hocus Pocus
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
Hobbes
Posts: 4438
Joined: Sat Mar 11, 2006 12:18 am
Location: UK

Thu Mar 26, 2009 2:22 pm

Lodi, where you have :-

SelectSubUnit = UniqueName Infantry;


Do I actually have to put UniqueName in param0?

Param0
UniqueName|Cherokee Warband|0

Cheers, Chris

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

Thu Mar 26, 2009 2:27 pm

Dunno, doesn't seem to work and I tired of trying things until we get "ye olde syntaxe answere" :blink:
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 21 guests