Okay, I figured out what was going on. Apparently, something about the parsing of the rules files must be very sensitive, because a trailing newline after the ai_type line (which was inserted automatically by my editor) causes it to have the wrong value. I'm not sure what the value is exactly, but game.is_spell_harmful will return 0 if there's a trailing newline after "ai_type: ai_action_offensive".
I can confirm this behavior, I actually had game crashes, when I had a new line as the last line and the last real line was protos choices (Summon Undead spells) as the game seemed to interpret the new line as a 0 value.
Hey Sagenlicht, any chance you could do Acid Fog? I got a version imperfectly but functionally working, but it was ditched as (in keeping with the nomenclature) I put it in the alphabetically correct position which was spell 0, and of course using place 0 causes troubles, which apparently it did. But anyway, should be an easy enough spell - one of the mist / fog effects, plus acid damage
Just to emphasize what Ted said, spell enum 0 should not be used. It is reserved in the engine for "undefined spell".
Atm, there a few things I can't do, polymorph and shapechanging for example. I also have not forgotten about the necro spells you mentioned in the other threat Ted, they are on my to do list. I just prioritize the merge process atm, but I will do those spells, promised.
@Sagenlicht For the sake of speed I'll just say that I have at least one spell request list somewhere. Why not polymorph when Wild Shape exists and is already considered a Polymorph effect?
So here we go. Attached is Acid Fog. Please be aware that it requires Temple+ and I simply added it to the spell_compendium though it would be a core spell. This means you need to use the admin files for the spell compendium atm (spell_enum, partsys, help file, description mes files, sound file). All are attached. I will change this, when I get some more time. I would merge the spell to Temple+ when I merge all my other AoE spells, but this will take some time until this will happen. In addition I can only merge it to Temple+ if there is no other source for this spell anymore. Now all this being said, enjoy the spell Known Issues: Acid Fog prevents you from taking a 5-foot step, this is not implemented, I am unsure if I can do this in python. EDIT: Forgot to attach spell_utils, also required. Would also be part of the beta Temple+ versions, so if you use a newer beta version it is not required, if not please copy it to overrides/scr
@Sagenlicht What about using solid fog as a base since it drastically hampers movement? Does slow prevent 5' steps?
Solid Fog doesn't prevent 5 foot steps either. The check looks like it isn't a separate hook, and just checks if your movement is not (almost) 0. Luckily, it doesn't need to be a hook (for this application). The text of Solid/Acid Fog is actually just restating the general rule: you can't make a 5-foot step if your speed is 5 feet or less, because it's supposed to cost (at least) a move action in that case. Solid Fog lowers your speed to 5 feet, which triggers this, but any other condition that leaves you that slow should also trigger it.
Fixed the newline issue. Vanilla parser included the \n in the string comparison, for some reason just for ai type.
Ok, I was not aware of the rule, that you can't do a 5 foot step if you actually can move only 5 foot. But I admit I haven't played P&P 3.5 since the relase of 4th Edition (never looked back and yeah I really dislike 5th Edition). But anyways, I tested Acid Fog pretty decent and I am 100% sure I can 5 foot step in the Acid Fog, something I should not be able to do. I think solid fog disables the 5 foot step in this callback: Code: int __cdecl OnBeginRoundDisableMovement(DCA a1) { DispIOTurnBasedStatus *v1; // eax@1 TurnBasedStatus *v2; // eax@2 v1 = DispIoCheckIoType08(a1.dispIO); if ( v1 ) { v2 = v1->tbStatus; if ( v2 ) v2->tbsFlags |= 2u; } return 0; } but I am unsure if I can do this in Python.
Tried to level up a sorceress to test this, but levelup doesn't seem to work in T+ past 55000. O well, I'll get there Sagenlicht - what about Sound Burst (and other paralyzing spells)? Since there is now a disarm functionality in T+, think you could get paralyzed critters to drop their weapons?