• 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

Can the incrementer in a portal be based on a field?

Mathias

Moderator
Staff member
I have a set of items I'm adding to my game system - some have variable costs. I have the code written to switch portals between a display for those with a fixed cost and an incrementer for those with a variable cost. The problem is that in one cast, the incrementer I need is 2, not 1 (the thing allows costs of 2, 4, or 6). I had already writtten a field (with defvalue="1") into this thing in order to allow the user to set a different increment when needed, but when I tried to set;

<incrementer
field="valCost"
interval="valInc"
</incrementer>

it gave me an error. For now, I'm going to write a second incrementer, with increment="2", and add an if/then to switch between them.
 
Your solution is correct. Each incrementer can be assigned an interval, but that value must be an explicit integer. That means you'll need two separate portals if you want one with an increment of one and another with an increment of two.

The other approach you might consider is to always use an increment of one and then setup the multiplier internally. For example, if you look at the Savage Worlds example files, they use a range of 2-6 with an increment of 1, then they multiply everything by 2 for final display. The user sees it as a range of 4-12 with an increment of 2, but it's actually tracked as a range of 2-6 internally.
 
Back
Top