Follower Integration - ProbablyManuel/requiem GitHub Wiki
Requiem has a centralized script system to handle followers from third-party mods. After registering them once, they can be used in more advanced features like e.g. the lockpicking system.
A NPC must satisfy two conditions to be considered as a follower by Requiem:
- be in a known Reference Alias
- be in the faction
00084D1B <PlayerFollowerFaction>
Requiem by default only checks the follower contained in the alias Follower
from 000750BA <DialogueFollower>
, but you can register additional aliases to be checked.
Requiem supports up to 30 aliases to check and can detect up to four current followers.
Registering a Follower Alias
To register an Alias for searching followers, you only need to make a simple script call in your mod's setup.
Requiem has a quest xx82F3AF <REQ_Quest_FollowerControl>
which contains the script REQ_FollowerRegistration
.
To register your alias, just call the function RegisterFollowerAlias(ReferenceAlias toRegister)
on the script running on this quest. The function returns True if the registration was successful, otherwise it returns False and writes the reason to the papyrus log files.
The registration is permanent, i.e. you only need to run this command after the initial setup of your mod.
If you try to register your follower alias directly after a new game has been started, the function call may fail because the management script is not ready yet. In such scenarios you should retry the registration after waiting for some time.
Unregistering a Follower Alias
To support proper upgrading and deinstallation, the aforementioned system also has an unregister function. To remove your alias from the list of aliases to search, simply call UnregisterFollowerAlias(ReferenceAlias toUnregister)
. Just as with the registration function, this one returns True if the unregistration was successful, otherwise it returns False and writes the reason to the papyrus log files.