Diana Posted January 10, 2006 Share Posted January 10, 2006 Example: 1) You have one user created NPC. 2) Another modder has another NPC/Cre file How do you check to see if #2 exists so you can I_C_T into it without crashing your game? There must be some sort of check in the .tp2 to see if a .dlg file for #2 exists if the check passes. Like I said unless it is top secret, I'd like to know how to do this. Thanks. Link to comment
Andyr Posted January 10, 2006 Share Posted January 10, 2006 A series of FILE_EXISTS checks for each NPC dialogue pair, I'd imagine. (Note: I don't have the mod as I've not yet used the NPC mods involved). If you're interested, there is a bit of information on the Wiki showing the filenames used (though no tp2 code): http://dev.gibberlings3.net/index.php/Crossmod_Banter_Pack There's also some in Mur'Neth, which isn't on the Wiki so I will post the relevant stuff here: //Mur'Neth-Indira banter ACTION_IF FILE_EXISTS ~override/J#INDIB.DLG~ THEN BEGIN ACTION_IF NOT FILE_EXISTS ~override/INDIRAMURNETH.XXX~ THEN BEGIN PRINT ~You have Indira installed, adding extra banters...~ COPY_EXISTING ~SW1H01.ITM~ ~override/INDIRAMURNETH.XXX~ COMPILE ~Mur'Neth/dialogues/A#MURIND.d~ END END //Mur'Neth-Finch banter ACTION_IF FILE_EXISTS ~override/BSUFINCH.DLG~ THEN BEGIN ACTION_IF NOT FILE_EXISTS ~override/FINCHMURNETH.XXX~ THEN BEGIN PRINT ~You have Finch installed, adding extra banters...~ COPY_EXISTING ~SW1H01.ITM~ ~override/FINCHMURNETH.XXX~ COMPILE ~Mur'Neth/dialogues/A#MURFIN.d~ END END Also note the file checks to make sure it is not installed if already present (as for the Tutu NPCs we decided to package the crossmod stuff in with the main mods). If you wanted to I_C_T in instead of normal banters then the only difference would be the file you compile isn't a banter file but a file with I_C_Ts. Hope this helps! Link to comment
Grim Squeaker Posted January 10, 2006 Share Posted January 10, 2006 Feel free to look at Setup-CrossmodBG2.tp2. It's fairly well commented so it should be understandable. If anything's confusing, just drop me a PM and I'll try to help. Link to comment
Diana Posted January 10, 2006 Author Share Posted January 10, 2006 Thank you gentlemen. The examples shown are great and told me what I need to do. I assume I only need to code up a file with my INTERJECT/END and I_C_T/END coding without having the BEGIN ~whatever~ at the top of the new file. Link to comment
Andyr Posted January 10, 2006 Share Posted January 10, 2006 Correct, you don't need a BEGIN if it's not a new dialogue. It is fine to compile a .D consisting of only sets of mixes of CHAINs, APPENDs, I_C_Ts or whatever. Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.