Member
Join Date: Jun 2007
Location: United Kingdom
Posts: 80
|
One of the trickest bits of the setting I've been working on is the Learning trait - it's defined as the lower of Memory (attrMem) or Concentration (attrCon). To make matters worse it can be altered from this base up for 1CP or down giving back 1CP.
Ideally I'd also like it to display indented under the Concentration attribute on the Attributes tab, but appreciate that might be a bit beyond my current level of ability. I also have two traits that default to Concentration and can be raised and lowered in the same way - Focus and Perception, as well as six other traits of this nature relating to other Attributes. Perhaps it's best if we start with Focus as the example and expand to cover the more difficult Learning trait later. I think I need to add the code to thing_traits.dat - is this right? If so will the following code work? It's a non-combat ability. Do I need to add any code elsewhere (apart from the eventual code for displaying it as intended on the Abilities tab)? Code:
<thing id=trFocus name="Focus" compset="trait" isunique="yes" description="Your ability to concentrate on a single task for an extended period. Defaults to Concentration."> <eval value="1" phase="Traits" priority="4000"> <before name="Derived trtFinal"/> <after name="Calc trtFinal"/><![CDATA[ field[trtBonus].value += #trait[attrCon] ]]></eval> |
#1 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 8,232
|
I was circling back to spot posts we've missed and found this one. It looks like all of us on this end saw this post as a huge can of worms that would entail a long response - and we all assumed someone else would respond. Oops. That's one of the downsides of group ownership of tasks. Sorry! :-(
I'm going to try answering your post in pieces, with each piece in a separate post. Hopefully, this will keep everything more easily digestible. |
#2 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 8,232
|
Quote:
An excellent example of how to handle this situation is provided within the Savage Worlds data files. Within SW, there are standard traits and derived traits, with the latter being passed on the standard traits (as well as other factors like skills). So the trick is to define a new component for derived traits that allows handling of the special behaviors involved. If you take a look at the file "thing_traits.dat" within the SW data files, there is a big comment block at the top that describes what's going on. The actual implementations of the derived things are also found there. The walk-through within the Wiki documentation also provides a additional explanation of what's going on and how to set it all up. |
|
#3 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 8,232
|
When displaying info to the user, you'll be using tables. These tables have some specific rules about their contents and sizing, which you'll learn as you delve into them. It would be impractical to try and indent the various dependent attributes beneath the primary attributes. You're much better off having a separate table of the derived attributes. Perhaps you can place the derived attributes in a table to the right of the primary attributes, establishing the spacing to visually associate the groups of attributes together for the user.
|
#4 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 8,232
|
Quote:
The key thing you'll want to do with these derived traits is set them up to possess a linkage (or two) to the trait(s) they derive from. Since you have lots of these derived traits, this will make it easier to define the traits and add new ones as necessary. Don't worry about the linkages at first, but that's something you'll want to switch to once you've got things starting to work. |
|
#5 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 8,232
|
Quote:
Quote:
The solution is to setup a separate component and component set to differentiate a "derived" trait from a primary trait. Once you have the derived trait, you can re-calculate values after the primary trait is finalized. This is what's done in the Savage Worlds files that I pointed you to above. It's the only way to eliminate the circular dependency. Quote:
|
|||
#6 |
|
|