Jump to content

Detectable spells (again)


DavidW

Recommended Posts

I've revamped the Detectable Spells component of SCSII for its first non-beta release. The original version was pretty much lifted from the G3 wiki, and this revised version is still very closely based on the original one, but it adds a few more features and fixes a bug.

 

This one can be installed multiple times without clogging up spells with multiple entries, and allows different mods to define different lists of immunities. It should install harmlessly over the detectable-spells components in QuestPack and Oversight (in fact, it should fix some bugs in those mods' DS components).

 

I'm not really clear how the various wikis, permissions etc work - as far as I'm concerned anyone is welcome to borrow this but most of the work is due to whoever wrote the wiki entry, not to me.

 

I'm using the wiki effect table, except that I've borrowed slot 109 (CLERIC_HALLOW) to indicate a magic weapon's enchantment strength. I've also included a separate macro that labels all weapons in the game with their enchantment strength.

 

Apologies in advance for any idiot errors.

DS.zip

Link to comment
And depending on how bug-free you feel it is, I can update Oversight and also toss it in the Fixpack's modder component--the biggest reason why we made that component.

 

Touch wood, it's pretty bug-free, but I'd feel safer if someone else installed it and had a quick look to see if it's modifying the right files.

Link to comment
Actually, didn't I copy it from you who copied it from KingCrimson who copied it from Horred who copied it from KensaiRyu who copied it from allirPM?

 

Short version, you are free to use my bits as you feel like.

Nah.... IIRC DS was first created by Xyx, Sarkyn and KensaiRyu back on Yahoo and then held by Vulgar Zildrath on his own website. (Urh!! talk about showing your age...)

 

-Y-

Link to comment
Did I really write edit this before ever thinking about BiggDU?

 

Ah, so now you remember. The Yellow Jester does not play but gently pulls the strings.

DEFINE_ACTION_MACRO ~LINE_10~ BEGIN
 PRINT ~Hello World~
 LAUNCH_ACTION_MACRO ~LINE_20~
END
DEFINE_ACTION_MACRO ~LINE_20~ BEGIN
 PRINT ~We love spaghetti!~
 LAUNCH_ACTION_MACRO ~LINE_30~
END
DEFINE_ACTION_MACRO ~LINE_30~ BEGIN
 PRINT "GOGO GOTO KEKE LA~"
 LAUNCH_ACTION_MACRO ~LINE_40~
END
DEFINE_ACTION_MACRO ~LINE_40~ BEGIN
 OUTER_SPRINT ~GOTO~ ~10~
 LAUNCH_ACTION_MACRO ~LINE_%GOTO%~
END
LAUNCH_ACTION_MACRO ~LINE_10~

DEFINE_ACTION_MACRO ~BREAK~ BEGIN
 OUTER_WHILE predicate BEGIN
   ACTION_IF predicate THEN BEGIN
     DO_SOMETHING
     ACTION_IF result_of_DO_SOMETHING = breakvalue THEN BEGIN
       OUTER_SET predicate = 0
     END
   END
   ACTION_IF predicate THEN BEGIN
     DO_SOMETHING_ELSE
     ACTION_IF result_of_DO_SOMETHING_ELSE = breakvalue THEN BEGIN
       OUTER_SET predicate = 0
     END
   END
   ACTION_IF predicate THEN BEGIN
     LAUNCH_ACTION_MACRO ~BREAK~
   END
 END
END
OUTER_SET predicate = 1
LAUNCH_ACTION_MACRO ~BREAK~

 

Anyway, I'll be interested in seeing what you've done differently from me :) Any changes will promptly be overwritten by scads of no-longer-updated mods, though.

Link to comment
Ah, so now you remember. The Yellow Jester does not play but gently pulls the strings.

 

And smiles as the puppets dance in the court of the Crimson King....

 

Just about sums up IE modding! :) (with apologies for going off-topic and attempting badly to derail the thread).

 

-Y-

 

Link to comment

Just wondering, what would be the best way to skip the re-installation of DS from within RR if another mod has already installed it beforehand? At first I thought of including a simple ACTON_IF check which detects a DS specific file but, after a bit of glancing over the current DS code, it seems that a lot of effort has already been put into avoiding duplication.

 

The code has two sections:
/////
/////	1) a "run-once" section. This section marks itself as having been run by dumping "cddetect.spl" 
/////	into the override directory, and will be silently skipped if that file is already there. Note
/////	that this is the same file used to detect earlier versions of DS (e.g., the ones in the 2007 
/////	versions of QP and SCS2); this is intentional. It contains:
/////
/////	- a fix for the spells melis02 and spcl741, lifted verbatim from the wiki
/////	- a fix for Khelben's Warding Whip, based on the wiki but modified to remove a bug identified 
/////	  in SCS2 playtesting.
////	- a component to make undead level drain detectable, lifted from the wiki.
/////
/////	
/////	2) a "run often" section. This section can safely be run even if other copies of DS are already
/////	installed. It contains:
/////
/////	- A crude fix for the above bug in Warding Whip: if the spell is detected to be bugged, a 
/////	  replacement - the spell in "khelbenfile" - is copied over.
/////	- a STATS.IDS updater. It takes any entry in statsfile - e.g. 133 CLERIC_DEFENSIVE_HARMONY -
/////	  and (a) replaces all entries having that number OR that description (e.g. 133 WIZARD_FIRE_SHIELD
/////	  or 176 CLERIC_DEFENSIVE_HARMONY; (b) if there are no entries, it adds the line as a new entry.
/////	  (this is original code: it works by a method that's hopefully more bug-resilient than extant ones.)
/////	- the core spell-and-item updater. This is pretty closely based on the wiki version, but I've 
/////	  modified it so that any existing detectable-spell blocks for that spell/item *which refer to 
/////	  exactly the required stat* are removed before the new blocks are added. This means that the 
/////	  macro can be run multiple times without clogging up the spell with repetitions; it should also
/////	  aid compatibility with older versions of DS (e.g., the one in BPv177). I've also tried to make
/////	  it at least a bit tolerant of corrupted files.

 

 

So, basically, I just wanted get a confirmation that installing the current version of DS multiple times won't cause any problems. Is this correct?

Link to comment
So, basically, I just wanted get a confirmation that installing the current version of DS multiple times won't cause any problems. Is this correct?

If I've done it right, then yes.

 

The original (wiki) version of DS did exactly what you suggest: the whole thing was wrapped up in an ACTION_IF. The reason I didn't want to go that way was basically that it doesn't allow for later versions of DS to install over earlier versions: you get the version in the first mod you install, and later ones are silently skipped. This version has a subcomponent that works the old way, but the main bit can be installed multiple times without problems.

 

(I hope.)

Link to comment

I just noticed that both the Minor Globe of Invulnerability and the normal Globe of Invulnerability currently set the MINORGLOBE stat to 1. Since the latter is a more powerful spell, would it be possible to make it set the MINORGLOBE stat to 2? I'm primarily concerned about the proper targeting of Spell Thrust.

Link to comment
I just noticed that both the Minor Globe of Invulnerability and the normal Globe of Invulnerability currently set the MINORGLOBE stat to 1. Since the latter is a more powerful spell, would it be possible to make it set the MINORGLOBE stat to 2? I'm primarily concerned about the proper targeting of Spell Thrust.

 

As I recall, setting MINORGLOBE to 1 is hardcoded into the game, so that any creature with the Globe animation gets it set ... whether it's possible to override it, though, I don't know.

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...