Spell Compendium Mod

Discussion in 'General Modification' started by Sagenlicht, Feb 28, 2021.

Remove all ads!
  1. dolio

    dolio Established Member Supporter

    Joined:
    May 30, 2005
    Messages:
    338
    Likes Received:
    81
    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".
     
  2. Sagenlicht

    Sagenlicht Established Member

    Joined:
    Apr 14, 2004
    Messages:
    338
    Likes Received:
    119
    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.
     
  3. Shiningted

    Shiningted I want my goat back Administrator

    Joined:
    Oct 23, 2004
    Messages:
    12,651
    Likes Received:
    350
    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 :)
     
  4. Sagenlicht

    Sagenlicht Established Member

    Joined:
    Apr 14, 2004
    Messages:
    338
    Likes Received:
    119
    Sure can do it :) Do you have a spell wishlist from Core that should be done?
     
  5. Sitra Achara

    Sitra Achara Senior Member

    Joined:
    Sep 1, 2003
    Messages:
    3,613
    Likes Received:
    537
    Just to emphasize what Ted said, spell enum 0 should not be used. It is reserved in the engine for "undefined spell".
     
  6. Shiningted

    Shiningted I want my goat back Administrator

    Joined:
    Oct 23, 2004
    Messages:
    12,651
    Likes Received:
    350
    Thanks, I'll think about it.

    And yet, I'm sure someone else will answer first.
     
  7. Sagenlicht

    Sagenlicht Established Member

    Joined:
    Apr 14, 2004
    Messages:
    338
    Likes Received:
    119
    :)

    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.
     
  8. Endarire

    Endarire Ronald Rynnwrathi

    Joined:
    Jan 7, 2004
    Messages:
    953
    Likes Received:
    112
    @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?
     
  9. Sitra Achara

    Sitra Achara Senior Member

    Joined:
    Sep 1, 2003
    Messages:
    3,613
    Likes Received:
    537
    Wild Shape is hard coded for Druids, unfortunately.
     
  10. Sagenlicht

    Sagenlicht Established Member

    Joined:
    Apr 14, 2004
    Messages:
    338
    Likes Received:
    119
    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
     

    Attached Files:

    Last edited: Jun 11, 2021
  11. Endarire

    Endarire Ronald Rynnwrathi

    Joined:
    Jan 7, 2004
    Messages:
    953
    Likes Received:
    112
    @Sagenlicht
    What about using solid fog as a base since it drastically hampers movement? Does slow prevent 5' steps?
     
  12. dolio

    dolio Established Member Supporter

    Joined:
    May 30, 2005
    Messages:
    338
    Likes Received:
    81
    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.
     
  13. Sitra Achara

    Sitra Achara Senior Member

    Joined:
    Sep 1, 2003
    Messages:
    3,613
    Likes Received:
    537
    Fixed the newline issue. Vanilla parser included the \n in the string comparison, for some reason just for ai type.
     
  14. Sagenlicht

    Sagenlicht Established Member

    Joined:
    Apr 14, 2004
    Messages:
    338
    Likes Received:
    119
    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.
     
  15. Shiningted

    Shiningted I want my goat back Administrator

    Joined:
    Oct 23, 2004
    Messages:
    12,651
    Likes Received:
    350
    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?
     
Our Host!