Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - Authoring Kit
Register FAQ Community Today's Posts Search

Notices

Reply
 
Thread Tools Display Modes
EightBitz
Senior Member
 
Join Date: May 2013
Posts: 1,458

Old February 17th, 2016, 12:20 PM
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?
EightBitz is offline   #1 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old February 17th, 2016, 12:40 PM
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.
Mathias is online now   #2 Reply With Quote
EightBitz
Senior Member
 
Join Date: May 2013
Posts: 1,458

Old February 17th, 2016, 01:18 PM
Quote:
Originally Posted by Mathias View Post
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 ...
EightBitz is offline   #3 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old February 17th, 2016, 01:32 PM
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.
Mathias is online now   #4 Reply With Quote
EightBitz
Senior Member
 
Join Date: May 2013
Posts: 1,458

Old February 17th, 2016, 02:00 PM
Quote:
Originally Posted by Mathias View Post
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.
EightBitz is offline   #5 Reply With Quote
Reply


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 Jump


All times are GMT -8. The time now is 02:03 PM.


Powered by vBulletin® - Copyright ©2000 - 2024, vBulletin Solutions, Inc.
wolflair.com copyright ©1998-2016 Lone Wolf Development, Inc. View our Privacy Policy here.