pete_smith1229 Posted March 11 Share Posted March 11 (edited) What is the limit to spell.ids and is there a way to bypass this limit? I've created a whole load of spells in IWD:EE and want to expose them to .BCS scripts so that NPCs can use them like so: ReallyForceSpell(NearestEnemyOf(Myself),NEW_SPELL) Before I tried to edit spell.ids with weidu, there were ~726 lines already used. I get to adding 26 new lines before it complains that no slots are available. This is how I add spells: LAF ~ADD_SPELL_EX~ INT_VAR type = 2 level = 1 STR_VAR file = EVAL ~my_mod/data/RB_SPL01.SPL~ name = ~NEW_SPELL~ RET DEST_FILE END Edited March 11 by pete_smith1229 Quote Link to comment
jmerry Posted March 11 Share Posted March 11 (edited) 50 normally learnable wizard spells per level, 50 normally learnable priest spells per level. If you don't care about that, 4000 total slots split among the four (SPCL, SPIN, SPPR, SPWI) groupings. There's no way to bypass that overall limit, as spell.ids entries encode resource names. There is an alternative if you want to use your spells in scripts; all of the "cast a spell" actions have RES versions that take the spell resource as an argument instead of the symbolic name. For example, ReallyForceSpellRES("NEWSPELL",NearestEnemyof(Myself)) will do the exact same thing as your version and cast your NEWSPELL.SPL at the nearest enemy. Edited March 11 by jmerry Quote Link to comment
pete_smith1229 Posted March 11 Author Share Posted March 11 2 minutes ago, jmerry said: 50 normally learnable wizard spells per level, 50 normally learnable priest spells per level. If you don't care about that, 4000 total slots split among the four (SPCL, SPIN, SPPR, SPWI) groupings. There is an alternative if you want to use your spells in scripts; all of the "cast a spell" actions have RES versions that take the spell resource as an argument instead of the symbolic name. For example, ReallyForceSpellRES("NEWSPELL",NearestEnemyof(Myself)) will do the exact same thing as your version and cast your NEWSPELL.SPL at the nearest enemy. You're a genius! Using the alternative works perfectly and saves a lot of hassle. Many thanks! Quote Link to comment
subtledoctor Posted March 11 Share Posted March 11 Yes, use SpellRES() and ForceSpellRES() for nonjoinable creatures. You really only should use ADD_SPELL for spells that you want player-character sorcerers to have access to. Quote Link to comment
pete_smith1229 Posted March 11 Author Share Posted March 11 15 minutes ago, subtledoctor said: Yes, use SpellRES() and ForceSpellRES() for nonjoinable creatures. You really only should use ADD_SPELL for spells that you want player-character sorcerers to have access to. Ahh that's good advice and makes perfect sense after being made aware about learnable spells for each level for various classes. Thank you! Quote Link to comment
Recommended Posts
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.