World generation

From Caves of Qud Wiki
Jump to navigation Jump to search
This article has information that is missing or not up to par.
Reason: The deep jungle feature arc added additional historic sites to the game. This page needs to be updated to account for those changes.

Caves of Qud uses procedural generation to create much of its content each playthrough. While a few of the main quest locations are pre-determined or pre-built, such as Grit Gate, most of the rest of the world is largely procedurally generated. Even many main quest dungeons and guaranteed settlements tend to include a large element of procedural generation. For example, the shops and merchants surrounding the Six Day Stilt, in the Stiltgrounds, will be procedurally generated during each playthrough, and much of the interior structures of Golgotha and the Tomb of the Eaters are also procedurally generated.

History

Main article: Sultan histories

A core component of world generation is the history of the sultans. Related to the sultan history are the underlying types of government, historic sites, villages, and other locations.

The history of the sultans will always include 5 initial periods of sultan rule, involving 5 procedurally generated sultans. Those sultans' names, events from their lives, bits of lore that recount those events, and recurring sultan themes that are relevant to each sultan will all be procedurally generated.

The sixth sultan is Resheph - a guaranteed sultan who appears in every playthrough and always has the same fixed events described in his lore.

Regions and Locations

The world generation process creates a variety of named regions and locations that correlate to the five periods of sultan rule. During each period, a handful of additional regions and locations are added to the history, increasing the overall size of the historic region and location pool.[1][2] After the regions and locations are generated for a particular period of the sultanate, the sultan history for that period is generated, using those regions and locations (along with any regions and locations from previous sultanates) as context.

Significant events in each sultan's life that involve named regions or locations will always occur in regions or locations that have been generated as part of the history thus far. For example, a 2nd period sultan will have a minimum of 4-6 regions and 11-18 locations available for possible inclusion in their lore. A 5th period sultan will have the greatest number of regions and locations available for potential inclusion in their lore (a minimum of 10-15 regions and 20-30 locations).

Core World Generation
Sultanate New Regions Locations In Each Region
1st Period 2-32-3 (Avg: 2.5) 6-86-8 (Avg: 7)
2nd Period 2-32-3 (Avg: 2.5) 5-85-8 (Avg: 6.5)
3rd Period 2-32-3 (Avg: 2.5) 4-64-6 (Avg: 5)
4th Period 2-32-3 (Avg: 2.5) 3-43-4 (Avg: 3.5)
5th Period 2-32-3 (Avg: 2.5) 2

In addition to the core regions and locations created as part of initial world generation, sultans can also discover or build new locations (within existing regions), or rename existing locations, during significant events in their lives. Those locations are then added to the pool of available locations in the world from that point forward.

Location-Altering Sultan Lore Events
Sultan Event Outcome
Liberates or sacks a city[3] The location is renamed in the sultan's honor or at the sultan's command
Wins a battle against the forces of the region[4] The location is renamed because it is in ruins
Collaborates with a faction to found a new gathering place[5] A new location is created in a randomly-selected region from the current sultanate or an earlier sultanate.
Discovers a location and befriends a faction[6] A new location is discovered in a randomly-selected region from the current sultanate or an earlier sultanate.

Ultimately, most of the regions and locations that are generated as part of the world history will not be accessible in game. Each region, however, will be mentioned at least once in the corresponding sultan's history from that period. For example, the sultan may have "travelled through" the region as part of one of their notable life events. Locations, on the other hand, may not be referenced anywhere in game or in any sultan histories.

The one notable exception is historic sites, as described below.

Historic Sites

Main article: Historic site

The sultans from period 4 and period 5 are unique because they will each have two procedurally generated historic sites associated with them. These historic sites will always be chosen from among the 2-3 historical regions that were added to the generated world history during those sultan's reign. Regions from earlier parts of the generated history won't be used for this purpose.[7]

The historic sites will be inhabited by sultan cults composed of members from the sultans' favored factions. The sultans' favored factions can generally be observed from the various bits of lore that describe events in the sultans' lives. For example, this snippet of sultan lore indicates that crabs are one of the sultan's favored factions:

While wandering around Abalep Palace, Oroleseh II stumbled upon a clan of crabs performing a secret ritual. Because of her fortuitous eyes, they accepted her into their fold and taught her their secrets.

Historic site generation is controlled both by features from the broader generated world, such as the government type, and by features from their associated sultan, such as the sultan's themes.

References

This information is reliable as of patch 2.0.201.52.
  1. XRL.Annals.QudHistoryFactory
  2. XRL.Annals.InitializeRegion
  3. XRL.Annals.LiberateCity
  4. XRL.Annals.BloodyBattle
  5. XRL.Annals.FoundGuild
  6. XRL.Annals.MeetFaction
  7. XRL.World.WorldBuilders.JoppaWorldBuilder, method AddSultanHistoryLocations