Jump to content

Photo

Missing vanilla spells after modding

iwdification spell revisions spells modding mods missing

23 replies to this topic

#16 Jarno Mikkola

Jarno Mikkola

    The Imp

  • Modders
  • 6829 posts
  • Gender:Male
  • Location:The town where the dead haven't keeled over, yet. In Finland.

Posted 31 August 2018 - 04:29 PM

Yeah, but the spell.ids can have both:

2108 WIZARD_PROTECTION_FROM_PETRIFICATION
2108 WIZARD_EXPEDITIOUS_RETREAT

This is cause ... the .ids files are just identifiers, for scripts, not permanent exclusive markers for virusbombs that explode if you happen to double them. Of course it's optimized to use identical identifiers ... but that needs not to be the case if you do it with the end intent is that the change will be permanent. But the case is likely not here that. Cause you can't replace the spell like this with that. And so a better solution should be archived instead.


Edited by Jarno Mikkola, 31 August 2018 - 04:36 PM.

Welcome to the sanity, you are free to search for the limit, it's out there, we drew it in the sand.
Here's how to install all the ... mods you ever really could want to Infinity Engine games. I removed the stable word from there as Roxanne began to add BS mods that are likely to break compatibility from the BWS.

#17 CamDawg

CamDawg

    ALL GLORY TO THE HYPNOTOAD

  • Gibberling Poobah
  • 9751 posts
  • Gender:Not Telling

Posted 31 August 2018 - 04:35 PM

You were asking for a "WeiDU function" that could resolve this. I pointed out that we have had a native WeiDU command, ADD_SPELL, since June 2006 that does exactly what you're asking for.

No. Not so much. I asked you to show/give kreso a valid code he could use in the mod, for a spell of example ... cause I sure the hell can't, cause this is not as simple as COPY ~.spl~ ~override~ like it's in SR todays. Cause there's also the other facts like dependency to all the other .spl files, resistances, protections, ...
Let's take an example:
COPY ~spell_rev\sppr1##\sppr105.spl~     ~override~  // Entangle
  SAY NAME1 @9     SAY UNIDENTIFIED_DESC @10
COPY ~spell_rev\sppr1##\dventang.eff~     ~override~
COPY ~spell_rev\shared\spentaai.bam~      ~override~  // IWD's Entangle Animation
COPY ~spell_rev\shared\spentaci.bam~      ~override~
Besides, the DS and projectiles: That's the whole code there is of the one file, the file is premade today probably within Near Infinity to include the other references like resistances, .pro references etc. It can be done this way cause the variables in that are known. But you are talking about possibly changing vartiables on the flip of a coin, because the game in/excludes a single edit to a table.
Yes, I understand that's a lot to ask.


ADD_SPELL is basically a special COPY variant; you literally replace COPY with ADD_SPELL, an IDS reference, and a pair of variables to note type and level.
COPY ~spell_rev\sppr1##\sppr105.spl~ ~override~
  SAY NAME1 @9 SAY UNIDENTIFIED_DESC @10
becomes
ADD_SPELL ~spell_rev\sppr1##\sppr105.spl~ 1 1 CLERIC_ENTANGLE
  SAY NAME1 @9 SAY UNIDENTIFIED_DESC @10
If there's an existing CLERIC_ENTANGLE, this will overwrite it. If there isn't, WeiDU will slot this spell into the first available slot in the SPPR1xx series. If the spell references itself, you can throw in an A_E in the patch list, like so:
ADD_SPELL ~spell_rev\sppr1##\sppr105.spl~ 1 1 CLERIC_ENTANGLE
  SAY NAME1 @9 SAY UNIDENTIFIED_DESC @10
  LPF ALTER_EFFECT STR_VAR match_resource = EVAL ~%SOURCE_RES%~ resource = ~%DEST_RES%~ END
If you have spells referencing one another, there aare some additional steps needed but there a lot of examples of how to handle those in IWDification.

Why is this Hypnotoad video so popu... ALL GLORY TO THE HYPNOTOAD.


#18 Jarno Mikkola

Jarno Mikkola

    The Imp

  • Modders
  • 6829 posts
  • Gender:Male
  • Location:The town where the dead haven't keeled over, yet. In Finland.

Posted 31 August 2018 - 04:43 PM

Now, that looks a lot more useful than just saying of: "I pointed out that we have had a native WeiDU command, ADD_SPELL" You might not see the difference... but it's there.
This is cause I have a pretty clear imagination of what the last line is going to do to the file.
On a side note, if one would then just be able to use clone effect and delete effect's effectively too, which you could show perhaps, you could just throw that whole thing to "how to utilize ADD_SPELL -macro" here. Poke.gif

Back to the point of the above post...

But the mod that makes Petrification more easily curable is the same mod that removes the Pro Petrification dpell... I mean, it's almost like the modder actually thought thrpugh the consequences of the change before publishing the mod...!

And what happens when the player enters a restricted area, that has an exit to trade and rest functions, but no such present and the player doesn't happen to have the Break Enchantment spell memorized. Do you kick the NPC out of party to exit the area and kill the romance that way or ? That's why the romance was dropped... in case you didn't know.


Edited by Jarno Mikkola, 31 August 2018 - 05:00 PM.

Welcome to the sanity, you are free to search for the limit, it's out there, we drew it in the sand.
Here's how to install all the ... mods you ever really could want to Infinity Engine games. I removed the stable word from there as Roxanne began to add BS mods that are likely to break compatibility from the BWS.

#19 CamDawg

CamDawg

    ALL GLORY TO THE HYPNOTOAD

  • Gibberling Poobah
  • 9751 posts
  • Gender:Not Telling

Posted 31 August 2018 - 04:59 PM

But the mod that makes Petrification more easily curable is the same mod that removes the Pro Petrification dpell... I mean, it's almost like the modder actually thought thrpugh the consequences of the change before publishing the mod...!

And yes, if you use a stupid install order you might get stupid problems. This is not news.

As for ADD_SPELL, it us actually not a solution for SR. SR avoids ADD_SPELL on purpose a lot of the time, because scripts in SCS expect Expeditious Retreat to be WIZARD_PROTECTION_FROM_PETRIFICATION - not a newly added WIZARD_EXPEDITIOUS_RETREAT. Realistically, the solution to spell duplication between SR and IWDification must probably involve adding SR-specific compatibility code to IWDification. Like, just wrapping the duplicate spells inside a

ACTION_IF NOT FILE_EXISTS_IN_GAME ~dvsrv4here.mrk~ BEGIN
conditional clauses.

 

This is a one-off solution, and not extensible. If SR is going to be changing spells then best practice is to update spell.ids to account for it instead of having an expeditious retreat under a protection from petrification banner. Whether SR overwrites PFP with ER or does a combo add-ER-and-disable-PFP, spell.ids needs to be accurate when it's done.


Why is this Hypnotoad video so popu... ALL GLORY TO THE HYPNOTOAD.


#20 Almateria

Almateria
  • Modders
  • 80 posts
  • Gender:Male

Posted 31 August 2018 - 11:37 PM

Waht about protecting player & NPC romances ?

 

shitty design on Bioware's part.



#21 DavidW

DavidW
  • Gibberlings
  • 4648 posts
  • Gender:Male

Posted 01 September 2018 - 06:53 AM

As for ADD_SPELL, it us actually not a solution for SR. SR avoids ADD_SPELL on purpose a lot of the time, because scripts in SCS expect Expeditious Retreat to be WIZARD_PROTECTION_FROM_PETRIFICATION - not a newly added WIZARD_EXPEDITIOUS_RETREAT. 

 

This is not a good idea. For obvious reasons SCS doesn't actually make a lot of use of Protection from Petrification, but if I did script for it, you'd end up with a wizard who casts Expeditious Retreat on SR installs in exactly the situation when they'd have cast Protection from Petrification on non-SR installs, whereas the use case for those spells is completely different.

 

There is some (debatable) case for overwriting a spell if you want to replace it with a *thematically similar* spell: it's a quick-and-dirty way to get the AI to use it and to introduce scrolls of it. But there's no good case for doing it with thematically distinct spells. If you want to remove Protection from Petrification, use hidespl.2da to make sure the player can't see it, and edit the scroll out of the game (or overwrite it with another scroll if you're feeling lazy). Add Expeditious Retreat separately, with ADD_SPELL.

 

As a historical note, I think the reason SR does overwrites is less about playing nice with SCS, more about (a) solving the problem of scroll introduction without having to write complicated WEIDU code, since originally Demivrgvs was mostly writing the mod using editors and just used WEIDU as a file-install tool; (b) coping with the various ways in which (non-EE, pre-ToBeX) BG2 hardcodes a maximum number of spells.

 

Yeah, but the spell.ids can have both:

2108 WIZARD_PROTECTION_FROM_PETRIFICATION
2108 WIZARD_EXPEDITIOUS_RETREAT

It's not a great idea to double up in spell.ids if you can help it: various bits of the game and the mod environment assume ids files are one-to-one. (INT_OF_SYMBOL and LOOKUP_IDS_SYMBOL_OF_INT stop being reliable inverses, for instance.) But it's a particularly bad idea here, because spell.ids shouldn't lie: if I script for WIZARD_PROTECTION_FROM_PETRIFICATION, I expect to get an anti-basilisk spell, not a speed boost.



#22 subtledoctor

subtledoctor
  • Modders
  • 2851 posts
  • Gender:Male

Posted 01 September 2018 - 07:54 AM

Interesting.  I thought the main reason SR was overwriting things in particular instances like this one was from some long-ago collaboration between it and SCS, and that switching to ADD_SPELL would screw up existing scripts in ways that would be difficult to fix.  I guess I stand corrected.  In that case yes, SR should start moving toward using ADD_SPELL. 

 

Some spells should clearly still be overwritten... it will need to be considered on a case-by-case basis.  I've dived into SR code a bit in making it work on IWDEE, so I'm a bit familiar and this shouldn't be difficult.  Only part of it that I don't already have code for is adding new scrolls to the game... best method I can think there is to pair the new spells with existing spells (pairing them with the ones they used to overwrite makes most obvious sense) and add them to stores that contain the matching scrolls.  Camdawg, do I recall that IWDification has started doing this, or is contemplating doing so? 


Faiths & Powers: Spell spheres and kit pack for priests and paladins
Might & Guile: Tweaks and kits for warriors and rogues
Scales of Balance: Game tweaks and rule overhauls
NPC_EE: More options for NPCs in BGEE, SoD, & BG2EE


#23 VagPen

VagPen
  • Members
  • 27 posts

Posted 04 September 2018 - 03:03 AM

One more question guys, is installing revised scs +atweaks a good idea with my existing mod?



#24 subtledoctor

subtledoctor
  • Modders
  • 2851 posts
  • Gender:Male

Posted 04 September 2018 - 07:16 AM

One more question guys, is installing revised scs +atweaks a good idea with my existing mod?


Sure. I do, anyway.

Faiths & Powers: Spell spheres and kit pack for priests and paladins
Might & Guile: Tweaks and kits for warriors and rogues
Scales of Balance: Game tweaks and rule overhauls
NPC_EE: More options for NPCs in BGEE, SoD, & BG2EE




Reply to this topic



  



Also tagged with one or more of these keywords: iwdification, spell revisions, spells, modding, mods, missing

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users