• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

[Modules] Rekzais OTClient Modules

Rekzai

👹
Joined
Mar 15, 2010
Messages
176
Solutions
5
Reaction score
74
Location
Germany
GitHub
RekzaiSharp

OTClient Modues

I recently started to work with OTClient and are slowly building a collection of modules in my spare time.
You can freely use them in any project and modify it to your liking.
If you find bugs or have improvements, please make sure to create either an issue or a pull request on GitHub.
Please note that all these modules were created for TFS 1.4, and I can't tell if they work for other versions.

Recommended Hunting Places



1719836738830.png

I created this module for Eternal Odyssey, it should help players find hunting places and recommend them places based on their level and skills.
The hunting places are located in your server's scripts directory and get loaded on startup of your server, the server will automatically gather the client IDs and look types of creatures.
Players will receive a packet with the hunting places on Login.


Minimap Party Icons



1719836994868.png

This module helps you keep track of your party members by showing an icon and label on the minimap.
It currently requests and sends data with every step of every party member. This might be taxing on the server, but honestly I have no idea.
If you have a recommendation for a better way of doing this, please let me know, so I can change the code and push an update.



You can find the source for these modules on my GitHub.




I will continue to post new modules depending on how much free time I have. If you have wishes for modules, let me know, so I can take a look into it.
Cheers,
Rekzai
 

OTClient Modues

I recently started to work with OTClient and are slowly building a collection of modules in my spare time.
You can freely use them in any project and modify it to your liking.
If you find bugs or have improvements, please make sure to create either an issue or a pull request on GitHub.
Please note that all these modules were created for TFS 1.4, and I can't tell if they work for other versions.

Recommended Hunting Places



View attachment 85773

I created this module for Eternal Odyssey, it should help players find hunting places and recommend them places based on their level and skills.
The hunting places are located in your server's scripts directory and get loaded on startup of your server, the server will automatically gather the client IDs and look types of creatures.
Players will receive a packet with the hunting places on Login.


Minimap Party Icons



View attachment 85774

This module helps you keep track of your party members by showing an icon and label on the minimap.
It currently requests and sends data with every step of every party member. This might be taxing on the server, but honestly I have no idea.
If you have a recommendation for a better way of doing this, please let me know, so I can change the code and push an update.



You can find the source for these modules on my GitHub.




I will continue to post new modules depending on how much free time I have. If you have wishes for modules, let me know, so I can take a look into it.
Cheers,
Rekzai

Really cool from you to release them for free :D
Thanks mate :D
 

OTClient Modues

I recently started to work with OTClient and are slowly building a collection of modules in my spare time.
You can freely use them in any project and modify it to your liking.
If you find bugs or have improvements, please make sure to create either an issue or a pull request on GitHub.
Please note that all these modules were created for TFS 1.4, and I can't tell if they work for other versions.

Recommended Hunting Places



View attachment 85773

I created this module for Eternal Odyssey, it should help players find hunting places and recommend them places based on their level and skills.
The hunting places are located in your server's scripts directory and get loaded on startup of your server, the server will automatically gather the client IDs and look types of creatures.
Players will receive a packet with the hunting places on Login.


Minimap Party Icons



View attachment 85774

This module helps you keep track of your party members by showing an icon and label on the minimap.
It currently requests and sends data with every step of every party member. This might be taxing on the server, but honestly I have no idea.
If you have a recommendation for a better way of doing this, please let me know, so I can change the code and push an update.



You can find the source for these modules on my GitHub.




I will continue to post new modules depending on how much free time I have. If you have wishes for modules, let me know, so I can take a look into it.
Cheers,
Rekzai
Thanks for the release, you're a beast

Add a donation button :)
 
Thanks! Will try to build a good collection and improve code base soon.
Will probably create an advanced task system, including a task tracker next.
Also have to do a bit of code cleanup and changes to the existing modules.

If you use any module on your server, make sure to either enable notifications or check regularly for changes.
 
I have never been interested in OTC modules, I only compiled it for Android and Windows, am I thinking correctly? for these modules to work, just throw them into modules and add the lua code to the datapack with the server, which e.g. sends information from the server to the client?
I saw canary engine already have function
ExtendedOpcode

Party icons is nice function I like it ! And I will glad when it be work haha
 
Yes, you want to put the modules into your mods folder and the server-side code into your scripts' directory within your data folder.
If you have any issues, you can send me a dm.
 
Good luck with performance of party icons.
Yea, I am still thinking about another way of getting the member position, I don't think the client has information of members that are not on the screen.
Will update the script with a more optimal solution once I found one.

Probably limit the position change on every 5 steps instead of every step and only sending the player's position that is moving instead of everyone's position.
 
Last edited:
Yea, I am still thinking about another way of getting the member position, I don't think the client has information of members that are not on the screen.
Will update the script with a more optimal solution once I found one.

Probably limit the position change on every 5 steps instead of every step and only sending the player's position that is moving instead of everyone's position.
Maybe stop sending position change from the client for one. You have server for this. Send party info when party is created, player joins or leaves. Update position of a member that took a step (again, server side).
You won't do that without server source edits btw.
 
Maybe stop sending position change from the client for one. You have server for this. Send party info when party is created, player joins or leaves. Update position of a member that took a step (again, server side).
You won't do that without server source edits btw.

Thanks for the heads-up, will look into a full server side solution in the coming days and update the source with the needed changes.
 
Yep I agree, client will only update positions received from server, won't ask for positions. Also, you can make it send it each X/sec if position is different from previous position send, if you don't want to spam a lot.
 
Last edited:
When player takes a step, save current time and in an event like onThink check if player took a step in given period, that way you won't spam packets if players have high enough movement speed, and if you save positions to a vector and send that vector, you can simulate steps taken by the player so its not gonna look like the player is teleporting (icon on minimap).

I'm working on party system overhaul and showing party members on minimap will be one of the features so this is how I'm going to do it.

Pseudo code.
Code:
vector<Position> lastSteps
time lastWalk

onWalk()
{
  lastSteps.insert(newPosition)
  lastWalk = time()
  
  if (lastSteps.count() > 10) // send if more than X steps so it wont end up sending too many steps at once
  {
    sendPositions(lastSteps)
    lastWalk = 0
    lastSteps.clear()
  }
}

onProcess()
{
  if (lastSteps.count() > 0 && lastWalk + 100ms < time())
  {
    sendPositions(lastSteps)
    lastWalk = 0
    lastSteps.clear()
  }
}
 
Last edited:
Finally some "free" modules to play around with! (loving the partyicons)
Fiddling around with OTC is still something i'm learning and having these are a great help!
 
Last edited:
Finally some "free" modules to play around with! (loving the partyicons)
Fiddling around with OTC is still something i'm learning and having these are a great help!
I will rework the party module completely and move all the logic and communication towards the client, so the server has no load at all.
Will probably take a few days until everything works completely, but it should be drag and drop then so you have to do no server side modifications!

Have to set up a bot server for this, so clients can communicate over web sockets.

Update:
1720002937393.png
The client now communicates with a separate web socket server and needs no communication to your otserver at all.
I still have to do a few things here and server to ensure stability and edge cases, but this should be the best solution.
Huge shoutout to @martintokio for bringing this solution to my attention.
 
Last edited:
Back
Top