Modding:Worlds: Difference between revisions

From Caves of Qud Wiki
Jump to navigation Jump to search
m (Teamtoto moved page Modding/Worlds to Modding:Worlds)
m (Add some more detail)
Line 23: Line 23:
|-
|-
| <code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<nowiki><zone></nowiki></code>
| <code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<nowiki><zone></nowiki></code>
|  
| Define the specified zone or range of zones within this world cell. For example, the Rustwell is a single world cell, which includes various zone definitions for the zones included within it's 3x3 parasang area and Z depths. The game currently applies a depth cap of 49 to zone definitions (in <code>XRL.World.ZoneManager.GetZoneBlueprint</code>). As a result, if you define a zone definitions with a <code>Level</code> attribute higher than 49, those definitions are ignored.
|-
|-
| <code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<nowiki><builder></nowiki></code>
| <code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<nowiki><builder></nowiki></code>
|  
| Builders for zones. Zones can have multiple builders, which are applied in succession to generate the zone.
|-
|-
| <code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<nowiki><postbuilder></nowiki></code>
| <code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<nowiki><postbuilder></nowiki></code>
|  
| Postbuilders are similar to builders, but applied afterward.
|-
| <code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<nowiki><population></nowiki></code>
| Not supported or loaded by code (looks like it may have been previously, because there is a <nowiki><population></nowiki> tag included in the game's default Worlds.xml).
|-
|-
| <code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<nowiki><encounter></nowiki></code>
| <code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<nowiki><encounter></nowiki></code>
|  
| Encounters to apply to the zone. These are loaded from EncounterTables.xml.
|-
|-
| <code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<nowiki><feature></nowiki></code>
| <code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<nowiki><feature></nowiki></code>
| loaded by the game but currently not implemented or used for any purpose.
| Loaded by the game but currently not implemented or used for any purpose.
|-
|-
| <code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<nowiki><map></nowiki></code>
| <code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<nowiki><map></nowiki></code>

Revision as of 18:39, 9 August 2020

This page is about modding. See the modding overview for an abstract on modding.
This page is about modding. See the modding overview for an abstract on modding.

Worlds.xml defines many of the important zones on the world map. The game currently only uses one "world", called JoppaWorld, but it is theoretically set up to support more worlds than that.

Structure

Worlds.xml has the following general structure:

XML Tag Description
<worlds>
  <world> auto merged with the game definition if the world with this Name was already defined (the only world currently is JoppaWorld, so you want to use that if you're trying to merge into Qud's world)
    <builder> Any builder class you specify gets added to the list of builders and executed as part of world creation. Must be a class in the XRL.World.WorldBuilders namespace. The only builder used by the base game is JoppaWorldBuilder. Begin a Class name with minus (-) to remove all builders with that class from existing world definition (this would probably be a bad idea though unless you're remaking the entire world by fully replacing JoppaWorldBuilder).
    <cell> Cell nodes are completely overwritten if they have a matching Name to one that already exists in the game files. Cell nodes can inherit from other cell nodes.
      <zone> Define the specified zone or range of zones within this world cell. For example, the Rustwell is a single world cell, which includes various zone definitions for the zones included within it's 3x3 parasang area and Z depths. The game currently applies a depth cap of 49 to zone definitions (in XRL.World.ZoneManager.GetZoneBlueprint). As a result, if you define a zone definitions with a Level attribute higher than 49, those definitions are ignored.
        <builder> Builders for zones. Zones can have multiple builders, which are applied in succession to generate the zone.
        <postbuilder> Postbuilders are similar to builders, but applied afterward.
        <population> Not supported or loaded by code (looks like it may have been previously, because there is a <population> tag included in the game's default Worlds.xml).
        <encounter> Encounters to apply to the zone. These are loaded from EncounterTables.xml.
          <feature> Loaded by the game but currently not implemented or used for any purpose.
        <map>