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

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:

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Posts

    • Server has npc buffer but 2nd class donate or make what mid rate server is that...
    • i had sent you in discord i think already the link seen you asking in mobius forum  anyway here you go  https://www.mediafire.com/folder/6oh7l7hf34xr9/C1
    • Hello all.   I have some strange errors on server side and the right bar of Open Beta STORE is not showing anymore after changing server ip.   Errors: [11:34:12] TriggerParser: Exception: l2.gameserver.data.xml.parser.exception.InvalidAttributeValueException: Bypass trigger is calling "classMaster#tryShowIcon" action which is missing! l2.gameserver.data.xml.parser.exception.InvalidAttributeValueException: Bypass trigger is calling "classMaster#tryShowIcon" action which is missing! at l2.gameserver.data.xml.parser.TriggerParser.parseBypasses(Unknown Source) ~[server.jar:?] at l2.gameserver.data.xml.parser.TriggerParser.parseTrigger(Unknown Source) ~[server.jar:?] at l2.gameserver.data.xml.parser.TriggerParser.readData(Unknown Source) ~[server.jar:?] at l2.commons.data.xml.AbstractParser.parseDocument(Unknown Source) ~[server.jar:?] at l2.commons.data.xml.AbstractFileParser.parse(Unknown Source) [server.jar:?] at l2.commons.data.xml.AbstractParser.load(Unknown Source) [server.jar:?] at l2.gameserver.data.xml.Parsers.parseAll(Unknown Source) [server.jar:?] at l2.gameserver.GameServer.<init>(Unknown Source) [server.jar:?] at l2.gameserver.GameServer.main(Unknown Source) [server.jar:?]   java.lang.IllegalArgumentException: Couldn't find Config "closedBeta" in file "shop" at l2.commons.config.ConfigManager.getConfigValue(Unknown Source) ~[server.jar:?] at l2.commons.config.ConfigManager.getObjectValue(Unknown Source) ~[server.jar:?] at l2.ext.closedbeta.ClosedBeta.isBetaTester(ClosedBeta.java:32) ~[?:?] at l2.ext.closedbeta.ClosedBeta$OnEnterWorld.onEnterWorld(ClosedBeta.java:23) ~[?:?] at l2.gameserver.model.actor.listener.PlayerListenerList.onEnterWorld(Unknown Source) ~[server.jar:?] at l2.gameserver.network.l2.c2s.EnterWorld.runImpl(Unknown Source) [server.jar:?] at l2.gameserver.utils.ExecutionRecorder.wrapInPacketExecution(Unknown Source) [server.jar:?] at l2.gameserver.network.l2.c2s.L2GameClientPacket.run(Unknown Source) [server.jar:?] at l2.commons.net.nio.impl.MMOExecutableQueue.run(Unknown Source) [server.jar:?] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) [?:?] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) [?:?] at java.lang.Thread.run(Thread.java:840) [?:?] Caught at: l2.gameserver.network.l2.c2s.EnterWorld.runImpl(Unknown Source)   I am using lucera files, Ertheia version.   Any help would be gladly appreciated. Thank you.
    • u cant change anything in facebook without a password, so my tiktok case wasnt a hijack.
    • Exactly, if somebody hijacks ur sessions, then u wont see a new device in your "Devices List". And with that hijacked session you are able to change whatever you want unless you have 2FA enabled. And I believe changing a group owner doesn't trigger 2FA.
  • Topics

×
×
  • 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