Land templates
Sat, 2017-10-14 11:02
I just discovered that map templates are hard-coded in the engine and there's probably lot of work to add them. I thought I could maybe make a template editor, but even if it would generate code ready to be paste there, it's still not perfect solution. Is making templates more portable even an option? Like, they would be stored in files similar to theme.cfg somewhere and all of them would be loaded on engine startup or something.
I considered to move the Lua-based mapgens (DiagonalMaze, ShoppaMap, Tunnels) to the map type drop-down list where they belong.
I think a graphical editor for map generators would be overkill. I also think your suggestion isn't really clear; I'm not sure what you want to achieve exactly. :-/
Hi, I am a Hedgewars developer.
Right now, if you want to add new template, you need to provide points.
Then, you need to configure it below in the same file.
Finally, there's this list.
To sum up, you need to know what points to add, then make changes in few places in the code. If few people want to contribute templates, they have to make sure that their files are in sync, because you have to do this manually.
Now that you mentioned LUA scripts, it seems like they do something similar. But does it have same capabilities as normal map-gen? I mean, these templates define rough shape, but they are further processed by engine. Not sure if you can do the same with scripts, like e.g. replace the default templates.
Also, I'm not sure if adding more templates is planned, but it wouldn't hurt to have more, right? XD
My themes / Theme Editor / Code contributions /
Dank
I'm still busy with hunting down bugs for the 0.9.23 release, I don't want to think about these things yet.
Hi, I am a Hedgewars developer.