Darth_Andrez Posted September 28, 2008 Share Posted September 28, 2008 I need help with updating a dialog for my new recruitment mod. what i need to do is make my dialog update because of an event Example; you walk up to a man and start the dialog he says "hello im harry" and you go away from him and when you come back and start the dialog again he will now say "hello again" it something i have never seen a tutorial on so any help would be greatly apreacieciated(i cant spell) Thanks, :xp:Nanu12 Link to comment Share on other sites More sharing options...
ForeverNight Posted September 28, 2008 Share Posted September 28, 2008 This is where conditional scripts come into play. I don't have one on me right now, but you would create a conditional script that, let's say it checks for an item that you get through the first dialog and can't get rid of. Then, if you have that item, the game would then play the dialog that fires when you have that item... Does that make any sense? I'm kinda out of it today... Link to comment Share on other sites More sharing options...
Inyri Posted September 28, 2008 Share Posted September 28, 2008 This kind of thing is done with scripts and variables, typically. I'm going to slaughter the explanation of this, so bear with me. When you make a dialogue you typically have branches. On each branch and each reply you have two slots for scripts -- an action script (the script performs an action when the dialogue branch comes up) and a conditional script (the script determines whether or not the dialogue will appear based on one or more conditions). To make a particular dialogue branch not appear you will need to have a conditional script on that branch (for instance you can set the script only to appear if a variable you set is '1'). Somewhere you will need to have an action script that will set that variable to 1. You can also use this method to make sure a branch doesn't fire. If you have a conditional script on branch 1 that says it will only fire if the variable is 0, you can have an action script at the end of that dialogue that changes the variable to 1. This way the first branch won't fire, but the second branch will. So now that I've confused you feel free to ask questions. Link to comment Share on other sites More sharing options...
Darth_Andrez Posted September 28, 2008 Author Share Posted September 28, 2008 This kind of thing is done with scripts and variables, typically. I'm going to slaughter the explanation of this, so bear with me. When you make a dialogue you typically have branches. On each branch and each reply you have two slots for scripts -- an action script (the script performs an action when the dialogue branch comes up) and a conditional script (the script determines whether or not the dialogue will appear based on one or more conditions). To make a particular dialogue branch not appear you will need to have a conditional script on that branch (for instance you can set the script only to appear if a variable you set is '1'). Somewhere you will need to have an action script that will set that variable to 1. You can also use this method to make sure a branch doesn't fire. If you have a conditional script on branch 1 that says it will only fire if the variable is 0, you can have an action script at the end of that dialogue that changes the variable to 1. This way the first branch won't fire, but the second branch will. So now that I've confused you feel free to ask questions. Thanks, Its still a bit confusing how would i go about making the script that changes its varialble,im totally useless when it comes to advanced scripting if you could make it for me i would be very greatfull all i want is a sort of tenplate if you no what i mean? Link to comment Share on other sites More sharing options...
ChAiNz.2da Posted September 28, 2008 Share Posted September 28, 2008 Thanks, Its still a bit confusing how would i go about making the script that changes its varialble,im totally useless when it comes to advanced scripting if you could make it for me i would be very greatfull all i want is a sort of tenplate if you no what i mean? K1 or TSL? TSL's new options make conditionals a snap (depending on what you need) since the dialogues have the ability to look for parameters. Literally, one script can be used for a host of different options and TSL includes alot of pre-made conditional/parameter scripts.. K1, not so much Just in case.. because of TSL's new functionality.. it's often best to use tk102's DLGEditor (I use it no matter what game). Link to comment Share on other sites More sharing options...
Inyri Posted September 28, 2008 Share Posted September 28, 2008 I'm pretty useless with advanced scripting too, although this would probably be considered a basic script. I think some of the tutorials should help you formulate such a script. In fact there are probably some variable scripts in Holowan Labs somewhere if you run a quick forum search. Link to comment Share on other sites More sharing options...
Darth_Andrez Posted September 28, 2008 Author Share Posted September 28, 2008 ok thanks guys ill have a look in tuts but its for K1 Link to comment Share on other sites More sharing options...
Inyri Posted September 28, 2008 Share Posted September 28, 2008 If you need to see some of these scripts in action you're free to look at the dialogue and script files from my recruitment mod. I used the technique extensively. Link to comment Share on other sites More sharing options...
ChAiNz.2da Posted September 28, 2008 Share Posted September 28, 2008 ok thanks guys ill have a look in tuts but its for K1 Pavlos' tutorial I believe sets an example for a 'talked to' type setting. Might want to check it out http://www.lucasforums.com/showthread.php?t=180845 Link to comment Share on other sites More sharing options...
Inyri Posted September 28, 2008 Share Posted September 28, 2008 Oh that's right, I forgot that there are a couple of default game scripts you can use if you don't want to make your own. I believe they're k_con_talkedto and k_act_talktrue. Based on what I told you before I'm sure you can figure out which goes where. Chainz, can you confirm those scripts for me? Been a while since I've used them. Link to comment Share on other sites More sharing options...
Darth_Andrez Posted September 28, 2008 Author Share Posted September 28, 2008 scrap that Link to comment Share on other sites More sharing options...
ChAiNz.2da Posted September 28, 2008 Share Posted September 28, 2008 Chainz, can you confirm those scripts for me? Been a while since I've used them. Now… we’re going to attach some global scripts. These are standard game resources. We’re using them to check if the player has spoken to the NPC beforehand. If your dialogue if for KotOR then type “k_act_talktrue” in the “Script that fires when spoken” field on your first speaker node and then type “k_con_talkedto” in the “Script that determines availability” field. In TSL the principle is the same. Set conditional #1 to “c_talkedto” and set the script #1 field to “a_talktrue.” Any scripts that you ever place in these fields should not have the extension attached. Absolutely correct Link to comment Share on other sites More sharing options...
Darth_Andrez Posted September 28, 2008 Author Share Posted September 28, 2008 OH sorry scrap this post Link to comment Share on other sites More sharing options...
ChAiNz.2da Posted September 28, 2008 Share Posted September 28, 2008 OH sorry scrap this post Not a problem.. we're here to help Take a look at that tutorial though..Pavlos did a wonderful job on it Link to comment Share on other sites More sharing options...
Darth_Andrez Posted September 29, 2008 Author Share Posted September 29, 2008 ok kool hey guys i have decided to make the mod under added content because it will also add a new side quest thanks for help guys ill keep you updated EDIT: Hey guys so i think ive got to grips with it now correct me if im wrong but if put a script like equipt item in script that fires when spoken does that mean that if you put it in the script that determinds availability the dialog branch will only be available if the script has fired? Link to comment Share on other sites More sharing options...
ForeverNight Posted September 29, 2008 Share Posted September 29, 2008 Basically, yes. If you write a conditional script that checks if you have an item, and if fires and returns true, than you will access that dialog branch. If it fires and returns false, then you won't. If the NPC is giving the lines, and the script fires and sees that you don't have the item, then it will go down to the next line of dialog and check what it says to do. If there's no script, then it will just fire the dialog and stop the search for more dialog. Link to comment Share on other sites More sharing options...
Darth_Andrez Posted September 29, 2008 Author Share Posted September 29, 2008 ok thats quite helpful so how do i rite conditional scripts ? Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.