Page 1 of 1

SelectSubUnits

Posted: Thu Jan 15, 2009 2:01 pm
by Hobbes
Hi chaps, I don't think SelectSubUnits can be used to select only fixed units?

Cheers, Chris

Posted: Thu Jan 15, 2009 6:41 pm
by Pocus
Not for now, right...

Posted: Sun Feb 08, 2009 1:44 pm
by Hobbes
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

Posted: Sun Feb 08, 2009 1:51 pm
by Hobbes
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

Posted: Mon Feb 09, 2009 11:16 am
by Pocus
Ok, I added the addition to the command to my list, your ticket is #10, and consider yourself privileged ;)

Posted: Mon Feb 09, 2009 1:07 pm
by Hobbes
:hat:

I do sir!

Thanks, Chris

Posted: Mon Feb 09, 2009 1:20 pm
by lodilefty
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. :)

Posted: Wed Feb 11, 2009 6:12 pm
by Pocus
Depends, some task can take sometime or are recurring :)

Posted: Sat Mar 21, 2009 11:51 am
by Hobbes
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

Posted: Mon Mar 23, 2009 5:54 pm
by Pocus
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).

Posted: Tue Mar 24, 2009 8:38 am
by Hobbes
I need a command that looks at the unique name - they all go to different places for winter.

Cheers, Chris

Posted: Tue Mar 24, 2009 6:39 pm
by Pocus
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).

Posted: Tue Mar 24, 2009 7:23 pm
by Hobbes
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

Posted: Wed Mar 25, 2009 5:40 pm
by Pocus
I hesitated in which order I should put the adjectives and names btw. But it will do ;)

Posted: Wed Mar 25, 2009 6:56 pm
by Pocus
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:

Posted: Wed Mar 25, 2009 7:49 pm
by Hobbes
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

Posted: Wed Mar 25, 2009 8:24 pm
by lodilefty
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

???

Posted: Thu Mar 26, 2009 1:28 pm
by Hobbes
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

Posted: Thu Mar 26, 2009 2:00 pm
by lodilefty
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

Posted: Thu Mar 26, 2009 2:22 pm
by Hobbes
Lodi, where you have :-

SelectSubUnit = UniqueName Infantry;


Do I actually have to put UniqueName in param0?

Param0
UniqueName|Cherokee Warband|0

Cheers, Chris

Posted: Thu Mar 26, 2009 2:27 pm
by lodilefty
Dunno, doesn't seem to work and I tired of trying things until we get "ye olde syntaxe answere" :blink: