rughar123 Posted July 24, 2018 Share Posted July 24, 2018 (edited) Hi everyone. There is an in-game comand you can place on your follower and execute into some target. Namely you can give a comand for kill something or grab an item etc to your follower. I am trying to run command "attack" on reffered actors (actor and victim) with the same behaviour (however, another follower commands will be handy too). To be more specific, i just want to execute this routine by script started in MagicEffect between akCaster and akTarget during event OnEffectStart (so i dont want to start behavior where you need to specify your targets ingame but i want to have some specific MagicEffect to do this job). My suggestion is that there is some Quest with two ReferenceAlias (protagonist and victim) with package where protagonist do some "follow" routine into victim location. And that Aliases are probably set to somethiug like "follower" and "followerCommand" or similar. So the only thing i need to is to change Actors in these ReferenceAlisases into some another actors. Something like... protag.ForceRefTo(akCaster) victim.ForceRefTo(akTarget) akCaster.EvaluatePackage(true) Or something like that (i am not sure about that EvaluatePackage command, i am not very experienced with handeling packeges...) But here is my problem. I just cannot find that Quest that do this. I expect this somewhere in quest list in fallout4.esm but literally i just cant find anything even similar. Do you have any idea where is that "Follower Command" for attack actually hiden? (in Creation Kit) I allready tried to write my own Quest and Packege but im not very succesfull with that. So if you are experencided with packages and know how to create something similar, any advice will be extremely helpfull as well. I am trying to obtain exactly same bahavior as "follower command - attack" becouse (geez!) it has signifantly far better behavior than any of my try to make my own package. Note: I am not very stisfied with PathToReference(). It is obvious that this kind of command will be interrupted by tons of another actions. So thats why there are packeges (to protect run any command with low priority or with specific flags). Theoretically it should work but only in the case where you wipe literally all packeges (by some EnebleUI(false)) from actor behaviors and write own system of priorities in scripts (which is probably literally impossible in any more complicated system like ordinary combat). I allready find that PathToReference() works on your follower only if you place him into "Stand" stance before and will be interupted by any of follower command or even some autonomy in-combat action. Edited July 24, 2018 by rughar123 Link to comment Share on other sites More sharing options...
Magicockerel Posted July 25, 2018 Share Posted July 25, 2018 I'm not saying that it's impossible to achieve what you're looking to do here, but the follower/companion commands feature could very well be hard-coded into the game (like a lot of other things). I was looking into ranged activate choices at one point, and so I had a look at how the Intimidation/Wasteland Whisperer/Animal Friend perks worked. Turns out applying the GetInIronSights condition to perks extends the range of activate choices. But, it's inconvenient that you have to be in iron sights. So, I looked into how the companion commands feature worked, and I was never able to find anything in the CK. If you have any luck, I'd be interested in what you find, but I never found anything myself. Link to comment Share on other sites More sharing options...
NikaCola Posted July 25, 2018 Share Posted July 25, 2018 I really can't be 100% sure about this, but I think I remember seeing something about this in the default "followersscript" Maybe that could be a place to look at this sort of thing? edit: I found this? ;Companion command interface commands Event ReferenceAlias.OnCommandModeGiveCommand(ReferenceAlias akSender, int aeCommandType, ObjectReference akTarget) ; aeCommandType: Type of Command that is given, which is one of the following: ; ; 0 - None ; 1 - Call ; 2 - Follow ; 3 - Move ; 4 - Attack ; 5 - Inspect ; 6 - Retrieve ; 7 - Stay ; 8 - Release ; 9 - Heal Link to comment Share on other sites More sharing options...
rughar123 Posted July 25, 2018 Author Share Posted July 25, 2018 Thank you for responses. Sadly, all your hints leads to actions which is related to some side actions only (Dogmeat barking, Player/Follower dialogues ...) There is just one command i found related to commanding your folower: SetCommandState(bool onoff)which just turn on on/off actor into listening your command state with condition you are pointing at him with corsshair. There is also another command SetDoingFavor(bool onoff)which turn on/off command state even if you are not pointing on that actor. This one is actually not used in Vanilla game and its probably made for mod purposes only or for never relized idea by devs to command your follower even if you are not pointing on him. There are also two kinda weird commands FollowerWait() FollowerFollow()Which are not exactly the same as your ordinary "stay" or "follow" comands in-game. This two just place your companion in to state where he refuse to follow you or not. So If you execute FollowerWait() he will stand on their position and your in-game action is unable to change that. Howevever he listen to your "go there command". FollowerFollow() command is something like turning that FollowWait() status off. So it seems that attack or similar follower actions are really hardcoded. Its reasonable to keep hardcoded behavior of setting followers commands. But what is little bit strange for me is that after you place your command, the reaction is hardcoded too! It doesnt make sense to me so there are two possibilites: 1) It actually make some sense and so its really hardcoded2) I just didnt found that package yet. Still hope in that second option... :D Link to comment Share on other sites More sharing options...
Recommended Posts