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 August 30th, 2015, 09:43 AM
Does anyone know if it is possible to create a weapon that uses a different skill? If so, do you know how to do it? I have been able to create every other aspect of the weapon and the skill and even an edge that relies upon the skill. I just can't get it to show on the character sheet as associating with it. Now, I know I could just print out the character sheet and put a line through it and write in the correct value, but I would prefer not to.
basselope is offline   #1 Reply With Quote
SeeleyOne
Senior Member
 
Join Date: Nov 2009
Posts: 891

Old August 30th, 2015, 10:18 AM
I would do this with a mechanic that searches for the weapon, and then changes its skill. When coming up with how to change the die so that it can have a d14, d16, d18, d20, d22, or d24 Fighting skill I figured out how to do this.

http://forums.wolflair.com/showthread.php?t=53040

Make it use whatever skill you want it to use, so change Fighting to whatever you want it to be.

The trickiest part will be the "foreach pick in hero from.. " because that really depends on what you are looking for. You can make it look for a specific ID for a specific weapon, or if you ware going for a class of weapons you can make it look for those. If you have multiple weapons, like maybe several types of lightsabers you would be best served either using a tag or even easier is to have a similar ID syntax that only changes at the end. So for different lightsabers, you might have weapon ID that are these: wpLIGHTred, wpLIGHTblu, wpLIGHTgrn, wpLIGHTyel. The wildcard that looks for them would be "wpLIGHT?".

Phase Final
Priority 10000

Code:
var finalbonus as number
var thisbonus as number
var finaldie as string
var finaltext as string
var bonustext as string
var dieNumber as number

finalbonus = hero.child[skFighting].field[trtNetRoll].value 
thisbonus = 0
finaldie = ""
finaltext = ""
bonustext = ""
dieNumber = #trait[skFighting]


~ Cap die number at 12
if (dieNumber >= 6) then
      dieNumber = 6
endif

~ Double the dieNumber so that it will be a die
dieNumber = dieNumber * 2
finaldie = "d" & dieNumber

foreach pick in hero from WeapMelee
      bonustext = ""
      thisbonus = finalbonus
      thisbonus += eachpick.field[wpBonus].value
      thisbonus += eachpick.field[wpPenalty].value

      if (thisbonus > 0) then
           bonustext = "+" & thisbonus
      endif

      if (thisbonus < 0) then
           bonustext = thisbonus
      endif

      finaltext = finaldie & bonustext
      eachpick.field[wpNetAtk].text = finaltext
nexteach

Evil wins because good rolls poorly .... or the players are not paying enough attention to the game.

Last edited by SeeleyOne; August 30th, 2015 at 10:20 AM. Reason: Wow, it killed my code and made it unreadable, this should be better
SeeleyOne is offline   #2 Reply With Quote
basselope
Junior Member
 
Join Date: Sep 2011
Posts: 23

Old August 30th, 2015, 04:15 PM
That is a little advanced for me, so I'll have to play around with it.

However, thanks for the advice! I can't wait to try it out.
basselope is offline   #3 Reply With Quote
SeeleyOne
Senior Member
 
Join Date: Nov 2009
Posts: 891

Old August 30th, 2015, 07:04 PM
Well, if you can be more specific with what you are looking for I can narrow it down better.

Evil wins because good rolls poorly .... or the players are not paying enough attention to the game.
SeeleyOne is offline   #4 Reply With Quote
SeeleyOne
Senior Member
 
Join Date: Nov 2009
Posts: 891

Old August 30th, 2015, 07:06 PM
Basically what the code is doing is overwriting the weapon attack roll information.

Evil wins because good rolls poorly .... or the players are not paying enough attention to the game.
SeeleyOne is offline   #5 Reply With Quote
basselope
Junior Member
 
Join Date: Sep 2011
Posts: 23

Old September 4th, 2015, 03:01 PM
What I'm trying to do is a Zen Archery setup for a player. I have been able to create the skill Zen Archery to work off of Spirit. I have also been able to duplicate some other Edges that had different requirements to work with Zen Archery instead. Where I'm having a problem is when I purchase a Bow, it uses the Shooting skill. I have tried creating a separate Bow just for use with this skill, let's call it a Zen Bow just for convenience. However, I am not sure how to get it to use the Zen Archery skill instead of Shooting.

Does that clarify a little bit?

Also, thanks for your help.
basselope is offline   #6 Reply With Quote
SeeleyOne
Senior Member
 
Join Date: Nov 2009
Posts: 891

Old September 5th, 2015, 10:02 AM
OK, this one was easy. I just tested it to make sure that I am not pulling things out of my rear.

Inside the Zen Archery edge that lets you use the zen archery skill, make an eval script

Phase: Final
Priority: 10000

Code:
var finalbonus as number
var thisbonus as number
var finaldie as string
var finaltext as string
var bonustext as string
var dieNumber as number

finalbonus = hero.child[skZen].field[trtNetRoll].value 
thisbonus = 0
finaldie = ""
finaltext = ""
bonustext = ""
dieNumber = #trait[skZen]


~ Cap die number at 12
if (dieNumber >= 6) then
      dieNumber = 6
endif

~ Double the dieNumber so that it will be a die
dieNumber = dieNumber * 2
finaldie = "d" & dieNumber

foreach pick in hero from WeapRange
   if (eachpick.tagis[Weapon.Bow] = 1) then
      bonustext = ""
      thisbonus = finalbonus
      thisbonus += eachpick.field[wpBonus].value
      thisbonus += eachpick.field[wpPenalty].value

      if (thisbonus > 0) then
           bonustext = "+" & thisbonus
      endif

      if (thisbonus < 0) then
           bonustext = thisbonus
      endif

      finaltext = finaldie & bonustext
      eachpick.field[wpNetAtk].text = finaltext
   endif
nexteach
You might have to change the skill tag from skZen to whatever you have it as. If you DO have it as skZen, it is done for you. It is in two places towards the start of the script. One for the die rating, the other for any modifiers to it (for example, d12 +1 has a +1).

Evil wins because good rolls poorly .... or the players are not paying enough attention to the game.
SeeleyOne is offline   #7 Reply With Quote
SeeleyOne
Senior Member
 
Join Date: Nov 2009
Posts: 891

Old September 6th, 2015, 09:35 AM
For clarification, the above script will look through Ranged Weapons that have the Special Trait of "Bow Weapon".

Evil wins because good rolls poorly .... or the players are not paying enough attention to the game.
SeeleyOne is offline   #8 Reply With Quote
basselope
Junior Member
 
Join Date: Sep 2011
Posts: 23

Old September 14th, 2015, 03:33 PM
You are made of awesome with a liberal sprinkling of kick ass. I can't wait to work on this.
basselope is offline   #9 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 10:39 PM.


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