Jump to content

Detection BGT / BGII?


jastey

Recommended Posts

Are there already mods that detect between a BGT- and a BGII-install? Does there exist a common detection like the "FW0100.are" and "AR7200.are" for Tutu / BGT?

 

Which files would be the most useful to detect whether it's a BGII or a BGT-install (or, let's phrase it which ones would you use)?

Link to comment
Are there already mods that detect between a BGT- and a BGII-install? Does there exist a common detection like the "FW0100.are" and "AR7200.are" for Tutu / BGT?

 

Which files would be the most useful to detect whether it's a BGII or a BGT-install (or, let's phrase it which ones would you use)?

Nothing currently for BGT vs BG2. What you say for Tutu/BGT is the one I use, but everyone uses something slightly different.

 

If you are trying to distinguish BGT vs non-BGT, you could simply use REQUIRE_COMPONENT ~Setup-BGT.tp2~ ~0~, because the component tp2 and number is never going to change.

Link to comment

This is what I use to detect the various platforms. You can use various combinations of these, for example to detect Tutu with or without ToB. Obviously, I don't use this by itself, since that'd be rather silly, but if necessary I'll use it to assign various platform-specific variables as relevant (such as for area files).

ACTION_IF FILE_EXISTS_IN_GAME ~fw0125.are~ THEN BEGIN //Tutu
 OUTER_SPRINT ~tsu~ ~_~ //Tutu underscore
END ELSE BEGIN
 ACTION_IF FILE_EXISTS_IN_GAME ~ar7200.are~ THEN BEGIN //BGT
OUTER_SPRINT ~tsu~ ~~ //No underscore
 END ELSE BEGIN
ACTION_IF FILE_EXISTS_IN_GAME ~ar2003.are~ THEN BEGIN //BG1+TotSC
  OUTER_SPRINT ~tsu~ ~~ //No underscore
END ELSE BEGIN
  ACTION_IF FILE_EXISTS_IN_GAME ~ar0125.are~ AND NOT FILE_EXISTS_IN_GAME ~ar2003.are~ THEN BEGIN //BG1 (without TotSC)
	OUTER_SPRINT ~tsu~ ~~ //No underscore
  END ELSE BEGIN
	ACTION_IF FILE_EXISTS_IN_GAME ~ar6200.are~ AND NOT FILE_EXISTS_IN_GAME ~ar7200~ THEN BEGIN //BG2-ToB
	  OUTER_SPRINT ~tsu~ ~~ //No underscore
	END ELSE BEGIN
	  ACTION_IF FILE_EXISTS_IN_GAME ~ar0083.are~ AND NOT FILE_EXISTS_IN_GAME ~ar6200~ AND NOT FILE_EXISTS_IN_GAME ~ar7200~ THEN BEGIN //BG2-SoA (without ToB or BGT)
		OUTER_SPRINT ~tsu~ ~~ //No underscore
	  END ELSE BEGIN
		FAIL ~This mod is not compatible with your game.~
	  END
	END
  END
END
 END
END

It would be more efficient (easier to remember anyway) to have GAME_IS strings for all these, but there isn't one that I can see for BGT, maybe some others. Also, I've seen it reported that GAME_IS doesn't always work as planned. Might make a good enhancement to WeiDU though (it's not like it'd be asking for a new feature, since it's already there).

Link to comment

Archived

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

×
×
  • Create New...