Darn - never thought of that loophole. So we need a recode of this.
OK, Logic check. Dy's Quest embedded in the {banters, quests, interjections} component adds x#winski.cre.
The Portraits component installs a flag file if it is chosen, X#NJNPCPortrait.G3
then does its stuff. At that point it does not refer to x#winski -
COPY_EXISTING ~%tutu_var%winski.cre~ ~override~
WRITE_ASCII 0x34 ~winskis~ #8 // small portrait
BUT_ONLY_IF_IT_CHANGES
COPY_EXISTING ~%tutu_var%winski2.cre~ ~override~
WRITE_ASCII 0x34 ~winskis~ #8 // small portrait
BUT_ONLY_IF_IT_CHANGES
BUT
in the Dynaheir Romance materials, the only screening flag for x#winski is the potrait flag, X#NJNPCPortrait.G3
which means if someone does not install the banter component, but does install the NPC portrait component,
the resource is missing.
Fix:
bg1npc.tp2, lines 6055 - 6069
/* Add Portraits if NJNPC Portraits was chosen */
ACTION_IF FILE_EXISTS_IN_GAME ~X#NJNPCPortrait.G3~ THEN BEGIN
COPY_EXISTING ~x#nell.cre~ ~override~
WRITE_ASCII 0x34 ~madams~ #8 // small portrait
COPY_EXISTING ~x#madr.cre~ ~override~
WRITE_ASCII 0x34 ~madrinas~ #8 // small portrait
COPY_EXISTING ~x#bhet.cre~ ~override~
WRITE_ASCII 0x34 ~bhetels~ #8 // small portrait
COPY_EXISTING ~x#sveet.cre~ ~override~
WRITE_ASCII 0x34 ~sveetlas~ #8 // small portrait
COPY_EXISTING ~x#winski.cre~ ~override~
WRITE_ASCII 0x34 ~winskis~ #8 // small portrait
COPY_EXISTING ~x#setta.cre~ ~override~
WRITE_ASCII 0x34 ~settas~ #8 // small portrait
END
replace with
/* Add Portraits if NJNPC Portraits was chosen */
ACTION_IF FILE_EXISTS_IN_GAME ~X#NJNPCPortrait.G3~ THEN BEGIN
COPY_EXISTING ~x#nell.cre~ ~override~
WRITE_ASCII 0x34 ~madams~ #8 // small portrait
COPY_EXISTING ~x#madr.cre~ ~override~
WRITE_ASCII 0x34 ~madrinas~ #8 // small portrait
COPY_EXISTING ~x#bhet.cre~ ~override~
WRITE_ASCII 0x34 ~bhetels~ #8 // small portrait
COPY_EXISTING ~x#sveet.cre~ ~override~
WRITE_ASCII 0x34 ~sveetlas~ #8 // small portrait
COPY_EXISTING ~x#winski.cre~ ~override~
WRITE_ASCII 0x34 ~winskis~ #8 // small portrait
COPY_EXISTING ~x#setta.cre~ ~override~
WRITE_ASCII 0x34 ~settas~ #8 // small portrait
ACTION_IF FILE_EXISTS_IN_GAME ~x#winski.cre~ THEN BEGIN
COPY_EXISTING ~x#winski.cre~ ~override~
WRITE_ASCII 0x34 ~winskis~ #8 // small portrait
END
END
and we need to go recheck if anything else automatically messes with x#winski that way -
Searching for: X#winski
bg1npc_docs\bg1npcvarindex.htm(17566): <td>X#WinskiTakeDyna</td>
phase2\baf\x#dynaquest.baf(337): CreateCreatureObjectDoor("X#WINSKI",Player1,0,0,0)
phase2\baf\x#dyqwin.baf(91): Global("X#WinskiTakeDyna","GLOBAL",1)
phase2\baf\x#dyqwin.baf(107): SetGlobal("X#WinskiTakeDyna","GLOBAL",2)
phase2\baf\x#impspl.baf(170): SetGlobal("X#WinskiTakeDyna","GLOBAL",1)
phase2\dlg\x#dynaquest.d(8): BEGIN ~X#WINSKI~
phase2\dlg\x#dynaquest.d(354): /* Initial teleport added to Dynaheir's BCS: _YNAHEIR.BCS X#WINSKI used as walking, instead of %tutu_var%WINSKI2 9sleeping man anim, existing D, and existing .BCS */
phase2\dlg\x#dynaquest.d(355): APPEND ~X#WINSKI~
phase2\dlg\x#dynaquest.d(364): == ~X#WINSKI~ @132 EXTERN ~%DYNAHEIR_BANTER%~ X#DYWIN62
phase2\dlg\x#dynaquest.d(369): == ~X#WINSKI~ IF ~InParty("minsc") InMyArea("minsc") !StateCheck("minsc",CD_STATE_NOTVALID)~ THEN @135
phase2\dlg\x#dynaquest.d(370): == ~X#WINSKI~ @136 DO ~SetGlobal("X#DYQUImpAttack","GLOBAL",1) SetGlobal("X#WinskiTakeDyna","GLOBAL",1) SetGlobal("X#DynaheirRomanceInactive","GLOBAL",1)~ EXIT
phase2\dlg\x#dynaquest.d(376): + ~Class(Player1,THIEF_ALL)~ + @139 EXTERN ~X#WINSKI~ X#DYWIN61love
phase2\dlg\x#dynaquest.d(377): + ~Class(Player1,BARD)~ + @140 EXTERN ~X#WINSKI~ X#DYWIN61love
phase2\dlg\x#dynaquest.d(378): + ~Class(Player1,FIGHTER_ALL)~ + @141 EXTERN ~X#WINSKI~ X#DYWIN61love
phase2\dlg\x#dynaquest.d(379): + ~Class(Player1,PALADIN)~ + @142 EXTERN ~X#WINSKI~ X#DYWIN61love
phase2\dlg\x#dynaquest.d(380): + ~Class(Player1,RANGER_ALL)~ + @143 EXTERN ~X#WINSKI~ X#DYWIN61love
phase2\dlg\x#dynaquest.d(381): + ~Class(Player1,CLERIC_ALL)~ + @144 EXTERN ~X#WINSKI~ X#DYWIN61love
phase2\dlg\x#dynaquest.d(382): + ~Class(Player1,DRUID_ALL)~ + @145 EXTERN ~X#WINSKI~ X#DYWIN61love
phase2\dlg\x#dynaquest.d(383): + ~Class(Player1,MONK)~ + @146 EXTERN ~X#WINSKI~ X#DYWIN61love
phase2\dlg\x#dynaquest.d(384): + ~Class(Player1,MAGE_ALL)~ + @147 EXTERN ~X#WINSKI~ X#DYWIN61love
phase2\dlg\x#dynaquest.d(385): + ~Class(Player1,SORCERER)~ + @148 EXTERN ~X#WINSKI~ X#DYWIN61love
phase2\dlg\x#dynaquest.d(388): ++ @151 EXTERN ~X#WINSKI~ X#DYWIN62cash
phase2\dlg\x#dynaquest.d(389): ++ @152 EXTERN ~X#WINSKI~ X#DYWIN61love
phase2\dlg\x#dynaquest.d(395): IF ~~ THEN EXTERN ~X#WINSKI~ X#DYWIN62swear1
phase2\dlg\x#dynaquest.d(399): APPEND ~X#WINSKI~
phase2\dlg\x#dynaquest.d(441): CHAIN IF WEIGHT #-4 ~%BGT_VAR% Global("X#DynaJournal","GLOBAL",8) InParty("dynaheir") InMyArea("dynaheir") !StateCheck("dynaheir",CD_STATE_NOTVALID)~ THEN ~%tutu_var%WINSKI~ X#WinskiFinal
phase3\wait\dlg\x#npcwait.d(390): IF ~Global("X#WinskiTakeDyna","GLOBAL",1)~ THEN EXIT
phase3\wait\dlg\x#npcwait.d(420): IF ~Global("X#WinskiTakeDyna","GLOBAL",1)~ THEN EXIT
phase3\wait\dlg\x#npcwait.d(560): IF ~Global("X#WinskiTakeDyna","GLOBAL",1)~ THEN EXIT
phase3\wait\dlg\x#npcwait.d(590): IF ~Global("X#WinskiTakeDyna","GLOBAL",1)~ THEN EXIT
Found 30 occurrence(s) in 6 file(s)
hmmm... no reference to x#winski in the romance - oh.
ok, well, that gives a quick fix, replace that block in the .tp2, and everything works, but it leaves x#winski's portrait out of the mix for the folks who just have the quest, not the romance installed.
Perhaps this would be better served falling in the portraits component in the first place, since the rest of this stuff is installed with the romance, making it install-order-independent.
So, for the real fix in v18, I need to remember to move lines 6065 and 6066 to the portrait component around line 5153,
ACTION_IF (FILE_EXISTS_IN_GAME ~X#BG1NPCPhase1.G3~) THEN BEGIN
/* Phase2 Quest NPCs */
It still leaves a loophole - if someone installs the portrait component first, right after the required component, then they will not get any of the phase1/phase2 portraits installed.
bleh.
Well, I guess the question is, is it worth it to simply ask in the core required component,
'do you want to add Non-Joinable NPC portraits to quests and dialogues?' via READLN and set that as a variable, then toss a macro to patch 'em in.
I am not sure it is worth the mess of using DEPRECIATED and such.