dianacat777 Posted September 1, 2012 Share Posted September 1, 2012 So I'm a new modder, still pretty wet around the ears. But I've managed to cobble together some rudimentary quests, dialogue trees, triggers, et cetera, so I'm mildly competent at this point. However, I've got a few things that I can't get to work. Most important at the moment is that my WIP companion works off a series of loyalty/hatred points. Loyalty eventually opens up a quest and perks, and pissing him off enough eventually gets him to leave and attack you (and certain actions are an automatic leave). Except it doesn't. Here's what I have. Begin GameMode if (AlexRef.IsAngryWithPlayer >= 5) Set AlexRef.IsFuriousWithPlayer to 1 EndifEnd Begin GameMode if (AlexRef.IsFuriousWithPlayer == 1) SetEssential FollowerAlex 0 AlexREF.StartConversation Player FollowerAlexAlexHasHadEnough AlexRef.RemoveFromFaction PlayerFaction SetFactionReaction AlexMercerFaction PlayerFaction -100 EndifEnd The conversation triggered finishes the rest of those pieces, with; ShowMessage AlexMessageFuriousSet AlexREF.Waiting to 0Set AlexREF.HasBeenHired to 0Set AlexREF.Hireable to 0Set AlexREF.L38 to 0Set AlexREF.IsFollowingDefault to 0Set AlexREF.IsFollowingLong to 0AlexREF.SetPlayerTeammate 0AlexREF.RemovePerk AlexLoyaltyPerkAlexREF.evp But it doesn't seem like the first trigger is getting hit at all, because no conversation is initiated, even when I do things that would put him into the Furious state. Could a more experienced modder point out any issues in my scripts here? Thanks. :3 Link to comment Share on other sites More sharing options...
viennacalling Posted September 1, 2012 Share Posted September 1, 2012 Sounds like AlexRef.IsAngryWithPlayer is not hitting 5. When you do things that you believe would put him into the Furious state, do an sqv <quest ID> in the console and check what the value of IsAngryWithPlayer really is. Link to comment Share on other sites More sharing options...
dianacat777 Posted September 1, 2012 Author Share Posted September 1, 2012 I have certain actions that directly set IsFuriousWithPlayer to 1, which are the ones I've been testing with, and nothing's happening. :/ Sqv? That would actually be really helpful, if I could change/check mod attributes ingame. How exactly is that done? Link to comment Share on other sites More sharing options...
RogerIrrelevant Posted September 1, 2012 Share Posted September 1, 2012 In both your GameMode blocks, whilst they are active they will be continuously running the same bit of code Begin GameMode if (AlexRef.IsAngryWithPlayer >= 5) Set AlexRef.IsFuriousWithPlayer to 1 EndifEnd This one will continuously set AlexRef.IsFuriousWithPlayer to 1 to stop that happening repeatedly put in a condition to only do it when alex isnt furious eg:if (AlexRef.IsAngryWithPlayer >= 5) && ( AlexRef.IsFuriousWithPlayer == 0 ) Your next GameMode will constantly try to start the convo (and is probably why its never starting) you can cure it by incrementing AlexRef.IsFuriousWithPlayer at the end so that it invalidates the if statement and stops it running repeatedly thus: Begin GameMode if (AlexRef.IsFuriousWithPlayer == 1) SetEssential FollowerAlex 0 AlexREF.StartConversation Player FollowerAlexAlexHasHadEnough AlexRef.RemoveFromFaction PlayerFaction SetFactionReaction AlexMercerFaction PlayerFaction -100set AlexRef.IsFuriousWithPlayer to 2 ;this will stop the startconversation being repeatedly calledEndifEnd Of course it may not be this and may be an artifact of where these gamemode blocks are. I'll stop rambling now Link to comment Share on other sites More sharing options...
dianacat777 Posted September 1, 2012 Author Share Posted September 1, 2012 Thank you, that's extremely helpful. I've tried to close a lot of loops, but clearly I've still got work to do. Ooh, maybe that's why this one other trigger convo isn't happening, either. Link to comment Share on other sites More sharing options...
dianacat777 Posted September 1, 2012 Author Share Posted September 1, 2012 I hate to double post, but... curiously enough, I can't get Alex to actually attack the player, even though the rest of the furious script works. He'll attack if attacked, but he won't initiate combat. Can anyone see any problems, or identify what might be a problem? I might add, there's a StartCombat trigger at the end of the Furious dialogue - starts on end. Link to comment Share on other sites More sharing options...
RogerIrrelevant Posted September 2, 2012 Share Posted September 2, 2012 NPcs need to be agressive or Very agressive in order to attack facation enemies The simplest solution though is to add this to your conversation result script: StartCombat Player whereupon alex will attack. Link to comment Share on other sites More sharing options...
dianacat777 Posted September 2, 2012 Author Share Posted September 2, 2012 I did, and he is aggressive. Result script is this; Begin block; ShowMessage AlexMessageFuriousSet AlexREF.Waiting to 0Set AlexREF.HasBeenHired to 0Set AlexREF.Hireable to 0Set AlexREF.L38 to 0Set AlexREF.IsFollowingDefault to 0Set AlexREF.IsFollowingLong to 0AlexREF.SetPlayerTeammate 0SetFactionReaction AlexMercerFaction PlayerFaction -100SetFactionReaction PlayerFaction AlexMercerFaction -100AlexREF.RemovePerk AlexLoyaltyPerkAlexREF.evp End Block; AlexRef.StartCombat Player He becomes unhireable and ceases to act as a teammate, but he doesn't attack. Link to comment Share on other sites More sharing options...
RogerIrrelevant Posted September 3, 2012 Share Posted September 3, 2012 As the end resultscript, try just using resetaistartcombat player The resetai command is useful to make the npc throw away whatever it is they are doing. You also don't need to specify AlerRef, since the appropriate npc is implicity defined as the subject of the conversation (i.e. the one you are talking to) Link to comment Share on other sites More sharing options...
dianacat777 Posted September 3, 2012 Author Share Posted September 3, 2012 (edited) Handy. I'll try that. Thanks for the help. Edit: Still won't attack. What might be causing this? Edited September 3, 2012 by dianacat777 Link to comment Share on other sites More sharing options...
Recommended Posts