Junior Member
Join Date: Sep 2011
Posts: 23
|
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.
|
#1 |
Senior Member
Join Date: Nov 2009
Posts: 891
|
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 |
#2 |
Junior Member
Join Date: Sep 2011
Posts: 23
|
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. |
#3 |
Senior Member
Join Date: Nov 2009
Posts: 891
|
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. |
#4 |
Senior Member
Join Date: Nov 2009
Posts: 891
|
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. |
#5 |
Junior Member
Join Date: Sep 2011
Posts: 23
|
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. |
#6 |
Senior Member
Join Date: Nov 2009
Posts: 891
|
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 Evil wins because good rolls poorly .... or the players are not paying enough attention to the game. |
#7 |
Senior Member
Join Date: Nov 2009
Posts: 891
|
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. |
#8 |
Junior Member
Join Date: Sep 2011
Posts: 23
|
You are made of awesome with a liberal sprinkling of kick ass. I can't wait to work on this.
|
#9 |
|
|