Jump to content

[LE] I just found an incredibly simple technique for making a follower on its own framework!


Recommended Posts

This only makes sense if you already have a basic understanding of quests, dialogue and scripts.

 

 

To make a follower who's NOT on the vanilla framework, there are a few established methods out there, ranging from complex (creating a whole new system of follower factions) to simple (a follow player AI package toggled on/off by a quest stage). I just found a way that's simpler than the simplest one I'd seen before, and testing is going very smoothly.

 

 

Step 1: Add this script fragment to a line of dialogue: akSpeaker.SetPlayerTeammate()

 

Step 2: Put a "follow player" AI package at the top of their stack with a "GetPlayerTeammate" condition

 

 

THAT'S IT.

 

 

To dismiss, you just use a dialogue line with akSpeaker.SetPlayerTeammate(false), and then of course you'll need to add custom lines for stuff like opening inventory, waiting, doing favors, etc. as normal. But all that stuff works perfectly without any quest stages involved at any point. It mostly relies on teammate status anyway.

 

The big advantage is that without setting quest stages, you won't trip up and call stages out of order when you give them actual quests or more complex conditional dialogue.

 

Based on this clean, simple framework, you can make a follower as simple or as complex as you'd like.

 

 

This all seems kind of obvious now, but I spent the past two days googling and looking at tutorials and repeatedly breaking my mod before I figured this out. This does NOT seem to be common knowledge, but it should be. This is far easier than the easiest method I've seen documented anywhere else, and it's completely foolproof. You can't break this like you can with quest stages.

Link to comment
Share on other sites

You can also use the WaitingForPlayer actor value as more than a simple waiting flag. For example, Inigo has multiple AI packages conditioned on it. For Inigo, in addition to the standard 1 means waiting, 2 means relaxing (allowing him to sandbox and prefer clothing to armor), -1 means stop following and go home, 0 means the standard follow mode, and a few other values are used for special cases (that I can't remember right now without looking). Inigo never actually stops being a teammate once you first accept him as a follower so that he can keep wearing the clothing and armor you've given him instead of reverting to an Outfit defined in the CK. (There's a scripting trick involved in getting him to take off his armor while relaxing but the AI part of the sandboxing is handled solely by the WaitingForPlayer value change.)

Link to comment
Share on other sites

  • 2 years later...
  • 3 years later...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...