Lone Wolf Development Forums

Lone Wolf Development Forums (http://forums.wolflair.com/index.php)
-   HL - Savage Worlds (http://forums.wolflair.com/forumdisplay.php?f=59)
-   -   Setting File Authors, please take note... (http://forums.wolflair.com/showthread.php?t=57722)

CapedCrusader February 16th, 2017 05:01 PM

Setting File Authors, please take note...
 
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.

zarlor February 16th, 2017 05:23 PM

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... :/

Paragon February 17th, 2017 06:09 PM

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.

CapedCrusader February 18th, 2017 11:37 AM

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.

Paragon February 19th, 2017 11:50 AM

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?

CapedCrusader February 19th, 2017 01:33 PM

Yes, this only affects Edges, and only those with eval scripts.

Paragon February 19th, 2017 04:51 PM

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.

Paragon February 22nd, 2017 09:18 AM

I forgot to ask, when is the new version where this change is needed rolling out?

CapedCrusader February 22nd, 2017 11:47 AM

I would say in the next week or so.

zarlor February 22nd, 2017 11:47 AM

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.

Paragon March 26th, 2017 12:05 PM

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?

zarlor March 26th, 2017 05:00 PM

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.

Paragon March 26th, 2017 07:04 PM

Could you try that again, Zarlor? Am a using toggleable wrong here?

zarlor March 27th, 2017 06:46 AM

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?

Paragon March 27th, 2017 07:17 AM

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?

zarlor March 27th, 2017 09:20 AM

Right.

Paragon March 27th, 2017 10:03 AM

Thanks, Zarlor. I was part way through it and suddenly began having second thoughts.

zarlor March 27th, 2017 11:12 AM

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.

Paragon March 27th, 2017 06:32 PM

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...

zarlor March 27th, 2017 06:45 PM

I'm sorry, D&D what-e? Never heard of that one... never want to hear of that one again, in fact. ;)

CapedCrusader March 28th, 2017 01:10 AM

Actually, Colen showed me a really slick way of doing it with a single line at the start, no endif line needed:

Code:

doneif (field[abilActive].value = 0)
That's why's he's the head engineer...

CapedCrusader March 28th, 2017 01:11 AM

Also, I'm in con prep mode this week... Gamestorm is this coming up weekend.

Paragon March 28th, 2017 06:09 AM

Enjoy the con, CC.

Paragon March 28th, 2017 08:33 PM

So, this is going to be a strange question: does the Editor just automatically sort edges with bootstrapped weapons and armor into that category? I was going ahead and updating a copy of my .user file in prep for the changeovers, and I realized I have no idea how it knows to put them there.

Or is this one of those things I'm overthinking, and it'll address itself when the special edge category goes away?

zarlor March 29th, 2017 04:36 PM

I'm not sure I understand the question, Paragon. What category? There's no auto-shuffling of things, though. Or do you mean the EdgeWep compset? In which case, no, CC mentioned in his first post that once the changes are in place we can revert all of the EdgeWep edges back to being just good old Edges. The update has to be done first, though, because if you changed them back now you'd run into errors in your file.

Paragon March 30th, 2017 06:51 AM

Quote:

Originally Posted by zarlor (Post 247105)
I'm not sure I understand the question, Paragon. What category? There's no auto-shuffling of things, though. Or do you mean the EdgeWep compset? In which case, no, CC mentioned in his first post that once the changes are in place we can revert all of the EdgeWep edges back to being just good old Edges. The update has to be done first, though, because if you changed them back now you'd run into errors in your file.

Its the EdgeWep thing; I was going to revert it in a separate file so I didn't have to do it later.

The problem is, looking over at the code, I can't figure out how to revert it; I couldn't even figure out what was telling it to an EdgeWep rather than just an Edge. I'm apparently blind if there's something there.

zarlor March 30th, 2017 09:28 AM

If you look at the xml file (it's not something you see in the Editor, expect that these are in a separate tab) you will find there is a setting for compset="EdgeWep" as opposed to compset="Edge" as is used for standard Edges. If you are looking in the Editor the EdgeWep Edges are the ones on the tab called "Edge With Bootstrapped Weapons/Armor".

Paragon March 30th, 2017 11:18 AM

It was in the xml file where I couldn't find it. I suspect because its on the same line as the thing id rather than on a line of its own.

Paragon May 2nd, 2017 01:14 PM

Okay, as my other thread may indicate, I'm now a little confused; wasn't this the update where the old EdgeWep things and the like were no longer supposed to work? As my post in my other thread will indicate, while my updated Broken Earth user file is working, it won't open in the editor, while the old file not only will open, it seems to still work.

Have I misunderstood something here?

CapedCrusader May 2nd, 2017 01:42 PM

Curious. What do you mean, won't open in the editor? EdgeWep still exists, it just isn't used anymore.


All times are GMT -8. The time now is 05:00 PM.

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