About GenStep.

Started by Prophetly, March 01, 2019, 06:01:28 PM

Previous topic - Next topic

Prophetly

want to clearly know how to write genstep. i was thinking it is all about world generation and it will be so cool if i make my own mod that generates more complex labirynth-like ancient danger locations, precious lumps and pirate base size & designations & security also mountainus based pirates :)
spent more than two hours to find all about genstep, and it ends here. help me guys

Mehni

GenSteps are executed in the order they're defined in the XML.

There's worldgen and there's mapgen, and it sounds like you want mapgen. Ancient Dangers are GenStep_ScatterShrines. The fancy stuff with pirate bases sorta starts with GenStep_Settlement with their parms being in XML.

From there the complexity skyrockets. There's an entire namespace (BaseGen) dedicated to it, with a symbolstack popping RuleDefs by string and each of these adding and removing more and more fine-grained things to the symbolstack, each part adding to making a base.

It's a grammar based system and has some potential for great procedural generation.

You can look at Albion's Sparkling Worlds for a some relatively simple but well-executed examples (his gen-steps are mostly hardcoded) that really helped me understand the structure. I used it as a stepping point to creating the Hunter's Lodge in More Faction Interaction.

It took me at least two days before it started making sense to me, so two hrs isn't all that much yet.