Map editor

Thanks.

Does this branch break savegame compatibility?

No such regressions were found. (However due to our architecture loading of old save will break new features until restart as map format depends on handlers state.)

That’s all I got so far :frowning: (with latest devlope recompiled).

When exactly it’s occur for you? Tried to remove mods?

PS: One problem of editor is that it’s doesn’t check if mod enabled or not in launcher and load everything. So it’s crashing when it’s unable to load JSON that “invalid” since loading not as permissive as in VCMI.

Will it give to log, which json file has errors?

I don’t think there is any logging, but I pretty sure that AVS going to make it work for all mods that VCMI can load.

Maybe it’s not good idea to load all mods including disabled?
After loading all mods editor will generate RMG map with all this stuff, fitting or not?

PS I have few mods disabled most of time, because they break game configs, when enabled with other noncompatible mods. They will surely break editor too:-)

I totally agree on it, but since it’s WiP that the way it currently works.

Editor don’t have RMG or any VCMI integration. It’s completely separate.

This is 99% wrong mod data. There is log file but for now in wrong place (in install path but not in user profile) it may have some more information.

As for mod enable/disable, it will be but I want it to be independent from game.

RMG (and some other VCMI_lib stuff) integration is also planned (but after map format stable release)

Indeed. I had to removed all the mods to make it wokr. Then managed to launch editor with WoG and HoTA, but not to launch map. WoG is missing from the (required?) mod list in editor.

In general I can see it’s far from usable :neutral_face: Still, a good job.

It’s when in mod.json of current mod comma before square bracket:

"creatures":

"config/cool-creatures/New Ogre.json",
],

I corrected mod.jsons of test mods, now it errors something like

Exception=Error at line 92, Pos 6:Expected , or ], got token "name".

It will need ideal jsons now:-)

Another error:
TApplication.HandleException Res not found config/darkness/buildings.json
When mod is not archived to Content.zip, and unpacked in Content,

What mod is this?[/quote]

I found 2 invalid JSON file “sevenleagueboots.json” “surefootedboots.json” in “H4 arts - hero”.

These are two different artifacts.

Yes. And both files have wrong JSON format. Everything else in launcher seems to work, except bugs.vcmi.eu/view.php?id=2421

My local mod.
I tried yesterday to write about errors, but my browser was bugging.

Yesterday I took one town mod and cleaned it of all errors through jsonlint.com
Finally I managed to get vcmieditor started.
Whoa, editor is making maps with towns, dwellings and creatures from this mod.
I made 36x36 map, placed few towns on it, customized hero. And saved it to maps folder (it has strange extension “.vmap” (is it vcmi map abbreviation)?
But in VCMI map is selected and than crashes on start, so I couldn’t play test map.
Will try again today.

  1. Editor allows to make maps of “any” (of big) sizes. I created map 1024x1024, and it was opened.

  2. editor crashes on jsons, where we have comma, and than square/figure bracket (VCMI is allowing such behavior), that were all incidents I corrected before map editor started.
    I think editor must allow such ‘error’, just check if comma before ] ,} and remove it before evaluation.

Later I will write some throughts on interface. I bear in mind, that VCMI can have tens or hundred of mods, and so standard HMM3 editor interface is not good enough for handling such masses of objects…
At least dropdown list filter by mods is required to handle objects listed to the right.[/quote]

Yes.

  • Map format is still incomplete, VCMI will crash with some maps, but should not (you may report it as a bug).

1024x1024 * 2 levels is fixed limit for now. Is see no reason to increase it but it is obviously possible. BTW Editor should work map of ANY size and any number of levels limited mostly be RAM size and CPU speed (map rendering itself do not depends on map size) (you may try to generate json for such map by yourself :slight_smile: ).

  • Json parser is from freepascal standard library, I do not want to change it (but may be will have to fork it, json serialiser forked already)

Full text search works already and will be improved more.

It searches by “name” property, so user must have to memorize names for objects in mods to find them:-)
Text search is cool, but I think that mod filter is absolutely must have also. User can remember mod names at least :mrgreen:

Another idea:
most of heroes in mods (I mean map def of hero class) don’t have “editorAnimation” set. In editor we have full animation, so they just rotate/run on hex in various direction:-)
I propose for heroes and boats: don’t animate them, just take 3 frame (east direction stand) and draw it in editor.

I think there must be editor option to turn off animation of objects (draw only 1st frames) at all. Since it’s cpu consuming and user gets disctracted by all this flashing and moving.

I`ll include mod name to FTS.

Good idea, will try it.

Its not cpu consuming but done. (I`ve found a bug with CPU consumption - it was not in rendering)

Thank you for feedback, lets try again.
github.com/vcmi/vcmi_editor/rel … .1.2-alpha