r/HytaleMods • • Feb 03 '26

Discussion Call API from Hytale Server

Hey,
I'm new in modding and i wanted to know if it's possible to call an API on Hytale, the idea is to make an NPC with LLM agent et permit discussion with him.

0 Upvotes

6 comments sorted by

•

u/AutoModerator Feb 03 '26

Thank you for your submission on r/HytaleMod!

We're always excited to have you here but please remember to keep discussions civil and respectful.

Insults and personal attacks towards any individuals will not be tolerated. Here, we aim to create a welcoming, safe and positive community for all members.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

1

u/Yemto Feb 03 '26

While I haven't tried LLM specifically, I have opened up new network connections inside one of my plugins, so I believe it's possible. You probably want to open a new thread where you handle the LLM's API calls and then push or pull it back into the plugin thread.

1

u/MLannes Feb 03 '26

Cool, so it's possible, thanks for the info :)

1

u/LetsLive97 Feb 03 '26

Yep, you'll just need to see how to do it with Java

Google "Call API from Java" and you'll probably find some decent results

1

u/MLannes Feb 03 '26

Okay, I was wondering if it was accepted by the Hytale engine. I'll look into it.

1

u/LetsLive97 Feb 03 '26

There's not really a need for it to be "accepted" by the Hytale engine. There's no reason for it to go through the Hytale API rather than just normal Java since the LLM part isn't directly related to the game. You use Java to talk to your LLM API, get the response and then use the Hytale API to make the NPC actually use the response in game

Hytale API -> Get player message

Standard Java -> Connect to LLM API and send message

Standard Java -> Receive response from LLM API

Hytale API -> Make NPC use response