Vcmi for Debian main

Hi,
vcmi is licensed under GPL2.0 or later which is perfect for inclusion in Debian. Unfortunately it relies on non-free assets which mean that it can’t be in the “main” archive section but must go into “contrib”. That archive section contains software which by itself adheres to the Debian Free Software Guidelines (DFSG) but requires non-free parts to be usable. I would like to get vcmi into Debian but would only make the effort if it could go into the “main” archive section instead of “contrib”. This of course means, that the game must be usable without requiring the non-free original assets. So my idea was, to take all the pcx and def files and replace their content by colored rectangles. Each rectangle contains a small textual string of what “thing” it represents. Naturally this would make the game very ugly and I doubt anybody would want to play it in that state but at least it would be possible to play it and thus allow it into the “main” Debian archive section.

Based on client/CAnimation.cpp and client/CBitmapHandler.cpp I wrote a small Python parser for lod, pcx and def files and also wrote a program which is able to unpack a def into multiple png images and repack them into a def after the individual images have been modified. The result looks like this:

mister-muffin.de/p/kpyL.ogg

The video quality is bad to keep size low but the text one can barely make out at the top left corner of each colored rectangle is only the name of the pcx or def file for now.

I wanted to ask: does there exist a machine readable mapping of pcx and def files to object name? This would allow me to automate making these tiles more meaningful and the game playable (probably without being fun).

You can find the code I used here: github.com/josch/lodextract The nice thing about vcmi is, that it allows assets to be packed in an lod or pac as well as being a plain unpacked png or def file.

Would it make sense for vcmi to also allow that a def animation exists as unpacked images in a subdirectory structure (or any other animation format for which there exists open source editors)? I did not see an open source program which is able to edit def files which is why I was writing my own unpacking/packing code. I would like to see a tool which allows to modify def files in Debian as well if vcmi persists on using only def files for its animations.

My hope is that by having vcmi in Debian (and by that also in all its derivatives like Ubuntu or Mint) more users will feel compelled to either replace the original heroes3 graphics or to create graphics for a future vcmi mod. Using the packing and unpacking code above it would for example be very easy to replace still images by something which is more pleasing to the eye than a colorful rectangle with text in it - everything would be more pleasing than that.

Surely, as noted in [forum.vcmi.eu/t/fork-proejct-an-idea-for-replacing-homm3-assets/459/1) any serious replacement effort would take years of continuous work but other projects (like openTTD) managed as well and I see that vcmi is still steadily being developed after all these years which is truly awesome!

What do you think?

Not sure if I like such idea but feel free to go ahead.

Some random bits here and there. For example to connect name of adventure map object with .def that represents it you need to parse

  1. Objects.txt (first column - name of def file, last two - object primary and secondary ID)
  2. Objnames.txt (line -> object primary ID mapping).

Names of quite a lot of files can be “demangled”, e.g. TBCSBLAK -> Town Building CaStle BLAcKsmith

And there is another problem with you idea - non-graphical content which includes:

  • maps (you’ll have to find some user-made map)
  • campaigns
  • fonts (can be replaced with ttf)
  • text files

Partially we do supports this - wiki.vcmi.eu/index.php?title=Animation_Format
However it still can not be used for some important areas like battles and adventure map.

Hi Ivan,

Why are you not sure if you like such idea?

Thanks, that will help.

Yeah but that will only help a human but not a machine :slight_smile:

do there not exist many user-made maps? Do you think it will be hard to find somebody who releases his map under a DFSG free license like CC-BY-SA?

the official campaign will certainly be disabled

can be replaced as you said

I started with the image assets because they seem far harder for me to come up with a free solution. I imagine it will take much less effort to find free text than to recreate the visual assets in a free manner. This is why I started with the images, because I think it’s the hardest task.

There are of course also audio and video but these are optional and I think they dont have to be present for the game to work, right?

Oh this is great, I didnt know about that. Does there exist an automated way to destinguish between def files which do work in that format for vcmi and those which do not? If it is only battles and adventure map - how can I find exactly all other def files?

Thanks!

The game in not usable without good graphics part. Your idea is terrible.

It will be useable but it will also look terrible, yes. Why do you think that the idea is terrible?

It’s a chicken and egg problem. Without many users nobody will be interested in designing for it but with nobody designing for it there will be no users. How does one get designers interested in creating content? One way is by making more people use the game and one way to do that is to make the game easier accessible.

If vcmi can be in Debian main instead of contrib, it will be easier for people to install as they do not have to add an additional package repository. Additionally it will automatically propagate into most derivatives. If they own the original game then they can use the graphics from there.

Notice that my plan is not to make it hard to use the original graphics. Users should be able to use the vcmibuilder script to fill the ~/.vcmi folder with the original graphics plus the vcmi.zip and wog.zip as usual. The only point is to get it into Debian main instead of contrib and for that it must at least be “usable”. There is no requirement of not being terrible.

I think you will be forced to replace all graphical files (pcx and defs) LODs contain.

So you must find artists who will redraw each frame of HMM3 files (at least not quality-made).

Monsters DEF can be made for first time for several frames only (frame with standing monster, frame with dead monster, frame with attacking monster).
Towns can be drawn primitively.

Or you may ask heroeswm.ru/ owners. Since it’s noncommercial project, maybe they allow you to use their graphics in your version (there are pure monsters animation and several town screens with pure graphics also).

I think even ugly graphics may be used in free version.

PS There is also some Flare RPG game engine i met (open source), there were some monsters made in Blender. So they could also converted to HMM3 format and used in free implementation.

github.com/clintbellanger/flare … antasycore
There are goblins/goblin ups, for example. So some material is already waiting for you to prepare it.

I just not sure that doing something like this in order to get in Debian main is a good idea. It may encourage development on graphical side though…

And as for already available graphics - install “High resolution menu” and “True Type Fonts” from repository (via launcher). Both replace some graphical bits from H3. Not much but better than nothing :slight_smile:

Yes. But you may create relatively small dictionary and generate human-readable names from it :slight_smile:

You may also try to parse our json files from config directory to find all files related to some game object.

Of course there is huge number of such maps but they don’t have any clear licenses (although I doubt that any map maker would be against CC-BY-SA) and you’ll need to find maps that can act as replacement for standard maps - notable amount of such maps are either custom scenarios (as opposed to normal player vs player game) or extremely difficult maps made largely for skilled players.

Of course game can be played with just one map but it barely will be RE-playable.

Yup.

I don’t think so. Sometimes I think it easier to say what works with it - town buildings (TB*) and GUI (unorganized naming scheme).

Hi Ivan,

again: why? :slight_smile:

Maybe you think that getting into Debian main is not that important? Or do you see a better way of getting into main?

Yes, that’s what I am hoping for. Showing that it’s easy to just automatically replace all graphics might encourage people who know how to create graphics to give it a go and improve the current situation.

I see you are the author of “True Type Fonts” but I didnt see any license for it? I see that it contains files called LiberationSerif-Regular.ttf and LiberationSerif-Bold.ttf and if they are indeed the liberation serif fonts then of course redistribution of them is fine. What about the included json files?

I would have to contact Dru for “High-res Menu”.

I could create a package which installs these mods if the creator decided to release them under a DFSG free license.

Yes. I guess I’ll give it a go and see how far I get with such an approach.

Yes. I’m not there yet to think about the scenarios but it’s on my TODO list in case I can further improve the rectangle graphics such that it at least becomes “playable”. Since I still think this requirement is the hardest one, I will only do the others once I managed to finish that one.

Remember that it only has to fulfill the requirement of being playable, so one map would be enough (though of course more would be better). Nobody will want to play the colorful rectangle game anyways so anybody apt-get installing it will sooner or later run vcmibuilder to retrieve the original assets. Since the game is available from GoG it’s really simple now to get hold of a copy.

Hi Macron,

that’s what I did.

No. I only must do that if I want the game to be fun to play but all I want is it to be playable. It will become fun to play by replacing the colorful rectangles with the original graphics. In the long run I would of course like to see a free version of all graphics but that is a multi year long effort for which I neither have the talent nor the resources. So until then, I will use the original graphics but I want an easy way to install it and it’s easiest if it’s in Debian main. But it can only get there if it’s playable. The colorful rectangles are nowhere near pretty but at least they make the game playable.

Unfortunately it is not enough for them to allow me to use them “in my version” for the graphics to be DFSG free. Unfortunately I do not understand russian.

Yes, even stick figures are better than colored rectangles. If those graphics exist, I will take them but I will not create them myself.

Yes, there are loads of games and resources available these days that release their assets under an open license. But that still means that they have to be adapted to work with vcmi and this is too much work for me and also more than I want to accomplish. Nevertheless I would of course welcome if somebody does it.

Do you really think that such awful shit like on your video can attract developers to VCMI? If yes there is no more to talk about.

Kind of. I just don’t think that “main” part is that important. Of course since I’m not Debian user I don’t know differences between main and conribs and (what’s more important) how users perceive them.

Yes. I specifically keep all files with “external” authors without renaming in order to indicate their origin. I can show their origin somewhere in mod info but so far I simply haven’t though about it.
Json config was made by me but I have no problems with considering it as part of VCMI project (I even think about integrating that mod into VCMI codebase).

Perhaps we finally should decide on licensing of mods that get into repository - so far it was pretty much undefined. CC-BY-SA sounds like good choice since the license is quite close to GPL.

Yeah, I know. But I won’t mind having our own map pack anyway :slight_smile:
It also may act as a part of free content for VCMI. And one that can be made by anyone who have free time to contact authors of existing maps.

I do not think your choice of words is justified. Can we not discuss this in a calm and civilised manner?

I do not want to attract anybody to vcmi with ugly rectangle graphics. Of course I expect that users will replace them with the original ones right after installing the game. What I want is to get vcmi into Debian main for which it needs to be usable, not pretty.

Are you a main contributor to vcmi? If yes, then I will of course honor your position and stop my work right now because I have great respect toward the tons of work that you spent on getting vcmi in the state it is in today and I have no desire to do you any harm or do anything with your codebase without your consent.

After installing Debian it only has one repository activated which is “main”. To add more one must either edit /etc/apt/sources.list or use a graphical package manager. Though to do that the user must know in the first place that he must do it. So the alternative would be to put vcmi into “contrib” as it is. One would then have to explain somewhere on the vcmi website how prospective users enable that repository.

Do you think that solution is preferrable to the “ugly rectangles” solution which could go to main?

That would be awesome. For the better or worse Debian is extremely picky about licenses and I often had a package of mine pulled just because one single file had unclear license terms.

That’s more-less same situation as Ubuntu with “non-free” repository that contains some commercial apps like Flash Player. However majority of users just enable it and don’t care much about how “free” this software is. Mindset of Debian users may be different though.

In general - I still don’t like this idea as a way to get to Debian main but it may be interesting way to get some activity on graphical side.

And another reason why I’d rather wait with push towards Debian is updates - Debian software is usually 1-2 years old due to long release cycles. And that’s quite a lot for projects like ours - we support only latest release.
Having something similar to Ubuntu PPA or Arch AUR (user-provided repositories) with frequent updates & automated builds would be much better

Our project leader is Tow.
Our (current) team consists from Ivan (me), Warmonger, AVS and beegee
That’s probably all for formal part.

Repository is not part of VCMI source code so Debian shouldn’t have problems with that. However more clear license is good idea anyway.

Sorry for flame. Will throw emotions away.

  1. The idea to push VCMI to debian-main itself is good but not doing it at all costs.

  2. To fully satisfy DFSG, VCMI should be independent of heroes III at all. Even if recreate all content from scratch (but with similar look) it may considered as derivative work. To achieve such independence engine should be separated and turned into pure modding platform. All SoD related stuff should be separate mod.

Sorry for offtopic: Some day you will use VCMI as a game engine to build your own Heroes-like game. Perhaps it may then be used as a prototyping tool for Ubisoft or fans who always wanted to create their own Heroes game since H3:)

josch, I would do public relations work, tell friends about it, post about VCMI in forums, write articles for gaming plattforms, show what you can archieve with VCMI, how easy it is to replace graphics (even with no programming skills) and so on.

I don’t know where to put this, but I think we could localize VCMI, the website, installation instructions and the manual in different languages. I think a lot of german H3 (Heroes) fans even don’t know what VCMI is and they are not interested in reading english text. As always it’s a matter of priority and time, I could translate H3 texts, but sadly I don’t know where to put this on my todo list. Perhaps I can get someone interested in translating some stuff.

It will be great. But first SOD as mod must be completed. Then JSON texts can be translated, as original txt files will be no longer needed.
So it will be author translation then.

Hi again,

Yes. Another difference is that (at least last time I tried) Ubuntu offers to enable the non-free archive sections already during installation. That way the user doesnt even have to have a clue how to enable them later.

I can understand. As I already told AVS, if you tell me that you would rather not that I offer a colorful rectangle based alternative graphic pack as the default in Debian main, then I will not persue this avenue any further. So just tell.

I see. As you can imagine other upstream projects have similar issues. There are several solutions to it:

  1. accept that with vcmi being in Debian, the package maintainer and the Debian bug tracker is the first stop for support. Users are suggested to first complain about bugs to the Debian bugtracker. The maintainer would then figure out how to solve the situation. This process likely does not involve vcmi upstream at all. Users who want the most shiny vcmi version will certainly use a mix of testing/unstable.
  2. accept that vcmi is just not stable so never migrate it to testing but only have it in unstable. It is possible to never have vcmi in a Debian stable release until you think it’s ready by filing a release critical bug for it. Then, there would only ever be the most recent version of vcmi in Debian unstable and only users of Debian unstable would use it.

There is a discussion in Debian of having something similar but more powerful to ubuntu PPAs in Debian as well but nobody started implementing that yet.

Thanks for the clarification :slight_smile:

Hi,

What cost would be low enough for you? How good does it have to look for you to warrent inclusion?

What is your general opinion about inclusion in Debian (possibly contrib)?

If all content is recreated from scratch (as it was done with the colorful rectangles) then that content is no derivative work. But I’m not a lawyer and in the end the Debian ftp-masters make that decision.

Other games like OpenTTD have managed quite well to just replace the original proprietary graphics with independently created ones. Apparently that worked well for Debian license-wise.

Graphics should be graphics but not just a placeholder. It may be incomplete to play original but should be enough to play with mods.

Due to debian releasing policy it might be useless at all. But I support inclusion to debian.