Getting Started
Here’s a bunch of links that contain more information about how set yourself up to make a change to CDDA:
https://github.com/AMurkin/CDDA-GitHub-Start is an illustrated tutorial on setting up a github account, forking and cloning the repo, and pushing a PR.
http://cddawiki.chezzo.com/cdda_wiki/index.php?title=Contributing has the same information in th middle. You can 100% ignore all the stuff about compiling, but it’s the same process to share JSON and code changes, so set up a github account.
Technically, you can just edit the files in your game’s data/json folder, but if you do that while in a git repo, then git will automatically keep track of your changes.
This is mostly about the mod manager app, but it gives the basics of setting up a new mod: http://cddawiki.chezzo.com/cdda_wiki/index.php?title=Mod_manager
There’s a fair bit of documentation in the game already:
Start with the modding guide:
# Modding guide
Certain features of the game can be modified without rebuilding the game from source code. This includes professions, monsters, npcs, and more. Just modify the pertinent files and run the game to see your changes.
The majority of modding is done by editing JSON files. An in-depth review of all json files and their appropriate fields is available in [JSON_INFO.md](JSON_INFO.md).
## Adding a profession.
Let's say we want to add a "survivalist" profession.
We'll say this profession starts with archery, survival, traps, beef jerky and a few survival items. We'll set the starting cost at 3 points since it modifies skills and items. We can do that with the following entries:
````json
{
"ident" : "survivalist",
"name": "Wilderness Survivalist",
"description": "You live off the wild and wander the world; you've never
had a place to live or items other than what you can
scavenge off the land. People called you crazy; now,
after the disaster, you're the sane one.",
This file has been truncated. show original
then the general JSON format guide:
# JSON file contents
## File descriptions
Here's a quick summary of what each of the JSON files contain, broken down by folder.
## `data/json/`
| Filename | Description
|--- |---
| anatomy.json | a listing of player body parts - do not edit
| bionics.json | bionics, does NOT include bionic effects
| body_parts.json | an expansion of anatomy.json - do not edit
| construction.json | definition of construction menu tasks
| default_blacklist.json | a standard blacklist of joke monsters
| doll_speech.json | talk doll speech messages
| dreams.json | dream text and linked mutation categories
| effects.json | common effects and their effects
| emit.json | smoke and gas emissions
| flags.json | common flags and their descriptions
| furniture.json | furniture, and features treated like furniture
This file has been truncated. show original
Before you contribute, make sure you read the JSON style guide and the manual of style for descriptive text:
# JSON Style Guide
Like in `doc/CODE_STYLE.md`, the JSON styling policy is to update JSON as it is added or edited, and in relatively small chunks otherwise in order to prevent undue disruption to development.
We haven't been able to find a decent JSON styling tool, so we wrote our own. It lives in tools/format/format.cpp and it leverages src/json.cpp to parse and emit JSON.
## JSON Example
This example outlines most of the styling features:
```json
[
{
"type": "foo",
"id": "example",
"short_array": [ 1, 2, 3, 4, 5 ],
"short_object": {
"item_a": "a",
"item_b": "b"
},
This file has been truncated. show original
Follow these conventions when adding or editing in-game text:
1. Use US English spelling.
2. Use double sentence spacing after periods. This means that a period that ends a sentence should be followed by two spaces. If the sentence is the last in the block of text, there should be no spaces following it.
3. Use second person point of view (eg. "you").
4. The names of traits, martial arts, and Compact Bionics Modules (CBM's) should be in title case. This means that each word should be capitalized unless it is an article, preposition or conjunction.
5. Items and entities with proper noun names should also be in title case.
6. All other item and entity names should be in all lower-case letters.
7. Use the serial comma (Oxford comma).
More on adding specific types of content