Create account / Log in

Trait order in counters

Talk about module design ideas and techniques.

Moderators: Tim M, uckelman

Trait order in counters

Postby Brent Easton » January 11th, 2008, 11:02 pm

I have noticed many messages reporting bugs and module problems that all stem from the same basic misunderstanding about the way that counter traits work.

The Three most important things to remember when setting up traits in a counter are

LOCATION, LOCATION and LOCATION!

The order of traits is VITALLY important. This needs to be engraved on the forehead of every budding VASSAL module designer.

Each trait is only affected by other traits that are BELOW it in the expanded list of traits after taking prototypes into account.

If you want Text Labels to Rotate, then the Text Label trait must be ABOVE the Rotation trait. If you don't want your Text Labels to rotate, then they must be BELOW the Rotation trait. You need to think about each trait, how it affects the counter and whether it should affect, or be affected by other traits that affect the counter.

This is a FEATURE, not a BUG. You can't just blast in the traits you want in any order and expect them to work. You can't move a trait from one prototype to another and expect it work in exactly the same way (though it may). You need to take into account the order of all traits in all prototypes after they have all been expanded.

Cheers,
Brent.




____________________________________________________________
Brent Easton
Analyst/Programmer
University of Western Sydney
Email: b.easton@uws.edu.au


_______________________________________________
Messages mailing list
Messages@forums.vassalengine.org
http://forums.vassalengine.org/mailman/ ... engine.org

Post generated using Mail2Forum (http://www.mail2forum.com)
User avatar
Brent Easton
 
Posts: 2742
Joined: December 21st, 2007, 3:06 am
Location: Berry, NSW, Australia

Postby bsmith » January 12th, 2008, 9:07 am

Good post Brent, I made it a sticky.
User avatar
bsmith
Site Admin
 
Posts: 657
Joined: October 2nd, 2007, 4:47 pm

very good to know

Postby brucesears » January 16th, 2008, 6:18 pm

thanks brent
brucesears
 
Posts: 30
Joined: January 16th, 2008, 6:07 pm
Location: San Jose, CA

Postby Damiste » January 20th, 2010, 3:58 pm

I understand that it does not apply to shortcuts, does it?
Damiste
 
Posts: 20
Joined: January 18th, 2010, 3:54 pm

Postby Damiste » January 20th, 2010, 4:00 pm

Also, if this is vitally important, then I suggest that this is underlined both in the documentation (in bold characters) and in the piece definition dialog box.

I believe that this would only take you 5 minutes to do that, and would save lots of headaches to beginners (and not so beginners alike probably).

Regards.

Nicolas.
Damiste
 
Posts: 20
Joined: January 18th, 2010, 3:54 pm

Re: Trait order in counters

Postby kpilkington » February 16th, 2011, 6:43 pm

Okay, how does this impact my current project? I'm adding movement trails to a set of counters that have a flipped side as a layer. Will it make a difference if I put the movement trails in above or below the layer? (And if I put them in a prototype, that would be like putting it above even if the prototype is below?)
kpilkington
 
Posts: 21
Joined: January 1st, 2011, 8:48 pm

Re: [messages] [Module Design] Re: Trait order in counters

Postby pgeerkens » February 16th, 2011, 7:00 pm

The behaviour I have seen appears that prototypes are expanded 'in place'
during unit creation, so that traits in a prototype maintain their relative
order as in the prototype, and sit in the piece where the prototype sits.
This is transitive, so that it generalizes to prototypes within prototypes..

Pieter

-----Original Message-----
From: messages-bounces@vassalengine.org
[mailto:messages-bounces@vassalengine.org] On Behalf Of kpilkington
Sent: Wednesday, February 16, 2011 1:44 PM
To: messages@vassalengine.org
Subject: [messages] [Module Design] Re: Trait order in counters

Okay, how does this impact my current project? I'm adding movement
trails to a set of counters that have a flipped side as a layer. Will
it make a difference if I put the movement trails in above or below the
layer? (And if I put them in a prototype, that would be like putting it
above even if the prototype is below?)

_______________________________________________
Read this topic online here:
viewtopic.php?p=21891#p21891
Pieter
-----------------------------------------
"Even on the attack, I found the spade [to be] the equal of the rifle."
Erwin Rommel, Infantry Attacks
User avatar
pgeerkens
 
Posts: 228
Joined: September 12th, 2010, 4:33 am
Location: Hamilton, Ontario, Canada

Re: Trait order in counters

Postby ijam » November 18th, 2012, 8:21 am

Brent Easton wrote:
Each trait is only affected by other traits that are BELOW it in the expanded list of traits after taking prototypes into account.



OK. But ...

... from my experience, the sequence of setting Global Property seems to be from top to bottom i.e. if
- GP2 is conditioned by GP1 value,
- GP1 and GP2 are trigged by the same GKC,

the code should be :

set GP1
Trigger to set GP1
...
set GP2
Trigger to set GP2
...
Right ?

Ijam.
ijam
 
Posts: 16
Joined: October 20th, 2012, 6:01 am
Location: Bruxelles, BELGIUM

Re: Trait order in counters

Postby samuelw3 » June 4th, 2013, 9:04 pm

So if I have Dynamic property (Mass) ; a text Label displaying the dynamic property (mass); an action button that activates the dynamic property's keystrokes; and a calculated property that calculates a value based on the dynamic property... does the order of these affect their function? should the buttons be on top and the calculated be on the bottom?
samuelw3
 
Posts: 46
Joined: August 31st, 2011, 5:34 pm
Location: Columbus OH

Re:

Postby jmp120 » March 19th, 2014, 7:42 pm

Damiste wrote:Also, if this is vitally important, then I suggest that this is underlined both in the documentation (in bold characters) and in the piece definition dialog box.

I believe that this would only take you 5 minutes to do that, and would save lots of headaches to beginners (and not so beginners alike probably).

Regards.

Nicolas.


I ran into this myself. I would have figured it out had it been documented. I just looked in the Game Pieces Help and it's not there. You can't blame someone for not understanding what isn't documented.
jmp120
 
Posts: 9
Joined: February 24th, 2014, 6:36 pm

Re: Trait order in counters

Postby Stiglr » October 12th, 2014, 5:09 pm

jmp120 wrote:

You can't blame someone for not understanding what isn't documented.


(Only half in jest) Yes, you can: especially if you're a software engineer. They resent everyone who can't quote code, or don't know the Windows Development Guide verse for verse. Ever notice how IT people seem to have that chip on their shoulder, so that when you call them in to solve a problem, they act as if "you should've *known* how to do this yourself"? :D
Stiglr
 
Posts: 178
Joined: June 28th, 2014, 12:06 am

Re: Trait order in counters

Postby ChuckS » June 12th, 2018, 1:45 pm

I move the order of elements in the design to troubleshoot when something is not working correctly, so also use the order as a troubleshooting tool before declaring a bug as 99% of the time it's a design flaw by the designer and not vassal itself. Had a map issue that I caused and moving the map to the bottom of the design helped me figure out what was really going on. So do the same for traits on a unit and see what changes!
ChuckS
 
Posts: 47
Joined: August 16th, 2016, 4:37 pm


Return to Module Design

Who is online

Users browsing this forum: No registered users and 2 guests

cron