Skip to content

Spell learning chance is broken

After being frustrated with a chain of spell learning failures I decided to check if anyone else on the forum didn't trust the percentages the game tells us.

I found a few topics, mostly from 2012/2013 with people complaining that the sample sizes were too small. So I did what every bored (and slightly frustrated) programmer would do - I wrote a program to automatically learn scrolls, check if it was successful and if so, erase them from the spellbook.

I've just finished a run of 50.000 attempts and the results are quite far apart from what the game tells me it should be.

Difficulty: Core rules
Intelligence: 19 (95% chance theoretically)
Character level: 10
Spell: Magic Missile, level 1
Attempts: 50.000
Successful: 40.443

In practice an intelligence of 19 gives us an ~80% chance instead of the 95% chance we should be getting.
TJ_HookerAwong124AstroBryGuymeaglothPibaroFinaLfrontCrevsDaakDreadKhanBrude

Comments

  • AstroBryGuyAstroBryGuy Member Posts: 3,437
    You don't mention if the mage was a specialist or not (and if so, what type). A specialist mage has a -15% modifier to their learn spells chance for spells outside their school. So, an illusionist with 19 Int would have a (95% - 15%) = 80% chance of learning MM from a scroll - which fits with your result.
    TJ_HookerFinaLfrontBrude
  • ClangedinClangedin Member Posts: 6
    The mage was a dualclass berserker (13)/mage (10)
  • Troodon80Troodon80 Member, Developer Posts: 4,110
    @Clangedin, you wouldn't mind uploading that program, would you (and the source code)? I would love to try this out.
    CrevsDaak
  • ClangedinClangedin Member Posts: 6
    edited June 2014
    I don't mind Troodon. I'd like an 'OK' from Dee or someone else from Beamdog first though.
    Theoretically the concept can also be used for more dastardly deeds, like rolling till your character has a total ability score of 95+ :p

    If Beamdog forsees a problem with this I'll refrain from uploading it.

    [edit]
    And there's a catch to it as well that I should probably mention. After each action (going to the inventory, opening the scroll, learning the scroll, etc..) there's a 150ms delay to allow the game some time to perform the necesary actions. All in all it takes ~1 second per scroll, so that 50.000 run I mentioned took about 14 hours.
  • TJ_HookerTJ_Hooker Member Posts: 2,438
    edited June 2014
    Clangedin said:

    Theoretically the concept can also be used for more dastardly deeds, like rolling till your character has a total ability score of 95+ :p

    Ha, that ship has already sailed, my friend: http://forum.baldursgate.com/discussion/10937/utility-bg-2-ee-autoroller-v4/p1

    I really don't think uploading it will be an issue.
    Post edited by TJ_Hooker on
    AstroBryGuymeaglothClangedinCrevsDaak
  • ClangedinClangedin Member Posts: 6
    TJ_Hooker said:

    Clangedin said:

    Theoretically the concept can also be used for more dastardly deeds, like rolling till your character has a total ability score of 95+ :p

    Ha, that ship has already sailed, my friend: http://forum.baldursgate.com/discussion/10937/utility-bg-2-ee-autoroller-v4/p1

    I really don't think uploading it will be an issue.
    Haha, so it seems. I'll see to uploading it then
    AstroBryGuyCrevsDaak
  • AstroBryGuyAstroBryGuy Member Posts: 3,437
    Clangedin said:

    The mage was a dualclass berserker (13)/mage (10)

    Gotcha. Well, it was an idea. :-)

    I wonder how it would work with a single-class non-specialist mage.

    Clangedin
  • meaglothmeagloth Member Posts: 3,806
    I always wondered about this. I have a sneaking suspicion that neera gets a -15% on all scrolls, instead of no change. Could that be tested?
  • ClangedinClangedin Member Posts: 6
    edited June 2014
    I'm busy writing some documentation before I release the program.

    Gotcha. Well, it was an idea. :-)

    I wonder how it would work with a single-class non-specialist mage.

    A good idea at that. I didn't know about that penalty. It might be that the game sees multi or dualclass mages as specialists.
    I'll start a run of 25.000 attempts when I go to bed. That should be done by the time I wake up.
    meagloth said:

    I always wondered about this. I have a sneaking suspicion that neera gets a -15% on all scrolls, instead of no change. Could that be tested?

    I did a short run with Neera and 1.000 timestop scrolls yesterday. She was succesful on 691 attempts. She was wearing the golden ioun stone though, so her intelligence was at 18 during the test. So that conforms to the -15% theory.

    [Edit]
    The (C#) application can be downloaded from https://mega.co.nz/#F!CwAh1B7R!O_X2yofy3nVUx6FjEd3T3g
    Be prepared to spend a few minutes figuring out screen coördinates before it'll work properly.
    Post edited by Clangedin on
    AstroBryGuyCrevsDaakmeagloth
  • CrevsDaakCrevsDaak Member Posts: 7,155
    Yeah, this is broken since vanilla; I kinda always go back to the easiest difficulty to learn the spell, or just cluaconsole the spell with AddSpell("SPWI916") for example (I use TobEx for my vanilla game, which adds that feature, and the EEs have it).
    AstroBryGuyDungeonnoobmeagloth
  • ClangedinClangedin Member Posts: 6
    @AstroBryGuy‌, I've only managed a run of 5.000 attempts. Somewhere during the night my application broke down due what looks like a memory leak in .NET, so I lost the results of the 25.000 run :(

    Single class mage, level 7, 19 integelligence
    4820 successfull attempts out of 5000. (96,4%)

    So it looks like single classed mages are working correctly.
    CrevsDaakAstroBryGuy
  • Gate70Gate70 Member, Developer Posts: 3,870
    So...

    Not an issue? Or documentation somewhere needs updating?
  • Troodon80Troodon80 Member, Developer Posts: 4,110
    Tagging @Dee, because I'm not sure who else to tag.
  • DeeDee Member Posts: 10,447
    The random number generator is something that has been examined several times on these forums, and the results are almost always inconclusive.
    meagloth
  • meaglothmeagloth Member Posts: 3,806
    Dee said:

    The random number generator is something that has been examined several times on these forums, and the results are almost always inconclusive.

    I remember a discussion about amounts of gold dropped. I think the credibility of the random number generator has been dubious since 1998.
  • Gate70Gate70 Member, Developer Posts: 3,870
    Is the 15% documented where appropriate.
Sign In or Register to comment.