Lone Wolf Development Forums  

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

Notices

Reply
 
Thread Tools Display Modes
allpowerfulbob
Junior Member
 
Join Date: Mar 2016
Posts: 4

Old October 25th, 2016, 11:37 AM
Hello everyone,

I've been reading through the other threads and have not found any scripts that quite fit what I am trying to do with this new derived trait.

The trait would be Cyber Psychosis, when a character has too much cyberware and begins to lose their connection to humanity.

Basically it would be equal to half the max strain trait, rounded up. But no matter how I change my script this number stays at 2. I'm not sure if it's the timing I have set up on it or not. Any help you guys could offer would be much appreciated. I'll drop my script in down below.

Thanks!

var bonus as number
var bonusadd as number
bonus = round(#trait[trSFStrnMx] / 2,0,1)
perform field[trtBonus].modify[+,bonus,"Half Max Strain"]
allpowerfulbob is offline   #1 Reply With Quote
zarlor
Senior Member
 
Join Date: Nov 2010
Location: Metairie, LA, USA
Posts: 1,819

Old October 25th, 2016, 01:16 PM
What timing and where are you setting it at?

Lenny Zimmermann
Metairie, LA, USA

Data files authored (please let me know if you see any issues with any of these if you have/use them):
Official (In the downloader)
50 Fathoms, Deadlands: Hell On Earth, Deadlands: Noir, East Texas University, Necessary Evil (requires Super Powers Companion), Pirates of the Spanish Main, Space 1889 (original file by Erich), Tour of Darkness, Weird War II, Weird Wars: Rome
Coming Eventually
Evernight (LWD has completed their review but I have some fixes to make first... although Pinnacle mentioned this might get an overhaul to SWADE so I may just wait for that first. If you just HAVE to have this now, though, just PM me)
zarlor is offline   #2 Reply With Quote
allpowerfulbob
Junior Member
 
Join Date: Mar 2016
Posts: 4

Old October 25th, 2016, 05:58 PM
Right now I have it set to go after Calc Derived Bonus and before Calc trtFinal

Thanks for your help
allpowerfulbob is offline   #3 Reply With Quote
zarlor
Senior Member
 
Join Date: Nov 2010
Location: Metairie, LA, USA
Posts: 1,819

Old October 26th, 2016, 07:09 AM
I take it this is in the "Derived Traits" tab as an Eval Script? If so you might try a timing of Traits/4000 instead. I'm pretty sure Derived Traits have to happen after all of the other trait calculations are made. At least that's what I have happening on my ETU data file for Academics, along with After Scripts: Calc trtFinal, Before Scripts: Derived trtFinal and Script Name: Calc Derived Bonus. (Not sure if the last is needed or what, but it's what I have in there that seems to work if that helps any.) Timing is definitely a tricky thing to work with.

Lenny Zimmermann
Metairie, LA, USA

Data files authored (please let me know if you see any issues with any of these if you have/use them):
Official (In the downloader)
50 Fathoms, Deadlands: Hell On Earth, Deadlands: Noir, East Texas University, Necessary Evil (requires Super Powers Companion), Pirates of the Spanish Main, Space 1889 (original file by Erich), Tour of Darkness, Weird War II, Weird Wars: Rome
Coming Eventually
Evernight (LWD has completed their review but I have some fixes to make first... although Pinnacle mentioned this might get an overhaul to SWADE so I may just wait for that first. If you just HAVE to have this now, though, just PM me)
zarlor is offline   #4 Reply With Quote
SeeleyOne
Senior Member
 
Join Date: Nov 2009
Posts: 891

Old October 26th, 2016, 04:40 PM
You need one in Pre-Traits 4000 to establish the initial value. Then you can change it later. Whenever I make one I copy one and make changes to its copy.

Evil wins because good rolls poorly .... or the players are not paying enough attention to the game.
SeeleyOne is offline   #5 Reply With Quote
allpowerfulbob
Junior Member
 
Join Date: Mar 2016
Posts: 4

Old October 27th, 2016, 12:39 PM
Thanks for the suggestions guys, it still seems like it's not working. I'm not sure if it's my script (though that's a direct copy from toughness), or the timing still.

I'm also now getting an error message, "Specified thing is actively in use. All references must be deleted before changes can be applied."

So I tried deleting the old derived trait, but copied my script and all to notepad, and tried creating a new blank trait. It still wasn't working, but now I'm noticing that even though I've deleted the traits, they're still showing up on my source thing list and cluttering up my character sheets with extra derived traits.

Is there some way to delete source things so they stop appearing?

Thanks for all the help, I'm almost afraid I've junked up my whole user file and just need to start over again.
allpowerfulbob is offline   #6 Reply With Quote
zarlor
Senior Member
 
Join Date: Nov 2010
Location: Metairie, LA, USA
Posts: 1,819

Old October 27th, 2016, 01:31 PM
Fist, you should almost always set a source on anything you set up in the editor. That can help keep things tidy and not have something you set up show up absolutely everywhere when you don't want it to.

I am wondering if you maybe made some copies of your data file in the same location, though? That could cause problems as well.

I could try and take a look at what the issue is if you want to email a copy of the file to zarlor at acm dot org.

Lenny Zimmermann
Metairie, LA, USA

Data files authored (please let me know if you see any issues with any of these if you have/use them):
Official (In the downloader)
50 Fathoms, Deadlands: Hell On Earth, Deadlands: Noir, East Texas University, Necessary Evil (requires Super Powers Companion), Pirates of the Spanish Main, Space 1889 (original file by Erich), Tour of Darkness, Weird War II, Weird Wars: Rome
Coming Eventually
Evernight (LWD has completed their review but I have some fixes to make first... although Pinnacle mentioned this might get an overhaul to SWADE so I may just wait for that first. If you just HAVE to have this now, though, just PM me)
zarlor is offline   #7 Reply With Quote
zarlor
Senior Member
 
Join Date: Nov 2010
Location: Metairie, LA, USA
Posts: 1,819

Old October 31st, 2016, 10:13 AM
Thanks for sending the file. A couple of things off the bat, under Derived Traits: trSRCybPs3 (Cyber Psycho) and trSRMxStrn (Max Strain), did not have their sources set, so that is likely the issue you were seeing with them showing up all over the place.

Also some Equipment and other things in your file are set to include things like "Modern" or "Futuristic" for a source, which is fine but just be aware that it means that equipment will be available and show up an ANY character where they select Modern or Futuristic as a source, with all the same costs and so on. So all of the characters you make, if they have any of those sources set, will show Shadowrun stuff even if you might not want that to be the case. Personally if I want something to be available globally for my players I'll create a HouseRules file to put that stuff in.

Now to the nitty gritty. It looks like you tried to reuse the script on "Max Strain" and "Cyber Psyco"and BOTH define the variables for "bonus" and "bonusadd". In the scripts where it sets:
Code:
var bonus as number
var bonusadd as number
What you are doing is creating a new variable called "bonus" and "bonusadd" and defining those variable to be of the type "number" so it knows they are supposed to represent numbers, but you already defined those things in another script so one of them will always keep overwriting the values from the other one. Try setting them to something more Unique so on "Max Strain" maybe use something like:

Code:
var msbonus as number
var msbonusadd as number
And on Cyber Psycho maybe:

Code:
var cpbonus as number
var cpbonusadd as number
Of course also replace all references to the "bonus" and "bonusadd" variables in the rest of the scripts with the appropriate names you defined as well. See if that makes any difference, and don't forget to set the "Source" on them.

Lenny Zimmermann
Metairie, LA, USA

Data files authored (please let me know if you see any issues with any of these if you have/use them):
Official (In the downloader)
50 Fathoms, Deadlands: Hell On Earth, Deadlands: Noir, East Texas University, Necessary Evil (requires Super Powers Companion), Pirates of the Spanish Main, Space 1889 (original file by Erich), Tour of Darkness, Weird War II, Weird Wars: Rome
Coming Eventually
Evernight (LWD has completed their review but I have some fixes to make first... although Pinnacle mentioned this might get an overhaul to SWADE so I may just wait for that first. If you just HAVE to have this now, though, just PM me)

Last edited by zarlor; October 31st, 2016 at 10:17 AM.
zarlor is offline   #8 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 04:51 AM.


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