• 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

Setting File Authors, please take note...

CapedCrusader

Well-known member
We are instituting a new programming standard for Edges with background code (eval scripts).
One of our big issues has always been that initially there was no way to turn Edges on and off in the Savage Worlds game system, so Hero Lab's architecture was set up that way. As time went on, there were some Settings that allowed Edges to be acquired in ways that allowed them to be equipped (or not). The first was the Fantasy Companion with magic items, but others soon followed.

At the time, we did not want to force the re-coding of all the Edges, so we set up an architecture that changed the live state of Edges in order to give us the lever we needed. Well, down the road things got more complex, with the Sci-Fi Companion's modification system and similar changes, and this caused timing issues.

So, we've decided the time has come to bite the bullet and re-code. It's not a huge change, it's already in use on a few Edges, like Berserk and Thief. What needs to happen, is that we need to start adding a wrapper around any code in an eval script on an Edge. It'll give the software the ability to turn the effects of the Edge on and off in the background. Now, the Edge still won't show up on the In-Play tab unless the User Activation is enabled. Here's the code that needs to be added:

Code:
      if (field[abilActive].value <> 0) then
        <existing code block>
        endif

This will need to be done with any Edge that has background code in the existing Setting files, and also any future Setting file work.

Now, also in relation to this, we will be removing the "EdgeWep" compset definition as it won't be needed anymore. Those Edges that were changed to EdgeWep can be changed back once we get this update rolled out. We'll actually remove it in a future update to give Setting file authors time to make this particular change.

It'll be simpler with fewer timing collisions once this change is complete. Thanks for understanding.
 
I'll start reworking all of my data files shortly and getting the uploaded and in the updater as soon as I get a chance. Then I may need to find some time to do Weird War I... :/
 
The only functional one I have is Broken Earth; will this throw an error when it goes through if you've not got the wrapper on it? If so, it might be easier for me to just wait and see what breaks (since I'm not clear what will) and fix in place.
 
It won't cause any errors if this is not present. The system just won't be able to turn the Edge effect on and off when it needs to.
 
Oh, poo. I guess I'll have to see what all I did eval scripts on, then. I've only got 33 edges in there, so I guess it won't be that damn big a deal even if I used those on all of them (and that's unlikely).

Edit: Oh, just to make sure: this is only on Edges. right?
 
Last edited:
As it turns out, a fair number of the ones I have in BE use eval scripts, but like I said, there's only 33 of them, so its not that big a deal.
 
Just an FYI, I've got the change in for all of my data files and I'll be posting updates for all of them within the next few days, hopefully.
 
I just realized as I'm getting into these that I'm not 100% sure I'm understanding what this is needed for.

Is this needed for any Edge that has an eval script, or only those that are toggleable on and off?
 
Any Edge that is toggleable will already have that code, so any Edge that has a Eval script on it will need that code to make ALL of them (well, all of them with eval scripts, anyway) toggleable.
 
Last edited:
Prior to this new update you might make an Edge toggleable (using the code CC lists above) because it had an effect that was situational, so you might not want it to be on all the time. CC is saying that because of a change that will be going in any other Edge you have that has an Eval script on it will not also need to have that ability, even if they are situation. For example, the Alertness Edge just gives a flat +2 to Notice rolls, no toggle required. It does have an Eval script on it to give that +2 bonus to Notice, however. Since it isn't currently set to be a toggle CC is asking that such edges that do NOT have the toggle code listed above but that DO have Eval scripts, such as Alertness would be, show now have this toggle code added to them.

In other words by, effectively, making all Edges toggleable the new update will provide some extra functionality for us even though those Edges would not normally need to be toggleable by the way we do things now. You may never turn the toggle off, mind you, but the fact that it has that code is key to adding that new functionality. Presumably we don't need to do anything on Edges without eval scripts because I am guessing by default they will not be treated as toggleable to help satisfy the need for us to do this.

It's not that you are doing anything wrong now, it's that the new update is going to add functionality for us but that functionality requires that Edges that previously were not toggleable to now be toggleable, and if they aren't presumably the new update might actually break those Edges if they are not toggleable.

Does that make sense?
 
Yeah. I just wasn't sure since I was using "toggleable" to refer to things that had a check box to activate it, that there wasn't some term-of-art for that I wasn't aware of. So I was right with my original assumption I should do this with all edges with an eval script, right?
 
I guess the only thing I would add that CC mentioned in his first post is that there are really 2 parts to making an Edge truly toggleable. 1st is that code (which needs to now be on every Edge that has an eval script), second is the checkbox for "User Activation". Having that box checked makes it available to the player on the In Play tab, but for those Edges which don't really need to be turned on or off (like Alertness, since it's supposed to always provide a +2 to Notice) you do NOT need to check that box. That way you can still have the code in place that is needed for the new update, but you won't have to confuse your players with the ability to activate/deactivate something that they don't normally need to do.
 
Yeah, I already had that set up for the one or two that are truly toggleable. In fact, I really missed that checkbox when I was trying to fix some of the code in the D&D 4e files...
 
Back
Top