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
Stephen Peto
Junior Member
 
Join Date: Sep 2010
Posts: 12

Old April 26th, 2020, 06:26 AM
Hi, I have been working on adding content for the Drakonheim setting. There is one edge which has got me stumped. I would be very grateful if someone with more knowledge than me could help. The edge I am trying to create is called Military Discipline. The edge allows the character to gain one combat edge of their choice, ignoring its rank requirement, but other requirements must still be met. So far I have managed to get the edge set up with a menu using EdgeType.Combat for the menu expression. But I am at a loss as to how to the evaluation script. The best I can come up with is to use the code I've found in the forum to apply the ignore rank helper to all Combat edges. But I'd really like to find a way to do it for just the chosen edge. Any ideas?
Code:
if (field[usrChosen1].ischosen<>0) then
foreach thing in Edge where "EdgeType.Combat"
           var ignoretag as string
           ignoretag = "IgnoreRank." & eachthing.idstring
           perform hero.assignstr[ignoretag]
nexteach 
endif
Stephen Peto is offline   #1 Reply With Quote
CapedCrusader
Senior Member
Volunteer Data File Contributor
 
Join Date: Aug 2009
Posts: 1,550

Old April 26th, 2020, 11:08 AM
Is this perhaps what you are after?

Code:
if (eachpick.uniqindex = field[usrChosen1].chosen.uniqindex) then

_
Currently In Development: Savage Pathfinder, SWADE Fantasy Companion
Future Development: SWADE Super Powers Companion, SWADE Sci-Fi Companion
_
Currently Running: Savage Unity Inc. (homebrew multiverse theme)
Setting Files Supported: Deadlands: Reloaded, Flash Gordon, Gaslight, Hellfrost, Interface Zero 2.0, Seven Worlds, Slipstream, Solomon Kane
Future Setting Files: Savage Judge Dredd
CapedCrusader is offline   #2 Reply With Quote
Stephen Peto
Junior Member
 
Join Date: Sep 2010
Posts: 12

Old April 27th, 2020, 05:15 AM
Thanks CapedCrusader for taking the time to reply. While the code wasn't exactly what I wanted, it did point me in the right direction and helped me think around the problem until I found a solution. In the end I did what I wanted with the following code. I'm posting it here in case anyone else has a similar thing they want to do.
Code:
if (field[usrChosen1].ischosen<>0) then
var chosenindex as string
chosenindex = field[usrChosen1].chosen.idstring
foreach thing in Edge where "EdgeType.Combat"
if (compare (eachthing.idstring,chosenindex) = 0) then
           var ignoretag as string
           ignoretag = "IgnoreRank." & eachthing.idstring
           perform hero.assignstr[ignoretag]
endif
nexteach
endif

Last edited by Stephen Peto; April 27th, 2020 at 05:35 AM.
Stephen Peto is offline   #3 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 08:51 PM.


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