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)
-   -   Help with Drakonheim Military Discipline edge (http://forums.wolflair.com/showthread.php?t=64255)

Stephen Peto April 26th, 2020 06:26 AM

Help with Drakonheim Military Discipline edge
 
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


CapedCrusader April 26th, 2020 11:08 AM

Is this perhaps what you are after?

Code:

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

Stephen Peto 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



All times are GMT -8. The time now is 06:13 AM.

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