Junior Member
Join Date: Sep 2011
Posts: 23
|
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?
|
#1 |
Junior Member
Join Date: Sep 2011
Posts: 23
|
I found the following from the Common Code Examples thread:
Quote:
Any ideas? |
|
#2 |
Junior Member
Join Date: Sep 2011
Posts: 23
|
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] Pre-Traits/5000 Code:
linkage[Attribute].field[trtCost].value += 1 Code:
linkage[Skill.skMyCustomSkill].field[trtCost].value += 1 |
#3 |
Senior Member
Join Date: Nov 2010
Location: Metairie, LA, USA
Posts: 1,819
|
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 Code:
Skill.skMyCustomSkill[advCost].value *=2 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) |
#4 |
Junior Member
Join Date: Sep 2011
Posts: 23
|
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' |
#5 |
Senior Member
Join Date: Nov 2010
Location: Metairie, LA, USA
Posts: 1,819
|
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 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) |
#6 |
|
|