Zone tier: Difference between revisions

From Caves of Qud Wiki
Jump to navigation Jump to search
Line 92: Line 92:
* <code>XRL.World.WorldBuilders.JoppaWorldBuilder.getLocationWithinNFromTerrainTypeTier()</code>
* <code>XRL.World.WorldBuilders.JoppaWorldBuilder.getLocationWithinNFromTerrainTypeTier()</code>


These methods are used for placing surface locations, placing village quests, and historic site discovery XP; since no existing zone tier overrides apply to surface locations, not applying overrides in these methods doesn’t change the game’s behavior.  
These methods are used for placing surface locations, placing village quests, and historic site discovery XP; since no existing zone tier overrides apply to surface locations, not applying overrides in these methods doesn’t change the game’s behavior. As such, the main article assumes universal overrides to make explanations easier.


[[Category:Mechanics]][[Category:World]]
[[Category:Mechanics]][[Category:World]]

Revision as of 14:14, 22 June 2022

This article has information that is missing or not up to par.
Reason: Needs updated map that includes the Deep Jungle areas from the latest game version.

Each zone (or screen) that a player explores has a particular difficulty tier typically referred to as the Zone tier.

Zone tier is one significant factor that contributes to the procedural generation of features in Caves of Qud, such as the level and difficulty of creatures that are found in a particular zone, or the items that can be obtained as random loot from a chest in that zone. Procedural generation is also influenced by other factors, such as the terrain type of the current zone and whether or not the current zone is part of a village or a unique location.

Zone tier is determined based on a combination of the following elements:

  • The surface tier of the current world map parasangAn area made of 3x3 screens, which is represented as one tile on the overworld map..
  • The depth of the current zone, if it is underground.

Tiers and Procedural Generation

Elder Irudad with zetachrome pumps

A location's zone tier is generally used as a rough guide for procedural generation of creatures and items in that zone.

For example, in an area with a zone tier of 5, tier 5 creatures (such as dynamic turret tinkers) and tier 5 items (such as fullerite gauntlets) are more likely to be found. Note that zone tier is only one of several factors that affects the dynamic generation of creatures and objects in the world. Specific types of terrain, biomes, unique locations (such as historic sites or dungeons), or other factors can influence the objects and items that are generated in particular zones. This is why, for example, the surface levels of the desert canyons will always contain the same primary creatures, such as snapjaws, equimaxes, and giant dragonflies - this biome has its own unique population/encounter tables.

Most biomes have unique generation tables defined for their surface and levels 1-5 underground.[1] Once you descend to level 6 or lower in most areas, creature and item generation more directly correlates to zone tier and is less strictly defined by terrain-specific spawning logic.

There is also an element of randomness at play. For example, the dynamic loot tables for each zone tier have a small chance to roll upward one tier higher. This effect can chain in succession (although at very low probability), sometimes resulting in loot several tiers higher than expected. For example, Elder Irudad may spawn with tier 8 zetachrome pumps in Joppa at the start of the game, even though Joppa has a very low zone tier.

Creature Tier

Creature tier is based on level and can be given as follows:

Note that this creature tier varies slightly from the tiering used to calculate XP, which can go as low as Tier 0. Refer to the Experience page for more information about XP tiers.

Item Tier

Item tier is manually specified for each item in the game's ObjectBlueprints.xml. You can view the tier of a particular item on its wiki page. For example, a flamethrower is a tier 4 item.

Surface Zone Tier

The subject of this section has no official name presented in-game. As a result, a name for it was chosen at the discretion of wiki editors.

The following map shows the zone tier for all surface areas in Caves of Qud.

22222222211324444444444444444444444444444444444444444444444442444444422444444444
22222222112224442222222444232333333344434444424444444444444442224422224444444444
22222122211224222222112222333333333334433324424444555555544442222224444444448844
22222222211222211222122224333333333333433332422445555555534444422444444444888884
22222222221112211111112233333333333344433324244443555553333444444444444448888884
22222222222111112222223333333333333343333244244433335533334444466666244448888884
22222222222211222211223333333333333344444224244334333333444446466666224444888884
22222222222211222111232333333333333343334422224334444444444446666667724444888844
22222222222112221112233333343333333343333332244444444444466666666666222244888844
22222222222122212112233343333344333443333333444333344444466666677666662288888844
22222222222111222122233333433333333433333333434333333244666666667666666668888884
22222222222112221222333334344433334433333333333333333332266666666776666778888884
22222222222221222212233333333333344333334333433333333333266677666666666676888244
22222222222222122112244343433333444333333333433333333332226666666666666666888824
22222222222222122212221343333444444333333433333333353335522266666666666668888824
22222222222211112222233333334444443333433434333333555355232226666677667667866824
22222222221111111112223333344444443334433333343333555555536622677776666688868824
22222222211211111211223333344444434333333333333333355555556666666777776766668624
22222222211111111211333334444443333333434433333355555555556666676777677676676624
22222222111111112211333444444333333444334333333335555355566666677777776666667624
22222222211111112113333333413333333343333333333333555355666666666777666666676624
22222221111111112211133334433333333333333333333333333333666666666666666667766722
22222221111111112222133333333333333333333333433333334433666666666666666666626222
22222111111111111222213313331113333333113333333333334333336666666667762222222266
22222111111111122222221111111111111111223333333333333333333333337762222222662266
World map.png

Underground Zone Tier

To determine the zone tier for an underground zone:[2]

  • If the current zone is 6 strata or deeper underground:
    1. Calculate 2 + Floor((Strata - 6) / 5).
    2. Modify the result to ensure it is a number between 1 and 8. The result is always constrained to the nearest number within the 1 to 8 range.
  • Otherwise, for any zone higher than 6 strata underground:
    1. Take the surface zone tier at the location.
    2. Modify that value to ensure it is a number between 1 and 8. The result is always constrained to the nearest number within the 1 to 8 range.

Zone tier exceptions

Certain biomes and unique locations override the above rules:

  • Ruins and Baroque Ruins progress underground zone tier more quickly; see their pages for details.
  • The Asphalt Mines have zone tier 3 until the Great Sea, after which they have zone tier 7.
  • Bethesda Susa has uniform zone tier 4.
  • Historic sites have uniform zone tier equal to the tier of the historic site.

Effects of Zone Tier

References

This information is reliable as of patch 2.0.203.49.
  1. Determined by review of Worlds.xml, ZoneTemplates.xml, and PopulationTables.xml.
  2. XRL.World.Zone, property NewTier
  3. XRL.World.WorldBuilders.JoppaWorldBuilder, method AddSultanHistoryLocations
  4. XRL.World.Parts.SultanRegionSurface
  5. XRL.World.Parts.VillageSurface
  6. XRL.World.Parts.JoppaWorldBuilder, method BuildSecrets
  7. XRL.World.Parts.PetEitherOr
  8. XRL.World.Parts.RandomAltarBaetyl
  9. XRL.World.ZoneBuilders.FactionEncounters – Affects anything that uses "FactionEncounters" builder, which is most world zones.
  10. PopulationTables.xml - Possible factions chosen from "GenericFactionPopulation"
  11. XRL.World.ZoneBuildes.PlaceRelicBuilder, method BuildZoneWithRelic
  12. XRL.ZoneTemplate – Applies to anything that uses "{zonetier}" in ZoneTemplates.xml
  13. ObjectBlueprints.xml
  14. XRL.World.Parts.TurretTinker
  15. PopulationTables.xml
  16. HistoryKit.HistoricEvent, method AddQuestsForRegion
  17. XRL.World.WorldBuilders.JoppaWorldBuilder, method AddLairAt
  18. XRL.Annals.InitializeVillage, method Generate
  19. Technical note: Includes {zonetier} stand-ins in all XML files other than ZoneTemplates.xml.
  20. XRL.ZoneTemplate
  21. XRL.World.GameObjectFactory
  22. XRL.World.Encounters.EncounterObject
  23. XRL.World.Encounters.EncounterPopulation
  24. XRL.World.Encounters.EncounterTableObject

General Technical Notes

The following fields and methods return a "zone tier" value based on the "RegionTier" tag on the World Map terrain object and a few overrides, and are used for most applications of the tier system:

  • XRL.World.ZoneManager.zoneGenerationContextTier
  • XRL.World.Zone.NewTier

Those fields and methods determine the overrides discussed in Zoning Exceptions:

  • WorldTerrain.xml, feature Tier
  • XRL.World.ZoneManager.GetZoneProperty(), property "ZoneTierOverride"

The following methods utilize a “zone tier” value directly based on the “RegionTier” tag on the World Map terrain object without applying overrides:

  • XRL.World.ZoneManager.GetZoneTier()
  • XRL.World.WorldBuilders.JoppaWorldBuilder.getLocationOfTier(int)
  • XRL.World.WorldBuilders.JoppaWorldBuilder.getLocationOfTier(int, int)
  • XRL.World.WorldBuilders.JoppaWorldBuilder.getLocationWithinNFromTerrainTypeTier()

These methods are used for placing surface locations, placing village quests, and historic site discovery XP; since no existing zone tier overrides apply to surface locations, not applying overrides in these methods doesn’t change the game’s behavior. As such, the main article assumes universal overrides to make explanations easier.