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)
-   -   Linking Fighting/Shooting skills to a different Attribute (http://forums.wolflair.com/showthread.php?t=48988)

javadragon April 13th, 2014 03:17 PM

Linking Fighting/Shooting skills to a different Attribute
 
I tried to search the forums for this answer, but I have not found a thread that matches what I am trying to do. So, if there already is a post that you are aware of for this, please link it here.

Goal:
I am creating an Edge called Smart Fighter. This edge allows the character to link their Fighting and Shooting skills to their Smarts, rather than Agility. Is this possible?

I thought about making new skills and not allowing the current ones, but I am not sure how I would link the weapons up to this new skill for their stat windows.

Other than that I think the only other way to do this would be to "refund" (increase skill points to offset extra cost for low Agility score when buying into these skills) buy costs back to the character.

SeeleyOne April 13th, 2014 04:19 PM

The only effect that the attribute has on a skill is the skill cost. I would leave the rest alone.

I have not looked yet at the actual coding, but I would have the edge use an Eval Script that compares the ratings of Agility and Smarts. If Smarts is higher, have it go off the higher rating. Otherwise it has no effect.

SeeleyOne April 13th, 2014 04:24 PM

Oh, and there is a problem with the refund. While it works at character creation (and it is an easy fix to put into the Eval script I mentioned), it would be a pain to mess with during Advancement. OF course, if it is a Creation Only edge that part is solved.

Edges that give a skill at d4 through bootstrapping have a similar problem. It is easy to offset the cost during creation mode, but it messes things up if the edge is taken at some point later on as it messes up the skill points during Advancement and you can't fix that (unless you unlock it). Interestingly enough you can bootstrap a free skill through advancement and it will not mess up skill points (if it is not off-set).

Gumbytie May 28th, 2014 05:20 PM

Well, I created an Edge (Inspired by another game system) that did something similar. I called it Calculated Attacks. Uses Smarts as the linked attribute for Fighting.

The code:

Quote:

<eval phase="Setup" priority="1000">
<![CDATA[perform hero.childfound[skFighting].setlinkage[attribute,Attribute,"thingid.attrSma"]]]></eval>

SeeleyOne May 28th, 2014 06:03 PM

Well, that was easy. :) Thanks for sharing.

zarlor May 29th, 2014 04:24 AM

Quote:

Originally Posted by Gumbytie (Post 184274)
Well, I created an Edge (Inspired by another game system) that did something similar. I called it Calculated Attacks. Uses Smarts as the linked attribute for Fighting.

I hope you won't mind (let me know if you do) but I've added that code to the Common Code thread to help put it someplace else for folks to find it if that will help them, with attribution to you. Great find!

javadragon May 30th, 2014 03:37 AM

Thank you for the replies.

What I wound up doing in mine was to create new Skills called "Fighting (Smarts)" and "Fighting (Strength)" which were linked to the appropriate Attributes. I then kept this new skill and the original Fighting Skill in sync with each other.

However, set the linkage was a lot shorter and easier. I will have to test that code out to see how it works when the edge is bought after skills have already been bought using the original linked Attribute. Fore example, let's I had a d10 in Smarts and a d6 in Agility, but I bought up to a d8 in Fighting before taking the edge (meaning I spent 2 skills points to go from the d6 to the d8). If after taking the edge that changed the linked Attribute, would that mean I would get a skill point back? If I already spent that point before taking the edge, I do not think that skill point should be refunded back to me. I will have to test your code to see how it works.

I know that the other code is already above, but here is the code for me to keep the two Skills linked:
Quote:

<eval phase="PreTraits" priority="5000"><![CDATA[~ if this is added during user creation
if (hero.tagis[mode.creation] = 1) then
~This will offset the cost of adding the new skill
perform #resspent[resSkill,-,1,"Smart Fighter"]
endif

var smFightDie as number
var skillFight as number

~ get the current die for Fighting, -2 for initial d4
skillFight = 0
foreach pick in hero where "thingid.skFighting"
skillFight = eachpick.field[trtUser].value - 2
nexteach

foreach pick in hero where "thingid.skSmaFight"
~ get the current die for Fighting (Smarts), -2 for initial d4
smFightDie = eachpick.field[trtBonus].value + eachpick.field[trtUser].value - 2

~ add the current Fighting die to Fighting (Smarts)
eachpick.field[trtBonus].value += skillFight
nexteach

~ add the Fighting (Smarts) skill die to Fighting
foreach pick in hero where "thingid.skFighting"
eachpick.field[trtBonus].value += smFightDie
nexteach]]></eval>

<bootstrap thing="skSmaFight"></bootstrap>

SeeleyOne May 30th, 2014 07:32 AM

If that does not work, a mechanic will.

Code:

if (hero.tagis[Edge.edgFightSmart] = 1) then
      perform hero.childfound[skFighting].setlinkage[attribute,Attribute,"thingid.attrSma"
endif


javadragon June 1st, 2014 06:58 AM

As I suspected, when I tried using the setlinkage code, skill points were refunded to me when I gained the edge.

In my example, I had an Agility of d6 and a Smarts of d8. During hero creation, I did not take Smart Fighter. However, I chose to increase my Fighting skill to a d8, which cost 2 skill points when I went from d6 to d8. During advancement, I took the Smart Fighter edge and once I did this, I had another skill point to spend since my double skill point cost to take Fighting to a d8 became a single skill point cost.

I will have to play around with the code to see if I can figure out if there will be skill points refunded and adjust the characters allowed points.

Thank you for showing me the setlinkage code though as it means I do not have to create a new skill now.


All times are GMT -8. The time now is 04:40 PM.

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