Jump to content

Modifying spls based on school of other spls


Aquadrizzt

Recommended Posts

How would I go about having something that takes a list of spells, reads the school of the spell and then uses that to make one of several modifications to a different spell.

 

For example, if the school was abjuration, it would add a spell effect to a ABJURATION.spl (example).

Link to comment

you read it in a variable and then use that. Check out if any macros included with weidu can make your job easier. Or other spell-related mods if they have some code you could reuse.

Link to comment

EDIT - ninja'd!

 

At the outset, you'd want to define the spell_list, and then read the school of each. Something like

 

FOR spell IN spell_list

COPY_EXISTING ~spell~ ~override~

READ_BYTE 0x25 school

END

 

Then, I think, you'd want to create an associative array with the spells and their school, and then do an ACTION_PHP_EACH to run through the array, and run through each spell and have an ACTION_IF block to change the other .spl, depending on the first spels's school. My "APR on Spec" mod has some example code that could be adapted:

https://forums.beamdog.com/discussion/36197/mod-release-apr-on-spec

 

(I think. I do have a tendency to overcomplicate things.)

 

That's all if you want a uniform effect based on school. If you want the school of each chosen spell to cause a unique effects to a distinct other .spl file, then I think you have to just go one-by-one.

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...