RealityMachina / Scaling-Cantrips

Blah blah forbidden D&D 5e stuff
MIT License
10 stars 9 forks source link

Highest Caster Level blueprint ignores whether cantrip exists in other spellbooks #1

Open RealityMachina opened 3 years ago

RealityMachina commented 3 years ago

Basic example of the problem: Level 10 sorcerer takes one level in cleric, giving them access to DIvine Zap, Unholy Zap, etc.

What SHOULD happen:

Acid Splash still does 6d3, Divine Zap does 1d3.

What CURRENTLY happens:

Acid Splash and Divine Zap both do 6d3.

Solution is to figure out some way to get what spell is being casted.

Then get access to all spells a unit currently has available to them from permanent sources, and know which source those spells came from.

That would be enough to properly compare caster levels without buffing spells that shouldn't have it.

Amariithynar commented 3 years ago

For some reason when I first replied to this I thought you were someone else just making an issue, and not the repository owner, hah! Deleted that post, now, but did want to keep the one thought that I had regarding a possible solution: Is there any way to reference the caster level of the class that grants the skill, using one of the spells that already scales by caster level as a model?

RealityMachina commented 3 years ago

That was actually my thought, the wall I ran into was that as far as I could test, there was no way to actually grab the relevant data I needed in the PropertyValueGetter class (that is, the ability being casted + the spellbook it came from), so I'll need to figure out some other way to add the bonuses as intended while also grabbing that information...

Amariithynar commented 3 years ago

Hmm... How do the spells that already scale within the game do so? Or are you saying that the value they reference isn't one accessible in the API to you?

RealityMachina commented 3 years ago

Basically that's where the problem of #4 comes in.

Before it was using the default way to rank spells, except a funky thing happens with how the game handles duplicate cantrips: while it shows multiple cantrip entries, it seems the last class a character got overrides all the previous classes' cantrips. Hence the current workaround.

...which actually makes me wonder if that's a problem for cantrips specifically or if something weird happens if you have the same spell in different spell books in general...

Amariithynar commented 3 years ago

duplicate cantrips

That would explain why there are so many individual items for each list even when they are obvious duplicates! There's most likely not actual duplicates in spellbooks, but individual items that are referenced individually.

AkiraR commented 2 years ago

"something weird happens if you have the same spell in different spell books in general" Sooo might be related, might not, but I am having a problem with my Magus/Lich that just hit level 19. This gives the Magus Greater Spell Access, where I can select 6 spells from the wizard spell list up to level 6 and add them to my Magus spell book however it is not working.

Specifically I noticed that at the review screen, at the end of leveling up, any spells I selected that were already in my Lich spell book don't show up under the "New Spells" section. Spells that aren't currently in my Lich spell book still show up here, but in either case none of the spells I select for Greater Spell Access actually show up in my spell book.

I suspect this is actually a base game bug and not something caused by this mod, but I have no way to check as I can't disable this mod and still load the save. I asked about this issue on the steam discussion boards for the game but no one wants to reply if Greater Spell Access is working for them in the current build or not.

I would be happy to send over save files or anything else you need if you want to poke at the issue. The only mods I am using are this mod, Allow Modded Achievements, and Free Camera.