=======================
GUIDE TO MODDING
=======================TABLE OF CONTENTS
=======================I. Introduction
II. Preparation and Compiling
a. Windows
b. Linux
III. What do all the files do?
IV. Adding Definitions
a. Monsters
b. Items
V. Conclusion
I. INTRODUCTION
=======================In Cataclysm, you'll have to change the game's souce code itself if you want to mod the game. I'll try to describe how to do that in this guide.
The game is written in C++, but while knowledge of programming can be useful, it is not needed. The code was written to be easibly understood and modified.
II. PREPARATION AND COMPILING
=======================While for changing the code you won't need much more than a text editor, you will need a compiler and some additional game resources to recompile it into a playable game.
I'll now describe how to do that for both platforms.
=== a. WINDOWS ===I'll describe how to compile using Code::Blocks, which is an IDE, containing everything you need to develop programs.
You can, of course, use compilers like MinGW directly, though I have been unable to link the libraries there, so I can't document it.
First go to "
https://github.com/headswe/Cataclysm". Press "Download" and grab an archive of the source.
Extract it somewhere.
Second, let's download and install Code::Blocks now. Get the version that's bundled with MinGW.
Once installed, you'll also need to download the libraries like PDCurses and SDL.
Download "
http://www.libsdl.org/release/SDL-devel-1.2.14-mingw32.tar.gz" and put the "bin", "lib" and "include" directories into the MinGW directory.
Download "
http://sourceforge.net/projects/pdcurses/files/pdcurses/3.4/pdc34dlls.zip/download" and put "pdcurses.lib" into the "lib" directory in MinGW, "pdcurses.dll" into "bin" and the ".h" files into "includes".
In the extracted source, look for cataclysm.cbp. This is a Code::Blocks project file. It only needs some configuring and it's ready to compile.
Open it, we'll be now working in Code::Blocks.
Right-click on Cataclysm project and select "Build Options". Go to "Linker Settings" and add "\lib\libSDLmain.a" and "\lib\libSDL.dll.a".
Change the "Other linker options" to have all these: "-lmingw32 -lSDLmain -static -lpdcurses"
Click OK and try to build (compile) the project now. If everything works out fine, you're ready to mod.
=== b. Linux ===On Linux, it is infinitely more simple to compile the source.
First, open the terminal. On Ubuntu, it is accessible under Applications / Accessories.
I'm simply going to list the commands you need to type in now. It may ask you to type in your password or Y to confirm. Do it and continue.
"sudo apt-get install libncurses5-dev", "sudo apt-get install libncursesw5-dev", "sudo apt-get update", "sudo apt-get install g++", "sudo apt-get install git-core"
This is it. Now to pull the source. You're likely in your "home" or "root" directory in the terminal. You can use "ls" to list the directories and "cd" to move into them.
Once you are where you want the source to be, type "git clone git://github.com/Whales/Cataclysm.git". This'll make a directory called Cataclysm and pull the source into it. It might take a while.
Type "cd Cataclysm" to move into the directory". Now type "make" to compile it. If it fails, try "make clean".
If it works, try running the game with "./cataclysm". If that also works, you're ready to mod.