• 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

bootstrap elements

EightBitz

Well-known member
Is there any way to increment a field inside of a bootstrap block?

For example, in this block, a field is being assigned a value of 42:
Code:
<bootstrap thing="AttrIncr">
  <containerreq phase="Setup" priority="500">
    val:Level.? >= 4
    </container>
  <autotag group="TheGroup" tag="TheTag"/>
  <assignval field="MyField" value="42"/>
  </bootstrap>

Is there anyway to increment "MyField" instead of assigning a fresh value?
 
You'd need to set up a separate "bonus" field, and then have scripts that will total the bonus and whatever's already there. Then your bootstrap would assign a value to the bonus, and your scripts will add it in.

As a reminder, if you actually describe the game rule you're trying to implement, as well as asking the technical question that you're currently focused on, there may be different, possibly better ways to accomplish your goal, but here, I don't know what context this is being used in, so I can't offer any other advice.
 
You'd need to set up a separate "bonus" field, and then have scripts that will total the bonus and whatever's already there. Then your bootstrap would assign a value to the bonus, and your scripts will add it in.

As a reminder, if you actually describe the game rule you're trying to implement, as well as asking the technical question that you're currently focused on, there may be different, possibly better ways to accomplish your goal, but here, I don't know what context this is being used in, so I can't offer any other advice.

I'm working on Numenera, and I'm trying to figure out how I want to do Tiers. When players in Numenera advance certain aspects of their character, they gain a Tier, and each Tier confers certain abilities.

For example, there are traits called "Effort" and "Edge". Advancing in Tiers allows a player higher values in these traits.

The problem with the bonus field is that if it has been incremented by other things, I'll be completely overwriting it instead of incrementing it.

I can do it with abilities. Bootstrap an ability that increments the bonus field. Or in the "Type" thing itself (which is the component that advances in tiers), I can add an if-then block. If Tier >= 6, elseif Tier >= 5, etc ...
 
I definitely would not bootstrap effort and edge picks to the tiers, if you're adding a separate tier pick for each time the tier increases. Put a field on those tiers that stores the amount of effort or edge to add, and then use a script to look up that field's value and add it to the correct place.
 
I definitely would not bootstrap effort and edge picks to the tiers, if you're adding a separate tier pick for each time the tier increases. Put a field on those tiers that stores the amount of effort or edge to add, and then use a script to look up that field's value and add it to the correct place.

Well, no, I'm definitely adding a separate pick per tier. But there are other things that get booststraooed, I'm just considering possibilities right now.
 
Back
Top