- What is otclient?
- 🚀 Features
- The Mobile Project
- 🔨 Compiling
- 🐳 Docker
- 🩺 Need help?
- 📑 Bugs?
- ❤️ Roadmap
- 💯 Support Protocol
- ©️ License
- ❤️ Contributors
Otclient is an alternative Tibia client for usage with otserv. It aims to be complete and flexible, for that it uses LUA scripting for all game interface functionality and configurations files with a syntax similar to CSS for the client interface design. Otclient works with a modular system, this means that each functionality is a separated module, giving the possibility to users modify and customize anything easily. Users can also create new mods and extend game interface for their own purposes. Otclient is written in C++20 and heavily scripted in lua.
For a server to connect to, you can build your own with the forgottenserver or canary.
Note
Based on edubart/otclient Rev: 2.760
Beyond of it's flexibility with scripts, otclient comes with tons of other features that make possible the creation of new client side stuff in otserv that was not possible before. These include, sound system, graphics effects with shaders, modules/addons system, animated textures, styleable user interface, transparency, multi language, in game lua terminal, an OpenGL 2.0 ES engine that make possible to port to mobile platforms. Otclient is also flexible enough to create tibia tools like map editors just using scripts, because it wasn't designed to be just a client, instead otclient was designed to be a combination of a framework and tibia APIs.
-
Details of optimizations with respect to OTClient by edubart:
-
C++20 ( v17 , Unity build and Manifest Mode (vcpkg.json) ) build in x32 and x64
-
Asynchronous texture loading
-
i ) Description: with this the spr file is not cached, consequently, less ram is consumed.
-
ii ) Video
Asynchronous.texture.loading.mp4
-
-
Multi-threading
-i ) Description:
[Main Thread]
- Sound
- Particles
- Load Textures (files)
- Windows Events (keyboard, mouse, ...)
- Draw texture
[Thread 2]
- Connection
- Events (g_dispatcher)
- Collect information on what will be drawn on the Map
[Thread 3]
-
Less memory usage
- i ) Description:
highlightingPtr to stackPos new async dispatcher (using bs thread_pool) optimized updateChildrenIndexStates & updateLayout removed ThingTypePtr scoped object to raw pointer shaderPtr to shaderId and multiple optimizations
- i ) Description:
-
New Lighting System with Fading
- i ) Video
Lighting.Fading.mp4
-
Walking System Improvements
-
Supports sequenced packages and compression
-
Asserts load (Tibia 13)
-
Improvements UIWidgets
-
i ) Description:
[UIWidget] Improvements in the UI algorithm, with that we had a better performance in >add, remove and reposition widgets, it is possible to see these improvements >through the battle module. -
ii ) Video
UIWidget.Control.Optimized.mp4
-
-
Force Effect Optimization
- i ) Description : will avoid drawing effects on certain occasions
-
updated libraries
-
-
Attached Effects System (to create aura, wings...)
-
Compatible with .Apng
- ThingCategoryEffect
- ThingCategoryCreature
- ThingExternalTexture: are images in Png | Apng
-
Example Code: (code sample: effects.lua, code test)
-
Example specific settings for lookType X outfit_618.lua
- you have an AttachdEffect X, it has a standard offset, but in the daemon it's all skewed, so you use ThingConfig to adjust the effect specifically for the desired looktype.
-
ThingCategory Attached Effect | Texture(Png) Attached Effect | Particule |
-
Floor Shadowing
-
Highlight Mouse Target (press shift to select any object)
-
Floor View Mode (Normal, Fade, Locked, Always, Always with transparency)
-
Floating Effects Option
-
Refactored Walk System
-
Support for more mouse buttons, for example 4 and 5
-
Module Controller System
a safer way to create modules, without the need to unbind keys, disconnect events, or destroy widgets.
-
Client 12.85 ~ 12.92, 13.00 ~ 13.40 support (protobuf)
-
Market has been rewritten compatible with tfs and canary
-
Async Texture Loading
-
Support Negative Offset (.dat)
-
compatible with ObjectBuilderV0.5.5
-
need enable this feature:
g_game.enableFeature(GameNegativeOffset)
-
Video
offsets.mp4
-
-
Creature Information By UIWidget
- to enable: setup.otml
- To style: modules/game_creatureinformation
- Note: There is a performance degradation compared to direct programming with Draw Pool, by about ~20%, testing was performed with 60 monsters attacking each other.
Video_Sem_Titulo_Feito_Com_O_Clipchamp1.mp4
- Drawpool 3
- Tile Widget Wiki
Title Attached Effect | Title Widget | Title Particule |
-
Support DirectX
-
Garbage Collection
Garbage collector is used to check what is no longer being used and remove it from memory. (lua, texture, drawpool, thingtype)
- Mobile Support @tuliomagalhaes & @BenDol & @SkullzOTS
Interface | Density Pixel | Joystick (patrykq) |
-
Support Tibia 12.85/protobuf by @Nekiro
-
Support Discord RPC by @SkullzOTS (Doesn't work with CMAKE)
-
by @SkullzOTS
-
To enable just go to config.h, set 1 in ENABLE_DISCORD_RPC and configure the others definitions
-
You can see the step by step in YouTube
-
Example interface | Example in game | future discord-game-sdk |
- Action Bar by @DipSet
- Access to widget children via widget.childId by @Hugo0x1337
- Shader System Fix (CTRL + Y) by @FreshyPeshy
Creature | Map | Mount |
-
Refactored Battle Module by @andersonfaaria
-
Health&Mana Circle by @EgzoT, @GustavoBlaze, @Tekadon58 (GITHUB Project)
-
Tibia Theme 1.2 by Zews (Forum Thread)
-
Add option ADJUST_CREATURE_INFORMATION_BASED_ON_CROP_SIZE in config.h by @SkullzOTS
-
Encryption System by @Mrpox (Note: This implementation is unsafe)
by @Mrpox
- To enable just go to config.h, set 1 in ENABLE_ENCRYPTION and change password on ENCRYPTION_PASSWORD
- To enable Encrypting by "--encrypt" change ENABLE_ENCRYPTION_BUILDER to 1 (by @TheMaoci). This allows to remove code of creating encrypted files off the production build
- To generate an encryption, just run the client with flag "--encrypt SET_YOUR_PASSWORD_HERE" and don't forget to change the password.
- you can also skip adding password to --encrypt command it automatically will be taken from config.h file (by @TheMaoci)
-
Support HTTP/HTTPS/WS/WSS. by @alfuveam
-
Client Updater by @conde2
- by @conde2
- Paste the API folder in your www folder (https://github.com/mehah/otclient/tree/main/tools/api)
- Create a folder called "files" in your www folder and paste init.lua, modules, data, and exe files
- Uncomment and change this line (https://github.com/mehah/otclient/blob/main/init.lua#L6)
-
Colored text @conde2
- by @conde2
- widget:setColoredText("{Colored text, #ff00ff} normal text")
-
QR Code support, with auto generate it from string [@conde2]
- by @conde2
- UIQrCode:
- code-border: 2
- code: Hail OTClient Redemption - Conde2 Dev
-
Typing Icon by @SkullzOTS
- by @SkullzOTS
- To enable just go to setup.otml and set draw-typing: true
-
Smooth Walk Elevation Feature by @SkullzOTS
- by @SkullzOTS
- View Feature: Gyazo
- To enable just go to modules/game_features/features.lua, and uncomment line 5 (g_game.enableFeature(GameSmoothWalkElevation)).
-
Tutorial to Use OTC in TFS main see wiki
-
3D Sound and Sound Effects! by @Codinablack
Example 1 | Example 2 | Example 3 |
---|---|---|
001_example.mp4 |
002_example.mp4 |
003_example.mp4 |
-
Layout based on tibia 13 by @marcosvf132
-
by @marcosvf132
-
Game_shop v8
-
Minimap WorldTime
- tfs c++(old):
void ProtocolGame::sendWorldTime()
- tfs lua(new) :
function Player.sendWorldTime(self, time)
- Canary:
void ProtocolGame::sendTibiaTime(int32_t time)
- tfs c++(old):
-
Outfit windows compatible with attachEffect , shader
-
Calendar
-
client_bottommenu (activate the array "Services.status" in init.lua)
put this
./otclient/tools/api/status.php
in yourC:/UniServerZ/www/api/
if not work try ,active curl:
-
Interface | In-game |
-
Imbuement tracker by @Reyaleman
-
Blessing
-
Screenshot
-
Highscores
-
Store (compatible with 13.32 - 13.40)
-
QuickLoot
-
Groups Vip
-
Browser Client by @OTArchive
-
by @OTArchive
-
wiki: https://github.com/OTArchive/otclient-web/wiki/Guia-%E2%80%90-OTClient-Redemption-Web
-
2024-09-27_19-50-58.mp4
-
-
Bot V8 (@luanluciano93, @SkullzOTS, @kokekanon, @FranciskoKing, @Kizuno18)
- Is adapted in 85%
- To enable it, it is necessary to remove/off the BOT_PROTECTION flag.
- VS Solution / CMAKE
-
Shader with Framebuffer (@SkullzOTS, @Mryukiimaru, @JeanTheOne, @KizaruHere)
Creature. | Items | UICreature |
- Full Cyclopedia (@luanluciano93, @kokekanon, @MUN1Z ,@qatari )
OTClient V8 (Features)
- Lighting System
- Floor Fading
- Path Finding
- Module Shop
- Module Oufit
- Placeholder
The Mobile Project This is a fork of edubart's otclient. The objective of this fork it's to develop a runnable otclient on mobiles devices.
Tasks that need to do:
- Compile on Android devices
- Compile on Apple devices
- Adapt the UI reusing the existing lua code
Current compiling tutorials:
If you are interested in compiling this project, just go to the wiki.
In order to build the app for production, run the following command :
- To build the image:
docker build -t mehah/otclient .
- To run the built image:
# Disable access control for the X server.
xhost +
# Run the container image with the required bindings to the host devices and volumes.
docker run -it --rm \
--env DISPLAY \
--volume /tmp/.X11-unix:/tmp/.X11-unix \
--device /dev/dri \
--device /dev/snd mehah/otclient /bin/bash
# Enable access control for the X server.
xhost -
Try to ask questions in discord
Have found a bug? Please create an issue in our bug tracker
Tip
if using Nostalrius 7.2, Nekiro TFS-1.5-Downgrades-7.72 OR any protocol below 860 that the walking system is stuttering. set force-new-walking-formula: true in setup.otml
In Old Protocol , if you consider that the speed of the item is too fast, modify item-ticks-per-frame: 75 in setup.otml
TO-DO list | Status | PR |
---|---|---|
Android compatibility | Branch | |
Familiar outfit | #39 | |
wheel of destiny | None | |
Forge | None | |
Analyzer | #802 | |
fix: Extended view new-layout | None | |
Sound tibia 13 | None |
Protocol / version | Description | Required Feature | Compatibility |
---|---|---|---|
TFS (7.72) |
Downgrade nekiro / Nostalrius |
force-new-walking-formula: true item-ticks-per-frame: 75 |
✅ |
TFS 0.4 (8.6) |
Fir3element | item-ticks-per-frame: 75 | ✅ |
TFS 1.5 (8.0 / 8.60) |
Downgrade nekiro / MillhioreBT |
force-new-walking-formula: true item-ticks-per-frame: 75 |
✅ |
TFS 1.4.2 (10.98) |
Release Otland | ✅ | |
TFS 1.6 (13.10) |
Main repo otland (2024) |
See wiki | ✅ |
Canary 13.21 | OpenTibiaBr | Assets , Enable HTTP login and port 80 | ✅ |
Canary 13.32 | OpenTibiaBr | Assets , Enable HTTP login and port 80 | ✅ |
Canary 13.40 | OpenTibiaBr | Assets , Enable HTTP login and port 80 | ✅ |
Otclient is made available under the MIT License MIT License .thus this means that you are free to do whatever you want, commercial, non-commercial, closed or open
If you are interested in supporting the project, go to this link, any value is great help, thank you.