I have a few questions and concerns to our current modding possibilities.
Will we be able to have control over the terrain generation eventually?
Like being able to define quantity and distribution of plants, which plants and wildlife would we like to have, and minerals, water, etc - to make our own biome or modify an existing one?
(Not necessarily over the height map)
Would we have some way to define water color too without having to override the whole water code (we can change terrain colors currently, why not water - despite its current nature of no shadows and bugs)?
How am I supposed to add my building patterns to the new editor? I’m talking about the icons to select floor / roofs / etc, which have the image path hardcoded in the js, so no matter if I try to mixinto a less file, it won’t work (I don’t know if to mixinto an html or css file would work anyway(?))…
If you have any other concern or improvement to the modding API you can suggest it here rather than in the suggestions category…
It’s somewhat doable, Jelly had it until its recent version (I couldn’t be bothered to do the jump to the water change when nobody was using the API anyway). The landscaper needs a few adjustments to be really able to do it, but it’s not a big deal to do it (and to do it properly on top of it). You can take a look at Jelly’s landscaper.lua to see what would be required to make it more flexible, or at least, the way I did it.
How could we add our own effect+animation so we can add a new animation for the humans or goblins from our own mod? Say I make a new weapon and I need a fitting animation for fighting with it. It needs to be on the rig subfolders in the stonehearth mod, which makes it totally incompatible with other mods.
Components can be monkey patched. The following code is untested, but should give you a rough idea.
This has some caveats, however. In particular, if two mods do it, only one will succeed. The magic is in building a function that can be extended by many mods at the same time. In this case, because of random magic, it’s not that easy.
Edit: As to how I would do it in this case…
Append to the initialize function a table that is either already set (by another mod) or gets set by us. After the table certainly exists, we inject our critter into it.
The spawning function then simply selects one critter of that list - which can now be done by multiple mods (using this approach). Feel free to use it, but put a link to this post next to it please.