Age of Wonders III

Age of Wonders III

Community Made Maps & Campaigns
Welcome to the Age of Wonder III Workshop. The place on Steam to get and share handcrafted scenarios, epic campaigns and mods that implement little tweaks to full game overhauls.
Learn More
Making UG generation more equitable?
I'm really struggling to generate the Underground layer with any uniformity. The existing parameters seem to always create massive disparities in resources and useable terrain.

I've been experimenting with growth-power, counts and distances but I cannot find a way to make wall-generation any less sporadic or lopsided.

I tried a brute-force attempt by offsetting walls from the border using 8/-1 distance, and while everyone now has reasonable access to land and resources, it has also made logistics extremely linear as there's more or less a massive, perfectly rectangular channel around the entire perimeter.

Anyone know of a better way to induce more balanced/predictable wall generation?
< >
Showing 1-8 of 8 comments
Gladen 16 23 Jun, 2023 @ 1:27pm 
There is not so many people knowing anything about Rmg since it very unpredictable results from edits.

From my experience underground is partially broken by lava. Therefore lava needs to be tweaked or removed. Walls has very wierd Rmg setting

The areas underground is partially linked with surface settings Rmg so any effect like player starting location or expansion areas is also tied to the underground. So are those pathing between resources sites also shared settings.

I cannot give any solid advices. But it's an extremely tedious process of figuring out how the level generator.rpk works since everything is shared and unlogical...
spaceweezle 12 24 Jun, 2023 @ 2:55am 
Originally posted by Gladen:
There is not so many people knowing anything about Rmg since it very unpredictable results from edits.

From my experience underground is partially broken by lava. Therefore lava needs to be tweaked or removed. Walls has very wierd Rmg setting

The areas underground is partially linked with surface settings Rmg so any effect like player starting location or expansion areas is also tied to the underground. So are those pathing between resources sites also shared settings.

I cannot give any solid advices. But it's an extremely tedious process of figuring out how the level generator.rpk works since everything is shared and unlogical...

If only we could test dummy generations in the editor itself. Testing for XL-DL maps is an extremely slow process lol.

Seems that Wall-Hole-Fill plays a large role for wall-gen. At least it appears those values have the potential to ignore counts outright. I still don't understand how Wall-Peak-Fill works. Unless that is a distinction between a rubble wall and full-height wall tile.

Ideally I want it to generate land pockets of uniform size in each corner of the map. The default values have this potential but it is extremely rare. 1/500 I would say. Most of the time it's more likely that entire quadrants of the UG are completely walled and devoid of resources.

In the end I just went with Border-displacement for all walls, then reduced the minimum offset for treasure structures so they fit more densely in the channel. It looks weird but at least it's fair lol.
ElJoe 6 1 Jul, 2023 @ 12:31pm 
I made some substantial changes to the UG generation for my mod. These mostly included larger space around underground cities, slightly more resources near underground cities, a different pathway created for lava rivers, slightly larger lava pools, removal of those mermaid ponds from lava, creation of vulcano structure in these subterranean lava lakes, addition of an heart of the underground. A lot of testing was done. Easiest way to approach might be altering placement of structures in the underground.
spaceweezle 12 1 Jul, 2023 @ 2:35pm 
Originally posted by ElJoe:
I made some substantial changes to the UG generation for my mod. These mostly included larger space around underground cities, slightly more resources near underground cities, a different pathway created for lava rivers, slightly larger lava pools, removal of those mermaid ponds from lava, creation of vulcano structure in these subterranean lava lakes, addition of an heart of the underground. A lot of testing was done. Easiest way to approach might be altering placement of structures in the underground.

I probably would continue with it if I had some sanity left in me.

Far as I can tell its pretty much impossible to make uniform pockets of land outside of dumb-luck. Even if you somehow rigged the exclusion distances, fills and growths in perfect harmony you would likely not even realize it without an equal amount of luck for pass consistency.

For the longest time I kept testing the map-gen before I realized that even with perfectly balanced counts, weights, multipliers the results would flip between several inverse extremes of those values, meaning you would have to generate at least 10 maps per iteration just to learn what it truly does.

After 3 full days of tweaking I have it at a point now where treasure structures are reasonably balanced in relation to shared structures, city-ring counts, weights and distances to where it appears almost organic, yet there is still potential for wild disparities between each generation.

There is something funky going on with the pass algorithm. It shows massive favouritism between each gen when using normalized values. For instance, I have all myth dungeons set to the same count, mult and weight and yet it can totally omit one particular item and flood with another.

Yesterday I generated roughly 30 XL-DL maps with this setup and found that there's only roughly a 1/5 chance of it generating a balanced map. It seems to flip between 5 or so distinct pass seeds, some being grotesquely unbalanced.

I dunno, maybe there is a final piece of the puzzle I have yet to work out. The testing process is just too slow and laborious to make any headway. It sucks that you can't generate these in the editor.

So far the border offset method is about as consistent as it can possibly get. Having a nice clean channel around the perimeter is starting to grow on me lol.
ElJoe 6 4 Jul, 2023 @ 1:55pm 
Ah well, the insanity sounds familiair :) But after loads of testing, reloading, small tweaks I managed to get a fairly satisfying result. The distance settings for structures helped a lot and placing them in the proper group for placement (or create a new group for placement with its own settings). I suppose I can upload a few examples.
The generation time seems to increase like a logarhitmic however, and generation of XL maps was timed at about 15 minutes (versus about 4 minutes for a medium sized map). But all fair considering a game can take a few hours.
spaceweezle 12 4 Jul, 2023 @ 10:42pm 
Originally posted by ElJoe:
Ah well, the insanity sounds familiair :) But after loads of testing, reloading, small tweaks I managed to get a fairly satisfying result. The distance settings for structures helped a lot and placing them in the proper group for placement (or create a new group for placement with its own settings). I suppose I can upload a few examples.
The generation time seems to increase like a logarhitmic however, and generation of XL maps was timed at about 15 minutes (versus about 4 minutes for a medium sized map). But all fair considering a game can take a few hours.

I kind of burnt myself out of trying to balance it. I will probably revisit it once my depression has been cured by actually playing the game lol.

Those XL maps are immense, especially dual-layers. Typically I get about 50 hours out of a single map, but that has been increased even more with some AI mods. The current map-gen I'm working with adds on average 250 Myth dungeons in addition to increased density across the board. It's actually quite impressive what the engine can process. I've yet to hit a ceiling with structure counts.

I think you might be onto something in regards to weight groups. That's pretty much the only thing I haven't touched. On my next attempt I'll try plopping the treasure sites in the same weight group and see if it helps.

Btw, is your current gen capable of making these uniform pockets in the UG such that each corner of the map has uniform build areas and structure placement? I have the placement and density sorted but can't figure out how to make build areas uniform and fair.
ElJoe 6 13 Jul, 2023 @ 4:38am 
About your question:
Btw, is your current gen capable of making these uniform pockets in the UG such that each corner of the map has uniform build areas and structure placement? I have the placement and density sorted but can't figure out how to make build areas uniform and fair.

I think it's quite well possible and it's just inside the editor (which is the only thing I used). It is a lot of work to find out however. Most likely I would add a city like type placement with a minimal distance from the wall and other objects and implement it quite early in the placement execution (after the path creation but before any structure and city placement).
Also it should have a high tendency to be placed near the underground paths.
For instance 4 placements of such type for a medium map with a minimum distance of 10 from the wall and 40 minimum distance for eachother. After placing the point, let it be cleard for a ring around it for about 5 hexes radius (for instance), fairly equal to city type placement. Probably add some removal of hexes in a string like fashion to add sufficient random feel around it. Fairly equal to city placement without the actual city.
Takes a lot of trial and error unfortunately, especially at larger scale mods, which can be tiresome (having multiple computers at the same time can help however, reducing creation waiting times). Usually I created about 10 maps for testing.
spaceweezle 12 14 Jul, 2023 @ 1:42am 
Originally posted by ElJoe:
About your question:
Btw, is your current gen capable of making these uniform pockets in the UG such that each corner of the map has uniform build areas and structure placement? I have the placement and density sorted but can't figure out how to make build areas uniform and fair.

I think it's quite well possible and it's just inside the editor (which is the only thing I used). It is a lot of work to find out however. Most likely I would add a city like type placement with a minimal distance from the wall and other objects and implement it quite early in the placement execution (after the path creation but before any structure and city placement).
Also it should have a high tendency to be placed near the underground paths.
For instance 4 placements of such type for a medium map with a minimum distance of 10 from the wall and 40 minimum distance for eachother. After placing the point, let it be cleard for a ring around it for about 5 hexes radius (for instance), fairly equal to city type placement. Probably add some removal of hexes in a string like fashion to add sufficient random feel around it. Fairly equal to city placement without the actual city.
Takes a lot of trial and error unfortunately, especially at larger scale mods, which can be tiresome (having multiple computers at the same time can help however, reducing creation waiting times). Usually I created about 10 maps for testing.

Thanks for the breakdown. Yeah it does sound quite convoluted.

One valuable lesson I've learned is to not oversaturate with dungeon structures, else the AI will build mostly useless cities in terms of resource potential.

Last map I played 150 turns against 7 emp with boosted AI mod + city boost + cheat boost and it still wasn't enough to keep it competitive largely due to AI placement priority. I'm not even sure the city placement evaluation value would help as they would likely still value dungeon clusters over resource clusters.

To get around that I reduced the dungeon mults and increased counts of both shared treasure and rings/mini-exp to get a more even spread. Seems to have worked but I do miss having 500 mythical dungeons to pillage lol.

It's also tough to balance the map-gen in respect to class diversity. Having lots of gold gives is an obvious advantage to conventional armies, having lots of mana swings it over to Magical armies.

This current map has a scary amount of gold on it. As a Sorcerer up against 7 warlord/rogue/Dreadnought this worries me a little. Well at least I won't have the same issue as the last map.
< >
Showing 1-8 of 8 comments
Per page: 1530 50