Pockets are a layer of World Generation. A Pocket is a collection of Biomes and defines a whole level that will be encountered during an Expedition. Besides the definition of what Biomes it contains, a Pocket allows to define which kind of Locations are spawned, the type of goals or ambient sounds. The focus of tuning Pockets is heavily focused on Location spawning. |
Example[]
This example is slightly shortened for improved readability. Go to GitHub to see the unedited entry.
{ id: pck-grass name: txt-pck-grass-name flags: +jungle previewSprite: hud_worldmap_pocketPreview_grass.png slotMarker: hud_mapMarker_grass.png ambientSound: sfx_loop_grasslands_1 goals: [gol-goldenTemple-moonStone, gol-goldenTemple-buried] locations: [ [ {ref: grp-village} {ref: grp-sanity-nature} { select: 3 group: [ {ref: grp-village} {ref: grp-sanity-nature} ] } ] [ {ref: grp-cave} {ref: grp-cave} {ref: grp-loot} ] ] borderBiome: [ {slots: 2, ref: bio-outside-sea} ] biomes: [ {ref: bio-grasslands-generic} {chance: 0.9, ref: bio-grasslands-jungle} { chance: 0.1 group: [ {slots: 1, group: grp-desert-sanity, reqDifficulty: 1..} {slots: 1, group: grp-drylands-sanity} ] } ] }
Properties[]
Name | Type | Description & Example |
---|---|---|
id | string | prefix pck-
id: pck-grass |
name | string | The name of the Pocket. Will be shown to Players on the map selection screen
name: txt-pck-grass-name |
flags | string | The types of flags set for this Pocket
flags: +grass +mountain +water |
previewSprite | string | The preview image that will be shown to Player on the map selection screen
previewSprite: hud_worldmap_pocketPreview_grass.png |
slotMarker | string | The little flag that will be put on the expedition destination on the map selection screen
slotMarker: hud_mapMarker_grass.png |
goals | string | One or more goals that will be spawned in this Pocket
goals: [gol-goldenTemple-moonStone, gol-goldenTemple-buried] |
biomes | string | One or more Biomes that will be spawned to form this Pocket. Can be enhanced by using Selection Groups. For more information on spawning Biomes in Pockets, read the section #Biome Spawning in Pockets
biomes: [ {ref: bio-grasslands-generic} {chance: 0.5, ref: bio-grasslands-jungle} ] |
borderBiomes | string | One or more Border Biomes that will be spawned as a border around the actual Biomes of this Pocket
borderBiome: [ {slots: 2, ref: bio-outside-sea} {slots: 1, ref: bio-outside-jungle} ] |
locations | string | One or more locations that will be spawned within the Biomes of this Pocket. Can be enhanced by using Selection Groups
locations: [ {ref: grp-village} {ref: loc-mission} {ref: grp-sanity-nature} {ref: grp-sanity-nature} ] |
ambientSound | string | A soundfile that is played in a loop during the expedition
ambientSound: sfx_loop_grasslands_1 |
Biome Spawning in Pockets[]
Spawning Biomes in a Pocket follows some special rules, since a Pocket has a defined maximum amount of Biomes as defined in the World entry containing the Pocket. Also, as with Locations, the list of spawned Modding:Biomes can be enhanced by using Selection Groups. So if the World that contains a given Pocket has this biomeCount defined
biomeCount: [2, 1]
it means that the Pocket will be allowed to spawn 2 Biomes (2 wide / 1 high). Keep in mind that a Pocket can be part of many different World tunings, so you can almost never be certain how many Biomes exactly are allowed for a Pocket. For example, the typical Expedition 6 Pockets are allowed to spawn 6 Biomes.
When a Pocket is generated it starts at the top of it's biomes list and keeps filling up the allowed amount of Biome until they are full. If the end of the list is reached before the allowed amount of Biomes is reached the list will start from the top again.
Let's look at the biomes of pck-grass as an example (added line numbers for easier identification):
1 biomes: [ 2 {ref: bio-grasslands-generic} 3 {chance: 0.9, ref: bio-grasslands-jungle} 4 { 5 chance: 0.1 6 group: [ 7 {slots: 1, group: grp-desert-sanity, reqDifficulty: 1..} 8 {slots: 1, group: grp-drylands-sanity} 9 ] 10 } 11 {group: grp-grasslands-sanity} 12 { 13 chance: 0.3 14 reqWorld: 3.. 15 group: [ 16 {slots: 2, group: grp-desert-sanity, reqDifficulty: 1..} 17 {slots: 1, group: grp-drylands-sanity} 18 ] 19 } 20 {select: 5, group: grp-grasslands-sanity} 21 ]
So let's say our Pocket of part of wd-world-4, which means it is allowed to spawn 4 Biomes (3 x 2 = 6 -blockedBiomes:2) . The generation will start at the top of the biomes section.
Line 2: First Biome, bio-grasslands-generic is immediately picked as it has no requirements. 3 Biomes left.
Line 3: With the chance of 0.9 the second Biome is successfully picked, bio-grasslands-jungle. 2 Biomes left.
Line 4-1: The low chance of 0.1 fails, no Biome is picked, still 2 Biomes left.
Line 11: One Biome of the group grp-grasslands-sanity is picked as it has no requirement. 1 Biome left.
Line 15-19 Fails the chance of 0.3, no Biome is picked. 1 Biome left.
Line 20: With no requirement, the last Biome is filled by one entry of the grp-grasslands-sanity group.
So the final Biome selection of this example is:
- 1 x bio-grasslands-generic
- 1 x bio-grasslands-jungle
- 2 x grp-grasslands-sanity
Debugging Biome spawning[]
An extremely helpful Hotkey for debugging the biomes section is X or Q in combination with B . While X and Q will uncover then full map, B will toggle the map between a schematic display of the used Biomes and their containing Locations.