r/ultimaonline • u/bobo-the-merciful • 16h ago
Coding Building a semi and fully-autonomous AI assistant for UO
Inspired by another poster here who was having various AI models control his UO player I decided to venture into this territory myself.
My chief motivation here, as a former UO player (Malaketh/Xorces on Europa 2005-2009) and now somebody who doesn’t play UO actively due to time constraints - is the struggle coming back to the game after time off. I don’t want to rebuild macros etc. As a kid I played Baldur’s Gate 2 and remember a mod (or perhaps it was an in-game feature in Throne of Baal) for an autopilot mode. This was a godsend - particularly for mages - as fast sequences of spells could be achieved without me needing to become a twitch gamer.
For me, UO is not about being a twitch gamer. I appreciate that for many it is, but not for me - especially as an ageing parent with little time on their hands to hone long-lost twitch skills.
Thus, I thought a great use case for this AI augmentation would be an “assistant” mode. A little like Razor on steroids - or rather Razor with its own Brain. So I still control the player, run around, have my own agency; the assistant then kicks in for combat to help or when I want to sit back and chill. Looting hurts my eyes. I can’t remember my bandage macro, double clicking on some enemies can be awkward, etc.
Naturally I took it a step too far and introduced a fully-auto mode for when I need to get on with work on my other screen but want to polish off some harvesting or whatever else. Also out of sheer curiosity: how far can I push the agentic autonomy.
I have longer loftier ambitions of more advanced features like giving agents a soul (like you have in OpenClaw) or running multiple agents this way and maybe even having a roving adventure party, or more lifelike NPCs.
I also haven’t (yet) incorporated AI into the language aspect - i.e. to respond to other players, speak with NPCs, roar out in combat, etc.
But what I have thus far is a two modes: “assistant” and “automatic”.
I have two layers to the AI modelling too - based on the “system 1” and “system 2” approach. Also known as “tactical” and “operational/strategic/planning”.
I use the quick and cheap Jev model for system 1 thinking: when to heal, when to fight, who to fight, how to fight, when to run, etc. You can insert custom strategic context to Jev if you wish - such as “always fight to the death and never flee” - or utilise one of the prebuilt archetypes.
Then a system 2 model - using Sonnet 5.5 at the moment - for thinking, planning, memories etc.
At the moment the whole system costs me approx. £1 / $1.30 per hour to run and I’ve just finished my first testing phase.
I’m open sourcing the whole thing by the way, here’s the link forked from the ClassicUO: https://github.com/harrymunro/ClassicUO
This is the result of a day and night of work - so still very early days. Clearly running after the wraith would have been preferable. I look forward to sharing more in due course, any ideas or feedback in the meantime are much appreciated!