Create account / Log in

Quick Question on Markers

Talk about module design ideas and techniques.

Moderators: uckelman, Tim M

Quick Question on Markers

Postby DrNostromo » September 20th, 2014, 3:07 am

I couldn't find a definitive answer to my question in the docs so I'll ask here.

I have cards in my game that are of a certain type: Weapons, Armor, Arcane, etc.

Some of the cards may belong to more than one type ...like it may be both arcane and a weapon.

What's the proper syntex for a marker trait if I'm using it to identify this type of card.

Property Name = CardType
Property Value = Arcane, Weapon

or

Property Name = CardType, CardType
Property Value = Arcane, Weapon

or should I use two separate marker traits like

Property Name = CardType
Property Value = Arcane

Property Name = CardType
Property Value = Weapon
User avatar
DrNostromo
 
Posts: 1061
Joined: December 21st, 2007, 3:54 am
Location: Wine Country, Cal. USA

Re: Quick Question on Markers

Postby Rommel14 » September 22nd, 2014, 1:59 am

Dr. Nostromo,

Not that I know more than you do, but wouldn't you have to determine the maximum number of possible markers for an item and then use something like CardType1, CardType2...CardTypeN (with N being the last possible marker)?

If you do either of your following suggestions:

Property Name = CardType, CardType
Property Value = Arcane, Weapon

Property Name = CardType
Property Value = Arcane
Property Name = CardType
Property Value = Weapon

wouldn't CardType just reset to the last value supplied? I think I tried this at one point and that's what happened. However, I am unable to find the code for what was going to be my example. :oops:

I agree, can anyone verify this behavior definitively?
"For to win 100 victories in 100 battles is not the acme of skill.
To subdue the enemy without fighting is the acme of skill.
Thus, what is of supreme importance in war is to attack the enemy's strategy."
-- Sun Tzu, The Art of War
User avatar
Rommel14
 
Posts: 39
Joined: June 27th, 2011, 12:58 am

Re: Quick Question on Markers

Postby JoelCFC25 » September 22nd, 2014, 2:07 am

You're right--if you create multiple Markers with the same property name, only the last one processed will be honored.
JoelCFC25
 
Posts: 708
Joined: October 12th, 2010, 5:15 pm
Location: Minnetrista, MN


Return to Module Design

Who is online

Users browsing this forum: No registered users and 1 guest