bananakillerBRO Posted September 16, 2017 Share Posted September 16, 2017 So, the idle chatter, I'm not sure how I get this to work. I watched a Seddon tutorial and it says I need to use the "Getquestvariable" "Status". The problem is I didn't use Seddon's tutorial to program this companion, I used cgy95's, so instead of a "Status" I get two other options. "Do once" and "Is hireable". Which one of theses should I use, or will I have to re-script the entire companion? Link to comment Share on other sites More sharing options...
dubiousintent Posted September 16, 2017 Share Posted September 16, 2017 (edited) I think this is simple enough that even I can answer. (If I'm wrong, then we will both learn something.) Don't get too literal with tutorial scripts. They are providing you with examples and teaching you basic concepts. You are then expected to build upon those lessons. Merging something learned in one tutorial into a script based upon another tutorial is normal practice. What is important is understanding why each is needed. "Status" is just a variable you define in a quest script; the same as "DoOnce" and "IsHireable". (Do not use variable names with embedded spaces. The line parser uses spaces to distinguish separate things.) You use it for your own purposes, which in the Seddon's tutorial is apparently (haven't looked) to indicate the current status of an NPC. The 'GetQuestVariable' is a "conditional function" that you can use to test the value of that variable to determine when the "Status" is appropriate for "idle conversation", which makes it suitable to use as a conditional on the topic. You could use any defined quest variable; not just "Status". Consequently, you don't need to completely rewrite your script. Just work out how to incorporate Seddon's use into cgy95's logic flow. -Dubious- Edited September 16, 2017 by dubiousintent Link to comment Share on other sites More sharing options...
Mktavish Posted September 17, 2017 Share Posted September 17, 2017 (edited) In sedon's tutorial ... he uses the variable "Status == 1" because that is when the companion is following.Otherwise the companion would also run the random check to idle chatter during sandboxing or waiting.The important condition is the "GetRandomPercent" " >= " then use global of "FollowerChatterPercentage" So instead of the variable "Status" in sedon's script ... Im guessing cgy95 has a quest variable to indicate "Following" also. Or maybe it is in a script on the NPC ?So that is what you would use. Paste the script here if you can't find it. Edited September 17, 2017 by Mktavish Link to comment Share on other sites More sharing options...
bananakillerBRO Posted September 17, 2017 Author Share Posted September 17, 2017 So So, the idle chatter, I'm not sure how I get this to work. I watched a Seddon tutorial and it says I need to use the "Getquestvariable" "Status". The problem is I didn't use Seddon's tutorial to program this companion, I used cgy95's, so instead of a "Status" I get two other options. "Do once" and "Is hireable". Which one of theses should I use, or will I have to re-script the entire companion? So I can just use either one? Link to comment Share on other sites More sharing options...
bananakillerBRO Posted September 17, 2017 Author Share Posted September 17, 2017 I think this is simple enough that even I can answer. (If I'm wrong, then we will both learn something.) Don't get too literal with tutorial scripts. They are providing you with examples and teaching you basic concepts. You are then expected to build upon those lessons. Merging something learned in one tutorial into a script based upon another tutorial is normal practice. What is important is understanding why each is needed. "Status" is just a variable you define in a quest script; the same as "DoOnce" and "IsHireable". (Do not use variable names with embedded spaces. The line parser uses spaces to distinguish separate things.) You use it for your own purposes, which in the Seddon's tutorial is apparently (haven't looked) to indicate the current status of an NPC. The 'GetQuestVariable' is a "conditional function" that you can use to test the value of that variable to determine when the "Status" is appropriate for "idle conversation", which makes it suitable to use as a conditional on the topic. You could use any defined quest variable; not just "Status". Consequently, you don't need to completely rewrite your script. Just work out how to incorporate Seddon's use into cgy95's logic flow. -Dubious-scn Companion1Script short HasBeenHiredshort L38short DoOnce int CombatStyleRangedint CombatStyleMeleeint IsFollowingDefaultint IsFollowingLongint FollowerSwitchAggressiveint Waiting Begin GameModeIf (DoOnce != 1)Set HasBeenHired to 0Set L38 to 0Set CombatStyleRanged to 1Set CombatStyleMelee to 0Set IsFollowingDefault to 0Set IsFollowingLong to 0Set FollowerSwitchAggressive to 0Set Waiting to 0Set DoOnce to 1EndIfEnd Link to comment Share on other sites More sharing options...
dubiousintent Posted September 17, 2017 Share Posted September 17, 2017 (edited) That script is just setting up your companion's initial "conditions". When do you intend the "idle conversation" to take place: when following (long or default), or "waiting", or only once "hired" or in the Lucky38 (sandboxing)? Each of those is another possible condition, but you may also want to know that they are not engaged in combat or some other activity, in which case you would need additional conditional tests. Mktavish is pointing out that Seddon is using "Status" to indicate the companion is "following" at whatever distance, and that is the only time they should be barking "idle chatter", but even then only randomly. So if you want to follow that example, you would add the "int Status" and "Set Status to 0" line to the script you posted, and then test "Status" in the topic conditional to determine that the companion is both following and combine that with testing the random result was what you wanted for the chance to determine if it was time to bark the conversational line. -Dubious- Edited September 17, 2017 by dubiousintent Link to comment Share on other sites More sharing options...
Mktavish Posted September 17, 2017 Share Posted September 17, 2017 OIC where you are having a confusion between sedon's & cgy95's scripts. The variables "Short" & "Int" are the same for most purposes. So I'm guessing since sedon declared it a short , and cgy95 declared it an "Int" ... you are thinking you have to use the "short" variables in cgy95's script. You definitely don't want to use the "DoOnce" since that is only a stop gate on the "GameMode" block.You could use the L38 to set up idle chatter they only say while in there.You could use the "HasBeenHired" But then this only keeps them from idle chatter before you hire them. But the closest to what sedon is using is the "FollowingDefault" ... I'm guessing the "FollowingLong" is like an enhancement to the FollowingDefault , since it is a separate variable , instead of having 3 states of 1 variable.So therefore if the "FollowingDefault" is on , is all you need for the idle chatter. And they will still chatter with "FollowingLong" But anyways , maybe I should check out cgy95's tutorial , before giving to much advice on that.Could you give a link to it ? Link to comment Share on other sites More sharing options...
Mktavish Posted September 17, 2017 Share Posted September 17, 2017 Each of those is another possible condition, but you may also want to know that they are not engaged in combat or some other activity, in which case you would need additional conditional tests. -Dubious- Not sure but I think the game has built in conditions , where setting up idle chatter in the "Conversation" tab.Will never happen in combat ... So for combat idle chatter , would need to set that up in the "Combat" tab. Link to comment Share on other sites More sharing options...
bananakillerBRO Posted September 17, 2017 Author Share Posted September 17, 2017 (edited) That script is just setting up your companion's initial "conditions". When do you intend the "idle conversation" to take place: when following (long or default), or "waiting", or only once "hired" or in the Lucky38 (sandboxing)? Each of those is another possible condition, but you may also want to know that they are not engaged in combat or some other activity, in which case you would need additional conditional tests. Mktavish is pointing out that Seddon is using "Status" to indicate the companion is "following" at whatever distance, and that is the only time they should be barking "idle chatter", but even then only randomly. So if you want to follow that example, you would add the "int Status" and "Set Status to 0" line to the script you posted, and then test "Status" in the topic conditional to determine that the companion is both following and combine that with testing the random result was what you wanted for the chance to determine if it was time to bark the conversational line. -Dubious- Edited September 17, 2017 by bananakillerBRO Link to comment Share on other sites More sharing options...
bananakillerBRO Posted September 17, 2017 Author Share Posted September 17, 2017 OIC where you are having a confusion between sedon's & cgy95's scripts. The variables "Short" & "Int" are the same for most purposes. So I'm guessing since sedon declared it a short , and cgy95 declared it an "Int" ... you are thinking you have to use the "short" variables in cgy95's script. You definitely don't want to use the "DoOnce" since that is only a stop gate on the "GameMode" block.You could use the L38 to set up idle chatter they only say while in there.You could use the "HasBeenHired" But then this only keeps them from idle chatter before you hire them. But the closest to what sedon is using is the "FollowingDefault" ... I'm guessing the "FollowingLong" is like an enhancement to the FollowingDefault , since it is a separate variable , instead of having 3 states of 1 variable.So therefore if the "FollowingDefault" is on , is all you need for the idle chatter. And they will still chatter with "FollowingLong" But anyways , maybe I should check out cgy95's tutorial , before giving to much advice on that.Could you give a link to it ? Link to comment Share on other sites More sharing options...
Recommended Posts