Jump to content

IDS entries for SR spells


DavidW

Recommended Posts

DD_SPELL can replace an existing spell if it matches the identifier you're trying to add. This avoids having multiple copies of the same spell in your spellbook, all added by different mods. It's preferable to just have one version of the spell - the one added by the last installed mod.

If mods incorporate their mod name into their identifiers, then this matching won't happen. SR_FAERIE_FIRE would be installed alongside TDD_FAERIE_FIRE and all the other versions installed by other mods.

And you are not a programmer that can over come such a small hassle such as this ?

Cause I would be somewhat assure ACTION_IF can do that easily... see:

COPY_EXISTING ~spell.ids~ ~override~

read possible idsName if it exists

ACTION_IF (%idsName% = SR_FAERIE_FIRE) THEN BEGIN 
ADD_SPELL SR_FAERIE_FIRE blorg
END

ACTION_IF (%idsName% = TDD_FAERIE_FIRE) THEN BEGIN
ADD_SPELL TDD_FAERIE_FIRE blorg
END
Link to comment

The issue is, most mods that add Faerie Fire intend to add the same spell: Faerie Fire. Whereas, SR Monster Summoning 1 is intentionally a different spell at a different level than vanilla Monster Summoning 1 (etc. including SR MS7 vs. IWD MS7).

 

For this reason it seems to me that in these very limited instances (SR Monster Summoning and SR Animal Summoning) they should be exceptions to the general rule.

Link to comment

The issue is, most mods that add Faerie Fire intend to add the same spell: Faerie Fire. Whereas, SR Monster Summoning 1 is intentionally a different spell at a different level than vanilla Monster Summoning 1 (etc. including SR MS7 vs. IWD MS7).

 

For this reason it seems to me that in these very limited instances (SR Monster Summoning and SR Animal Summoning) they should be exceptions to the general rule.

Exactly. There is no good general argument for using mod prefixes in spell.ids. But in this very specific case we need to identify spells using an alternate numbering scheme. The SR in MONSTER_SUMMONING_SR identifies a numbering scheme named after a mod, not a mod per se. Mikes use of Roman numerals also achieves this; I just think it risks confusion and bugs when scripting.

Link to comment

Implementation of ADD_SPELL in SR is undergoing testing now.  Any modders who have included the code from the first post in their mods will need to remove it when the next SR version is released.

In addition to choosing IDS names for the new spells, I followed a similar methodology as @DavidW and added and updated the IDS names for other spells as well.

There are only a few differences between the assignments in the first post in this thread and the upcoming SR implementation.

  • More IDS entries have been added for aliases and updated for deprecated spells
    • The naming for Goodberry is different
      • The SR version at level 1 is assigned the vanilla identifier CLERIC_GOOD_BERRIES
      • The original version at level 2 is assigned the identifier CLERIC_GOOD_BERRIES_DEPRECATED
      • The new names for the Animal Summoning and Monster Summoning lines of spells are different, e.g.
        • Instead of CLERIC_ANIMAL_SUMMONING_SR_1, it's CLERIC_ANIMAL_SUMMONING_LEVEL_1
        • Instead of WIZARD_MONSTER_SUMMONING_SR_1, it's WIZARD_MONSTER_SUMMONING_LEVEL_1
      • The Animal Summoning and Monster Summoning lines of spells have been assigned a complete set of aliases, for both their SR and vanilla naming schemes, where possible, e.g.
        • CLERIC_ANIMAL_SUMMONING_LEVEL_1 (new)
        • CLERIC_ANIMAL_SUMMONING_LEVEL_2 (new)
        • CLERIC_ANIMAL_SUMMONING_LEVEL_3 (new)
        • CLERIC_ANIMAL_SUMMONING_LEVEL_4 (new) + CLERIC_ANIMAL_SUMMONING_1 (vanilla)
        • CLERIC_ANIMAL_SUMMONING_LEVEL_5 (new) + CLERIC_ANIMAL_SUMMONING_2 (vanilla)
        • CLERIC_ANIMAL_SUMMONING_LEVEL_6 (new) + CLERIC_ANIMAL_SUMMONING_3 (vanilla)
        • CLERIC_ANIMAL_SUMMONING_LEVEL_7 (new) + CLERIC_ANIMAL_SUMMONING_4 (new)

      For the full listing of SR's changes to SPELL.IDS, please visit this page.

      Link to comment

      This mostly looks good. (This is for the official v4 release, I take it?)

      One suggestion. There are ten entries where the IDS entry has had "_DEPRECATED" added. In five of these cases - CLERIC_GOOD_BERRIES, CLERIC_PROTECTION_FROM_FIRE, CLERIC_PROTECTION_FROM_LIGHTNING, WIZARD_MONSTER_SUMMONING_2, WIZARD_SPELL_DEFLECTION - there is a new spell added that has the same IDS without the 'deprecated'. So a script using the old IDS will find the (closest-match) new spell, which is what we want.

      In the other cases - CLERIC_CURE_CRITICAL_WOUNDS, CLERIC_CAUSE_CRITICAL_WOUNDS, CLERIC_CONJURE_ANIMALS, WIZARD_DETECT_EVIL, WIZARD_DIMENSION_DOOR - there is no non-DEPRECATED entry in spell.ids. So any script containing one of those IDS entries will throw a parse error when WEIDU tries to compile it. I think that's undesirable, and will probably generate quite a lot of bugs. (Probably not many scripts cast Detect Evil, but the Cause/Cure spells, and Conjure Animals, are pretty mainstream.) So I'd suggest only using the _DEPRECATED entry when you actively want the compiler to find a replacement spell, not just as a way to signal that a spell has been removed.

      Alternatively, make sure those spells have aliases in spell.ids. You can add CURE_CRITICAL_WOUNDS and CAUSE_CRITICAL_WOUNDS as synonyms for CURE/CAUSE_SERIOUS_WOUNDS, and CONJURE_ANIMALS as a synonym for the L6 Animal Summoning spell. WIZARD_DETECT_EVIL could be a synonym for WIZARD_KNOW_ALIGNMENT (not a perfect fit, but it beats throwing a parse error). Dimension door I think is best just left (it's not like it was in the vanilla spell list anyway).

       

      Link to comment
      9 hours ago, Mike1072 said:

      Sure, I can just add the _DEPRECATED version for those spells rather than replacing the existing entry.

      Done.

      12 hours ago, DavidW said:

      (This is for the official v4 release, I take it?)

      It will probably be released on its own before then, unless @kreso happens to pop up.

      Link to comment

      kreso has popped up over at the Beamdog forums, a month or so ago, and claimed to be actively working on 4b17. The only thing he specifically mentioned was major revisions to the Haste spells - switching everything back to the Haste opcode instead of the current (+move and +apr) implementation.

      Just FYI.

      Link to comment

      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.

      Guest
      Reply to this topic...

      ×   Pasted as rich text.   Paste as plain text instead

        Only 75 emoji are allowed.

      ×   Your link has been automatically embedded.   Display as a link instead

      ×   Your previous content has been restored.   Clear editor

      ×   You cannot paste images directly. Upload or insert images from URL.

      ×
      ×
      • Create New...