Jump to content

Enhanced Powergaming Scripts


Recommended Posts

7 hours ago, subtledoctor said:

1) How are these spells getting added as SPPRx51 etc.? Weidu’s ADD_SPELL function does not do that, it will error out if you try. 

2) What is the point of adding spells above SPPRx49? The engine will not add them to cleric spellbooks. 

5E casting needs to know which spells might be memorized, so it looks for which spells go into your spellbook. Which for cleric spells means only SPPRx50 and lower. Which, not coincidentally, aligns with Weidu’s ADD_SPELL function.

The last mod adding spells is MIH spell pack, this is the only one that takes it over 50. This mod uses SFO library to install the spells, not exactly sure how that works.

Link to comment

Looks like for level 7 divine spells if you install IWDification and Spell revisions you can't also have made in heaven divine spellpack as they takes it to 50 already. 

Edit: this is incorrect, the big mods are also adding some spells on my install. 

Edited by Enigmajazz
Link to comment

@morpheus562 Found another source of parsing errors, with @subtledoctor random tweaks installed alongside 5e casting enhanced powergaming scripts has parsing errors for the spells acted on by that (I think).

I think it looks like the enhanced power gaming scripts installation is reading the memorized spell column of the d5zclons document from 5e casting and these no longer line up with the spells in the base for the scripts, looks like reading the third column for cast spell would work better as these match up with the original resources?

 

I think it is the spells acting on by SD's random tweaks that have the different value in the second column but not 100% certain. It is the one's that have a mem spell starting with d5p. (don't think this is faiths and powers)

 

Edit- looking at the code it actually looks like this might be to do with faith and powers. Regardless I think the issue is that the third column should be read rather than the second as this matches the spell resource in spell.ids.

d5zclons.2da

Edited by Enigmajazz
Link to comment
3 hours ago, Enigmajazz said:

the big mods are also adding some spells on my install

Ya this is the problem.

18 hours ago, Enigmajazz said:

I have worked out the cause of the parsing errors that I was having, it is due to there being too many divine spells of the same level. I think the 5e casting system does not assign new spell resources to spells with resource files of 1x51 or 2x51 or higher, in my case mass negative plane protection is 1752

3 hours ago, Enigmajazz said:

Found another source of parsing errors, ... I think it is the spells acting on by SD's random tweaks that have the different value in the second column but not 100% certain. It is the one's that have a mem spell starting with d5p. (don't think this is faiths and powers)

Sorry, my comments above were in relation to the spells added by BG1SoANPCs. And upon reflection, I think 5E casting can actually catch stuff like SPPRx52 and similar spells.

D5P prefix is actually stuff from Faiths & Powers. But re-reading these comments I don't understand what the issue is... you keep saying "parse errors" but parse errors often prevent a mod from installing. But looking back, maybe you are talking about errors like "Type mismatch in "Spell" argument of [HaveSpellRES].  Expecting type "string". Recovering" ?

My (admittedly rather limited) experience with scripts is that, when it says "recovering" it really does recover. So the question is, are you actually seeing problems with the scripts? Or is it just a matter of seeing these in the install log?

3 hours ago, Enigmajazz said:

it looks like the enhanced power gaming scripts installation is reading the memorized spell column of the d5zclons document from 5e casting and these no longer line up with the spells in the base for the scripts, looks like reading the third column for cast spell would work better as these match up with the original resources?

Careful. The way 5E casting works with Faiths & Powers is: you have the spells from the MEM column in your spellbook. These translate into giving you the D5Z[ind]i innate ability in the gameplay screen; and those innate abilities use op146/148 to cast the spell in the CAST column of the .2da index. So for example I have the d5zclons index in a current install with a line like this:

124 	d5p1301 	SPPR301 	divine 	yes

Note, in this game SPPR301 will never appear in anyone's spellbook and will never be memorized. So including that in HaveSpellRES script triggers will never return true. With FnP, the spell that gets memorized is D5P1301.SPL.

However, adding 5E casting complicates things. After you memorize D5P1212 and then sleep, the game will remove all your spellbook memorization slots and instead give you instances of the D5Z124I innate ability. In this case, even though the D5P spell is in your spellbook, it will not register as memorized since you have no traditional spell slots. So in this case a script should look for D5Z124I in the HaveSpellRES trigger.

I don't know what the Enhanced Powergaming scripts look like, but an error like "Expecting type "string". Recovering" sounds like there might simply be missing quotes, or something like that. And in "recovering," Weidu adds them automatically to fix the script. So I speculate that there may not actually be a problem here.

Link to comment
9 minutes ago, subtledoctor said:

Ya this is the problem.

Sorry, my comments above were in relation to the spells added by BG1SoANPCs. And upon reflection, I think 5E casting can actually catch stuff like SPPRx52 and similar spells.

D5P prefix is actually stuff from Faiths & Powers. But re-reading these comments I don't understand what the issue is... you keep saying "parse errors" but parse errors often prevent a mod from installing. But looking back, maybe you are talking about errors like "Type mismatch in "Spell" argument of [HaveSpellRES].  Expecting type "string". Recovering" ?

My (admittedly rather limited) experience with scripts is that, when it says "recovering" it really does recover. So the question is, are you actually seeing problems with the scripts? Or is it just a matter of seeing these in the install log?

Careful. The way 5E casting works with Faiths & Powers is: you have the spells from the MEM column in your spellbook. These translate into giving you the D5Z[ind]i innate ability in the gameplay screen; and those innate abilities use op146/148 to cast the spell in the CAST column of the .2da index. So for example I have the d5zclons index in a current install with a line like this:

124 	d5p1301 	SPPR301 	divine 	yes

Note, in this game SPPR301 will never appear in anyone's spellbook and will never be memorized. So including that in HaveSpellRES script triggers will never return true. With FnP, the spell that gets memorized is D5P1301.SPL.

However, adding 5E casting complicates things. After you memorize D5P1212 and then sleep, the game will remove all your spellbook memorization slots and instead give you instances of the D5Z124I innate ability. In this case, even though the D5P spell is in your spellbook, it will not register as memorized since you have no traditional spell slots. So in this case a script should look for D5Z124I in the HaveSpellRES trigger.

I don't know what the Enhanced Powergaming scripts look like, but an error like "Expecting type "string". Recovering" sounds like there might simply be missing quotes, or something like that. And in "recovering," Weidu adds them automatically to fix the script. So I speculate that there may not actually be a problem here.

My understanding of the enhanced powergaming coding is that it has base script, with the name of spells, then if 5e is installed it replaces that with the resource read from spell.ids and then replaces that with the cloned spell so that that spell is called in the script.

I think when it does the correction it still ends up looking for spell resource that won't be in the spell book (the vanilla). Certainly the scripts appear to have spxxx resources at the points where the parsing errors occurred and d5zxxx elsewhere.

Link to comment
17 minutes ago, subtledoctor said:

Sorry, my comments above were in relation to the spells added by BG1SoANPCs. And upon reflection, I think 5E casting can actually catch stuff like SPPRx52 and similar spells.

This adds spells by copying a scroll item and .spl file into override.

This time they do seem to have been included in the dzclons file. 

Link to comment
On 4/12/2022 at 8:57 PM, morpheus562 said:
ACTION_IF 5e_spellcasting BEGIN
	COPY_EXISTING ~d5zclons.2da~ ~override~
  	COUNT_2DA_COLS cols
  	COUNT_2DA_ROWS cols rows
  	FOR (row = 1; row < rows; ++row) BEGIN
    	READ_2DA_ENTRY row 0 cols ind_num
    	READ_2DA_ENTRY row 1 cols mem_spl
    	SPRINT $5e_spells_array(~d5z%ind_num%i~)~%mem_spl%~
  	END
	BUT_ONLY

I honestly think that will make it more confusing. It is the interaction  between fnp, 5e casting and the way enhanced powergaming scripts is treating the dzclon file.

This is an example line from the d5zclon.2da file:

116  d5p1109 SPPR109  divine  yes 

The above code is looking to replace the vanilla spell ref with the d5z code (the first column). The code looks like it reads second column, which is the fnp memorize spell, rather than the third column, which is the vanilla spell reference. Without fnp the second column matches the third (as it does for all the wizard spells even with fnp).

The second read_2da_entry should have 2 instead of 1 I believe.

I think that is what causes the string expected errors.

 

Link to comment
6 minutes ago, Enigmajazz said:

I honestly think that will make it more confusing. It is the interaction  between fnp, 5e casting and the way enhanced powergaming scripts is treating the dzclon file.

This is an example line from the d5zclon.2da file:

116  d5p1109 SPPR109  divine  yes 

The above code is looking to replace the vanilla spell ref with the d5z code (the first column). The code looks like it reads second column, which is the fnp memorize spell, rather than the third column, which is the vanilla spell reference. Without fnp the second column matches the third (as it does for all the wizard spells even with fnp).

The second read_2da_entry should have 2 instead of 1 I believe.

I think that is what causes the string expected errors.

 

Is the only issue with Sanctuary?

Link to comment

@subtledoctor For F&P spellcasting, how are the D5PXXXX spells assigned? Is it dynamic, or will Zone of Sweet Air always be D5P1318? If it is dynamic, do you create a list similar to D5ZClon.2da that shows original plus new mapping? Do the different install options for sphere systems change the D5Pxxxx name for spells or change which spells use the new naming system?

Edited by morpheus562
Link to comment
6 hours ago, morpheus562 said:

@Enigmajazz Please let me know if this resolves your issue.

 

enhanced-powergaming-scripts-v7.2.exe 1.43 MB · 0 downloads

This does resolve the problem, thank you. it is worth noting that anyone who has any spells called by the scripts installed but not in the sphere system with fnp will still get errors for those spells as they are not included by 5e casting. These spells would not appear in game anyway.

On a side note it still gives this warning: //WARNING enhanced-powergaming-scripts/baf/upload/mocore.baf - pattern not found:
//// MiH Cleric Repel Insects

Is that intended to be missed out?

Edited by Enigmajazz
Link to comment

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...