User Tools

Site Tools


user:loggy:sitegeneration

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
user:loggy:sitegeneration [2021/03/22 16:30]
loggy created
user:loggy:sitegeneration [2021/06/04 12:49] (current)
loggy
Line 1: Line 1:
-====== Site Generation ======+====== Loggy'Site Generation reverse engineering notes ======
  
 Site #loc types Site #loc types
  
-^ flag ^ inspector name ^ actual check ^+^ flag ^ inspector name ^ check ^
 | 1 | plains | None of the following set: sea, highland, swamp, waste, forest, cave, mountains | | 1 | plains | None of the following set: sea, highland, swamp, waste, forest, cave, mountains |
 | 2 | forest | forest, not sea | | 2 | forest | forest, not sea |
Line 17: Line 17:
 | 4096 | n/a | not LA | | 4096 | n/a | not LA |
 | 16384 | unique | unique | | 16384 | unique | unique |
-| 32768 | n/a | generates in caves only, regardless of other parameters - could be used to target coastal caves only |+| 32768 | n/a | cannot generate in caves |
 | 65536 | n/a | sea, not forest | | 65536 | n/a | sea, not forest |
 | 131072 | n/a | sea, not deep sea | | 131072 | n/a | sea, not deep sea |
 +
 +The above, split into two. Any one of the following must be true for the site to be placed:
 +
 +^ flag ^ inspector name ^ actual check ^
 +| 1 | plains | none of the following set: sea, highland, swamp, waste, forest, cave, mountains |
 +| 32 | sea | sea |
 +| 131072 | n/a | sea and not deep sea |
 +| 65536 | n/a | sea and not (kelp) forest |
 +| 2 | forest | forest and not sea |
 +| 4 | mountain | either mountains or highland, and not sea |
 +| 512 | cave | cave |
 +| 128 | swamp | swamp |
 +| 256 | deep sea | deep sea |
 +| 64 | coast | coast (no other terrain type specified) |
 +| 8 | waste | waste |
 +
 +
 +If any of the following are true, the site is NOT ALLOWED to be placed:
 +
 +^ flag ^ inspector name ^ checks for ^
 +| 1024 | n/a | EA |
 +| 2048 | n/a | MA |
 +| 4096 | n/a | LA |
 +| 16384 | unique | unique, and the site has already been placed |
 +| 32768 | n/a | caves |
 +
 +
  
 Terrain local modifiers (in the order they are checked in) Terrain local modifiers (in the order they are checked in)
  
-^ terrain ^ mod ^ +^ terrain                      ^ mod                               
-| manysites | +25 | +| manysites                    | +25                               
-| throne | +20 (stacks with other terrains) | +| throne                       | +20 (stacks with other terrains)  
-| farm | -20 (to a minimum of 5) | +| farm                         | -20 (to a minimum of 5)           
-| waste | +20 | +| waste                        | +20                               
-| cave | +15 | +| cave                         | +15                               
-| kelp forest | +10 | +| kelp forest                  | +10                               
-| forest | +10 | +| forest                       | +10                               
-| mountains | + 10 | +| mountains                    | +10                               
-| highland and UW | +15 | +| highland and UW (IE: gorge)  | +15                               
-| highland | +5 | +| highland                     | +5                                
-| deep sea | +10 |+| deep sea                     | +10                               |
  
 First, generate sites according the the site flags on the terrain %%(these are 2^(13 + path id))%%. If multiple are set, lower ID paths will take precedence. For generation with this method, there is a 5% chance that the site is rarity 2, a (19/80) probability of it being rarity 1, otherwise it is rarity 0. If none of these terrain flags are set, skip this step, otherwise make 100 attempts to generate a site, stopping after one is successful. First, generate sites according the the site flags on the terrain %%(these are 2^(13 + path id))%%. If multiple are set, lower ID paths will take precedence. For generation with this method, there is a 5% chance that the site is rarity 2, a (19/80) probability of it being rarity 1, otherwise it is rarity 0. If none of these terrain flags are set, skip this step, otherwise make 100 attempts to generate a site, stopping after one is successful.
Line 40: Line 67:
 Then move onto normal generation, which is 8 rolls of the following: Then move onto normal generation, which is 8 rolls of the following:
  
-  * Roll d100. If this is less than local site frequency, generate a site:+  * Generate random number between 0 and 99. If this is less than local site frequency, generate a site:
     - 75% chance to be rarity 0.     - 75% chance to be rarity 0.
     - 1/40 to be rarity 2.     - 1/40 to be rarity 2.
user/loggy/sitegeneration.1616430607.txt.gz · Last modified: 2021/03/22 16:30 by loggy