Jump to content

What happens when a kit is called in .d, but is not installed?


cmorgan

Recommended Posts

Who knows what a geomantic sorcerer will show up like on the radar.)

 

The GeoSorc uses the standard sorcerer class tag, so CLERIC_ALL would lock that out too.

 

And I apologize profusely, since it was my dialogue suggestion that kicked off this kerfluffle in the first place.

Link to comment
Who knows what a geomantic sorcerer will show up like on the radar.)

 

The GeoSorc uses the standard sorcerer class tag, so CLERIC_ALL would lock that out too.

 

Well, they're more druidish anyway, and druids aren't covered by CLERIC_ALL either. So there. :suspect:

Link to comment
Who knows what a geomantic sorcerer will show up like on the radar.)

 

The GeoSorc uses the standard sorcerer class tag, so CLERIC_ALL would lock that out too.

 

Well, they're more druidish anyway, and druids aren't covered by CLERIC_ALL either. So there. :laugh:

 

:suspect: Yeah, they're more druid than sorcerer, but they're still treated as sorcerers for in-game purposes.

 

I was thinking, would it be possible to make the Sune-specific stuff a separate component, or would that just muck up things even more?

Link to comment

Heh, I'll insert my few words. I'm not sure about final look of this system, but in Faiths and Avatars mod you'll be capable of detecting cleric kits and what's far more important Faith via checking equipped item because of whole Holy Symbols system (which are available for Clerics, Paladins, sometimes even for Monks). I hope this is going to be helpfull.

Link to comment

HasItemEquiped(Player1,"Item_Created_And_Assigned_HolySymbol_PaladinofTyr") ?

 

That is a darned good idea! For a little bit I thought about adopting either a flag item or some other indicator, but it still runs into the before_or_after problem for installs. Kits before = valid .ids entries, and no need for any changes - just code as usual. Kits after or not at all = dialog bugs because of the evaluation to 0.

Link to comment

Exactly. In my mod also being Cleric/Paladin of Tyr doesn't mean having any kit - there are two versions of Holy Symbols, one for clerics/paladins/crusaders who are venerating Tyr and second (called 'greater) for Speciality Priests of Tyr so if you'd really like to make differences between dialogues with generalist priest and guy who devoted his whole life to Tyr you can even do that. Well, for other classes I don't know how having an item could be explained but in F&A it's required for all of the clerics, so if you're planning compatibility, you can use it. I'm not sure about filenames, but after this week I'll try to create something what could be called alpha version (currently only with all of the kits, Lathander/Helm/Talos and probably Mask because of some very cool mechanics which allows Demarch to use thieving abilities).

 

Uhm, currently the only hindrance is that to make those mods compatible you have to change all cleric's kit checking (those for vanilla kits: Talos, Helm, Lathander) to item checking. I'm thinking is there a possibility of creating patcher which will change every Kit(Player1,CLERIC_OF_LATHANDER) into Holy Symbol check.

 

Ehrm, and still... completely incompatible with Divine Remixes (it can be even called revised version so I don't think anyone will install both of them at once).

Link to comment
That is a darned good idea! For a little bit I thought about adopting either a flag item or some other indicator, but it still runs into the before_or_after problem for installs. Kits before = valid .ids entries, and no need for any changes - just code as usual. Kits after or not at all = dialog bugs because of the evaluation to 0.

If you absolutely need to have a state/transition ready (i.e. not cutting it off if no mod kit is installed) for a kit that probably will be installed after, I assume the only way to go is to use fixed stuff, like items/spells. Since items are scarce and spells are almost as hard to detect without an ids entry, that leaves quite a little room...

Link to comment

Hey, stupid regexp question, if anyone knows - I can test later, but it is probably beter to get an expert's input first -

 

 

/* Aran Is Aware Of Other Mods Component */

 

// Replacement "globals" DR - Kit(Player1,NMSUNE) = Global("c-aransunekit","GLOBAL",1)

// Replacement "globals" DR - !Kit(Player1,NMSUNE) = Global("c-aransunekit","GLOBAL",1)

// Replacement "globals" DR - Kit("c-aran",NMSUNE) = Global("c-aranISsunekit","GLOBAL",1)

// Replacement "globals" DR - !Kit("c-aran",NMSUNE) =Global("c-aranISsunekit","GLOBAL",1)

 

COPY_EXISTING ~c-aranj.dlg~ ~override~

DECOMPILE_DLG_TO_D

REPLACE_TEXTUALLY CASE_INSENSITIVE EXACT_MATCH ~!Global("c-aransunekit","GLOBAL",1)~ ~!Kit(Player1,NMSUNE)~

REPLACE_TEXTUALLY CASE_INSENSITIVE EXACT_MATCH ~Global("c-aransunekit","GLOBAL",1)~ ~Kit(Player1,NMSUNE)~

REPLACE_TEXTUALLY CASE_INSENSITIVE EXACT_MATCH ~!Global("c-aranissunekit","GLOBAL",1)~ ~!Kit("c-aran",NMSUNE)~

REPLACE_TEXTUALLY CASE_INSENSITIVE EXACT_MATCH ~Global("c-aranissunekit","GLOBAL",1)~ ~Kit("c-aran",NMSUNE)~

COMPILE_D_TO_DLG

BUT_ONLY_IF_IT_CHANGES

 

 

I think rather than doing this four check process, I can leverage regexp, right? I think (based on reading wiki materials over and over again)

 

REPLACE_TEXTUALLY CASE_INSENSITIVE ~!*Global("c-aranissunekit","GLOBAL",1)~ will catch both !Global and Global, but then I am not sure -

 

{cut of all the stupid stuff I just typed, and I will cut to the chase}

 

Does anyone have a good, simple regexp that will allow me to detect and transfer things like this in a more simple way:

 

Kit(Player1,NMSUNE) = Global("c-aransunekit","GLOBAL",1)

!Kit(Player1,NMSUNE) = !Global("c-aransunekit","GLOBAL",1)

Kit("c-aran",NMSUNE) = Global("c-aranISsunekit","GLOBAL",1)

!Kit("c-aran",NMSUNE) =!Global("c-aranISsunekit","GLOBAL",1)

 

In dialog files, these may have other conditions first, so the ^[] for beginning of line is not needed, I think.

Link to comment
Does anyone have a good, simple regexp that will allow me to detect and transfer things like this in a more simple way:

 

Global("c-aransunekit","GLOBAL",1) => Kit(Player1,NMSUNE)

!Global("c-aransunekit","GLOBAL",1) => !Kit(Player1,NMSUNE)

Global("c-aranISsunekit","GLOBAL",1) => Kit("c-aran",NMSUNE)

!Global("c-aranISsunekit","GLOBAL",1) => !Kit("c-aran",NMSUNE)

REPLACE_TEXTUALLY ~Global("c-aransunekit","GLOBAL",1)~ ~Kit(Player1,NMSUNE)~
REPLACE_TEXTUALLY ~Global("c-aranISsunekit","GLOBAL",1)~ ~Kit("c-aran",NMSUNE)~

 

There's no magic needed since you just want to swap these specific cases. You aren't doing anything differently with the negated ones, so you don't need to worry about treating them separately either.

Link to comment

OK, this definitely works. A separate mini-mod, or patch, placed after DR in the install,

 

BACKUP ~aranw_aware/backup~
AUTHOR ~cmorgan~

VERSION ~pre-alpha 11.15.2010~

/* LAST AT INSTALL: Aran Is Aware Of Other Mods Component */

BEGIN ~Aran Aware - run this component independently, after Divine remix, and Aran will talk to Heartwarders of Sune and other kits occasionally.~


ACTION_IF FILE_EXISTS_IN_GAME nmsune.2da BEGIN  
ACTION_FOR_EACH ~dialog_file~ IN ~c-aranj.dlg~
						   ~c-arn25j.dlg~
						   ~c-arn25a.dlg~ BEGIN
	ACTION_IF FILE_EXISTS_IN_GAME ~%dialog_file%~ THEN BEGIN
		COPY_EXISTING ~%dialog_file%~ ~override~
			DECOMPILE_DLG_TO_D
				REPLACE_TEXTUALLY CASE_INSENSITIVE EXACT_MATCH ~!Global("c-aransunekit","GLOBAL",1)~ ~!Kit(Player1,NMSUNE)~
				REPLACE_TEXTUALLY CASE_INSENSITIVE EXACT_MATCH ~Global("c-aransunekit","GLOBAL",1)~ ~Kit(Player1,NMSUNE)~
				REPLACE_TEXTUALLY CASE_INSENSITIVE EXACT_MATCH ~!Global("c-aranissunekit","GLOBAL",1)~ ~!Kit("c-aran",NMSUNE)~
				REPLACE_TEXTUALLY CASE_INSENSITIVE EXACT_MATCH ~Global("c-aranissunekit","GLOBAL",1)~ ~Kit("c-aran",NMSUNE)~
				/* Feywarden of Correlon : Global("c-feywarden","GLOBAL",1) */
				REPLACE_TEXTUALLY CASE_INSENSITIVE EXACT_MATCH ~Global("c-feywarden","GLOBAL",1)~ ~Kit(Player1,A#FEYWARDEN) OR(6) Class(Player1,CLERIC) Class(Player1,FIGHTER_CLERIC) Class(Player1,CLERIC_MAGE) Class(Player1,CLERIC_THIEF) Class(Player1,FIGHTER_MAGE_CLERIC) Class(Player1,CLERIC_RANGER)~
				/* STRIFELEADER OF CYRIC : Global("c-strifeleader","GLOBAL",1) */
				REPLACE_TEXTUALLY CASE_INSENSITIVE EXACT_MATCH ~Global("c-strifeleader","GLOBAL",1)~ ~Kit(Player1,A#CYRIC) OR(6) Class(Player1,CLERIC) Class(Player1,FIGHTER_CLERIC) Class(Player1,CLERIC_MAGE) Class(Player1,CLERIC_THIEF) Class(Player1,FIGHTER_MAGE_CLERIC) Class(Player1,CLERIC_RANGER)~
				/* PAINBEARER OF ILMATER : Global("c-painbearer","GLOBAL",1) */
				REPLACE_TEXTUALLY CASE_INSENSITIVE EXACT_MATCH ~Global("c-painbearer","GLOBAL",1)~ ~Kit(Player1,CDILMATR) OR(6) Class(Player1,CLERIC) Class(Player1,FIGHTER_CLERIC) Class(Player1,CLERIC_MAGE) Class(Player1,CLERIC_THIEF) Class(Player1,FIGHTER_MAGE_CLERIC) Class(Player1,CLERIC_RANGER)~
				/* LOREKEEPER OF OGHMA - the Binder of What is Known, the Patron of Bards : Global("c-lorekeeper","GLOBAL",1) */
				REPLACE_TEXTUALLY CASE_INSENSITIVE EXACT_MATCH ~Global("c-lorekeeper","GLOBAL",1)~ ~Kit(Player1,A#OGMA) OR(6) Class(Player1,CLERIC) Class(Player1,FIGHTER_CLERIC) Class(Player1,CLERIC_MAGE) Class(Player1,CLERIC_THIEF) Class(Player1,FIGHTER_MAGE_CLERIC) Class(Player1,CLERIC_RANGER)~
				/* FIREWALKER OF KOSSUTH - evil - elemental fire - Thay : Global("c-firewalker","GLOBAL",1) */
				REPLACE_TEXTUALLY CASE_INSENSITIVE EXACT_MATCH ~Global("c-firewalker","GLOBAL",1) ~ ~Kit(Player1,A#KOSS) OR(6) Class(Player1,CLERIC) Class(Player1,FIGHTER_CLERIC) Class(Player1,CLERIC_MAGE) Class(Player1,CLERIC_THIEF) Class(Player1,FIGHTER_MAGE_CLERIC) Class(Player1,CLERIC_RANGER)~
				/* SILVERSTAR OF SELUNE - Moonmaiden : Global("c-silverstar","GLOBAL",1) */
				REPLACE_TEXTUALLY CASE_INSENSITIVE EXACT_MATCH ~Global("c-silverstar","GLOBAL",1)~ ~Kit(Player1, CDSELUNE) OR(6) Class(Player1,CLERIC) Class(Player1,FIGHTER_CLERIC) Class(Player1,CLERIC_MAGE) Class(Player1,CLERIC_THIEF) Class(Player1,FIGHTER_MAGE_CLERIC) Class(Player1,CLERIC_RANGER)~
				/* Holy Strategist of the Red Knight - Red Fellowship (only law) : Global("c-strategist","GLOBAL",1) */
				REPLACE_TEXTUALLY CASE_INSENSITIVE EXACT_MATCH ~Global("c-strategist","GLOBAL",1)~ ~Kit(Player1,A#RED) OR(6) Class(Player1,CLERIC) Class(Player1,FIGHTER_CLERIC) Class(Player1,CLERIC_MAGE) Class(Player1,CLERIC_THIEF) Class(Player1,FIGHTER_MAGE_CLERIC) Class(Player1,CLERIC_RANGER)~
				/* NIGHTCLOAK OF SHAR - Dark Lady : Global("c-nightcloak","GLOBAL",1) */
				REPLACE_TEXTUALLY CASE_INSENSITIVE EXACT_MATCH ~Global("c-nightcloak","GLOBAL",1)~ ~Kit(Player1,A#SHAR) OR(6) Class(Player1,CLERIC) Class(Player1,FIGHTER_CLERIC) Class(Player1,CLERIC_MAGE) Class(Player1,CLERIC_THIEF) Class(Player1,FIGHTER_MAGE_CLERIC) Class(Player1,CLERIC_RANGER)~
				/* HEARTWARDER OF SUNE - Sune Firehair, Lady Firehair : Global("c-heartwarder","GLOBAL",1) */
				REPLACE_TEXTUALLY CASE_INSENSITIVE EXACT_MATCH ~Global("c-heartwarder","GLOBAL",1)~ ~Kit(Player1,NMSUNE) OR(6) Class(Player1,CLERIC) Class(Player1,FIGHTER_CLERIC) Class(Player1,CLERIC_MAGE) Class(Player1,CLERIC_THIEF) Class(Player1,FIGHTER_MAGE_CLERIC) Class(Player1,CLERIC_RANGER)~
				/* BATTLEGUARD OF TEMPUS - th' Foehammer (chaos) : Global("c-battleguard","GLOBAL",1) */
				REPLACE_TEXTUALLY CASE_INSENSITIVE EXACT_MATCH ~Global("c-battleguard","GLOBAL",1)~ ~Kit(Player1,A#TEMP) OR(6) Class(Player1,CLERIC) Class(Player1,FIGHTER_CLERIC) Class(Player1,CLERIC_MAGE) Class(Player1,CLERIC_THIEF) Class(Player1,FIGHTER_MAGE_CLERIC) Class(Player1,CLERIC_RANGER)~ 
				/* Authlim of Iyachtu Xvim - the Godson : Global("c-authlim","GLOBAL",1) */
				REPLACE_TEXTUALLY CASE_INSENSITIVE EXACT_MATCH ~Global("c-authlim","GLOBAL",1)~ ~Kit(Player1,CDXVIM) OR(6) Class(Player1,CLERIC) Class(Player1,FIGHTER_CLERIC) Class(Player1,CLERIC_MAGE) Class(Player1,CLERIC_THIEF) Class(Player1,FIGHTER_MAGE_CLERIC) Class(Player1,CLERIC_RANGER)~ 
			COMPILE_D_TO_DLG
		BUT_ONLY_IF_IT_CHANGES
	END
END	  
END

I have to split them up and check for the kit's .2da for each, as you can install only one of these if you want, but the premise works just fine. The ToB joining dialog roughed out gives us the test (this is NOT final, as it has some pathways that are very constrained, and at least two loopholes, but it is a testable workable implementation):

Link to comment

Archived

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

×
×
  • Create New...