Language: 
To browser these website, it's necessary to store cookies on your computer.
The cookies contain no personal information, they are required for program control.
  the storage of cookies while browsing this website, on Login and Register.

Author Topic:  prayer/spell fumble  (Read 86 times)

0 Members and 1 Guest are viewing this topic.

Dolfo

« on: 29, September 2022, 07:10:34 »
I checked the formula for prayer fumble, because it looked strange to me with wisdom 45 still getting prayer fumbles.

spell_util.c line 707

Code: [Select]
if (item == spellNormal && op->type == PLAYER && s->flags & SPELL_DESC_WIS
            && RANDOM_ROLL(0, 99) < s->level / (float) MAX(1, op->chosen_skill->level) * 1)

First we have a multiplier *1, this is only processor cost.
Second it looks like, we have always at least 1% chance to fumble, when we roll a 0?
Third when we have something like integer/float the result is integer, so the float must be rounded/truncated somewhere. I am not 100% sure if it is before the operation or after.

So it looks like only when wisdom(stats) level is higher than wisdom(spelllevel) we have no fumble or the 1% depending on the round/truncate behavior above.

But i am sure, when you have level 110 prayer and your wisdom skill is 110, you have 1% fumble.
« Last Edit: 06, October 2022, 16:47:48 by Dolfo »
Don't believe the shit, you hear in mainstream. Believe your own body. Your body is speaking always the true to you. But you need to understand your body. Hear to your body, not to your ego. And when body is calling to you: "Hey something is wrong!" find the reason(s) for that. School medicine don't go for that, they don't want to heal you. They want earn money and sell you medicine, you should take rest of you life. School medicine is corrupted by bad humans, like politician, like media.

Dolfo

« Reply #1 on: 06, October 2022, 14:33:22 »
I have thought of a new formula to mage spell fumble. Currently it's mostly keep your fumble under 0 and thats all. But what if we combine the prayer formula with the item spell fumble formula?

So a 100 rnd roll against ...

... spelllevel-(pow+int)+-itemspellfumble.

So you have more ways to work against spellfumble and higher mages need to watch more for good spellfumble gear.

This means high level mages blasting level 110 spells, need pow+int+-spellfumble gear in sum to 110 so they never fumble.

...

I also thought about the priestspell fumble. First i would use a roll 1,100 instead of 0,100. I don't like this 1% always fumble. Then we have the tabernackle shrines. We can combine this. Priests get a kind of purity value, if they kill monsters this go down, of course it goes down slowly. When priest pray on an altar they can clean their purity. Could be also interesting to increase purity when priests help other players with healing, cure poison etc.  :o
« Last Edit: 06, October 2022, 16:47:38 by Dolfo »
Don't believe the shit, you hear in mainstream. Believe your own body. Your body is speaking always the true to you. But you need to understand your body. Hear to your body, not to your ego. And when body is calling to you: "Hey something is wrong!" find the reason(s) for that. School medicine don't go for that, they don't want to heal you. They want earn money and sell you medicine, you should take rest of you life. School medicine is corrupted by bad humans, like politician, like media.

Dolfo

« Reply #2 on: 06, October 2022, 16:37:02 »
I had some other ideas. Currently we have int against pow, int is nice but pow is better. It's same with cha and wis.

What if only int goes to spell fumble and pow is damage and mana? Something like

spelllevel-(int*2)+-itemspellfumble.

This could be same for priest with charisma. Tabernackle likes nice guys. And prayers work better.  :)

prayerlevel-(cha*2)+-purity value.

So each class has a damage boost attribute and a hit chance attribute.

Could also be interesting to use the hit chance attribute for crit damage.  8)

like
int 20% grants 20% critchance
cha 20% grants 20% critchance (tabernackle likes you)  :)
dex 20% grants 20% critchance.

So int, cha and dex gives also damage but by using critchances.

And finally we have ranged classes, they mostly need their dex and instead of using dex for direct damage boost, dex is used for critdamage boost.

We can do the same on throwing weapons. Dex is crit and str is direct damage boost.

Don't know how we can build in a secondary stat for sling, bow, crossbow? Sling and bow could be strength bonus too, but crossbow not. Perhaps crossbow becomes a higher bonus on critdamage, bow a medium bonus, sling slowest, but sling becomes the most bonus for strength, bow medium, crossbow nothing?

And can someone put this thread in suggestions?  :o
« Last Edit: 06, October 2022, 16:47:15 by Dolfo »
Don't believe the shit, you hear in mainstream. Believe your own body. Your body is speaking always the true to you. But you need to understand your body. Hear to your body, not to your ego. And when body is calling to you: "Hey something is wrong!" find the reason(s) for that. School medicine don't go for that, they don't want to heal you. They want earn money and sell you medicine, you should take rest of you life. School medicine is corrupted by bad humans, like politician, like media.

_people_

« Reply #3 on: 06, October 2022, 22:10:09 »
I haven't looked into how it works now recently, but I'll take your word for it that there's a minimum 1% fail chance - I assume that's a simple mistake rather than intentional design.

I don't like how SF is implemented ATM. I think incorporating stats would be beneficial, and perhaps even removing it as an item modifier (or, at least, have it be exclusive to unique artifacts). In its stead, some other stat (int/cha) would be used to calculate spell fumble chance.

My alternative proposal is:
fumble_chance = (skill_level - B - stat) / 2

Code: [Select]
(1-10-10) / 2 = 0 (capped at 0)
(20-10-10) / 2 = 0% chance to fumble
(50-10-10) / 2 = 15
(110-10-10) / 2 = 45

(20 - 10 - 15) / 2 = 0 (capped)
(50 - 10 - 15) / 2 = 12.5
(110 - 10 - 15) / 2 = 42.5

(50 - 10 - 50) / 2 = 0 (capped)
(75 - 10 - 50) / 2 = 7.5
(110 - 10 - 50) / 2 = 25

Where B is some constant "base" value similar to how int/wis/pow/cha currently work (below a certain value they lower damage). B and the "/ 2" can be modified to make the numbers more balanced. Obviously players will seldom (if ever) have spells/prayers fumble at low levels, which I think is fine as it gives them a gradual introduction to the mechanic. Though we should probably have some sort of explanation in place, either via in-game help topics or via a quest for a level 10-20 spell/prayer.

I also agree with Dolfo in that int/cha aren't really impactful enough in their current state - they're additive vice multiplicative (as wis/pow are) and consequently will be afterthoughts. This may change slightly when items can have multiple modifiers, but I think crit chance is probably a better use for them.

I think I agree entirely with your opinion for ranged weapons.
-- _people_ :)

Shroud

« Reply #4 on: 07, October 2022, 02:32:32 »
Actually the problem with SF in general is that it's not really been developed to have any purpose other than to prevent a player from casting spells. So basically it has a narrow range of effectiveness and once you have maxed (negative) SF any additional gain to the stat is useless. So to combat that I'd have two suggestions

1. Have more powerful versions of spells with a higher SF requirement. So that would mean that Pow would increase your spell damage in general while Int would give you access to more powerful spells.
2. Have any excess SF be converted into a double cast. So for example if you have 150% of the SF required to cast the spell it would change to 1 spell of 100% success rate and a 50% chance to simultaneously cast it again.

I'm assuming skill level in your formula is the spell level (e.g. Lightning is a lvl 50 quest so spell level would be 50) rather than the player's level in the skill as otherwise players would become less good at casting the more they train in the skill. Considering that Firestorm is a lvl 15 req quest and it's clone Icestorm I think is lvl 30 or 35 iirc I don't know if that would cause issues in implementation. Same would apply to Firebolt, Lightning and Frostbolt.

Just working through the numbers to get a lvl 50 spell to fumble 12.5% of the time requires 15 int. On the other hand to get a lvl 110 spell to fumble 12.5% of the time requires 75 int. So the big question is would the damage output of a lvl 110 spell be the same as a lvl 50 spell with 60 extra pow.

From a player viewpoint I'd be tempted to add guilds and attunements to the calcs but from a server processing viewpoint a simple calculation is faster. I'll note that as a slight optimisation you could store a value of skill level - B in the skill object so that if the constant is always 10 then a lvl 50 spell would have a lvl 40 SF value. Secondly would it be faster if instead of doing a d100 ((spell level - int)/2) you did a d200 (spell level - int)
Doesn't matter, you'd die anyway. ;D Shroud's a hacker. After many hours of deep thought I have came to that conclusion.

Dolfo

« Reply #5 on: 07, October 2022, 20:11:28 »
In current formula for priest fumble it's currently the skill level not the spell level to learn. Using the level of a spell i don't like, why should be icebolt harder to cast than firebolt? 80 to 35?

And yes the original logic for prayer fumble says if you become better in your skill, you need more wisdom to cast. As is said above, perhaps we can change this to charisma*2. But original formula devides and uses *1 as a factor, so fumble is mostly 1 to 5%
110/110 = 1% fumble
110/55 = 2% fumble
110/22,5= 4% fumble

My idea would be harder not using / instead using -
so
110-110 = 0% fumble
110-55=55% fumble
110-20= 90% fumble

And for mages you can use int against spell fumble and the magic gear! Currently i have -59,7 spellfumble with my gear, so i need "only" 25 int to nearly cast without fumble my ma skill 110 spells.

So priest is also missing a stat like this gear spell fumble, that was my idea for a kind of purity value for priests? But i didnt' say the original logic for the priest fumble is good.

This was only a fast idea, to take both mechanics we have and combine it. Ok the priest purity is more work. But spell fumble for mage with int*2 + mage gear should be fast possible to change.

The idea of different versions of a spell is nice. But you need a good interface to handle this, like pressing the mouse longer to load a higher version of a spell. If you load a weak firebolt very long you gain a fireball, perhaps also with area damage. So you use the time of a pressed key or pressed mouse for the power of spell a player wants to cast. :o

Of course this could be abused by client modding, so you need also allow all players macro commands like /cast spell firebolt level 20.
« Last Edit: 07, October 2022, 20:31:55 by Dolfo »
Don't believe the shit, you hear in mainstream. Believe your own body. Your body is speaking always the true to you. But you need to understand your body. Hear to your body, not to your ego. And when body is calling to you: "Hey something is wrong!" find the reason(s) for that. School medicine don't go for that, they don't want to heal you. They want earn money and sell you medicine, you should take rest of you life. School medicine is corrupted by bad humans, like politician, like media.

Shroud

« Reply #6 on: 07, October 2022, 20:58:56 »
I'll note that there is nothing that says spell level has to be directly linked to quest level to obtain the spell. So you could in theory have a quest that is unlocked with lvl 50 Ma that has as a reward a lvl 15 spell.

Once relatively quick version could be to change firebolt into minor, lesser, small, medium etc versions. Each version would have higher base damage and SF than the previous one. I've not really thought out the numbers too much so it's a bit off the cuff but I would suggest that each level has 1.2x the damage, mana cost and SF. So that would mean that a Tier 4 spell (Medium) would have 72.8% more damage but would cost 72.8% more mana than the Tier 1 (Minor) version and if the Tier 1 version used 110 SF base then the Tier 4 version uses 190 SF. So to get the same fumble rate you need an extra 40 int.

Theoretically extra effects could be changed so that for example the size of the cone in a storm could also depend on the spell level. You could in theory have an omnidirectional magic bullet etc. Having said that it would take a lot more work than just changing dmg, mana and SF values where you could in theory just loop through the object/array and copy new values in a cloned object

As far as priests lacking a SF stat you could compensate for it by giving a higher weighting to their equivalent stat so that for example mages are SF+int*2 while priests are cha*4
Doesn't matter, you'd die anyway. ;D Shroud's a hacker. After many hours of deep thought I have came to that conclusion.

Tags:
 

Related Topics

  Subject / Started by Replies Last post
14 Replies
2084 Views
Last post 22, May 2008, 03:10:32
by longir
0 Replies
1148 Views
Last post 23, August 2010, 13:47:19
by Dolfo
2 Replies
8329 Views
Last post 01, February 2012, 15:30:37
by ThePlaneskeeper
12 Replies
762 Views
Last post 18, December 2020, 19:29:25
by Shroud
0 Replies
7 Views
Last post 06, October 2022, 21:38:26
by _people_