Senior Member
Join Date: Mar 2007
Location: Muskegon, MI
Posts: 2,975
|
I've got a component called "Traits" (named Trait2 to avoid messing with the Trait that comes in the skeleton file).
Traits can be Good/Bad and can be Major/Minor/Special. I've got 5 tags covering this: Trait.gbGood, Trait.gbBad, Trait.mmMajor, Trait.mmMinor, Trait.mmSpecial. Minor Traits cost 1 CP Major Traits cost 2 CP Special Traits cost something else. Sometimes CP, sometimes Story Points or Both. I have field: trStorCost, and trCharCost Currently the internal logic sets those fields to either 1, 2, or whatever the value set in the field is. Some traits can be Minor/Major/Special and I want to have it put a selector on it to select which it is based on the tags on it. So if it has the Minor/Major tags, the selector would just give those options, if you had Major/Special, just those, if you had all 3, all three would show up. I have a script that assigns the tag User.UserSelect if more than 1 of those tags are found on the trait. I was originally going to have a different copy for each version and then put prereqs in that prohibited taking the same grouping twice, but doing like the "Bad Eyes" hindrance in Savage Worlds seemed like a better way to go. That uses a preset array, which obviously wouldn't work for this, I figure it needs candidate expression. But I wasn't sure if I could do an expression wit just tags or if I needed things attached to them. I know in Pathfinder the usrChosen fields use things, even in the ones that are pre-done (All Weapons, Energy Type, etc). Do I need to make a basic thing that can attack to this? Or is there some better way to do this? |
#1 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,207
|
Will you ever have a Minor/Special, that doesn't allow Major?
|
#2 |
Senior Member
Join Date: Mar 2007
Location: Muskegon, MI
Posts: 2,975
|
At least in the Core Rules there are no examples of Minor/Special, just Minor/Major, Major/Special, or Minor/Major/Special
|
#3 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,207
|
In that case, would an incrementer work? 1 = minor, 2 = major, 3 = special?
You'd use a finalize script to display a name instead of a number, and depending on what options were available, you can set the minimum and maximum values of the field that the incrementer is displaying. |
#4 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,207
|
Also, I recommend changing the name of the core Trait component, if your system uses that name to mean something else.
|
#5 |
Senior Member
Join Date: Mar 2007
Location: Muskegon, MI
Posts: 2,975
|
Well I've got an incrementer setup there the min and max is set based on the tags The display I want it to say is the type and good/bad for example "(Minor Good)" but all I'm able to get to show in the text is "(M".
Attached is an image of how it looks. I'm trying to modify the incrSimple style, created a copy of it called incrTrait. I've been adjusting the textwidth and fullwidth to give more room but nothing but the first 2 characters seems to show up. |
#6 |
Senior Member
Join Date: Mar 2007
Location: Muskegon, MI
Posts: 2,975
|
Also I am going to change the base trait, but I wanted to work on the system while I was in a good working mood and not spending a lot of time renaming fields and references in a whole folder worth of files.
|
#7 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,207
|
Also change the plusx by the same amount - that's the left-hand edge of the > arrow.
|
#8 |
Senior Member
Join Date: Mar 2007
Location: Muskegon, MI
Posts: 2,975
|
Doesn't seem to matter, still just displays the 2 characters and the gap gets wider
|
#9 |
Senior Member
Join Date: Mar 2007
Location: Muskegon, MI
Posts: 2,975
|
In case it helps this is my position script and the style.
Code:
~set up our height based on our tallest portal height = portal[info].height ~if this is a "sizing" calculation, we're done doneif (issizing <> 0) ~position our tallest portal at the top portal[info].top = 0 ~center the other portals vertically perform portal[name].centervert perform portal[delete].centervert ~position the delete portal on the far right perform portal[delete].alignedge[right,0] ~position the info portal to the left of the delete button perform portal[info].alignrel[rtol,delete,-8] ~position the name on the left and let it use all available space portal[name].left = 0 var edge as number if (tagis[User.UserSelect] = 0) then portal[select].visible = 0 edge = portal[name].right else perform portal[select].alignrel[ltor,name,15] edge = portal[select].right endif if (tagis[User.NeedDomain] = 0) then portal[lbldomain].visible = 0 portal[domain].visible = 0 else portal[lbldomain].left = edge + 15 perform portal[domain].alignrel[ltor,lbldomain,5] portal[domain].width = minimum(150,portal[info].left - portal[domain].left - 10) endif ~position the trait rank perform portal[rank].alignrel[ltor,name,8] portal[name].width = minimum(portal[name].width,portal[info].left - 5) ~if the ability is auto-added, change its font to indicate that fact if (candelete = 0) then perform portal[name].setstyle[lblAuto] endif Code:
<style id="incrTrait"> <style_incrementer textcolorid="clrnormal" font="fntincrsim" textleft="13" texttop="0" textwidth="84" textheight="20" fullwidth="110" fullheight="20" plusup="incplusup" plusdown="incplusdn" plusoff="incplusof" plusx="99" plusy="0" minusup="incminusup" minusdown="incminusdn" minusoff="incminusof" minusx="0" minusy="0"> </style_incrementer> </style> |
#10 |
Thread Tools | |
Display Modes | |
|
|