Author Topic: AiConnection alternative  (Read 1125 times)

Is there an alternative to the now-removed AiConnection class?

I used AiConnections to give some persistence to bots in minigames. For example, if the bot's AiPlayer died, the bot's objectives would still be stored on the AiConnection.

Having an AiConnection class that inherited from GameConnection also allowed me to very easily add bots to my minigames and have them interact with the game in the exact same way as regular clients. What was the purpose of removing this?

Is there an alternative? If not, is there a way to make ScriptObjects inherit from GameConnection? If not that, is it safe to make my own GameConnection objects?

Why do you need an AiConnection in the first place? Can you not store "objectives" in either global variables or in a regular scriptobject?

The most important part isn't the persistence, it's the inheritance. My bots interacted with Slayer minigames exactly as human players would (because AiConnection inherited from GameConnection), and now they can't do that.

The alternative is a ScriptObject. You'll need to implement a more generic interface to working with minigame members that internally abstracts that away.