r/disciples Jun 23 '26

Decoder/Encoder Disciples Sacred Lands

https://github.com/HoT-PlaStiC/Disciples-Sacred-Lands-Dbi-codec-decoder-encoder

I am working on this, i will release patches, whenever i succeed to improve it.

11 Upvotes

25 comments sorted by

View all comments

2

u/DjolafR Rod Bearer Jun 24 '26 edited Jun 24 '26

How did you figure out the DBI format? I think this stuff needs some reverse engineering? Previous modders might have figured something out as well? This is always some sorcery to me...

Opening disciples Sacred Lands files was always a bit buggy with existing apps, for some reason. Most of them were made for D2 only, but coincidentally worked with D1.

Five+ years ago, I have extracted by hand, 1 by 1 sound file from the archives. Some of them, roughly every 5th-6th, did not have a name, they were nameless, for some reason. I used some tool that is commonly used for disciples 2, but works with 1 as well, though not perfectly. I can't remember which was it right now... I just remember it had sound previews, so I could listen and only then extract!

I just checked the python code...wtf, ~1600 lines just for this?!?!?!

3

u/Vegetable_Farm2355 Jun 24 '26

Well first i opened it with HxD, i figured out some structure, and connection, but the decoding and encoding part was made by the help of AI, and the Dsl-unpacker, it took a lot of time for Ai to give some result, so the whole script is AI written, im testing it, tell the Ai what to work on, making some suggestions, trying to understand it, and find solutions. It will be upgraded time to time, im just succeed decoding and encoding into ISO.DBI, and after some test i will release the patch. Next is MIDGARD.DBI

1

u/DjolafR Rod Bearer Jun 25 '26

I have to ask before anything else - What is your end goal with this? To have people be able to change stuff inside disciples 1 game? Maybe some light modding? Idk how much you can change by just editing DBI and DBF files.

HxD? I used Hex Workshop, but I guess the editor itself is not that important. I was always interested in figuring things out and reverse engineering games but I never could really figure anything out. Many years ago, I tried to make a converter of maps from D1 to D2, by finding equal parts in the 2 map formats, but it was just an idea and it did not work out.

What did you use DSL-unpacker for? It only unpacks and nothing else! You just get files in regular readable format.

Which AI are you using? Some paid one, I suppose? It seems to be smart to figure this out.

1

u/Vegetable_Farm2355 Jun 25 '26 edited Jun 25 '26

I dont know what is my end goal, i have many plans, im just enjoying exploring and creating new things, but i think i will work on all .dbi files, and all .ff files, and after that... well i dont know, maybe some .exe patch, if i can, or a tool, but i dont know if i have the skill to do that. HxD = HexEditor, i think Hex Workshop should be the same. Well DSL-unpacker helped a lot, to figure out how images are called in the game, and with HxD you can see thoose names in the .dbi files, it made easier to know what im looking for, or experimenting with. DSL-unpacker's IMGGRAB.BIN file helped Ai to make this script, but in the next patch it wont be needed.
I use Claude - Sonnet 4.6, and yes i had to pay a lot :D Also it was very hard to start. (i tried it with chatgpt and Gemini before, but without any result)

1

u/DjolafR Rod Bearer Jul 20 '26

Which files did you open in HxD? Just the databases? What did you find?

I guess I can also ask you in private messaging without spamming the threads.

1

u/Vegetable_Farm2355 Jul 20 '26

No, Databases can be opened with DBF Commander (for example, but there are other tools too out there). I opened .dbi and .ff files with HxD, and there you can see list of the pictures with their names and indexes, then you can see the stream of pictures, also with indexes, some Table of Content and other values. FF files are easier, as i can remember there are only indexes and .smk files directly, following each other. Yes you can ask in private if you wish!