Chance to cast formula
Chance to cast formula
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%?
- BearFather
- Posts: 668
- Joined: Sun Feb 09, 2014 6:27 pm
- Location: Portland, OR
- Contact:
Re: Chance to cast formula
That's how I remember it.
BTW nice to see someone digging into the info again.
BTW nice to see someone digging into the info again.
Re: Chance to cast formula
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
- BearFather
- Posts: 668
- Joined: Sun Feb 09, 2014 6:27 pm
- Location: Portland, OR
- Contact:
Re: Chance to cast formula
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.
Re: Chance to cast formula
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.
ChatGPT assures me it's 98 possibilities to cast...