User:Kernelmethod/Sandbox: Difference between revisions

m
Minor fixes to wording
m (Tweak interlocutor CSS to fix images in mobile view.)
m (Minor fixes to wording)
Line 114: Line 114:
|}
|}


We'll start by creating a mod that doesn't actually do anything. To do that, go to Caves of Qud's "offline mods" folder; you can find the location of this folder for your operating system by looking at the page of [[file locations]]. Inside this folder (it should be named <code>Mods</code>), create a folder called <code>Snapjaw-Mages</code>. The first file we're going to create for our mod will be a '''''manifest file'''''; this contains metadata such as our mod's title, a description of the mod, and its version. Create a file called <code>manifest.json</code> inside the <code>Snapjaw-Mages/</code> folder, and paste in the following contents:
Our first goal is to create a mod that doesn't actually do anything. Start by finding Caves of Qud's "offline mods" folder; check the [[file locations]] page to see where this folder is on your operating system. Inside this folder (it should be named <code>Mods</code>), create a subfolder called <code>Snapjaw-Mages</code>. The first file we're going to write for our mod is a '''''manifest file'''''; this contains metadata such as our mod's title, a description of the mod, and its version. Create a file called <code>manifest.json</code> inside the <code>Snapjaw-Mages/</code> folder, and paste in the following contents:


<syntaxhighlight lang="json">
<syntaxhighlight lang="json">
Line 330: Line 330:
=== Changing stats ===
=== Changing stats ===


The base <code>Snapjaw</code> creature that we're inheriting from has really low stats, so we're going to bump up our mage's stats a little.
The base <code>Snapjaw</code> creature that we're inheriting from is pretty weak, so we're going to bump up our mage's stats a little.


<syntaxhighlight lang="xml">
<syntaxhighlight lang="xml">
Line 705: Line 705:
</syntaxhighlight>
</syntaxhighlight>


Now when you spawn one of your mages, you should find that they already have their magical tomes equipped (and they should start using them against you!).
Now when you spawn one of your mages, you should find that they already have their magical tomes equipped.


[[File:Snapjaw_Mages_--_mage_tome_equipped.webp|600px]]
[[File:Snapjaw_Mages_--_mage_tome_equipped.webp|600px]]
Line 964: Line 964:


* Through <code>DynamicObjectsTable</code>, such as the <code>DynamicObjectsTable:Baboons</code> table in the previous example. These tables contain all objects explicitly tagged as belonging to that table.
* Through <code>DynamicObjectsTable</code>, such as the <code>DynamicObjectsTable:Baboons</code> table in the previous example. These tables contain all objects explicitly tagged as belonging to that table.
* Through the use of <code>DynamicInheritsTable</code>. These tables include all objects that inherit from another object. This inheritance doesn't need to be direct -- for example, even though {{favilink|shrewd baboon}} doesn't inherit from <code>Creature</code> (it inherits from <code>Baboon</code>), it would still fall under the dynamic inherits table for <code>Creature</code> since <code>Baboon</code> inherits from <code>BaseApe</code>, which in turn inherits from <code>Humanoid</code>, and which finally inherits from <code>Creature</code>.
* Through the use of <code>DynamicInheritsTable</code>. These tables include all objects that inherit from another object. This inheritance doesn't need to be direct -- for example, even though {{favilink|shrewd baboon}} doesn't inherit from <code>Creature</code> (it inherits from <code>Baboon</code>), it would still fall under the dynamic inheritance table for <code>Creature</code> since <code>Baboon</code> inherits from <code>BaseApe</code>, which in turn inherits from <code>Humanoid</code>, and which finally inherits from <code>Creature</code>.
* Through a <code>DynamicSemanticTable</code>. A dynamic semantic table contains all objects that fall into several intersecting categories, such as "medical" and "furniture".
* Through a <code>DynamicSemanticTable</code>. A dynamic semantic table contains all objects that fall into several intersecting categories, such as "medical" and "furniture".