OTClient - Redemption
π Table of Contents
- 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**
https://github.com/kokekanon/otclient.readme/assets/114332266/f3b7916a-d6ed-46f5-b516-30421de4616d
-
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**:
```async autoreload
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
```
-
New Lighting System with Fading
- **i ) Video**
https://github.com/kokekanon/otclient.readme/assets/114332266/de8ffd14-af8c-4cc0-b5b1-2e166243bffc
-
Force Effect Optimization
- **i ) Description :** will avoid drawing effects on certain occasions
-
Auto Reload Module
Activate `g_modules.enableAutoReload()` ([init.lua](https://github.com/mehah/otclient/blob/main/init.lua#L114))
https://github.com/kokekanon/otclient.readme/assets/114332266/0c382d93-6217-4efa-8f22-b51844801df4
-
Attached Effects System (to create aura, wings...)
- Compatible with .Apng
- ThingCategoryEffect
- ThingCategoryCreature
- ThingExternalTexture: are images in Png | Apng
- [Wiki](https://github.com/mehah/otclient/wiki/Tutorial-Attached-Effects)
- Example Code:
(code sample: [effects.lua](https://github.com/mehah/otclient/blob/main/modules/game_attachedeffects/effects.lua), [code test](https://github.com/mehah/otclient/blob/main/modules/game_attachedeffects/attachedeffects.lua#L1))
- Example specific settings for lookType X [outfit_618.lua](https://github.com/mehah/otclient/blob/main/modules/game_attachedeffects/configs/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.
([Code example](https://github.com/mehah/otclient/blob/cache-for-all/modules/game_minimap/minimap.lua))
- Client 12.85 ~ 12.92, 13.00 ~ 13.40 support (protobuf)
- Market has been rewritten compatible with tfs and canary
- Async Texture Loading
-
Anti-Aliasing Mode Options
- note : (Note: Smooth Retro will consume a little more GPU)
- **i ) Gif**
![vvff](https://github.com/kokekanon/otclient.readme/assets/114332266/5a411525-7d5a-4b16-8bb6-2c6462152d39)
-
Support Negative Offset (.dat)
- compatible with [ObjectBuilderV0.5.5](https://github.com/punkice3407/ObjectBuilder/releases/tag/v0.5.5)
- need enable this feature:
g_game.enableFeature(GameNegativeOffset)
- Video
https://github.com/kokekanon/otclient.readme/assets/114332266/16aaa78b-fc55-4c6e-ae63-7c4063c5b032
-
Creature Information By UIWidget
- to enable: [setup.otml](https://github.com/mehah/otclient/blob/e2c5199e52bd86f573c9bb582d7548cfe7a8b026/data/setup.otml#L20)
- To style: [modules/game_creatureinformation](https://github.com/mehah/otclient/tree/main/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.
https://github.com/kokekanon/otclient.readme/assets/114332266/c2567f3f-136e-4e11-964f-3ade89c0056b
- Drawpool 3
- Tile Widget Wiki
|
|
|
Title Attached Effect |
Title Widget |
Title Particule |
-
Support HTML/CSS syntax
https://github.com/user-attachments/assets/9f20814f-0aed-4b70-8852-334ac745ec11
https://github.com/user-attachments/assets/3ac8473c-8e90-4639-b815-ef183c7e2adf
Note: Module example:
- [Shader](https://github.com/mehah/otclient/tree/main/modules/game_shaders)
- [Blessing](https://github.com/mehah/otclient/pull/825)
-
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)
π Community (Features)
|
|
|
Interface |
Density Pixel |
Joystick (patrykq) |
|
|
|
Example interface |
Example in game |
future discord-game-sdk |
-
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](https://github.com/Mrpox)
- To enable just go to [config.h](https://github.com/mehah/otclient/blob/main/src/framework/config.h#L33), set 1 in ENABLE_ENCRYPTION and change password on ENCRYPTION_PASSWORD
- To enable Encrypting by "--encrypt" change ENABLE_ENCRYPTION_BUILDER to 1 (by [@TheMaoci](https://github.com/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](https://github.com/mehah/otclient/blob/main/src/framework/config.h#L38) file (by [@TheMaoci](https://github.com/TheMaoci))
- Support HTTP/HTTPS/WS/WSS. by @alfuveam
-
Client Updater by @conde2
- by [@conde2](https://github.com/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](https://github.com/conde2)
- widget:setColoredText("{Colored text, #ff00ff} normal text")
-
QR Code support, with auto generate it from string [@conde2]
- by [@conde2](https://github.com/conde2)
- UIQrCode:
- code-border: 2
- code: Hail OTClient Redemption - Conde2 Dev
-
Typing Icon by @SkullzOTS
- by [@SkullzOTS](https://github.com/SkullzOTS)
- To enable just go to [setup.otml](https://github.com/mehah/otclient/blob/main/data/setup.otml) and set draw-typing: true
-
Smooth Walk Elevation Feature by @SkullzOTS
- by [@SkullzOTS](https://github.com/SkullzOTS)
- View Feature: [Gyazo](https://i.gyazo.com/af0ed0f15a9e4d67bd4d0b2847bd6be7.gif)
- To enable just go to [modules/game_features/features.lua](https://github.com/mehah/otclient/blob/main/modules/game_features/features.lua#L5), and uncomment line 5 (g_game.enableFeature(GameSmoothWalkElevation)).
Example 1 |
Example 2 |
Example 3 |
|
|
|
-
Layout based on tibia 13 by @marcosvf132
- by [@marcosvf132](https://github.com/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)`
- Outfit windows compatible with attachEffect , shader
- Canary :
- 1.4.2 :
- https://github.com/kokekanon/TFS-1.4.2-Compatible-Aura-Effect-Wings-Shader-MEHAH/commit/77f80d505b01747a7c519e224d11c124de157a8f
- Downgrade :
- https://github.com/kokekanon/forgottenserver-downgrade/pull/2
- https://github.com/kokekanon/forgottenserver-downgrade/pull/7
- https://github.com/kokekanon/forgottenserver-downgrade/pull/9
- Calendar
- client_bottommenu (activate the array "Services.status" in init.lua)
put this
`./otclient/tools/api/status.php` in your
`C:/UniServerZ/www/api/`
if not work try ,active **curl**:
![image](https://github.com/Nottinghster/otclient/assets/114332266/99ad2ce7-d70f-47f4-aa19-083140fb5814)
![image](https://github.com/Nottinghster/otclient/assets/114332266/84349388-a458-4eb5-b1d6-cce5693cfd5a)
|
|
Interface |
In-game |
πΈ Sponsored (Features)
|
|
|
Creature. |
Items |
UICreature |
- 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:
- [x] 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 :
1) To build the image:
docker build -t mehah/otclient .
2) 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 |
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.