Kwiat_W Posted March 15, 2011 Share Posted March 15, 2011 I haven't installed this mod yet, but I need to know how can other mods detect IWD-IN-BG2 by using MOD_IS_INSTALLED or FILE_EXISTS_IN_GAME? Link to comment
DavidW Posted March 16, 2011 Share Posted March 16, 2011 I haven't installed this mod yet, but I need to know how can other mods detect IWD-IN-BG2 by using MOD_IS_INSTALLED or FILE_EXISTS_IN_GAME? IWD-in-BG2 differs so radically in file contents from both BG2 and IWD separately that this really isn't going to be a problem. By the way, I'd still call the current version in testing rather than suitable for recreational play, so don't download unless it's for testing purposes. I'm hoping the next release will be recreationally playable. Link to comment
Kulyok Posted March 16, 2011 Share Posted March 16, 2011 I'm guessing a file would be nice for those modders who make mods/tweaks both for BG2 and IWD-in-BG2, or IWD and IWD-in-BG2. I mean, if I wanted to, I could even pack IWD NPC and IWD NPC for IWD-in-BG2 together. Not that I want to, but someone else could. Anyway! We are still lurking in the shadows ready to test the thing. If you need encouragement or virtual flowers or anything, you have it. Link to comment
DavidW Posted March 16, 2011 Share Posted March 16, 2011 I'm guessing a file would be nice for those modders who make mods/tweaks both for BG2 and IWD-in-BG2, or IWD and IWD-in-BG2. I mean, if I wanted to, I could even pack IWD NPC and IWD NPC for IWD-in-BG2 together. Not that I want to, but someone else could. If you're shipping a mod designed for both IWD and IWD-in-BG2, look for any BG2-specific file (e.g., MELISS01.dlg). If you're shipping a mod designed for both BG2 and IWD-in-BG2, look for any IWD-specific ARE, BCS, DLG, CRE or ITM file (e.g., DHJOLLDE.dlg). There are also lots of IWD-in-BG2 specific files (e.g., #BLDBARR.spl) but they're subject to change without notice. Link to comment
the bigg Posted March 16, 2011 Share Posted March 16, 2011 I guess adding GAME_IS support to WeiDU would be nice-ish. This is the current algorithm. Can you suggest viable file markers to detect IWD-in-BG2 as GAME_IS IWD-in-BG2 and ENGINE_IS SoA or ToB (ditto for HoF-in-BG2 and TotLM-in-BG2)? let game_list = Str.split many_whitespace_regexp (Var.get_string game_list) in let f x = (eval_pe buff game (Pred_File_Exists_In_Game (PE_LiteralString x))) = 1l in let tutu = if game_or_engine then f "fw0125.are" else false in let bgt = if game_or_engine then f "ar7200.are" else false in let ca = if game_or_engine then f "tc1300.are" else false in let bg2 = f "ar0083.are" in let tob = f "ar6111.are" in let iwd2 = f "ar6050.are" in let pst = f "ar0104a.are" in let bg1 = f "ar0125.are" in let tosc = f "ar2003.are" in let iwd1 = f "ar2116.are" in let how = f "ar9109.are" in let tolm = f "ar9715.are" in let ttsc = f "fw2003.are" in let res = List.exists (fun this -> match String.uppercase this with | "BG2" | "SOA" -> bg2 && not tutu && not tob && not ca | "TOB" -> bg2 && not tutu && tob && not ca | "IWD2" -> iwd2 | "PST" -> pst | "BG1" -> bg1 && not tosc && not bg2 | "TOTSC" -> bg1 && tosc && not bg2 && not iwd1 | "IWD" | "IWD1" -> iwd1 && not how && not tolm | "HOW" -> iwd1 && how && not tolm | "TOTLM" -> iwd1 && how && tolm | "TUTU" -> tutu && not ttsc | "TUTU_TOTSC" | "TUTU+TOTSC" -> tutu && ttsc | "BGT" -> bgt | "CA" -> ca | _ -> failwith (Printf.sprintf "No rule to identify %s" (String.uppercase this)) ) game_list in Link to comment
DavidW Posted March 16, 2011 Share Posted March 16, 2011 Well, for the foreseeable future the only possibilities are GAME_IS TotLM-in-BG2 and ENGINE_IS ToB. So you could use your existing method to look for the engine. As for the game, how about AR9201.are? That's a chunk of the Burial Isle in HoW, so it's late enough in the game that I'm fairly confident NeJ doesn't add it in (I'm nervous about early-game areas for that reason, but can't be bothered to download NeJ and check) and it doesn't exist in vanilla BG2 or in BGT. I'd probably just use IWD-in-BG2, not TotLM-in-BG2... the likelihood of never needing any alternative outweighs the hypothetical inconvenience of using IWD-in-BG2-no-TotLM at some distant point in the future. Link to comment
the bigg Posted March 16, 2011 Share Posted March 16, 2011 done (in git): let iwdinbg2 = if game_or_engine then f "ar9201.are" else false in | "SOA" -> bg2 && not tutu && not tob && not ca && not iwdinbg2 | "TOB" -> bg2 && not tutu && tob && not ca && not iwdinbg2 | "IWD1" -> iwd1 && not how && not tolm && not bg2 | "HOW" -> iwd1 && how && not tolm && not bg2 | "TOTLM" -> iwd1 && how && tolm && not bg2 | "IWDINBG2" -> bg2 && iwdinbg2 Link to comment
CamDawg Posted March 18, 2011 Share Posted March 18, 2011 In the latest series of IWD mod updates, I just checked for the presence of kitlist.2da to differentiate between IWD and IWD-in-BG2. Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.