Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - Savage Worlds

Notices

Reply
 
Thread Tools Display Modes
basselope
Junior Member
 
Join Date: Sep 2011
Posts: 23

Old November 17th, 2017, 12:40 PM
I'm creating a few custom skills using the editor. Does anyone know how I can make them cost double and not associate with any attribute? Is it some kind of eval script?
basselope is offline   #1 Reply With Quote
basselope
Junior Member
 
Join Date: Sep 2011
Posts: 23

Old November 25th, 2017, 03:00 PM
I found the following from the Common Code Examples thread:

Quote:
Originally Posted by zarlor View Post
A thorny one that Erich brought up dealing with how to use the mechanic used by the Racial Property "Very Costly Atribute", but in this case trying to do it for all Knowledge skills. Knowledge skill are rather special since they are not Unique, you can have multiples of the. CapedCrusaader came through with the following code:

Eval Script: Effects/1000

Code:
foreach pick in hero from Advance where "Skill.skKnow"
  eachpick.field[advCost].value *= 2
nexteach
Eval Script: Traits/5000 Index: 2

Code:
foreach pick in hero where "Skill.skKnow"
   perform #resspent[resSkill,+,eachpick.field[trtUser].value - 1,"Hindrance Name"]
   var modifier as number
   modifier = maximum(eachpick.field[trtUser].value - eachpick.linkage[attribute].field[trtFinal].value,0)
   perform #resspent[resSkill,+,modifier,"Hindrance Name"]
nexteach
However, I have not been able to modify it properly to work. Unfortunately, because I'm new at this, I don't have a real solid understanding of everything yet. I knew to change the reference to the skill to the one I was working on. What is happening is it charges 2 skill points for the initial purchase like I wanted. However, after that it charges 3 skill points for each rank after the first. So, a d4 is 2 points, but a d6 is 5 points instead of the desired 4 points.

Any ideas?
basselope is offline   #2 Reply With Quote
basselope
Junior Member
 
Join Date: Sep 2011
Posts: 23

Old December 18th, 2017, 06:49 AM
I also found code for Costly Attribute and Very Costly Attribute as Racial Properties and was wondering if anyone might know how I could tweak them to work for doubling the cost of the skill.

Costly Attribute is:
Pre-Traits/5000
Code:
perform #resspent[resAttrib,+,(linkage[Attribute].field[trtUser].value - 3) + linkage[Attribute].field[trtCost].value,linkage[Attribute].field[name].text]
Very Costly Attribute is:
Pre-Traits/5000
Code:
linkage[Attribute].field[trtCost].value += 1
I tried tweaking it to the following but it would not accept it:
Code:
linkage[Skill.skMyCustomSkill].field[trtCost].value += 1
Then I tried using just Skill and just skMyCustomSkill and neither one worked. Skill looked like it would work, but I need to define the linkage somehow, but I'm not sure how to do that. Does it need another script or can I somehow tell it to be self referencing?
basselope is offline   #3 Reply With Quote
zarlor
Senior Member
 
Join Date: Nov 2010
Location: Metairie, LA, USA
Posts: 1,819

Old December 18th, 2017, 07:28 AM
Well, the relevant line from that middle post is only what is inside the foreach-nexteach lines, since those lines are trying to walk through the skills to just find the Knowledge ones. So the double cost part is:

Code:
 eachpick.field[advCost].value *= 2
That is going through "eachpick", though, so instead you'd need to change eachpick.field with the skill name instead, I think? So maybe something like:

Code:
 Skill.skMyCustomSkill[advCost].value *=2
I'm not positive about that, though.

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
basselope
Junior Member
 
Join Date: Sep 2011
Posts: 23

Old December 18th, 2017, 08:26 AM
First, thank you for your assistance. I have made changes and now I'm getting an error when I test that reads:

Syntax error in 'eval' script for Thing 'skMyCustomSkill' (Eval Script '#1') on line 1
-> Reference to undeclared variable: 'Skill'
basselope is offline   #5 Reply With Quote
zarlor
Senior Member
 
Join Date: Nov 2010
Location: Metairie, LA, USA
Posts: 1,819

Old December 18th, 2017, 09:42 AM
Oh, maybe you had to do it something like the following?

Code:
foreach pick in hero where "thingid.skMyCustomSkill"
  eachpick.field[advCost].value *= 2
nexteach
Obviously put your skill's unique ID in the skMyCustomSkill part.

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   #6 Reply With Quote
Reply

Thread Tools
Display Modes

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 07:28 AM.


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