Aquadrizzt Posted August 5, 2015 Share Posted August 5, 2015 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
lynx Posted August 5, 2015 Share Posted August 5, 2015 With weidu or ingame (script, effect)? Should be the usual manual binary reading and setting with weidu, but impossible ingame. Link to comment
Aquadrizzt Posted August 5, 2015 Author Share Posted August 5, 2015 Yes it only needs to happen in Weidu. I'm not quite sure about how to actually read one file and them modify another using the stuff you read from the first file. Link to comment
lynx Posted August 5, 2015 Share Posted August 5, 2015 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
Aquadrizzt Posted August 5, 2015 Author Share Posted August 5, 2015 Got it working now, thanks lynx. Link to comment
subtledoctor Posted August 5, 2015 Share Posted August 5, 2015 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
Aquadrizzt Posted August 5, 2015 Author Share Posted August 5, 2015 Yeah I figured it out eventually. The read_byte wasn't work for me for whatever reason but now it is. Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.