I want to fix few things in existing mods but i didn’t find any working link to def editing tool.
MM Archive - for browsing .lod/.pac files.
Def Preview - for browsing .def files
Def Tool - for editing .def files.
All those app you can download from here:
thanks. it looks like i cannot edit def file with this tool, only create new. that means i can’t learn by example and need some guidance.
Of course you can edit.
https://i.imgur.com/P9Ecobj.png
Tell us what exactly you want to edit and we’ll give you some guidance.
some interface .def files in new-style-interface mod don’t fit wog buttons. i want to try to rework some interfaces, e.g. hero screen. but i don’t see how to open def files in deftool - it opens only .hdl and .h3l files. which are absent here https://github.com/vcmi-mods/new-interface-mod/tree/vcmi-1.4/New%20Interface%20Mod/content/sprites
I’ll write small tutorial tomorrow. Even more, you don’t need edit .def file to edit def You can do this by having frames in bmp/png format and writing json.
(download ghost-necro mod and browse files to see what it was done)/
-
You open the .DEF with DEF Preview.
-
Select Edit > Extract all for DefTool. It should extract every frames and provides you with a .HDL file. This file will allow you to use DefTool to create the new .DEF
-
Edit each frames you want to edit. Erase old files with yours but keep the name (so you don’t have to manually add them to the def).
-
Open the .HDL file that was created after DefPreview extraction. You can change frames and/or their order in the FRAME tab.
(General tab) Make sure that the type is the good one (in your case, it should be $47 Interface, which is the same for townscreen buildings by the way).
(Frame tab) Standard Special Colors should be checked. Note that you can change the colors by clicking on them (for example, #00FFFF is transparent, but if you need to work with blue you might want to change the hex code of the color for something different).
- Once everything is good, click on the tool icon to “make def”.
Note : Image file format are BMP 8bits (indexed colors).
thanks for help. i checked def files and decided that the main problem is in the mod’s order. looks like wog mod overrides some buttons and icons of the new style mod while it should be backward. so i have to find a way to change the mods order and fix what’s left. can you tell me about that?
well, i understood that i have to create submod for “new interface” that is dependent on wog and started fixing things. first thing i fixed was green spot that appears if you enable “Interface enhancements” feature in System Options.
but i had a new problem when i started to override backpack button. the backpack icon is hardcoded and cannot be disposed by json config. i believe i can override this icon with transparent image but it looks like a bad decision. is there any way to do it another way?
next step is overriding commander button at the top and it has the same problem. atm i just removed one of two images that also looked quite ugly.
- switched dependency from wog to wog->commanders. got stats’ icons working for hero and commander screens. commander’s skills support skill grades in fact. i believe wog mod should have such gradations as well.
- drawn backpackNormal icon
- scaled commanderNormal and commanderPressed buttons.
current state
is there way to code something like “if some_mod is enabled, this mod should be loaded after it”? interface mod should be loaded after wog mod and wog.commanders mod if they are enabled but should not depend on them.
I have to know github user name to add access.
hello. it’s swats-the-floran
Done. Access sended.
also may i ask to add me in some kind of developer chat? i have some questions about mod queue.
Just join discord or slack vcmi channel. There are developers subchannels.
which layout is better for radio-buttons?
p.s. it looks like i cannot change map scroll speed layout without overriding configs because original layout is “alien”. and i don’t want to override configs because it is another moment that can break mod and very fast.