PDA

View Full Version : Runestaff defense script request



Tarakan
05-21-2015, 01:31 PM
Is there a script that calculates DS in various stances based on a character's skills and the runestaff in hand, and also provides guidance as to how many more skill ranks are needed to improve the DS?

Tarakan

Tgo01
05-21-2015, 01:32 PM
Is there a script that calculates DS in various stances based on a character's skills and the runestaff in hand, and also provides guidance as to how many more skill ranks are needed to improve the DS?

Tarakan

I'm not even sure the formula is known for how many magical ranks = 1 point of DS, especially when factoring in diminishing returns. It would be awesome if there were though.

Whirlin
05-21-2015, 01:36 PM
I'm not even sure the formula is known for how many magical ranks = 1 point of DS, especially when factoring in diminishing returns. It would be awesome if there were though.
Dependent on level versus Magic Ranks:

If Magic Ranks / Level < 4
Parry Ranks = 10 + ((3 × magic ranks) ÷ (20))

If Magic Ranks/level =>4 and <11
Parry ranks = 10 + level + [((magic ranks) - (8 × level)) ÷ 10]

If Magic Ranks / Level >= 11
Parry Ranks = 10 + (level × 13/10) + [((magic ranks) - (11 × level)) ÷ 20]

That's parry ranks

10 + Parry + trunc (https://gswiki.play.net/mediawiki/index.php/Trunc)(STR bonus (https://gswiki.play.net/mediawiki/index.php/Strength) ÷ 4) + trunc(DEX bonus (https://gswiki.play.net/mediawiki/index.php/Dexterity) ÷ 4) = Base Value

(Base Value × Stance modifier × 1.5) + Stance Bonus + Runestaff Enchant Bonus = Parry DS

Tgo01
05-21-2015, 07:33 PM
Dependent on level versus Magic Ranks:

If Magic Ranks / Level < 4
Parry Ranks = 10 + ((3 × magic ranks) ÷ (20))

If Magic Ranks/level =>4 and <11
Parry ranks = 10 + level + [((magic ranks) - (8 × level)) ÷ 10]

If Magic Ranks / Level >= 11
Parry Ranks = 10 + (level × 13/10) + [((magic ranks) - (11 × level)) ÷ 20]

That's parry ranks

10 + Parry + trunc (https://gswiki.play.net/mediawiki/index.php/Trunc)(STR bonus (https://gswiki.play.net/mediawiki/index.php/Strength) ÷ 4) + trunc(DEX bonus (https://gswiki.play.net/mediawiki/index.php/Dexterity) ÷ 4) = Base Value

(Base Value × Stance modifier × 1.5) + Stance Bonus + Runestaff Enchant Bonus = Parry DS

Magic.

Got it.

Tgo01
05-21-2015, 08:33 PM
Does this look right?

Total number of magical ranks: 1289
Parry ranks: 149
Your level: 100
Your strength bonus: 25
Your dexterity bonus: 35
Your base value: 173
Your runestaff enchant bonus: 20
Your Offensive Parry DS: 97
Your Advance Parry DS: 146
Your Forward Parry DS: 195
Your Neutral Parry DS: 244
Your Guarded Parry DS: 293
Your Defensive Parry DS: 342

Tgo01
05-21-2015, 09:28 PM
This is actually a pretty nifty idea.

Assuming I got the math right I have it setup so you can start the script with how many goals to compare your current magical skills to, like say you wanted to see what your DS would be like with an extra 100 magical ranks:

#################################
Your current info.
Total number of magical ranks: 1289
Parry ranks: 149
Your level: 100
Your strength bonus: 25
Your dexterity bonus: 35
Your base value: 173
Your runestaff enchant bonus: 20
Your Offensive Parry DS: 97
Your Advance Parry DS: 146
Your Forward Parry DS: 195
Your Neutral Parry DS: 244
Your Guarded Parry DS: 293
Your Defensive Parry DS: 342
#################################
#################################
Your goal info.
Total number of magical ranks: 1389
Parry ranks: 154
Your level: 100
Your strength bonus: 25
Your dexterity bonus: 35
Your base value: 178
Your runestaff enchant bonus: 20
Your Offensive Parry DS: 100 (+3)
Your Advance Parry DS: 150 (+4)
Your Forward Parry DS: 200 (+5)
Your Neutral Parry DS: 250 (+6)
Your Guarded Parry DS: 300 (+7)
Your Defensive Parry DS: 350 (+8)
#################################

Or -300 ranks.

#################################
Your current info.
Total number of magical ranks: 1289
Parry ranks: 149
Your level: 100
Your strength bonus: 25
Your dexterity bonus: 35
Your base value: 173
Your runestaff enchant bonus: 20
Your Offensive Parry DS: 97
Your Advance Parry DS: 146
Your Forward Parry DS: 195
Your Neutral Parry DS: 244
Your Guarded Parry DS: 293
Your Defensive Parry DS: 342
#################################
#################################
Your goal info.
Total number of magical ranks: 989
Parry ranks: 119
Your level: 100
Your strength bonus: 25
Your dexterity bonus: 35
Your base value: 143
Your runestaff enchant bonus: 20
Your Offensive Parry DS: 84 (-13)
Your Advance Parry DS: 126 (-20)
Your Forward Parry DS: 168 (-27)
Your Neutral Parry DS: 210 (-34)
Your Guarded Parry DS: 253 (-40)
Your Defensive Parry DS: 295 (-47)
#################################

Riltus
05-21-2015, 09:52 PM
This is actually a pretty nifty idea.

Assuming I got the math right

That's a wildly optimistic assumption...:)

Mark

Tgo01
05-21-2015, 09:56 PM
That's a wildly optimistic assumption...:)

Mark

I see where I went wrong, I was using the two handed weapons DS parry thingie and I didn't even notice there was a whole page for runestaff DS parry thingies.

Tgo01
05-21-2015, 09:58 PM
Does this look better?

#################################
Your current info.
Total number of magical ranks: 1289
Parry ranks: 149
Your level: 100
Your strength bonus: 25
Your dexterity bonus: 35
Your base value: 173
Your runestaff enchant bonus: 20
Your Offensive Parry DS: 71
Your Advance Parry DS: 107
Your Forward Parry DS: 143
Your Neutral Parry DS: 179
Your Guarded Parry DS: 215
Your Defensive Parry DS: 251
#################################
#################################
Your goal info.
Total number of magical ranks: 1789
Parry ranks: 174
Your level: 100
Your strength bonus: 25
Your dexterity bonus: 35
Your base value: 198
Your runestaff enchant bonus: 20
Your Offensive Parry DS: 109 (+38)
Your Advance Parry DS: 163 (+56)
Your Forward Parry DS: 218 (+75)
Your Neutral Parry DS: 272 (+93)
Your Guarded Parry DS: 327 (+112)
Your Defensive Parry DS: 381 (+130)
#################################

Riltus
05-21-2015, 10:03 PM
Does this look right?

Total number of magical ranks: 1289
Parry ranks: 149 (10 + 139) ok
Your level: 100
Your strength bonus: 25 (6)
Your dexterity bonus: 35 (8)
Your base value: 173 163 (149 + 6 + 8)
Your runestaff enchant bonus: 20
Your Offensive Parry DS: 97 68 [(163 base * 0.30 stance mod) + 20 enchant bonus]
Your Advance Parry DS: 146 103 [(163 * 0.45) + 20 enc bonus + 10 stance bonus]
Your Forward Parry DS: 195 137[(163 * 0.60) + 20 ench bonus + 20 stance bonus
Your Neutral Parry DS: 244 172[(163 * 0.75) + 20 enc bonus + 30 stance bonus]
Your Guarded Parry DS: 293 206 [(163 * 0.90) + 20 enc bonus + 40 stance bonus]
Your Defensive Parry DS: 342 241 [(163 * 1.05) + 20 enchant bonus + 50 stance bonus]

1. In the script you've added the 10 bonus ranks twice.

2. Either change the stance mods to this set: 0.20, 0.30, 0.40, 0.50, 0.60, 0.70 or remove the * 1.5 multiplier. Example, you have the offensive stance mod as (0.30 * 1.5) when it is actually 0.30 or (0.20 * 1.5)

Mark

Tgo01
05-21-2015, 10:11 PM
Alright, how does this look.

#################################
Your current info.
Total number of magical ranks: 1289
Parry ranks: 149
Your level: 100
Your strength bonus: 25
Your dexterity bonus: 35
Your base value: 163
Your runestaff enchant bonus: 20
Your Offensive Parry DS: 52
Your Advance Parry DS: 78
Your Forward Parry DS: 105
Your Neutral Parry DS: 131
Your Guarded Parry DS: 157
Your Defensive Parry DS: 184
#################################
#################################
Your goal info.
Total number of magical ranks: 1589
Parry ranks: 164
Your level: 100
Your strength bonus: 25
Your dexterity bonus: 35
Your base value: 178
Your runestaff enchant bonus: 20
Your Offensive Parry DS: 55 (+3)
Your Advance Parry DS: 83 (+5)
Your Forward Parry DS: 111 (+6)
Your Neutral Parry DS: 139 (+8)
Your Guarded Parry DS: 166 (+9)
Your Defensive Parry DS: 194 (+10)
#################################

Riltus
05-21-2015, 10:32 PM
Alright, how does this look.

#################################
Your current info.
Total number of magical ranks: 1289
Parry ranks: 149
Your level: 100
Your strength bonus: 25
Your dexterity bonus: 35
Your base value: 163
Your runestaff enchant bonus: 20
Your Offensive Parry DS: 52
Your Advance Parry DS: 78
Your Forward Parry DS: 105
Your Neutral Parry DS: 131
Your Guarded Parry DS: 157
Your Defensive Parry DS: 184
#################################
#################################
Your goal info.
Total number of magical ranks: 1589
Parry ranks: 164
Your level: 100
Your strength bonus: 25
Your dexterity bonus: 35
Your base value: 178
Your runestaff enchant bonus: 20
Your Offensive Parry DS: 55 (+3)
Your Advance Parry DS: 83 (+5)
Your Forward Parry DS: 111 (+6)
Your Neutral Parry DS: 139 (+8)
Your Guarded Parry DS: 166 (+9)
Your Defensive Parry DS: 194 (+10)
#################################

The stance mods are incorrect. You went from an offensive stance mod, in the initial post, of 0.45 to 0.20 in this post. It should be 0.30. Parry DS by stance should match those that I posted in red.

From the current info section you have:
Your Offensive Parry DS: 52 [(163 * 0.20) + 20]

It should be:
Your Offensive Parry DS: 68 [(163 * 0.30) + 20]

Mark

Tgo01
05-21-2015, 10:39 PM
I had .20 * 1.5 but that showed up as wrong :/

Let me try this once more.

#################################
Your current info.
Total number of magical ranks: 1289
Parry ranks: 149
Your level: 100
Your strength bonus: 25
Your dexterity bonus: 35
Your base value: 163
Your runestaff enchant bonus: 20
Your Offensive Parry DS: 68
Your Advance Parry DS: 103
Your Forward Parry DS: 137
Your Neutral Parry DS: 172
Your Guarded Parry DS: 206
Your Defensive Parry DS: 241
#################################
#################################
Your goal info.
Total number of magical ranks: 2289
Parry ranks: 199
Your level: 100
Your strength bonus: 25
Your dexterity bonus: 35
Your base value: 213
Your runestaff enchant bonus: 20
Your Offensive Parry DS: 83 (+15)
Your Advance Parry DS: 125 (+22)
Your Forward Parry DS: 167 (+30)
Your Neutral Parry DS: 209 (+37)
Your Guarded Parry DS: 251 (+45)
Your Defensive Parry DS: 293 (+52)
#################################

Riltus
05-21-2015, 11:47 PM
I had .20 * 1.5 but that showed up as wrong :/

Let me try this once more.

#################################
Your current info.
Total number of magical ranks: 1289
Parry ranks: 149
Your level: 100
Your strength bonus: 25
Your dexterity bonus: 35
Your base value: 163
Your runestaff enchant bonus: 20
Your Offensive Parry DS: 68
Your Advance Parry DS: 103
Your Forward Parry DS: 137
Your Neutral Parry DS: 172
Your Guarded Parry DS: 206
Your Defensive Parry DS: 241
#################################
#################################
Your goal info.
Total number of magical ranks: 2289
Parry ranks: 199
Your level: 100
Your strength bonus: 25
Your dexterity bonus: 35
Your base value: 213
Your runestaff enchant bonus: 20
Your Offensive Parry DS: 83 (+15)
Your Advance Parry DS: 125 (+22)
Your Forward Parry DS: 167 (+30)
Your Neutral Parry DS: 209 (+37)
Your Guarded Parry DS: 251 (+45)
Your Defensive Parry DS: 293 (+52)
#################################

'Your current info' section is fine and the 'Goals' section computations are correct. However, there is the possibility that the formula is not correct for ranks per level greater than 15 or 16. There could be one or more additional thresholds which would result in diminishing returns. This would mean that the actual DS would be less than the script's calculated DS.

Example:

You have magical skill (2289 ranks) converted to parry ranks as 189 + 10 bonus ranks = 199. If ranks greater than 15 per level have a factor of 0.025 rather than 0.05 then the actual number of parry ranks would be 169 + 10 bonus ranks = 179 .

Mark

Tgo01
05-21-2015, 11:55 PM
'Your current info' section is fine and the 'Goals' section computations are correct. However, there is the possibility that the formula is not correct for ranks per level greater than 15 or 16. There could be one or more additional thresholds which would result in diminishing returns. This would mean that the actual DS would be less than the script's calculated DS.

Example:

You have magical skill (2289 ranks) converted to parry ranks as 189 + 10 bonus ranks = 199. If ranks greater than 15 per level have a factor of 0.025 rather than 0.05 then the actual number of parry ranks would be 169 + 10 bonus ranks = 179 .

Mark

Ah I see. Do we know if there are any other thresholds or has no one done any testing with that many spell ranks?

Tgo01
05-22-2015, 12:26 AM
This thread got me curious.

I wanted to see if my empath's DS would match up to what the script is spitting out but I couldn't account for 30 DS so I stripped him of his armor and all spells and made sure his hands were empty and his DS was still 55 in offensive stance, only 25 of which I could figure from his evade DS.

He has 30 AGI bonus and 19 INT bonus and if I'm figuring this right this should give him 34 base evade DS * .75 for being in offensive stance so 25 evade DS which leaves 30 DS I can't account for. No CMANs are known or anything.

Where is this 30 DS coming from?

Riltus
05-22-2015, 12:33 AM
Ah I see. Do we know if there are any other thresholds or has no one done any testing with that many spell ranks?

Not sure on this. The testing was up to ~16 ranks per level but I can't recall if we were able to confirm another threshold. I'm unaware of any other testing. Up to 15 ranks per level the formula is pretty solid except for rounding/truncation of partial ranks. But this should result in no more than +/- 1 DS errors.

Mark

Riltus
05-22-2015, 12:35 AM
This thread got me curious.

I wanted to see if my empath's DS would match up to what the script is spitting out but I couldn't account for 30 DS so I stripped him of his armor and all spells and made sure his hands were empty and his DS was still 55 in offensive stance, only 25 of which I could figure from his evade DS.

He has 30 AGI bonus and 19 INT bonus and if I'm figuring this right this should give him 34 base evade DS * .75 for being in offensive stance so 25 evade DS which leaves 30 DS I can't account for. No CMANs are known or anything.

Where is this 30 DS coming from?

The first thing I'd check is room lighting. A foggy room adds +30 DS.

Mark

Tgo01
05-22-2015, 12:51 AM
The first thing I'd check is room lighting. A foggy room adds +30 DS.

Mark

Yup that was it. Made sure the room was well lit and had 25 DS. Also his DS numbers all add up and the script is spot on. Thanks for all of the help.

Here is the script if anyone wants to play around with it:



goal_ranks = script.vars[2].to_i
if script.vars[2] =~ /\-/
nil
else
goal_symbol = "+"
end

total_magical_ranks = (Skills.arcanesymbols) + (Skills.magicitemuse) + (Skills.harnesspower) + (Skills.spellaiming) + (Skills.emc) + (Skills.smc) + (Skills.mmc) + (Skills.elair) + (Skills.elearth) + (Skills.elfire) + (Skills.elwater) + (Skills.slblessings) + (Skills.slreligion) + (Skills.slsummoning) + (Skills.sldemonology) + (Skills.slnecromancy) + (Skills.mldivination) + (Skills.mlmanipulation) + (Skills.mltelepathy) + (Skills.mltransference) + (Skills.mltransformation) + (Spells.minorelemental) + (Spells.minormental) + (Spells.majorelemental) + (Spells.minorspirit) + (Spells.majorspirit) + (Spells.wizard) + (Spells.sorcerer) + (Spells.ranger) + (Spells.paladin) + (Spells.empath) + (Spells.cleric) + (Spells.bard)

runestaff_bonus = script.vars[1].to_i
runestaff_bonus = 0 if script.vars[1] == nil

if (total_magical_ranks / Char.level) < 4
parry_ranks = (10 + (3 * total_magical_ranks) / 20).truncate
elsif (total_magical_ranks / Char.level) < 11
parry_ranks = (10 + Char.level + ((total_magical_ranks) - (8 * Char.level)) / (20)).truncate
elsif (total_magical_ranks / Char.level) >= 11
parry_ranks = (10 + ((Char.level) * (13.0/10)) + ((total_magical_ranks - (11 * Char.level)) / 20)).truncate
end

base_value = parry_ranks + (Stats.str[1] / 4).truncate + (Stats.dex[1] / 4).truncate
offensive_parry_ds = ((base_value * 0.30) + 0 + runestaff_bonus).truncate
advance_parry_ds = ((base_value * 0.45) + 10 + runestaff_bonus).truncate
forward_parry_ds = ((base_value * 0.60) + 20 + runestaff_bonus).truncate
neutral_parry_ds = ((base_value * 0.75) + 30 + runestaff_bonus).truncate
guarded_parry_ds = ((base_value * 0.90) + 40 + runestaff_bonus).truncate
defensive_parry_ds = ((base_value * 1.05) + 50 + runestaff_bonus).truncate

goal_total_magical_ranks = total_magical_ranks + goal_ranks

if (goal_total_magical_ranks / Char.level) < 4
goal_parry_ranks = (10 + (3 * goal_total_magical_ranks) / 20).truncate
elsif (goal_total_magical_ranks / Char.level) < 11
goal_parry_ranks = (10 + Char.level + ((goal_total_magical_ranks) - (8 * Char.level)) / (20)).truncate
elsif (goal_total_magical_ranks / Char.level) >= 11
goal_parry_ranks = (10 + ((Char.level) * (13.0/10)) + ((goal_total_magical_ranks - (11 * Char.level)) / 20)).truncate
end

goal_base_value = goal_parry_ranks + (Stats.str[1] / 4).truncate + (Stats.dex[1] / 4).truncate
goal_offensive_parry_ds = ((goal_base_value * 0.30) + 0 + runestaff_bonus).truncate
goal_advance_parry_ds = ((goal_base_value * 0.45) + 10 + runestaff_bonus).truncate
goal_forward_parry_ds = ((goal_base_value * 0.60) + 20 + runestaff_bonus).truncate
goal_neutral_parry_ds = ((goal_base_value * 0.75) + 30 + runestaff_bonus).truncate
goal_guarded_parry_ds = ((goal_base_value * 0.90) + 40 + runestaff_bonus).truncate
goal_defensive_parry_ds = ((goal_base_value * 1.05) + 50 + runestaff_bonus).truncate

offensive_difference = goal_offensive_parry_ds - offensive_parry_ds
advance_difference = goal_advance_parry_ds - advance_parry_ds
forward_difference = goal_forward_parry_ds - forward_parry_ds
neutral_difference = goal_neutral_parry_ds - neutral_parry_ds
guarded_difference = goal_guarded_parry_ds - guarded_parry_ds
defensive_difference = goal_defensive_parry_ds - defensive_parry_ds

respond "#################################"
respond "Your current info."
respond "Total number of magical ranks: #{total_magical_ranks}"
respond "Parry ranks: #{parry_ranks}"
respond "Your level: #{Char.level}"
respond "Your strength bonus: #{Stats.str[1]}"
respond "Your dexterity bonus: #{Stats.dex[1]}"
respond "Your base value: #{base_value}"
respond "Your runestaff enchant bonus: #{runestaff_bonus}"
respond "Your Offensive Parry DS: #{offensive_parry_ds}"
respond "Your Advance Parry DS: #{advance_parry_ds}"
respond "Your Forward Parry DS: #{forward_parry_ds}"
respond "Your Neutral Parry DS: #{neutral_parry_ds}"
respond "Your Guarded Parry DS: #{guarded_parry_ds}"
respond "Your Defensive Parry DS: #{defensive_parry_ds}"
respond "#################################"

if script.vars[2] != nil
respond "#################################"
respond "Your goal info."
respond "Total number of magical ranks: #{goal_total_magical_ranks}"
respond "Parry ranks: #{goal_parry_ranks}"
respond "Your level: #{Char.level}"
respond "Your strength bonus: #{Stats.str[1]}"
respond "Your dexterity bonus: #{Stats.dex[1]}"
respond "Your base value: #{goal_base_value}"
respond "Your runestaff enchant bonus: #{runestaff_bonus}"
respond "Your Offensive Parry DS: #{goal_offensive_parry_ds} (#{goal_symbol}#{offensive_difference})"
respond "Your Advance Parry DS: #{goal_advance_parry_ds} (#{goal_symbol}#{advance_difference})"
respond "Your Forward Parry DS: #{goal_forward_parry_ds} (#{goal_symbol}#{forward_difference})"
respond "Your Neutral Parry DS: #{goal_neutral_parry_ds} (#{goal_symbol}#{neutral_difference})"
respond "Your Guarded Parry DS: #{goal_guarded_parry_ds} (#{goal_symbol}#{guarded_difference})"
respond "Your Defensive Parry DS: #{goal_defensive_parry_ds} (#{goal_symbol}#{defensive_difference})"
respond "#################################"
end


You start the script with the first command line variable being your runestaff's enchant bonus and the second variable being how many ranks you want to add or subtract to compare to.

For example if you named the script test you would do:

;test 20 100

This would assume your runestaff has a bonus of +20 and you want to see how your DS would look like with +100 magical ranks.