Search the Community
Showing results for tags 'STATE_WHICH_SAYS'.
Found 1 result
We have found out in other threads that some "awareness" of things presented in mod-added content can be scripted directly into your mod without any troubles. For example, Aran can reference any existing DV, so !Inparty("mynpc") checks will not fail on install, and the strings referenced will be available if the mod-added NPC shows up in-game later on, regardless of install order. This works with globals, too, so in other threads progress to certain points in other mods allows "side talk" - not directly bantering with an NPC or using an item, but acknowledging their presence, either by use of <PLAYER3> tokens in dialog, or with direct checks for globals and DVs. Any way we cut this, we are still talking about having Aran (or your NPC) having some of his talks and paths refer to outside events created by other mods, and being able to install that content as part of Aran's mod. The presence of the global variable or DV being active in a game then "activates" that content passively - no need for messing about with other folk's files, etc. We have taken this a step further with looking at player responses by mod-added kit, in the thread regarding "what happens when..."; here, we found that when Divine Remix was not installed and we wanted to reference the kits added, we had a problem. Compiling a reference to a non-pre-existing kit left the engine with only one choice, "0". Which caused all sorts of problems if DR was not installed, and even worse had no "repair" effect on installed files - unlike GTIMES.IDS or other "engine lookup by handle" things, KIT.IDS references have to be built *after* the kits have been placed on an install, because of the way the files are created and referenced. We get around that by creating an independent "patch", ARAN_AWARE, which so far just swaps "dummy" variables that will compile at install but never be triggered (a very old idea in terms of shutting down content, the equivalent of adding False() to a trigger so a dialog will never play, except reversing a False() is a PITA, whereas setting a never-reached variable to 1 is a much more compatibility - friendly way of coding it - a SetGlobal, and the original block plays.) with the wanted content using good old fashioned REPLACE_TEXTUALLY operation: /* HEARTWARDER OF SUNE - Sune Firehair, Lady Firehair : Global("c-heartwarder","GLOBAL",1) */ ACTION_IF FILE_EXISTS_IN_GAME nmsune.2da BEGIN ACTION_FOR_EACH ~dialog_file~ IN ~c-aranj.dlg~ ~c-aranp.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 ~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)~ REPLACE_TEXTUALLY ~Global("c-aranheartwarder","GLOBAL",1)~ ~Kit("c-aran",NMSUNE) OR(6) Class("c-aran",CLERIC) Class("c-aran",FIGHTER_CLERIC) Class("c-aran",CLERIC_MAGE) Class("c-aran",CLERIC_THIEF) Class("c-aran",FIGHTER_MAGE_CLERIC) Class("c-aran",CLERIC_RANGER)~ COMPILE_D_TO_DLG BUT_ONLY_IF_IT_CHANGES END END END So far so good. We know that using this after Divine Remix is installed means that the correct reference gets swapped into Aran's files. If a player installs the "patch" mod, the new content is activated. If they don't their game still works, and there is no problem. So, what else would need this kind of handling?