edubart / otclient

An alternative tibia client for otserv written in C++11 and Lua, made with a modular system that uses lua scripts for ingame interface and functionality, making otclient flexible and easy to customize
Other
640 stars 402 forks source link

ERROR: Failed to read dat '/things/1098/Tibia.dat': #1191

Closed wioxjk closed 1 year ago

wioxjk commented 1 year ago

Hi,

ERROR: Failed to read dat '/things/1098/Tibia.dat': unable to open file '/things/1098/Tibia.dat': not found'
ERROR: Failed to load sprites from '/things/1098/Tibia.spr': unable to open file '/things/1098/Tibia.spr': not found

Seems kinda strange that the clients wants to check in /things/1098 right?

wioxjk commented 1 year ago
./modules/client_terminal/commands.lua:    local filepath = '/things/' .. file
./modules/game_things/things.lua:    datPath = resolvepath('/things/' .. filename)
./modules/game_things/things.lua:    sprPath = resolvepath('/things/' .. filename)
./modules/game_things/things.lua:    datPath = resolvepath('/things/' .. version .. '/Tibia')
./modules/game_things/things.lua:    sprPath = resolvepath('/things/' .. version .. '/Tibia')

Why is this hard-coded like this?

diath commented 1 year ago

That's intended, the files are loaded from the respective protocol version folders so that you can use it on different version servers.

wioxjk commented 1 year ago

Oh I was probably unclear. I do understand that it looks for different versions in different catalogues. However, the path, since it starts with a "/" - it will then look on the root of the filesystem for a catalogue named "things".

I am not sure that people should or would want place a catalogue there toghether with etc, opt, dev and so on. Would it be possible to make path relative to the binary instead?

diath commented 1 year ago

It's not the filesystem root but rather PhysFS mount root, PhysFS creates a virtual filesystem of sorts that uses absolute paths as relative to the mounted PhysFS root. All you have to do is create the things directory where your client binary is. https://www.icculus.org/physfs/

wioxjk commented 1 year ago

Oh, I have totally missunderstood then. I guess I have to find the .dat files also and populate the catalogues too?

diath commented 1 year ago

Yes, you have to obtain the assets from the original game and put them in the correct directories yourself.

wioxjk commented 1 year ago

Thanks for clarifying. I suppose this project cant really include the files due to legal reasons.