Note: LucasForums Archive Project
The content here was reconstructed by scraping the Wayback Machine in an effort to restore some of what was lost when LF went down. The LucasForums Archive Project claims no ownership over the content or assets that were archived on archive.org.

This project is meant for research purposes only.

[TSL] dialog conditionals

Page: 1 of 1
 HdVaderII
02-25-2008, 10:26 AM
#1
Hi. I 'm a beginner modder, and need 2 things.

1. A conditional that checks if an item is in your inventory, and it allows you to see a certain dialog node if you have it, and if you don't have it the node isn't shown.

2. Conditionals that check if a party member is in your current party, and allows a node to be shown or not shown if a member is/is not in the party.

Any help would be appreciated.
 Princess Artemis
02-25-2008, 11:29 AM
#2
TSL has these scripts already available to use, you just need to put them in the dialogues. c_hasitem is a conditional that will check if you have the item needed. If you use DLGEditor, it's easy to put in what item you need to have to access it by inputting the item's tag into the String Param field on the conditional statement for that node.

There are also scripts like c_con_hk47pm that can be used as conditionals for nodes. That particular one, as the name implies, will check to see is HK-47 is both in the party and near enough to the conversation to trigger the appearance of the dialogue. It's often a good idea to put dialogue with conditionals in them above dialogue that doesn't have conditionals so that the game will hit them first and check the conditions to see if they're met or not. If you want to make sure the character is NOT in the party, check the "NOT" box at the end of the conditional in DLGEditor, it will put a ! in front of the script in the dialogue--the ! is read as "not" by the game, and so the node would only be available if the character is not in the party and close by.
 HdVaderII
02-25-2008, 3:47 PM
#3
Is there one that can check if you are at a certain level?
 Princess Artemis
02-25-2008, 8:32 PM
#4
Looks like c_pc_level will do that, with the first parameter being the level you want to check for.
 GeorgNihilus
02-25-2008, 9:06 PM
#5
For the original KoTOR extract through KotorTool the source scripts from Kotor I/BIFs/scripts.bif/Script, Source (k_con_bastpm.nss for Bastila in the active party, k_con_canderpm.nss for Canderous in active party, k_con_juhanipm.nss for Juhani and so on), for TSL extract from same named branches, files like c_con_baodurpm.nss for BaoDur, c_con_Kreiapm.nss for that manipulating witch ... Atton says ... :D and so on ...

and this script checks if the PC has an item (sTag) in inventory (for TSL), it's in the game too:

// c_hasitem
/*
Returns true if the PC has the item
*/
// TDE 7/28/04

int StartingConditional()
{
string sTag = GetScriptStringParameter();
if ( GetIsObjectValid( GetItemPossessedBy( GetFirstPC(), sTag))) return TRUE;

return FALSE;
}

hope it helps, good modding over there :)
 HdVaderII
02-26-2008, 8:06 PM
#6
Thanks alot!
Page: 1 of 1