Jump to content

Unless it's top secret


Diana

Recommended Posts

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

A series of FILE_EXISTS checks for each NPC dialogue pair, I'd imagine. :D

 

(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. :D

 

Hope this helps!

Link to comment

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.

:D

Link to comment

Archived

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

×
×
  • Create New...