We are just theory-crafting at the moment, so there is no code to show. What we would like to do is something along the lines of;
- Player needs to interact with map NPC
- Player is given a personal persistant instance of that NPC that follows them
- NPC is disposed after fulfilling requirements
At a flow level it would be something like;
- Client -> SFS2X Extenstion Handler -> RequestNPC
- SFS2X -> External Svc. -> Generate NPC Instance
- External Svc. -> Login to SFS2X with Generated Credentials
- SFS2X (Custom Login Handler) -> Login and mark as NPC
- SFS2X (OnJoinZone) -> Allocate NPC to Player
- Proceed as normal
Why do we want to do this? We want to be able to treat the NPCs and Players equally when it comes to things like AOI, Server to Client Events, and AI "Client" Extension requests and processing (Cloud level scaling for AI processing). From what we saw we weren't able to allocate a session to an NPC, nor can we manually mark a user as an NPC.
We could just use the UserVars to mark the allocated User as an NPC, but we wanted to stay within the SFS2X system in case it became important to ensure that SFS2X knows this is an NPC user.
Is there an accepted method of doing this?
Is it actually important to let SFS know this user is an NPC?
Thanks in advance