Chance to cast formula
Posted: Sun Feb 23, 2025 5:55 pm
Do we know what the actual formula is for chance to cast a spell? Something like character spellcasting + spell difficulty = cast %, with a maximum chance of 95%?
Code: Select all
If SPELL_DIFFICULTY >= 200 then
chance_to_cast = 100
else
chance_to_cast = CHAR_SPELLCASTING + SPELL_DIFFICULTY
if chance_to_cast > 98 then chance_to_cast = 98
endif
Remember that most difficulties are expressed in negative numbers, with more difficult more negative. This check is a positive value of 200 or more. As for the chance to cast, sometimes I have to double-take to make sure because of how the disassembly presents things. In this instance, the disassembly says that mmud generates a value between 0 and 100, which is actually 101 total numbers. The cap on chance to cast is 98. That's 99 possible numbers between 0 and 98 (technically, I think you can have a negative chance to cast). What I struggle to wrap my head around sometimes is deciding if there is a difference in number comparison to throw off the overall percentage by a point one way or the other.BearFather wrote: Sun Mar 30, 2025 11:56 am Nice, thought cap was 97, and not 98. Also if the diff over 200, it makes the change 100? That doesn't sound right to me.