• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Packaging OTClient

Aoxomoxoa

Dev
Joined
Jun 23, 2020
Messages
95
Solutions
1
Reaction score
51
Location
USA
GitHub
TheAoxomoxoa
Hello,

I was wondering if there was any way to package OTClient into something like the Medivia Client has? I would like to redistribute it to other players for a test server I have running, but wouldn't want them to be able to change the options like ambient lighting and whatnot in-game, or have the ability to add extra mods, etc. I just want the options that I have created for them, without the ability to change the options in the OTClient files.

So, is there a way that this is possible? Medivia has a "game.wad" file, and seems to use OTClient, or something similar.

EDIT:
I found a way to extract the WAD file from Medivia's client and it seems to be just OTClient with their own edits. However, I can't read most of the files. They're all ending with extensions ".uc" ".mc" and ".bc". I have never heard of these.
 
Last edited:

mrianura

Active Member
Joined
Jan 31, 2015
Messages
37
Reaction score
32
As You found a solution for that problem - please give a feedback to the community :D
 
OP
OP
Aoxomoxoa

Aoxomoxoa

Dev
Joined
Jun 23, 2020
Messages
95
Solutions
1
Reaction score
51
Location
USA
GitHub
TheAoxomoxoa
As You found a solution for that problem - please give a feedback to the community :D
There wasn't a solution. I just found that the extracted files were encrypted. All I found is that you can create a .WAD from the OTClient files, but I am still not sure how the client application reads the files inside the WAD.
 

Fresh

Quack!
Joined
Oct 21, 2009
Messages
1,730
Solutions
17
Reaction score
413
Location
Poland
GitHub
FreshyPeshy
I like this guy, he is talking about Medivia all day all thread all night.
3806_kachow.png
 
OP
OP
Aoxomoxoa

Aoxomoxoa

Dev
Joined
Jun 23, 2020
Messages
95
Solutions
1
Reaction score
51
Location
USA
GitHub
TheAoxomoxoa
I like this guy, he is talking about Medivia all day all thread all night.
3806_kachow.png
Well, Medivia is the highest quality OTClient out there at the moment, so of course I would try to compare it.

I just noticed that OTClient's folders are packaged in a WAD file within Medivias game folder. I don't know another OT that uses OTClient that has this functionality.

Why I had updated about Medivia was the fact that I extracted the contents of the WAD to find nearly identical folders to OTClient. That showed it was possible.

What makes it interesting is the fact they have 3 files inside their program folder. The game client, fmod.dll and game.wad.

Was just asking if anyone had any idea how they were able to do such a thing, as it would make it much easier to package OTClient into more manageable files to distribute to players.
 

oen432

Legendary OT User
Joined
Oct 3, 2014
Messages
1,453
Solutions
49
Reaction score
1,546
Location
Poland
GitHub
Oen44
Well, Medivia is the highest quality OTClient out there at the moment, so of course I would try to compare it.

I just noticed that OTClient's folders are packaged in a WAD file within Medivias game folder. I don't know another OT that uses OTClient that has this functionality.

Why I had updated about Medivia was the fact that I extracted the contents of the WAD to find nearly identical folders to OTClient. That showed it was possible.

What makes it interesting is the fact they have 3 files inside their program folder. The game client, fmod.dll and game.wad.

Was just asking if anyone had any idea how they were able to do such a thing, as it would make it much easier to package OTClient into more manageable files to distribute to players.
Just archive files/folders and use ziplib (or something similar) to read that archive. File extension doesn't matter, then could as well name it game.rar.
 
OP
OP
Aoxomoxoa

Aoxomoxoa

Dev
Joined
Jun 23, 2020
Messages
95
Solutions
1
Reaction score
51
Location
USA
GitHub
TheAoxomoxoa
So why is it that the files in the archive are .uc .bc .mc etc? How is it that the game client is able to read those files, since they're not necessarily OTClient vanilla files?

I was just interested in learning how that happens. As well as how they bypass the need for particular dll files and only have fmod.dll, which is an audio dll.

It's just interesting to see. I've never worked with anything such as that, especially with Tibia OTs.

You guys have to realize that I just came back after leaving around 2011. So things are much different than what I am used to.
 

Olddies

Veteran OT User
Joined
Nov 21, 2009
Messages
1,137
Solutions
12
Reaction score
278
Location
Rep.Dom
So why is it that the files in the archive are .uc .bc .mc etc? How is it that the game client is able to read those files, since they're not necessarily OTClient vanilla files?
When you use a files packing tool like boxedapp you will get those rare files, it is how the application protect your files in some ways but they can be decrypted by someone with skills
 

Ezzz

Developer
Joined
Feb 26, 2010
Messages
1,783
Solutions
2
Reaction score
583
Location
Caracas, Venezuela
OTC supports one way of making loading every data and modules from a fake zip file named as dll using Phys library.
 
OP
OP
Aoxomoxoa

Aoxomoxoa

Dev
Joined
Jun 23, 2020
Messages
95
Solutions
1
Reaction score
51
Location
USA
GitHub
TheAoxomoxoa
I found something interesting. On the owner of Medivia's github, he had a repo for something called "lua-struct" which, in his own words is..

Implementation of binary packing/unpacking in pure lua

I think this could be something that they use to pack this data.

You can find the repo here:
 

Source

Well-Known Member
Joined
May 31, 2020
Messages
74
Reaction score
62
Location
OpenTibia .dev
GitHub
source61
@Aoxomoxoa
Kinda old thread, but the main method here is simply to read modules/data scripts from an encrypted file and that's it.
So instead of loading files from data/ and modules/ directories it's loading filenames and values from encrypted.wav
The reason people do this is because crackers try to steal your files and re-use them for their projects for profit.
This is just one of several options, but it's probably the most common one in my experience, personally I use file embedding instead.
 

Terotrificy

Well-Known Member
Joined
Oct 18, 2020
Messages
247
Solutions
9
Reaction score
81
Location
Santiago, Chile.
I know i'm a bit too late here but i if you want to know how Medivia works:

Iryont encrypted the files with a very basic XOR Encryption, first you have to open the .WAD files with a Winrar or any unzipper, there you will have basically all the modules and otclient files, but the files inside are encrypted as you said with .bc, .mc and such files. To decrypt those files you must use any XOR decrypt, but first you need a password to decrypt them. To get the password, you need to have some assembly knowledge to debug the Medivia.exe client, there you will find the password, medivia.exe has to decrypt the files somehow and inside it you can figure out what the password is. Once you have the password, you can decrypt and encrypt the files as you wish. I hope i helped you.
 

slaw

Developer
Joined
Aug 27, 2007
Messages
3,285
Solutions
101
Reaction score
773
Location
Germany
GitHub
slawkens
Hello,

I got similar question - anyone have an idea how to pack all files into .exe, so at the end there will be just otclient.exe without the data/ and modules/ folder? It doesn't need to be encrypted, just packed into .exe or separate archive like .zip or .rar.

Is there any already working solution for this or need to write it yourself?
 

Merlin

What a mess!
Content Editor
Joined
Dec 14, 2009
Messages
52
Solutions
5
Reaction score
67
Hello,

I got similar question - anyone have an idea how to pack all files into .exe, so at the end there will be just otclient.exe without the data/ and modules/ folder? It doesn't need to be encrypted, just packed into .exe or separate archive like .zip or .rar.

Is there any already working solution for this or need to write it yourself?
There's a couple of software that can do that; Enigma virtual box and cameyo packager to name a few.
 

Felipe93

Ghost Member
Joined
Mar 21, 2015
Messages
1,760
Solutions
9
Reaction score
284
Location
Chile
Hello,

I got similar question - anyone have an idea how to pack all files into .exe, so at the end there will be just otclient.exe without the data/ and modules/ folder? It doesn't need to be encrypted, just packed into .exe or separate archive like .zip or .rar.

Is there any already working solution for this or need to write it yourself?
Would be nice if a solution or workaround would be available cuz it's not nice to have some many folders outside the exe
 

Terotrificy

Well-Known Member
Joined
Oct 18, 2020
Messages
247
Solutions
9
Reaction score
81
Location
Santiago, Chile.
Would be nice if a solution or workaround would be available cuz it's not nice to have some many folders outside the exe
Problem with it is you need to re-compile the client everytime you want to make a little change to the client itself (i.e images, modules, configs, etc)
 

oen432

Legendary OT User
Joined
Oct 3, 2014
Messages
1,453
Solutions
49
Reaction score
1,546
Location
Poland
GitHub
Oen44
While you are at it, think about updater too. If you throw everything into .exe then you are screwed, small change and you have to redownload entire client.
 
Top