Skip to content
/ otclient Public

An alternative tibia client for otserv written in C++20 and Lua, made with a modular system that uses lua scripts for ingame interface and functionality, making otclient flexible and easy to customize

License

Notifications You must be signed in to change notification settings

mehah/otclient

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

logo OTClient - Redemption

Discord Shield Build - Ubuntu Build - Windows License: MIT

📋 Table of Contents

  1. Logo What is otclient?
  2. 🚀 Features
  3. Android The Mobile Project
  4. 🔨 Compiling
  5. 🐳 Docker
  6. 🩺 Need help?
  7. 📑 Bugs?
  8. ❤️ Roadmap
  9. 💯 Support Protocol
  10. ©️ License
  11. ❤️ 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]

      • Collect information on what will be drawn in the UI

        • ii ) Imagen: multinucleo
    • 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
        
    • 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

  • Auto Reload Module

    Activate g_modules.enableAutoReload() (init.lua)

    2022-11-17_17-45-35-1.1.mp4
  • Attached Effects System (to create aura, wings...)
    • Compatible with .Apng

      • ThingCategoryEffect
      • ThingCategoryCreature
      • ThingExternalTexture: are images in Png | Apng
    • Wiki

    • 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.
Haskanoid Video Peoplemon by Alex Stuart Space Invaders
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)

  • 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
  • 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
Haskanoid Video Peoplemon by Alex Stuart Space Invaders
Title Attached Effect Title Widget Title Particule
  • Support HTML/CSS syntax
    Video_Sem_Titulo_Feito_Com_O_Clipchamp1.mp4
    349623570-3fa1803a-2759-4b2f-890e-05f987f43260.mp4

    Note: Module example:

  • 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)
Haskanoid Video Peoplemon by Alex Stuart Space Invaders
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

Haskanoid Video Peoplemon by Alex Stuart Space Invaders
Example interface Example in game future discord-game-sdk
Haskanoid Video Peoplemon by Alex Stuart Space Invaders
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)
  • 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

Haskanoid Video

Haskanoid Video

Example 1 Example 2 Example 3
001_example.mp4
002_example.mp4
003_example.mp4
Haskanoid Video Peoplemon by Alex Stuart
Interface In-game
💸 Sponsored (Features)
Haskanoid Video Peoplemon by Alex Stuart Space Invaders
Creature. Items UICreature
OTClient V8 (Features)
  • Lighting System
  • Floor Fading
  • Path Finding
  • Module Shop
  • Module Oufit
  • Placeholder
  • UIGraph
  • keybinds

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 :

  1. To build the image:
docker build -t mehah/otclient .
  1. 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.

About

An alternative tibia client for otserv written in C++20 and Lua, made with a modular system that uses lua scripts for ingame interface and functionality, making otclient flexible and easy to customize

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Packages