Caves of Qud

Caves of Qud

View Stats:
Gold Spin Aug 1, 2017 @ 9:43am
how would I go about modding this game
Hi I have been interested in getting into programing for awile and I was told by someone that a great way to learn some of the basics is by moding games. the problem is I have very little knowledge on how to even start adding anything to a game. what I want to try and do is add new mental mutations to the game that give you some of the psi powers from earthbound (considering when I saw that you could get phsycic powers in this that was the first thing I thought of) im not sure exactly how hard that whould be but im willing to go through the challenge it will present to learn more about programing/modding. any advise on how to get started?
< >
Showing 1-4 of 4 comments
AlphaBeard  [developer] Aug 1, 2017 @ 9:44am 
Last edited by AlphaBeard; Aug 1, 2017 @ 9:44am
Gold Spin Aug 1, 2017 @ 11:59am 
this all looks like good information and your lecture on the object system was pretty cool(I think that was you anyways) but I dont understand alot of the basics of programing I can kinda get the bigger picture but im not sure what most of the terminology means. while I can grasp somewhat how the game works I dont know how to even go inside the code or change things. I dunno I dont want to come off as an idiot or anything Im just unsure were to start.
Urumi Aug 3, 2017 @ 3:10am 
Getting started with programming is pretty daunting in general, but since most languages use the same ideas and many have similiar syntax, once you learn the basic concepts of one language you can learn others pretty easily. I didn't really understand these concepts personally until I took an introductory C++ course in college, and I've never found learning from online tutorials very helpful, but there are some links below for good tutorials. I found codeacademy to be helpful for some web languages like javascript.

I would recommend C++ as a language to start with, since it's pretty user friendly but won't make you lazy like Python will. You could also learn Java, or C# (the language that CoQ is written with, I think). Based on my limited experience, I think that good things to understand, in order, are how a computer reads a program, the different data types (integer, floating-point, string, boolean, etc), the commands for input and output, conditional statements (if, else if, else), loop types (while, for), case structures, then data structures like arrays, functions and how to use them, and object-oriented programming and how to use classes.

https://www.codecademy.com/
https://www.tutorialspoint.com/cplusplus/
https://docs.python.org/3/tutorial/index.html
Urumi Aug 3, 2017 @ 3:46am 
Oh to answer the question "how would I go about modding this game," you don't need to know all of that for mods that don't need scripting. If you want to start out making modded object blueprints (which can be anything from items to creatures), you can open your file explorer (if on windows) and go to:

C:\Program Files (x86)\Steam\SteamApps\common\Caves of Qud\CoQ_Data\StreamingAssets\Base

This contains a lot of things in XML files that can be modified, since AlphaBeard was nice. If you want to make modifications all for yourself, you can edit the xml files using notepad or another text editor. If you want to make addons that can be published on the steam workshop, create a folder for your mod in the directory:

C:\Users\[INSERT YOUR USERNAME]\AppData\LocalLow\Freehold Games\CavesOfQud\Mods

Then you can add xml files for your mod to that folder. You name these files after the ones found in C:\Program Files (x86)\Steam\SteamApps\common\Caves of Qud\CoQ_Data\StreamingAssets\Base. For instance, all of the object blueprints are stored in ObjectBlueprints.xml, so if you want to make new object blueprints, name a file in your mod's folder ObjectBlueprints.xml

Inside of this folder write <?xml version="1.0" encoding="utf-8"?> at the very top.

After this point, things will start to get sandwhiched in between elements. Elements are things that look like this: <></>, for instance everything that you want to write in this file has to be sandwhiched in the element <objects></objects>. I'll give you an example of two elements from one of my mods:

<?xml version="1.0" encoding="utf-8"?>
<objects>

<object Name="Folz_Heirloom1" Inherits="BaseBracelet">
<part Name="Armor" AV="0" DV="0" RF="0" WornOn="Arm"></part>
<part Name="Render" DisplayName="Heirloom Bio-Scanner" RenderString="]" ColorString="&amp;C"></part>
<part Name="Commerce" Value="100"></part>
<part Name="Description" Short="A wrist-held display device that gives a detailed readout of its surroundings. Emblazoned with the emblem of your house."></part>
<part Name="Physics" Weight="1" Category="Artifacts"></part>
<part Name="BioScanner"></part>
<tag Name="Tier" Value="4"></tag>
</object>

<object Name="Folz_Heirloom2" Inherits="BaseBracelet">
<part Name="Armor" AV="1" DV="0" RF="0" WornOn="Arm"></part>
<part Name="Render" DisplayName="Heirloom Force-Field Emitter" RenderString="]" ColorString="&amp;C"></part>
<part Name="Commerce" Value="100"></part>
<part Name="Description" Short="An advanced wrist-held force-field emitter. Emblazoned with the emblem of your house."></part>
<part Name="EnergyCellSocket" SlotType="EnergyCell"></part>
<part Name="Physics" Weight="1" Category="Artifacts"></part>
<part Name="ForceEmitter"></part>
<tag Name="Tier" Value="4"></tag>
</object>


</objects>

Everything like Name="" and Inherits="" is called an Attribute. You define all of the things that the game reads to make this object in there, which are easiest to remember by mimicking things in ObjectBlueprints.xml.

If you want to make scripting mods, you will probably have to learn the names of the functions that you will have to call, using the dll reading tool that AlphaBeard suggests in the tutorial at

https://freehold.atlassian.net/wiki/spaces/CQP/overview.

Hopefully this helped clarify how to get started moding Caves of Qud. Take time to work out either the modding tutorials or the programming ones that I provided in the previous post, depending on what you want to do at this point. It may be confusing, frustrating, or boring at first, but you will get used to it faster than you think and soon enough will be doing some
awesome things.

I would like to clarify again that you do NOT need to learn C# or other programming languages to mod Caves of Qud. You can just mimic things in the XML files until you figure it out, and you can make some pretty cool mods that way.
< >
Showing 1-4 of 4 comments
Per page: 1530 50

Date Posted: Aug 1, 2017 @ 9:43am
Posts: 4