Lone Wolf Development Forums Advances - Same Increase Multiple Times?
 Register FAQ Members List Search Today's Posts Mark Forums Read

 Notices Please note: In an effort to ensure that all of our users feel welcome on our forums, we’ve updated our forum rules. You can review the updated rules here: http://forums.wolflair.com/showthread.php?t=5528. If a fellow Community member is not following the forum rules, please report the post by clicking the Report button (the red yield sign on the left) located on every post. This will notify the moderators directly. If you have any questions about these new rules, please contact support@wolflair.com. - The Lone Wolf Development Team

Senior Member

Join Date: Jan 2007
Location: NW Arkansas
Posts: 1,314

August 15th, 2022, 12:33 PM
Howdy all!

I'm playing around with a dataset where improving Attributes and Skills has a varying cost based on the level of the Trait.

For Attributes, the XP cost of an advance is twice the next level (Current is 9, going to 10 costs 20 points, then to 11 is 22 (for 42 total to go from 9->11). Skills are the next level for cost (current is 1, going to 2 is 2, then to 3 is another 3 for 5 total to go from 1-3).

However, when I take a second advance for the same Trait (whether it's Attribute or Skill) both advances take the most recent cost. So, above would be fine with the first advance to the Attribute, the cost is 20. As soon as I take the second advance, the previous advance to the attribute takes on the new cost of 22, and the new advance is 22 as well.

There's a simple solution to this I know, but I'm drawing a blank... Anyone see a solution?

Trait (XP Fields):
Code:
```
<field
type="derived">
<!-- Calculate the final value from the three distinct pieces -->
<calculate phase="Traits" priority="2950" name=""><![CDATA[

]]></calculate>
</field>
<field
id="trtXPCurr"
type="derived">
<!-- Calculate the xp cost based on the trtUser -->
<calculate phase="Traits" priority="3050" name="Calc trtXPCurr"><![CDATA[
var nextCost as number

~ Attribute Cost
if (tagis[component.Attribute] <> 0) then
elseif (tagis[component.Skill] <> 0) then
endif

@value = nextCost

]]></calculate>
</field>
<!-- In-play bonuses applied to the trait -->
<field
id="trtXPNext"
type="derived">
<!-- Calculate the xp cost based on the trtUser -->
<calculate phase="Traits" priority="3050" name="Calc trtXPNext"><![CDATA[
var nextCost as number

~ Attribute Cost
if (tagis[component.Attribute] <> 0) then
elseif (tagis[component.Skill] <> 0) then
endif

@value = nextCost

]]></calculate>
</field>```
Code:
```    <eval index="2" phase="Traits" priority="2900"><![CDATA[

~apply any appropriate increase or decrease for the linked trait
~Note: This pick is a child of the gizmo and our parent pick is the actual "Advance"
~       pick that contains the appopriate "Advance" tag, so be sure to check there.
~Note: Since the advancement is displaced to the hero, it's "parent" is *not* the
~       gizmo, so we must explicitly reference through the "origin" container.

endif

]]></eval>

<eval index="3" phase="Traits" priority="3060"><![CDATA[

var currCost as number

~apply any appropriate increase or decrease for the linked trait

]]></eval>```
Code:
```    <eval index="1" phase="Traits" priority="3200">
<after name="Calc trtXPNext"/><![CDATA[
]]></eval>```

Working on -
• Savage Rifts (Deluxe): Update link in This post
#1
Member

Join Date: May 2021
Posts: 84

August 16th, 2022, 09:54 PM
Instead of spending the resXP resource with a script on the advancement picks, can you have the trait pick handle it?

It seems to know the total number of its advances based on the tags, so it should be able to calculate the total cost of its current advancements without having to worry about what they are and which order they were added in.
#2

 Thread Tools Display Modes Linear Mode

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is Off Forum Rules
 Forum Jump User Control Panel Private Messages Subscriptions Who's Online Search Forums Forums Home Lone Wolf Development Web Site Announcements Realm Works Forums     Realm Works Discussion         Realm Works in Action         Realm Works Feature Requests     Realm Works in Action     Realm Works Feature Requests Hero Lab Online Forums     Hero Lab Online Discussion     HLO - Pathfinder 1st Edition     HLO - Pathfinder 2nd Edition     HLO - Starfinder     HLO - Shadowrun Hero Lab Forums     HL - Pathfinder Roleplaying Game     HL - D&D 5th Edition SRD     HL - Shadowrun     HL - Mutants & Masterminds     HL - d20 System     HL - World of Darkness     HL - Call of Cthulhu     HL - 4th Edition     HL - Savage Worlds     HL - Cortex System     HL - Authoring Kit     HL - User Projects     HL - Alternity (user-created)     Hero Lab Discussion Army Builder Forums     Army Builder Army Builder Data Files     Babylon 5: A Call to Arms     Battlefleet Gothic     Blood Bowl     Black Powder, Bolt Action, Hail Caesar, Judge Dredd, and Pike & Shotte     Confrontation - English     Kings of War (2nd Edition)     Lord of the Rings (Tabletop)     Mordheim     Necromunda     Starship Troopers     Star Wars: X-Wing and Armada Miniatures Game     The 9th Age     Warhammer Ancient Battles     Warhammer 40,000     Warhammer Fantasy 8th Ed.     Warhammer Historical: The Great War     Warhammer Fantasy 3rd Ed.     Warlord     Warmachine & Hordes     Warmaster Card Vault Forums     Card Vault Card Vault Data Files     MLB Showdown     Lord of the Rings CCG     .hack//ENEMY     Vs. System     Yu-Gi-Oh!     D&D Miniatures

All times are GMT -8. The time now is 12:01 AM.

 -- Default Style -- Majestic Contact Us - Lone Wolf Development Forums - Archive - Top