Jump to content


Photo

General discussion


  • Please log in to reply
43 replies to this topic

#21 Argent77

Argent77
  • Staff
  • 1112 posts

Posted 20 November 2016 - 01:06 PM

No, it's destroyed if you skipped the dungeon. Is the statue needed later on?

You can see the whole script here: https://github.com/A...s/npc/chloe.tph



#22 Roxanne

Roxanne

    Modder

  • Member
  • 3564 posts

Posted 20 November 2016 - 01:34 PM

No, it's destroyed if you skipped the dungeon. Is the statue needed later on?

You can see the whole script here: https://github.com/A...s/npc/chloe.tph

Thank you for the link.

I need to think a bit about how to restore all the missing contents from Chloe if you meet her outside for the first time.

She differs from the other NPCs you may skip in that she has her plots and relationships already started during the dungeon episode (why she was in the aerial plane, meeting Imoen, who is Akadia etc).

"My mother is Akadia, goddess of air...."

~I must admit I have an ulterior motive for being here in particular. I felt a pull to this area, and now that I'm here I understand why. This is a pocket plane of the air dimension, which I have somewhat of a relationship with.~
~We can discuss the nature of that relationship later, if you want, but for now I would ask that we investigate this. A pocket dimension like this takes considerable power and I would know what it's purpose is. Likely there is some manner of treasure or sensitive information that you would be interested in. Regardless, let us investigate, shall we?~

 

In the original mod she would refer to this meeting (that is now skipped) later on, which would make the mod appear to be bugged (how would someone know you were supposed to meet her in the dungeon unless you played the untweaked game before?).

Remember that her starting point in Seven Dens is not alternative but you send her there after you had the first meeting.


Edited by Roxanne, 20 November 2016 - 01:37 PM.

The Sandrah Saga

another piece of *buggy, cheesy, unbalanced junk*

 


#23 Argent77

Argent77
  • Staff
  • 1112 posts

Posted 20 November 2016 - 01:48 PM

It was the best option available without adding new dialog content. If it's required that you have to meet her inside Chateau Irenicus I could remove support for her altogether from this mod.



#24 Roxanne

Roxanne

    Modder

  • Member
  • 3564 posts

Posted 20 November 2016 - 02:11 PM

It was the best option available without adding new dialog content. If it's required that you have to meet her inside Chateau Irenicus I could remove support for her altogether from this mod.

Hm....

there is always a solution....at least for Chloe mod...

 

There is a more general issue probably - as EET and BG2EE evolve, more and more mods become available. A number of them will have the same issue, i.e. their presence in CI has a reason other than "meet me early in game". Some were captured by Irenicus for a reason or other and they join your hunt for the mage because of this etc. So, Chloe is just the first example.

Does it mean there will be incompatibility with such mods?

 

EDIT - we may forget about Chloe, I found a solution for her. Anyway, the global question will remain for you to consider. (Already Adrian contains a number of references to his rescue from Irenicus throughout the mod.)

 

But one can always argue that by installing the skip mod the player accepts such inconsistencies.


Edited by Roxanne, 20 November 2016 - 02:20 PM.

The Sandrah Saga

another piece of *buggy, cheesy, unbalanced junk*

 


#25 Argent77

Argent77
  • Staff
  • 1112 posts

Posted 20 November 2016 - 02:39 PM

Small inconsistencies are probably unavoidable if you skip such a crucial chapter of the main plot. The mod is not much better as the original Dungeon-Be-Gone in this regard. It's also mentioned in the readme. I could probably emphasize the fact that skipping the dungeon my cause inconsistencies with NPCs you would have met in Chateau Irenicus otherwise.

Even vanilla NPCs may refer to events you have skipped later on (such as Jaheira finding out about Khalid's fate).
 



#26 Roxanne

Roxanne

    Modder

  • Member
  • 3564 posts

Posted 20 November 2016 - 02:48 PM

Small inconsistencies are probably unavoidable if you skip such a crucial chapter of the main plot. The mod is not much better as the original Dungeon-Be-Gone in this regard. It's also mentioned in the readme. I could probably emphasize the fact that skipping the dungeon my cause inconsistencies with NPCs you would have met in Chateau Irenicus otherwise.

Even vanilla NPCs may refer to events you have skipped later on (such as Jaheira finding out about Khalid's fate).
 

I fully agree with that.

I think I have phrased my concern incorrectly. There will be NPCs that cannot be moved outside without breaking them. In this case, skip means that you simply never will see that NPC. I was considering whether Chloe was one of those or not.


The Sandrah Saga

another piece of *buggy, cheesy, unbalanced junk*

 


#27 Argent77

Argent77
  • Staff
  • 1112 posts

Posted 20 November 2016 - 02:59 PM

Difficult to say. I've inspected the other NPC mods mentioned by agb1 (Branwen, Frennedan, Moddie, ...). All of them can be modified, but only by adding new dialog content. Since all of them are available in other languages besides in English (some mods not even in English at all), the modified content would stick out very badly if I can't find a translator or use a translation tool. The same can be said about Chloe to a certain degree.


Edited by Argent77, 20 November 2016 - 03:01 PM.


#28 Almateria

Almateria

    most garbage person

  • Modder
  • 947 posts

Posted 20 November 2016 - 04:23 PM

I honestly think that skipping the first chapter of the game AND maintaining ~mod NPC integrity~ are two things divergent enough in purpose that trying to reconcile them by making this mod bend over backwards for Chloe (who is a trash npc) is kinda missing the point, if you ask me.

#29 agb1

agb1
  • Member
  • 1623 posts

Posted 20 November 2016 - 04:40 PM

This mod isn't just a skip - it is presented as an "in-character" skip. For whatever reason, Irenicus did not lock his portals, so you can simply exit at will.

It would make sense from that perspective that upon meeting the skipped NPCs later, they would tell you stories of their escape from CI without you, rather than referring to events that your character did not experience.

But it is certainly not a must-have ... the core intent of this mod after all is to skip content you have already experienced in prior games -- i.e., not for first-time players.

BiG World Fixpack (community collection of mod fixes and compatibility patches, with user-friendly cross-platform script)

 

BiG World Setup (tool to automate best-practice installation of Infinity Engine mods on Windows, with conflict analysis)

Latest version:    https://bitbucket.or.../get/master.zip


#30 Argent77

Argent77
  • Staff
  • 1112 posts

Posted 23 November 2016 - 02:50 AM

I have implemented the addon feature with just this option in mind. NPC mods who want to add SCI support for their own characters would simply drop their "skipcode.tph" into the designated subfolder of this mod. When SCI is installed as one of the last mods in line it will scan the whole subfolder and process all available TPH files, one after another, as visualized by this pseudocode:

FOR_EACH ~*.tph~ IN ~SkipChateauIrenicus/npc~ AS file BEGIN
  EXECUTE ~%file%~
END


I'm currently testing a few options to handle fatal WeiDU errors in case a addon file contains really screwed up code. If that doesn't work as expected I'll move the code for dealing with NPCs into a separate component, so it can be skipped if necessary.

 

Edit: The error catching code seems to work fine. I can continue processing addon files even if one of them contains garbage data.


Edited by Argent77, 23 November 2016 - 04:15 AM.


#31 Argent77

Argent77
  • Staff
  • 1112 posts

Posted 23 November 2016 - 08:59 AM

I don't think WeiDU provides anything that can be used to traverse directory trees. I would have to depend on platform-specific tools (which is very messy). I want to avoid that if possible. The scan process would also be a very time-consuming operation in more complex mod installations.

 

On the positive side it would avoid potential filename collisions in case there are two or more mods which happen to install addon script files of the same name.



#32 agb1

agb1
  • Member
  • 1623 posts

Posted 23 November 2016 - 09:17 AM

WeiDU definitely can traverse directory trees without cross-platform tools.

Something like this:
 
	DEFINE_ACTION_FUNCTION ~recursive_deep_copy~ // will skip empty directories
		STR_VAR
			current_dir = ~~
			target_dir = ~~
	BEGIN
		OUTER_TEXT_SPRINT file_arr ~%current_dir%_files~
		OUTER_TEXT_SPRINT folder_arr ~%current_dir%_folders~

		GET_FILE_ARRAY EVAL ~%file_arr%~ ~%current_dir%~ ~^.*$~
		GET_DIRECTORY_ARRAY EVAL ~%folder_arr%~ ~%current_dir%~ ~^.*$~

		ACTION_PHP_EACH ~%file_arr%~ AS ind => file_full_path BEGIN
			PRINT "+ COPY_LARGE ~%file_full_path%~ ~%target_dir%~"
			COPY_LARGE ~%file_full_path%~ ~%target_dir%~
		END

		ACTION_PHP_EACH ~%folder_arr%~ AS ind => subdir_full_path BEGIN
			ACTION_IF (~%subdir_full_path%~ STRING_MATCHES_REGEXP ~^.*/\.\.?$~ != 0) BEGIN // exclude /. and /..
				LAF FILE_OF_FILESPEC // trim leading path
					STR_VAR
						filespec = EVAL ~%subdir_full_path%~
					RET
						folder_name = file
				END
				ACTION_IF (NOT DIRECTORY_EXISTS ~%target_dir%/%folder_name%~) THEN BEGIN
					PRINT "+ MKDIR ~%target_dir%/%folder_name%~"
					MKDIR ~%target_dir%/%folder_name%~
				END
				LAF ~recursive_deep_copy~ STR_VAR current_dir = EVAL ~%subdir_full_path%~ target_dir = EVAL ~%target_dir%/%folder_name%~ END
			END
		END
	END

Since the function is recursive, the array names are SPRINT'd to be unique for each subdirectory because the number of files/directories found at a deeper level may be less than at a higher level, leaving erroneous leftover entries at the end of the arrays if you reuse the same array variables.

Also, it's very fast.

Edited by agb1, 23 November 2016 - 09:18 AM.

BiG World Fixpack (community collection of mod fixes and compatibility patches, with user-friendly cross-platform script)

 

BiG World Setup (tool to automate best-practice installation of Infinity Engine mods on Windows, with conflict analysis)

Latest version:    https://bitbucket.or.../get/master.zip


#33 agb1

agb1
  • Member
  • 1623 posts

Posted 23 November 2016 - 09:24 AM

Here's a variation that recursively searches for and includes .tph files:
DEFINE_ACTION_FUNCTION ~recursive_find_and_include_tph~ // will skip empty directories
		STR_VAR
			current_dir = ~~ // start from ~~ for game folder level
                        tph_regexp = ~^A#7SCI_.*\.tph$~ // match files named A#7SCI_*.tph
	BEGIN
		OUTER_TEXT_SPRINT file_arr ~%current_dir%_files~ // unique array names (including full path) to avoid processing left-over array elements
		OUTER_TEXT_SPRINT folder_arr ~%current_dir%_folders~

		GET_FILE_ARRAY EVAL ~%file_arr%~ ~%current_dir%~ ~%tph_regexp%~
		ACTION_PHP_EACH ~%file_arr%~ AS ind => file_full_path BEGIN
			INCLUDE ~%file_full_path%~
		END

		GET_DIRECTORY_ARRAY EVAL ~%folder_arr%~ ~%current_dir%~ ~^.*$~
		ACTION_PHP_EACH ~%folder_arr%~ AS ind => subdir_full_path BEGIN
			ACTION_IF (~%subdir_full_path%~ STRING_MATCHES_REGEXP ~^.*/\.\.?$~ != 0) BEGIN // exclude /. and /..
				LAF ~recursive_find_and_include_tph~ STR_VAR current_dir = EVAL ~%subdir_full_path%~ END
			END
		END
	END
END

Edited by agb1, 23 November 2016 - 09:27 AM.

BiG World Fixpack (community collection of mod fixes and compatibility patches, with user-friendly cross-platform script)

 

BiG World Setup (tool to automate best-practice installation of Infinity Engine mods on Windows, with conflict analysis)

Latest version:    https://bitbucket.or.../get/master.zip


#34 Argent77

Argent77
  • Staff
  • 1112 posts

Posted 23 November 2016 - 09:33 AM

Ah yes, there is GET_DIRECTORY_ARRAY. I've never used this action before.

 

It might work, but only if SCI is guaranteed to be installed very late in the mod order, or some addon scripts won't be executed successfully. I'll play with it and see how effective it will be.
 



#35 agb1

agb1
  • Member
  • 1623 posts

Posted 23 November 2016 - 10:06 AM

3 possibilities -

tph file is unpacked but NPC mod itself hasn't been installed, and then SCI install runs (SCI first, but tph present)
tph file is not unpacked and NPC mod hasn't been been installed, and SCI install runs (SCI first, no tph present)
tph is unpacked, NPC mod has been installed, SCI install runs (SCI mod last, tph present)

If SCI is already installed, we want the NPC mod to execute the tph when it is installed. Otherwise, we want SCI to execute the tph. We do not want SCI to execute a tph for a mod that hasn't been installed yet.

The most problematic scenario is the first one - tph is present, NPC mod has not been installed yet, SCI shouldn't execute the tph.

Here are a couple of possible solutions:

1) The mod could include some code to rename the tph file as part of its own install so the tph will only match SCI's search pattern if the mod has already been installed.
2) The tph file could check if the mod has already been installed, but this makes it more complicated for the mod to apply the patch itself (after SCI) -- basically this would force the mod to have more than one component or a marker file, which is not acceptable

I think #1 is OK. Here's how you could implement it. Have each modder include a snippet like this in their main tp2:
ACTION_IF (MOD_IS_INSTALLED ~Setup-SkipChateauIrenicus.tp2~ ~0~) THEN BEGIN // SCI has already been installed
  INCLUDE ~mymod/SCI_patch.tph~ // SCI was installed before, so apply the patch now (it should have a file name that does NOT start with "A#7SCI_")
END ELSE BEGIN // SCI has not been installed yet
  MOVE ~mymod/SCI_patch.tph~ ~mymod/A#7SCI_patch.tph~ // rename the tph to match the pattern that SCI will search for when it is installed later
END

Edited by agb1, 23 November 2016 - 10:06 AM.

BiG World Fixpack (community collection of mod fixes and compatibility patches, with user-friendly cross-platform script)

 

BiG World Setup (tool to automate best-practice installation of Infinity Engine mods on Windows, with conflict analysis)

Latest version:    https://bitbucket.or.../get/master.zip


#36 Argent77

Argent77
  • Staff
  • 1112 posts

Posted 23 November 2016 - 10:59 AM

The addon script files contain only variable definitions which are processed by SCI, so in the case that SCI has already been installed the addon code will do nothing, or in the worst case produce an error (which is handled gracefully by SCI, however). A typical addon script should be guarded by a condition that indicates the mod has been installed (e.g. a file existence check).

All a NPC mod would have to do is including the addon script file somewhere in their mod folder by following the addon filename convention (e.g. A7SCI_*.tph). The file should automatically be fetched and processed by SCI when it is installed.
 

I'm still in the middle of testing, so there may be more situations to consider yet.


Edited by Argent77, 23 November 2016 - 10:59 AM.


#37 Argent77

Argent77
  • Staff
  • 1112 posts

Posted 24 November 2016 - 03:01 PM

Adding a game-wide scan for addon files is too much work for too little effect (as I would have to do the same for the item and area definition tables). I'll keep the current method as it is, but move the code responsible for dealing with skipped NPCs into a separate component.



#38 Argent77

Argent77
  • Staff
  • 1112 posts

Posted 26 November 2016 - 09:40 AM

New version: Skip Chateau Irenicus v2.3

Changes in v2.3:

  • Moved NPC-related code into separate subcomponent
  • Added error catching code to NPC addon feature to prevent mod termination because of buggy script files
  • Added French translation (thanks Gwendolyne)


#39 Argent77

Argent77
  • Staff
  • 1112 posts

Posted 29 June 2018 - 05:33 AM

New version: Skip Chateau Irenicus v3.0

Changes in v3.0:

  • Added compatibility with classic BG2
  • Added compatibility with BG2:EE pre-2.0


#40 Instructor

Instructor
  • Member
  • 3 posts

Posted 10 July 2018 - 10:50 PM

Hi! I love your mod, I quit playing at least twice before because I didn't want to deal with this bs again, and I just wanted to replay chapter 2.


I do have a problem, I can't find Jaheira where she's supposed to be. I can find Minsc despite not freeing him, what can I do to get Jaheira to appear? Is there a global variable I could edit to make her appear outside Galvarey Estate?