Modding:Interior Zones
This article is a stub. You can help Caves of Qud Wiki by expanding it. |
Interior zones are special zones that can be attached to objects and entered by using the object's enter
action. They can be constructed purely using XML-based mods, and (with sufficient imagination) can simulate vehicles, buildings, and much, much more.
In-game, interior zones are typically used with the Vehicle
part to simulate vehicles:
- Golem
- The various Templar mechs: temple mecha mk Ia, temple mecha mk Ib, and temple mecha mk II.
However, interiors are also used for entirely different purposes by mods:
- Armithaig's Hearthpyre uses interiors to model the inside of tents, tipis, and yurts.
- Mycogrigoric Alcoves (a purely-XML mod) uses interiors to simulate distant space outposts.
Creating an interior zone
You need the following components to create an interior zone in-game:
- a map file (a .rpm created using the map editor) for the zone;
- a cell for the zone in the
Interior
world defined in Worlds.xml; - an object that you want to attach the zone to; and
- an object (typically some kind of door, hatch, portal, etc.) that you have placed inside the zone that you will use as an exit.
Creating vehicles with interior zones
You can use interior zones to create a wide variety of different vehicles using XML modding. To create a vehicle, you must typically create an interior zone using the process outlined in the previous section, and then
- apply the
Vehicle
part (and any other applicable parts) to the same object that you applied theInterior
part to; - add a driver's seat (or some other control mechanism) inside the vehicle interior;
- (if applicable) add a
VehicleEjectionSlot
widget inside the vehicle underneath seats that the player should be able to eject from; - (if applicable) add an object with the
InteriorContainer
part that will allow you to access and trade with the vehicle's inventory.
Limitations of interiors
As of patch 207.82, multi-zone interiors are not supported by the game. If you wish to construct something similar to a multi-zone interior, you will need to mod in your own world.
Note that it is possible to nest interior zones inside of one another. For example, suppose you wanted to simulate a spaceship consisting of several rooms. You could start by creating a Spaceship
object with an Interior
part that allows you to enter the ship's control room. To enter the ship's engine room, you could have an Engine Room Door
object that leads into the zone for the engine room, and so on.
|