Modding:Pets
Pets are primarily provided to Patreon members for supporting the Caves of Qud community. However, the system used to mod in pets exists within the base game, and it's relatively straightforward to mod in your own pet with just XML.
Modding in a custom pet
Technically, the only thing that you need in order to mod in a custom pet is to add
<tag Name="StartingPet" />
to its blueprint. For example, the following XML is sufficient to add a snapjaw scavenger pet to the game:
<?xml version="1.0" encoding="utf-8" ?>
<objects>
<object Name="Snapjaw Scavenger Pet" Inherits="Snapjaw Scavenger">
<tag Name="StartingPet" />
</object>
</objects>
This will cause a snapjaw scavenger
pet to appear in the character customization menu.
In practice, however, you will usually want to give your pet custom skills, mutations, stats, and so on. In addition, pets are usually differentiated from regular creatures in the following ways:
- They have the
Pettable
part, and thePetResponse
tag. - They have a unique tile (see Modding:Tiles).
- They have the
Story
property, which points to a unique story written relating to the pet. - They have a unique conversational script (see Modding:Conversations).
None of these are strictly necessary; for instance, Hylaeus uses the regular conversational script for dogs. However, these components help to round out your pet and flesh them out as unique characters.
Pettable
To make a pet pettable, you will need to give them the Pettable
part, as well as the PetResponse
tag. The value assigned to PetResponse
is a comma-separated list of the different responses that the pet can have. Continuing our snapjaw scavenger pet example from before, here is how you would define some custom pet responses for your snapjaw pet:
<?xml version="1.0" encoding="utf-8" ?>
<objects>
<object Name="Snapjaw Scavenger Pet" Inherits="Snapjaw Scavenger">
<part Name="Pettable" />
<tag Name="PetResponse" Value="licks you,growls" />
<tag Name="StartingPet" />
</object>
</objects>
Story
To give your pet its own backstory, you should give them the Story
property. For example:
<?xml version="1.0" encoding="utf-8" ?>
<objects>
<object Name="Snapjaw Scavenger Pet" Inherits="Snapjaw Scavenger">
<part Name="Pettable" />
<property Name="Story" Value="My Snapjaw Scavenger Story" />
<tag Name="PetResponse" Value="licks you,growls" />
<tag Name="StartingPet" />
</object>
</objects>
Then in Books.xml
, you can define a story under the My Snapjaw Scavenger Story
ID:
<?xml version="1.0" encoding="utf-8" ?>
<books>
<book ID="My Snapjaw Scavenger Story" Title="{{W|My Story Title}}">
<page>
Write your story for your creature here!
</page>
</book>
</books>