Request @ Devs – RMG Factors

We’ve moved over to the paradox forums. Please come visit us there to discuss:
You can still read the collective wisdom - and lolz - of the community here, but posting is no longer possible.

Home Forums Modding and Map Making Request @ Devs – RMG Factors

This topic contains 10 replies, has 2 voices, and was last updated by  Gloweye 4 years, 6 months ago.

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #242958

    Gloweye
    Member

    When using new terrain types in the Random Map Generator, it’s currently impossible to attach them to sliders, or to otherwise influence the amount of a new terrain type in the RMG.

    What I would prefer is to have some kind of dummy weighting introduced into the entry called “AoW LevelGen – Factor”. This would be a straight multiplier over the weighting of this item used when generating a new map. Currently I don’t seem able to make it act as any different than maximum weight. A multiplier here would for example enable us to set the slider halfway – then you can make them less prevalent by just putting vanilla types high, or do it the other way around without any issues.

    I’ve tried creating empty Factors and linking them in the weight dependencies – sadly, this doesn’t seem to have any effect. I also can’t seem to find any difference between linking them to none or all of the vanilla types – weight appears to remain at maximum.

    I believe this would be the most simple solution. Of course, it would be far preferable to link multiple factors to the same slider, or even to make new sliders, but I don’t think that this is gonna be possible, since it would potentially take an enourmous amount of testing.

    • This topic was modified 4 years, 7 months ago by  Gloweye.
    #243020

    Lascha
    Moderator

    Hi Gloweye,

    Thanks for your continued support!

    My memory of this isn’t as good anymore, but if I remember correctly each slider is linked to a specific factor resource (hard-coded). So, you should already be able to use an existing slider for your new terrain type (i.e. by associating ‘Factor – Fertile Plains’ to ‘New Terrain Type’ passes). This will however mean that one slider influences more than one terrain type.

    Anyway, I’ve discussed this and we’ve added this feature request to the pile of cases for the next patch (there’s no ETA afaik, so no guarantees). At that time we will look into the amount of work and risk involved, and decide what to do.

    #243051

    Gloweye
    Member

    My memory of this isn’t as good anymore, but if I remember correctly each slider is linked to a specific factor resource (hard-coded). So, you should already be able to use an existing slider for your new terrain type (i.e. by associating ‘Factor – Fertile Plains’ to ‘New Terrain Type’ passes). This will however mean that one slider influences more than one terrain type.

    Point here is that the settings link to the factors, not the other way around. It’s just a list where we are allowed to select a single entry.

    In the factor itself, there’s only one mutable visible to us – which is “weight dependencies”. I have experimented with unassociated weights, but the weight dependencies do nothing as far as I can see. For example, in vanilla, the themes are all weight dependent on each other, while the overlays are not. Yet that doesn’t really seem to matter all that much.

    On the other hand, the only thing I haven’t done yet is attempting to redirect the weights attached to the hole/peak finders and painters to the other themes. I don’t dare hope to much tho, and it would be a really messy solution for as far as I can see.

    #243079

    Lascha
    Moderator

    That is correct. You cannot add a new factor type because it doesn’t/cannot have an associated slider, or any other way to influence the factor value. A possible patch fix would be to let you set a fixed value in the factor settings.

    Linking a vanilla factor the factor to the pass settings is the way to go. The slider should influence the min/max of that pass. Could you confirm? (Copy/paste the factor settings from a vanilla pass into the factor settings of your new pass).

    Weight dependencies: that’s for sharing sliders (i.e. themes use this to normalize their slider value, since 100% arctic and 100% tropical will not result in 200% amount of hexes, so it gets normalized with the weight dependencies).

    #243085

    Gloweye
    Member

    Linking a vanilla factor the factor to the pass settings is the way to go. The slider should influence the min/max of that pass. Could you confirm? (Copy/paste the factor settings from a vanilla pass into the factor settings of your new pass).

    Sure, I’ll try and give it a try tonight.

    Still, tho, I would appreciate it a bunch if:

    A possible patch fix would be to let you set a fixed value in the factor settings.

    Since it would enable me to write a very small program that eats directly into the acp and changes the value. Since the mod only really has effect on the game’s host, the game shouldn’t care if other people’s edition say something different (since build number would still be the same.) Doing so would effectively give a slider, difference being that you need to set it up from outside the game itself. (I’d of course test it myself and not trouble you guys with whatever I manage to blow up this way.)

    #243107

    Gloweye
    Member

    Might sounds silly, but I can’t seem to find the link between the factor and the AoW LevelGen – Pass – Hole Finder (Theme). The Hole Finder just links directly to the terrain type in it’s Theme/Overlay link (and Border Objects, tho Hole Objects for the Peak Fills, which don’t even have an associated theme). The Theme doesn’t seem to link back either – it’s got three lines, those being “Dummy”(False), Geographic Type(Land) and Theme Name (AUTUMN/TUNDRA, linking back to the actual terrain type to use.) For the rest, they’re enabled for the Surface Layer, and the Generation Settings from Land/Continent/Islands (Structure) link to the Hole Finders, just like for the vanilla types. I can’t seem to find any link between the Factors and whatever else.

    And yes, they are created in the RMG – in their 1.0 weighted amounts.

    #243121

    Lascha
    Moderator

    There is no link between factors and hole finders.

    Hole finders are simply ‘clean up’ passes because sometimes when generating stuff you end up with ugly results, like a lone 1-hex water or mountain, etc. Those are called the ‘holes’. So hole finder can detect those cells (of size 1 or more, depending on how you set it up) and replace them with something else.

    Example:
    6 mountains in a circle, and 1-hex of ‘anything’ in the middle (besides a mountain). We define this situation like this:
    – Border Objects
    — Overlay: Mountain Overlay
    — Theme: NONE (=ANY)
    – Max Hole Size: 1

    If we want to fill up the 1-hex hole so that it also becomes a mountain, then we use
    – Auto Fill Holes: True
    – Theme/Overlay: NONE (Since we use Auto Fill, this is ignored)
    This replaces the hole with a random adjacent hex, in this case it’s always mountain.

    Ok, but let’s say we want to replace that one hex so it’s always WATER. In this case we don’t use ‘Auto Fill Holes’, but we use ‘Theme/Overlay’ instead.
    – Auto Fill Holes: False (Disable this, the pass will fill using specified Theme/Overlay)
    – Theme/Overlay
    — Overlay: Water Overlay
    — Theme: Default Water

    You can also use a hole finder to do the reverse thing (peaks). For example if there’s a lone 1-hex mountain that you want to delete, then instead of using ‘Border Objects’, use ‘Hole Objects’.

    Hole finder replaces _EVERYTHING_ that meets the condition in its pass settings, so there’s no factor involved at all. Factors are generally for influencing min/max settings that can be found in passes, but hole finders aren’t made to be influenced by that.

    EDIT: In case you mean that you want to replace the contents of the hole depending on slider/factor settings, then that’s not possible. I think you’d end up with ugly results if that were to happen. You can make many hole finder passes to handle many situations, though. Beware, order is important.

    #243133

    Gloweye
    Member

    Good to know. This is gonna help building the Shadow Realm…

    But…in that case, how are theme’s assigned? What causes the RMG to assign a certain theme to a certain spot? Above, I just had a look at every place in the AoW_LevelGenerator where themes are mentioned. The only other place where themes are mentioned is inside layer definitions – and that’s just a list. How can I redirect Tundra/Autumn themes to use the Arctic/Temperate Factors ?

    It know it should be a pass, but no passes exist that reference themes. Or at least, not that I can see with customer-level tools. Tundra and Autumn are put on random maps, and I’ve managed to do the same with Shadow Realm in that mod, but I’ve never touched passes that handle themes there.(only assigned it as initial fill and fallback theme)

    #243136

    Lascha
    Moderator

    It _used_ to work with passes, but there were too many dependencies with races. If you let those generation algorithms decide which theme goes where, then it becomes really hard to find a good distribution of themes AND keep all races satisfied. So at one point we flipped this around.

    There is ONE pass that fixes all the themes using mostly code instead of settings. This pass is called ‘Race Area Generator’. If you look at:
    Generation Settings -> Land (Structure) -> Generation Passes, then you’ll find “Land – Race Areas” in there. This pass is defined in:
    Generation – Shared (Structure) slot 62. Note, there are only a few settings, because solving this kind of problem via code is much easier. So, this is the pass that places themes. Underground also uses this exact same pass, but how does it know which themes to pick?

    Ok, go to the category ‘Themes, Overlays, Terrai Types, Markers’. You should have defined your own theme there, besides the other themes. The ‘Theme Name’ must match ‘Theme Name’ setting in the corresponding non-RMG theme (HexMap Theme). I assume you already did this, but saying it just in case..

    Now I assume you also made your own ‘Terrain Type’. You’ll see ‘Surface’ and ‘Underground’. You need one called ‘Shadow Realm’. The ‘Layer Type Name’ must again match the non-RMG version of the layer type resource (wherever you defined it). Then, note how Underground has the property called ‘Allowed Themes’. You need to set the correct ‘Allowed Themes’ for your Shadow Realm terrain type.

    When the ‘Race Area’ pass generates themes, it can only choose from the allowed themes. So if you only add the Shadow Realm theme there, it should pick that. If you have more than one theme here, have a look at the racial preferred themes. This also influences which theme to pick. I believe this setting can be set in the non-RMG race resource.

    Races always start in preferred themes, so if you have more than one theme, and shadow realm theme is hated by the races, then the race will never start there.

    Having said this, you can also generate theme using other passes as long as you do it AFTER the race-area pass.. I believe it should be possible (order of pass generation is defined by how they’re sorted in the pass list).

    You can use:
    – ‘Pass – Placement Generator (Theme/Overlay)’
    – ‘Pass – Placement Generator (Continent)’

    It works the same as the other passes of this type, only replace the setting ‘Placement Theme/Overlay’ so that:
    Overlay = None
    Theme = Shadow Realm

    #243138

    Gloweye
    Member

    yeah, shadow realm was just an example.

    But thanks a lot. I’ll have a good look at it.

    #243143

    Gloweye
    Member

    Ok, I’m going to make an attempt to solve it using other passes, and try if I can scale those inversely with the other passes, or something like that. (That said, a multiplier with the factors would make that completely obsolete. So my preference is clear 🙂 )

Viewing 11 posts - 1 through 11 (of 11 total)

You must be logged in to reply to this topic.