Strange feedback from spell
Vetril
Member Posts: 22
Hi, I wrote a small mod to give monks a bonus to AC according to their Wisdom score.
This works through a spell that uses opcode 272 to apply a number of repeating EFFs once per second. Each EFF uses opcode 326 (apply effect list) to apply a spl if the character's wisdom is equal to a certain score. The applied spls last 1 second and grant the appropriate bonus to AC.
It works fine, except for some unwanted feedback which seems triggered by the use of opcode 326.
The feedback shows up if Actions feedback is turned on in the options, and looks like this:
< CHARNAME >: Invalid: 9999999 : < CHARNAME >
I assume that that 9999999 is the tlk entry I defined in the spl file (which would be no such index). What's going on?
This works through a spell that uses opcode 272 to apply a number of repeating EFFs once per second. Each EFF uses opcode 326 (apply effect list) to apply a spl if the character's wisdom is equal to a certain score. The applied spls last 1 second and grant the appropriate bonus to AC.
It works fine, except for some unwanted feedback which seems triggered by the use of opcode 326.
The feedback shows up if Actions feedback is turned on in the options, and looks like this:
< CHARNAME >: Invalid: 9999999 : < CHARNAME >
I assume that that 9999999 is the tlk entry I defined in the spl file (which would be no such index). What's going on?
0
Comments
The files are set up in the following way.
QDMNK32.spl - Apply QDMNK32A.eff once per 6 seconds. (Opcode 272) QDMNK32A.eff - Cast QDMNK32A.spl instantly. (Opcode 146) QDMNK32A.spl - Remove QDMNK32B.spl. (Opcode 321) - If Wis >= 12, cast QDMNK32B.spl. (Opcode 326) - If Wis >= 14, cast QDMNK32B.spl. (Opcode 326) - If Wis >= 16, cast QDMNK32B.spl. (Opcode 326) - If Wis >= 18, cast QDMNK32B.spl. (Opcode 326) - If Wis >= 20, cast QDMNK32B.spl. (Opcode 326) - If Wis >= 22, cast QDMNK32B.spl. (Opcode 326) - If Wis >= 24, cast QDMNK32B.spl. (Opcode 326) QDMNK32B.spl - Give +1 bonus to AC for 6 seconds.
Note that the conditionals in QDMNK32A.spl are additive (so for a simple stacking bonus, you just need to have each new increment of the bonus have its own condition). Let me know if you have any questions or need help.
To see this in action, add the following line to your CLABMO01.2da file (or any other CLAB file you want).
WISACBON AP_QDMNK32
Mine is structured a little differently but the concept is the same. I also hand out penalties for low Wis, but they go according to the AD&D dexterity table - which means that incidentally Rasaad doesn't get anything out of this. Derp.
As for the timing, I think I'll keep the 1 second interval. It's not like a modern PC can't handle it anyway.
All in all, a simple mod.