Jump to content

Recommended Posts

Posted

Hi guys, I'm kinda new here. Was it ever discussed a way to expose an API that has values like objects around the player, player status, object status, quest log, etc? I mean, all info that a player would get by playing normally?

 

I wanna train an AI that uses it so I can create my personal local server with hundreds of independent AI players, but I'm having trouble with the java code.

 

Any tips? I have the L2J Mobius Interlude server.

 

Thanks!

Posted

I know a guy who did this but as i told him bots dont generate donations, they offer replies and character learning and adapting to replies, for a small server of 10 players might work, but the resources you need are big, i made a python integration in my AI to use API for I/O and learning by the information it gets but the cost of the server ultimately defeats the porpuse unless you are looking into a SaaS model.

 

:poker: making an AI server for a 20 year old game sounds promising

:kim:

Posted (edited)
2 hours ago, Nightw0lf said:

I know a guy who did this but as i told him bots dont generate donations, they offer replies and character learning and adapting to replies, for a small server of 10 players might work, but the resources you need are big, i made a python integration in my AI to use API for I/O and learning by the information it gets but the cost of the server ultimately defeats the porpuse unless you are looking into a SaaS model.

 

:poker: making an AI server for a 20 year old game sounds promising

:kim:

 

I figured as much ahaha! But keep in mind that this is purely for personal enjoyment and non profitable. I'm even considering getting a big boy PC just to run this!

 

Anyway, I kinda made progress. Created a "ApiServer.java" file to expose some classes and added it to the "ServerPackets.java" file. Sadly now it's gonna be a pain in the arse to study all the classes...

Edited by masses
Posted
1 hour ago, masses said:

 

I figured as much ahaha! But keep in mind that this is purely for personal enjoyment and non profitable. I'm even considering getting a big boy PC just to run this!

 

Anyway, I kinda made progress. Created a "ApiServer.java" file to expose some classes and added it to the "ServerPackets.java" file. Sadly now it's gonna be a pain in the arse to study all the classes...

Why not just query the database? No need for a server side mod if its not going too much into detail.

Posted
4 hours ago, Splicho said:

Why not just query the database? No need for a server side mod if its not going too much into detail.

 

I really want the AI to interact with the server as if it was a player. That involves de gameserver knowing and treating the AI instance as a player! I don't know if I can replicate that with database queries, honestly. But that's a nice tip that I might follow if everything else fails.

Posted
2 hours ago, masses said:

 

I really want the AI to interact with the server as if it was a player. That involves de gameserver knowing and treating the AI instance as a player! I don't know if I can replicate that with database queries, honestly. But that's a nice tip that I might follow if everything else fails.

And what model you wanna train? LLMs can't do that.

Posted (edited)

I suggest logging real player data such as positions, movement, quests, skills used in real time, and general actions and save them in whatever format you like. You need to organize and verify the data. If your data are not enough you can create synthetic data based on your existins real data. later you have 2 options 

You can fine tune a smaller model (for example, from hugging face). This requires time, money(compute power), and plenty of trial and error, but the benefit is that you can run it locally without relying on external services.

Use existing LLMs and  instead of training you can store your data in a vector database and let the LLM query it( im not sure if RAG is the right term here). This approach is faster to set up but depends on the model  and the output you want to achieve(you will need some research there).

Regardless of which approach you take  you should expose only safe actions through a service or API. This can be done with MCP(model context protocol) or a custom api ensuring the model (local or external) can only trigger controlled api calls such as movePlayer, castSkill, etc etc, which are already implemented in most sources, but you will need to implement them for your models output and behavior. 

 

Doable? Yes by commiting  a tone of hours and i dont think java code is the problem here.
Is it worth it? If you’re doing it to learn then go for it. But if your goal is to create “real fake player” experience on your server or to sell it later  its not worth it. Spend your time elsewhere

 

1 hour ago, Splicho said:

And what model you wanna train? LLMs can't do that.


yes they can

Edited by Seamless
Posted (edited)
2 hours ago, Seamless said:

yes they can

LLMs can just return text, and maybe tool calls (read write etc) no ?

Wouldn't you need a parser or something that translates the returned text to instructions, e.x move player here, cast skill there?

 

Sounds like a pain in the ass + a lot API costs.

Edited by Splicho
Posted
4 minutes ago, Splicho said:

LLMs can just return text, and maybe tool calls (read write etc) no ?

Wouldn't you need a parser or something that translates the returned text to instructions, e.x move player here, cast skill there?

 

Sounds like a pain in the ass + a lot API costs.

correct. for example with semantic kernel sdk that exists also for c# and java you can do all sorts of things. even orchestrate an llm to call classes and manipulate objects or even execute database queries. you can literally simulate a real player process on a loop. and yes its costly if you use services like azure. but you can find cheaper alternatives or even free if you brave enough and have time

Posted

Thanks a lot for the very interesting responses! To clarify, this is only for personal learning and use, I don't plan on earning any money!

Posted

as you said expose connections in the server and create a communication with your AI, ironically an AI can help you do excactly that, all you need is your time i dont think you can get any help on discovering something that dont exist out of the box, thats the history with emulating l2->j in general thats what people, here you can find only positive and sometimes toxic responses, just go ahead and do stuff

:kim:

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock