This is an item editor for OTB files written in C# using Avalonia. The editor supports the version 11+ file format (appearances.dat & LZMA-compressed sprites).
Currently, the Main functionality of this application is to:
- Create
items.otb
files. - Modify the
appearances.dat
file.
There is limited support for changing the default attributes of items, but this functionality is only partially implented and contains bugs.
If you would like to try to improve/implement changing of item attributes, good places to start are
./LapisItemEditor/ViewModels/Main/ItemPropertiesViewModel.cs
./LapisItemEditor/Views/Main/ItemPropertiesView.axaml
There is partial work on support for the older file format (dat & spr), but it is not finished. It can be found under ./Backend/Tibia7
.
Small parts of this repository are copied from the following projects:
Also, parts of this repository are inspired by code in the above repositories.
- Open
./LapisItemEditor.sln
in Visual Studio. - In the solution explorer, right-click the LapisItemEditor project and select Set as Startup Project.
- Build/Run.
- Start the application
- Select assets folder
- Select OTB file
- (optional) Click "Create missing items"
- (optional) Click "Import item names from file". Item name file must be of format:
[100] void
[3457] a shovel
[35523] an exotic amulet
[...]
-
Click "Save items.otb"
-
(optional) Click "Save client data" to save modifications to the appearances (
appearances.dat
).Note: While
items.otb
stores some item-related data, many of the options of this tool (likeTake
,Lying Object
,Animate Always
, etc.) are only stored inappearances.dat
.Unless you only use "Create missing items" and bump version data, you probably also want to use
Save client data
. Since this writes a newappearances.dat
, you must of course use this new file in your client to see those changes (as opposed to theitems.otb
file which is a server-side file).
Major otb version & client versions can be specified in data/config.json:
{
"clientVersions": [
{ "name": "12.71", "version": 1271 },
{ "name": "12.72", "version": 1272 },
{ "name": "12.81", "version": 1281 }
],
"majorOtbVersions": [1, 2, 3]
}
- Avalonia
- Avalonia.Desktop
- Avalonia.Diagnostics
- Avalonia.ReactiveUI
- System.Drawing.Common
- SevenZip
- Protobuf
-
clone Protod3
-
Get client.exe from <tibia_dir>/packages/Tibia/bin/client.exe
-
Run python3 src/protod.py client.exe
-
Add
syntax = "proto2";
as the first line in each.proto
file. -
To generate C# bindings, place
.proto
files in./in
. Then:protoc -I=./in --csharp_out=./out ./in/appearances.proto protoc -I=./in --csharp_out=./out ./in/map.proto protoc -I=./in --csharp_out=./out ./in/shared.proto