bananakillerBRO Posted February 1, 2018 Share Posted February 1, 2018 So, this is my second time making a companion mod. For some reason my new companion's firing script just won't work, despite everything seeming to be where it needs to be. The package conditions are in the right place, with the right variables, and the scripts match the previous companion's. I can't really pinpoint what's going wrong, can someone help? I'll post his scripts to be safe. Set Companion1REF.Waiting to 0Set Companion1REF.HasBeenHired to 0Set Companion1REF.L38 to 0Set Companion1REF.IsFollowingDefault to 0Set Companion1REF.IsFollowingLong to 0Companion1REF.SetPlayerTeammate 0Companion1REF.evp 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 scn Companion1QuestScript short bCompanion1Hireableshort bCompanion1DoOnce Begin GameModeif (bCompanion1DoOnce != 1)Set bCompanion1Hireable to 1Set bCompanion1DoOnce to 1EndIfEnd Link to comment Share on other sites More sharing options...
EPDGaffney Posted February 1, 2018 Share Posted February 1, 2018 Your scripts aren't exactly like the vanilla companions but that doesn't mean they're wrong. My guess is you need to double-check your packages again. You're missing some class of a Fired variable, but that doesn't necessarily mean you haven't fulfilled its function in some other way. If you don't find anything wrong with the packages, try testing in-game and using the console to check your variables when they should change. SQV for quests, and SV for actors and objects. Link to comment Share on other sites More sharing options...
bananakillerBRO Posted February 1, 2018 Author Share Posted February 1, 2018 Your scripts aren't exactly like the vanilla companions but that doesn't mean they're wrong. My guess is you need to double-check your packages again. You're missing some class of a Fired variable, but that doesn't necessarily mean you haven't fulfilled its function in some other way. If you don't find anything wrong with the packages, try testing in-game and using the console to check your variables when they should change. SQV for quests, and SV for actors and objects.I took a few screenshots, they look fine to me. They just won't trigger. Everything look okay from your end? https://imgur.com/yAKRbu5https://imgur.com/yMA2Khzhttps://imgur.com/K81vXcx Link to comment Share on other sites More sharing options...
EPDGaffney Posted February 1, 2018 Share Posted February 1, 2018 (edited) I would need a bit more than that. Can you screenshot all his AI packages and all their conditions? May be best if you just expand the columns fully. What is not working about this? He does get this dialogue, correct? He just doesn't stop following you? Does the companion wheel keep working after you say that dialogue that's meant to fire him? If you mean that he doesn't get that dialogue option, then it's not the packages. If he does get that dialogue option, open the console after the conversation is done, and click on him and enter SV. This will show you his script variables. Are they all what they should be after firing him? Also, GetCurrentPackage is a good console command to run on him. Check the GECK for the ID of it. Remember that the first two digits are your mod index, which is different in the GECK, so you're looking to match just the rest of the number, unless the mod index is 00 or ff, indicating either a vanilla package or a dynamically generated one, respectively. If you have JIP, GetCurrentStablePackage should be run as well. It may or may not return an identical ID. Edited February 1, 2018 by EPDGaffney Link to comment Share on other sites More sharing options...
Mktavish Posted February 2, 2018 Share Posted February 2, 2018 I'm just wondering about the script you posted ... this part ... Set Companion1REF.Waiting to 0Set Companion1REF.HasBeenHired to 0Set Companion1REF.L38 to 0Set Companion1REF.IsFollowingDefault to 0Set Companion1REF.IsFollowingLong to 0Companion1REF.SetPlayerTeammate 0Companion1REF.evp ~~~~~~~~~~~~~~~ Is this seriously the start of the script ... then after is the scn ? Link to comment Share on other sites More sharing options...
EPDGaffney Posted February 2, 2018 Share Posted February 2, 2018 That I assume is the result script for the firing dialogue. Link to comment Share on other sites More sharing options...
madmongo Posted February 2, 2018 Share Posted February 2, 2018 (edited) bCompanion1Hireable gets set to 1 initially by the NPC's script but it's not used for the firing script. I assume this gets set to 0 when the companion gets hired? Depending on how this is used, you may want to set it back to 1 when the companion is fired. What AI package is the NPC running when not hired? Do they have a non-hired AI package? You can make something like a sandbox with a condition of Companion1REF.HasBeenHired == 0. A companion that doesn't have an AI package when they aren't hired will probably just stand there waiting before they are hired, but if they are fired they may end up continuing to follow the player if they can't find any other AI package to run. Edit - I should have looked at the screen shots. Heh. What's the 2nd condition on the Go Home AI package? Edited February 2, 2018 by madmongo Link to comment Share on other sites More sharing options...
bananakillerBRO Posted February 2, 2018 Author Share Posted February 2, 2018 bCompanion1Hireable gets set to 1 initially by the NPC's script but it's not used for the firing script. I assume this gets set to 0 when the companion gets hired? Depending on how this is used, you may want to set it back to 1 when the companion is fired. What AI package is the NPC running when not hired? Do they have a non-hired AI package? You can make something like a sandbox with a condition of Companion1REF.HasBeenHired == 0. A companion that doesn't have an AI package when they aren't hired will probably just stand there waiting before they are hired, but if they are fired they may end up continuing to follow the player if they can't find any other AI package to run. Edit - I should have looked at the screen shots. Heh. What's the 2nd condition on the Go Home AI package?This is the second package. https://imgur.com/f8gXuhi Link to comment Share on other sites More sharing options...
bananakillerBRO Posted February 2, 2018 Author Share Posted February 2, 2018 I'm just wondering about the script you posted ... this part ... Set Companion1REF.Waiting to 0Set Companion1REF.HasBeenHired to 0Set Companion1REF.L38 to 0Set Companion1REF.IsFollowingDefault to 0Set Companion1REF.IsFollowingLong to 0Companion1REF.SetPlayerTeammate 0Companion1REF.evp ~~~~~~~~~~~~~~~ Is this seriously the start of the script ... then after is the scn ? I mean...it worked for Stimpak. Link to comment Share on other sites More sharing options...
dubiousintent Posted February 2, 2018 Share Posted February 2, 2018 Have you tried adding "AddScriptPackage <GoHome>" and an ".evp" command to the "Result Script"? While you have set the "Not Hired" conditions, you seem to be waiting for the default package evaluation interval (up to 10 seconds) to determine when to re-evaluate the packages. At that time it will work down through the list of packages until it finds the first where all the conditions are "true". More than likely that will be an idle package and never get to your "GoHome" package. -Dubious- Link to comment Share on other sites More sharing options...
Recommended Posts