Is caster level a property that can be set for different iterations of the same item, or is it an inherent property of the item? What I mean by this is, for example, the Potion of Cure Light Wounds has item code 8014, but can different instances of that item have different caster levels. It is clear that different instances of wands can have different charges, and scrolls seem to have a flag which indicates whether they are arcane or divine (evidenced by the fact that you can't have a wizard copy a scroll scribed by your party's cleric, even if the spell is shared on both lists), but I don't know whether caster level can be similarly set. If so, it may explain why different potions of cure light wounds have different healing ranges. It would be useful to know, I suppose, if the SAME potion could give both 1 and 13 (you'd have to reload a lot). I'd also wonder how it would interact with the stacking mechanism on potions. For that matter, can an arcane and divine scroll of the same spell stack and, if so, does that mess with the flags? Hmm... I'll have to test this.
Re: Creating a Spell Spreadsheet Yes, the same potion can give healing between 1 and 13 (for Cure Light Wounds). My first hypothesis to explain this is that, rather than store the caster level of the potion as data, the game designers decided to determine the caster level of the potion randomly each time it is used. Either they select a caster level between 1 and 5, add it to eight, and then randomly select a number between 1 and the result (for example a caster level of 3 would lead to a random number between 1 and 11) OR they randomly select a caster level between 0 and 5, and then add the caster level to a random number between 1 and 8. What's not possible is that they randomly select a number between 1 and 5 as the caster level, and then add that to a random number between 1 and 8 (as that would never result in a total result of 1).
Re: Creating a Spell Spreadsheet I drank 340 Cure Light Wounds potions, and here is the distribution: 1: 42 2: 47 3: 45 4: 50 5: 35 6: 38 7: 30 8: 43 9: 1 10: 5 11: 0 12: 2 13: 2 As you can see, the vast majority of the results are between 1 and 8. There seems to be a slight bias toward the lower numbers, but it may not be statistically significant with the number of data points used. Numbers above 8 exist, but are relatively rare, and never exceed 13. In any case, this probably invalidates my previous hypotheses.
Re: Creating a Spell Spreadsheet And for Cure Moderate Potions: 1: 0 2: 4 3: 5 4: 12 5: 15 6: 23 7: 26 8: 21 9: 45 10: 32 11: 29 12: 25 13: 25 14: 17 15: 4 16: 11 17: 4 18: 6 19: 1 20: 6 21: 4 22: 5 23: 6 24: 5 25: 1 26: 0 *sigh* At least there is a normalish-looking distribution between 2 and 16. Still, that means that Cure Mod is not getting the caster level bonus in the majority of rolls either. And what's happening near the top of the distribution... Ugh. I do not approve of these results.
Re: Creating a Spell Spreadsheet Did you drink the same potion over and over again (i.e. reloading each time), or did you drink different potions?
Re: Creating a Spell Spreadsheet I first drank one potion many times to establish that it could generate either a 1 or a 13. The statistical testing, though, was done with a stack of 12. Perhaps repeating one would have been better, but that would have been too much reloading x.x
Re: Creating a Spell Spreadsheet Its just disturbing, isn't it. Yes, I believe you can make CLW potions of different CLs like the wands. It would be better to have the one that worked according to RAW, though.
Re: Creating a Spell Spreadsheet After much more (a few hundred potions) testing, I can say fairly confidently that potions that you brew yourself *always* act at caster level zero. This would indicate that it is some of the healing potions you find throughout the game that act wonkily. Further, it is likely that there is some sort of caster level variable that is not being set when a potion is brewed, thus it is defaulting to zero.
Re: Creating a Spell Spreadsheet Hmmmm... found something similar in KotB with 'False Life' potions (for memory) and my fix didn't take... o well, bound to be something we can do. EDIT: I think you covered this above but to make it clear: so thats what I will be going for with fixes.
Re: Creating a Spell Spreadsheet Hey Ted, I have yet to get into integrating dolio's spell fixes so I don't know what he may or may not have done as regards any and all spell and spell-like effects, but you may want to consult his work to make sure you're not double-doing anything: http://www.co8.org/forum/showthread.php?t=8704.
Re: Creating a Spell Spreadsheet Getting back to the cure potions for a second, testing reveals that the scrolls also act wonkily. Scrolls of Cure Light Wounds, for example, use the caster level of the user, rather than the caster level of the scriber. So, this would seem to indicate that it's something to do with the cure spells themselves, rather than something particular to the potion version. Is there a way to get at the code for how the Cure Light Wounds spell is triggered, or is that hard-coded?
Re: Creating a Spell Spreadsheet Found the source folder for some spells, and I think I *may* have figured out the problem with the Cure Spells: Cure Light Wounds, for example, has the following line: dice.bonus = min( 5, spell.caster.stat_level_get( spell.caster_class ) ) Pretty clearly it's meant to be saying that the bonus to the die roll is the caster level, to a maximum of 5. Compare this to some text from fireball, however: dam = dice_new( '1d6' ) dam.number = min( 10, spell.caster_level ) Or some text from Owl's Wisdom: spell.duration = 10 * spell.caster_level Or Scorching Ray: projectiles = min(3, (spell.caster_level + 1) / 4) Note that they all use "spell.caster_level" to access the caster level. This is true for all non-cure spells that I've checked. In contrast, all the cure spells use "spell.caster.stat_level_get( spell.caster_class )" which seems to be directly accessing the caster level of the actor using the spell. For instance, the caster level of the person drinking the potion. Since the class type of potions has been domain_special, this ends up being zero, since characters don't have a caster level for domain_special spells. Further evidence of this is that if you change the domain_special to class_cleric, then people with cleric levels get bonuses when drinking potions, and people without cleric levels do not. I believe that if the instances of "spell.caster.stat_level_get( spell.caster_class )" were changed to "spell.caster_level" for the various cure spells, that this would fix the problem with their caster level. However, I have no idea whether this is something that can be done or not.
Re: Creating a Spell Spreadsheet Doing a search for "spell.caster.stat_level_get" reveals two more spells that access caster level in this odd way: Finger of Death and Slay Living. Testing reveals that these two spells do, indeed, have a similar problem: scrolls of those spells use the caster level of the person using the scroll, rather than the caster level of the scroll itself, to determine damage. So, I'm pretty confident in saying that is the problem, and doing the fix as detailed in the previous post should fix that issue. Note that many ray spell use "spell.caster.stat_level_get" to access the dexterity of the caster, but that's perfectly legit, since it IS the dexterity of the one that casts the scroll (as opposed to the dexterity of the one who scribes the scroll) that matters for determining to-hit modifiers. In the course of figuring this out, there's another issue that I've noticed, and that is that the DC of spell cast from scrolls is determined by the stats and feats of the one casting the scroll, whereas it SHOULD be based on the scriber. I'm not sure that this can be fixed, though, as it seems to apply to all scrolls.
Re: Creating a Spell Spreadsheet Why don't you test it out Rudy? Edit the files and see what happens in-game.
Re: Creating a Spell Spreadsheet Not to throw a wrench in you theory Rudy, but how do non-spellcasters get results of 13 for potions of Cure Light Wounds? Or am I just mis-remembering who applied the potion to the non-spellcasters?