User:Kernelmethod/Sandbox: Difference between revisions

Jump to navigation Jump to search
m (Add note about the Blue Ctesiphus tutorial)
No edit summary
Line 32: Line 32:
* How to perform a wish
* How to perform a wish
* The _Quickstart game option
* The _Quickstart game option
* Enabling mods


Prerequisites:
Prerequisites:
Line 40: Line 41:
=== XML ===
=== XML ===


* What is XML?
'''XML''' (the e'''X'''tended '''M'''arkup '''L'''anguage) is a type of ''markup language'', which (loosely speaking) is a text-based document format that can be read and interpreted by a program. Caves of Qud makes extensive use of XML for things like defining creatures, quests, items, conversations, and more. We'll be working with XML a lot throughout this tutorial, so it's helpful to have a little familiarity with XML first.
* Tags vs attributes
 
You can check out the [https://en.wikipedia.org/wiki/XML| Wikipedia page on XML] if you want to learn more about XML. Here's some basic terminology you should be familiar with: in the XML snippet below,
 
<syntaxhighlight lang="xml">
<foo bar="baz" />
</syntaxhighlight>
 
<code>foo</code> is what's called an '''XML tag'''. Meanwhile, <code>bar</code> is an '''attribute''', which (in this case) has been assigned the value <code>baz</code>.
 
You may also see '''comments''' here and there. A comment consists of one or more lines of text between <code>&lt;!--</code> and <code>--&gt;</code>, such as the following:
 
<syntaxhighlight lang="xml">
<!-- This is a comment! -->
 
<!--
  ... and this is also a comment!
-->
</syntaxhighlight>
 
Comments don't do anything by themselves; they're just helpful for documenting things that are going on in your XML.


=== Wishes ===
=== Wishes ===
Line 49: Line 69:
* Adding new mod with <code>manifest.json</code> to the <code>Mods/</code> folder.
* Adding new mod with <code>manifest.json</code> to the <code>Mods/</code> folder.
* At the end of this section, modders should have a no-op mod that appears in their mods list.
* At the end of this section, modders should have a no-op mod that appears in their mods list.
In the <code>Mods/</code> directory, create a new folder called <code>SnapjawMage</code>. We're going to start by creating a manifest file for our mod; this contains metadata such as our mod's title, a description of the mod, and its version. Create a new file called <code>manifest.json</code> inside the <code>SnapjawMage/</code> folder, and paste in the following contents:


<syntaxhighlight lang="json">
<syntaxhighlight lang="json">
Line 56: Line 78:
     "description": "Adds the new Snapjaw Mage creature to Caves of Qud.",
     "description": "Adds the new Snapjaw Mage creature to Caves of Qud.",
     "version": "0.1.0",
     "version": "0.1.0",
     "author": "Pvovya",
     "author": "Pyovya",
     "tags": "Creature",
     "tags": "Creature",
     "PreviewImage": "preview.png"
     "PreviewImage": "preview.png"
}
}
</syntaxhighlight>
</syntaxhighlight>
{| style = "margin: 1em;font-family:Source Code Pro;"
| style = "padding:0em 1em;"| [[File:Mopango_pilgrim.png|40px]]
| style= "color:#155352" | <
| style = "border:1px solid #155352;padding:0.5em 1em;" | Feel free to replace <code>Pyovya</code> with your own name!
|}
We should also get a preview image for the mod. I've made one that you can use here:
IMAGE DOWNLOAD LINK
Download this image and place it in the <code>SnapjawMage/</code> folder, so that now your folder looks like this:


<syntaxhighlight lang="text">
<syntaxhighlight lang="text">
Line 67: Line 101:
└── preview.png
└── preview.png
</syntaxhighlight>
</syntaxhighlight>
Now start up Caves of Qud. In the splash screen, click on "Installed Mod Configuration". If everything went correctly, you should see a new "Snapjaw Mages!" mod appear in your list of installed mods:
[[File:Snapjaw Heros -- Mods List.webp|800px]]
'''''You will be returning to this screen often!'''''
{| style = "margin: 1em;font-family:Source Code Pro;"
| style = "padding:0em 1em;"| [[File:Mopango_pilgrim.png|40px]]
| style= "color:#155352" | <
| style = "border:1px solid #155352;padding:0.5em 1em;" | Every time you make a change to your mod, you will need to go back to this screen and activate the "Save and Reload" option (which you can do by pressing <code>r</code>).
|}


== Your first creature ==
== Your first creature ==