Skip to content

Commit

Permalink
docs: reorder docs into relevent sections
Browse files Browse the repository at this point in the history
  • Loading branch information
scarf005 committed Sep 11, 2023
1 parent e539494 commit 31c8476
Show file tree
Hide file tree
Showing 34 changed files with 52 additions and 56 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ coordinates do. The z coordinate is relative to the vehicle origin.
## Point types

To work with these coordinate systems we have a variety of types. These are defined in
[`coordinates.h`](../src/coordinates.h). For example, we have `point_abs_ms` for absolute map-square
[`coordinates.h`](../../json/src/coordinates.h). For example, we have `point_abs_ms` for absolute map-square
coordinates. The three parts of the type name are _dimension_ `_` _origin_ `_` _scale_.

- **dimension** is either `point` for two-dimensional or `tripoint` for three-dimensional.
Expand Down
2 changes: 1 addition & 1 deletion doc/src/content/docs/en/i18n/reference/gender.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ translations depending on the gender of the conversation participants. This two
configuration.

1. The dialogue must have the relevant genders listed in the json file defining it. See
[the NPC docs](../../json/reference/NPCs).
[the NPC docs](../../json/reference/npc/NPCs).
2. Each language must specify the genders it wishes to use via `genders` list of the language's
entry in `data/raw/languages.json`. Don't add genders there until you're sure you will need them,
because it will make more work for you. Current choices are: `m` (male), `f` (female), `n`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Files that will be edited:

## Making the Roof Map

Refer to [MAPGEN](./MAPGEN.md) for creating the map if you are new to map creation.
Refer to [MAPGEN](../reference/map/mapgen) for creating the map if you are new to map creation.

Open the file that contains the map for the building `data/json/mapgen/[name of building].json` Add
a new entry for the roof. You can copy the building entry since you want the same foundation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ title: Guide for basic mapgen
This guide will cover the basics of mapgen, which files you need to edit, the tags in each file and
the differences in creating specials or regular city buildings.

[For full technical information about mapgen entries, visit here](./MAPGEN.md)
[For full technical information about mapgen entries, visit here](../reference/map/mapgen)

First, lets cover some basic concepts and the files you'll add or edit.

Expand Down Expand Up @@ -86,7 +86,7 @@ Before beginning you’ll want to make some decisions:
#### The mapgen map:

This covers the mapgen file map flags and what they do in layman’s terms. You can get more extensive
information from [MAPGEN](./MAPGEN.md).
information from [MAPGEN](../reference/map/mapgen).

the mapgen file has some meta data tags and the `"object"` data which defines everything to make the
map.
Expand Down Expand Up @@ -289,7 +289,7 @@ can put any item_group into the machines, like those bullet ones_.

6. Item spawns: There are many ways to place items. This tutorial will only cover explicit symbol
placement which is the easiest. There is documentation all about loot spawns you can read for
further information. See: [ITEM_SPAWN.md](./ITEM_SPAWN.md).
further information. See: [ITEM_SPAWN.md](../reference/items/ITEM_SPAWN).

our sample uses "items": for its tag. others include: "place_item", "place_items", "place_loot".
Some of these allow for individual item placement and others groups, or both. This will be covered
Expand Down Expand Up @@ -494,7 +494,7 @@ sample roof:
"t_shingle_flat_roof" in this mapgen which will override the palettes entry for
`".": "t_flat_roof"`. (more on this in advanced mapgen).

I have a separate roof document at: [JSON_ROOF_MAPGEN](./JSON_ROOF_MAPGEN.md).
I have a separate roof document at: [JSON_ROOF_MAPGEN](./JSON_ROOF_MAPGEN).

#### Linking various mapgen maps using multitile_city_buildings.json

Expand Down Expand Up @@ -596,9 +596,9 @@ Example:
percentage so `[ 1, 10 ]` wouldn't be 1 to 10 times per overmap but a 1 in 10% chance to spawn on
the overmap. So 10% chance to spawn once per overmap.
8. `"flags"`: These are flags you can use to further define the special. For a list of flags see:
[JSON_FLAGS](./JSON_FLAGS.md).
[JSON_FLAGS](../reference/JSON_FLAGS).

Read: [OVERMAP](./OVERMAP.md) for more details.
Read: [OVERMAP](../reference/map/OVERMAP) for more details.

#### Overmap_terrain entries:

Expand Down Expand Up @@ -643,7 +643,8 @@ You need one entry per mapgen ID:
8. `"extend"` many of these flags will be used by NPCs in the future for their AI, try to add flags
appropriate for your location. Others further define the mapgen, like having sidewalks generate.

For further information see: [Overmap Terrain section of OVERMAP](./OVERMAP.md#overmap-terrain).
For further information see:
[Overmap Terrain section of OVERMAP](../reference/map/OVERMAP#overmap-terrain).

#### Palettes:

Expand Down
8 changes: 4 additions & 4 deletions doc/src/content/docs/en/json/reference/JSON_INFO.md
Original file line number Diff line number Diff line change
Expand Up @@ -183,10 +183,10 @@ each json file. These properties are:
| Identifier | Description |
| ---------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| type | The type of object this json entry is describing. Setting this entry to 'armor' for example means the game will expect properties specific to armor in that entry. Also ties in with 'copy-from' (see below), if you want to inherit properties of another object, it must be of the same tipe. |
| [copy-from](./JSON_INHERITANCE.md) | The identifier of the item you wish to copy properties from. This allows you to make an exact copy of an item **of the same type** and only provide entries that should change from the item you copied from. |
| [extends](./JSON_INHERITANCE.md) | Modders can add an "extends" field to their definition to append entries to a list instead of overriding the entire list. |
| [delete](./JSON_INHERITANCE.md) | Modders can also add a "delete" field that removes elements from lists instead of overriding the entire list. |
| [abstract](./JSON_INHERITANCE.md) | Creates an abstract item (an item that does not end up in the game and solely exists in the json to be copied-from. Use this _instead of_ 'id'. |
| [copy-from](./items/JSON_INHERITANCE) | The identifier of the item you wish to copy properties from. This allows you to make an exact copy of an item **of the same type** and only provide entries that should change from the item you copied from. |
| [extends](./items/JSON_INHERITANCE) | Modders can add an "extends" field to their definition to append entries to a list instead of overriding the entire list. |
| [delete](./items/JSON_INHERITANCE) | Modders can also add a "delete" field that removes elements from lists instead of overriding the entire list. |
| [abstract](./items/JSON_INHERITANCE) | Creates an abstract item (an item that does not end up in the game and solely exists in the json to be copied-from. Use this _instead of_ 'id'. |

## Formatting

Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
---
title: Recommended reading
title: Basecamps
---

Basecamps leverage many existing aspects of JSON data such as recipes and mapgen. It's recommended
to be familiar with those:

- [JSON info](src/content/docs/en/json/reference/JSON_INFO) has information on common fields for
recipes
- [mapgen](MAPGEN.md), see section 3 about `update_mapgen`
- [JSON info](../JSON_INFO) has information on common fields for recipes
- [mapgen](../map/mapgen), see section 3 about `update_mapgen`

# Adding alternate basecamp upgrade paths

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: Effect data
title: Effects
---

## How to give effects in-game?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: Martial arts and techniques JSON file contents

### Martial arts

```cpp
```json
"type" : "martial_art",
"id" : "style_debug", // Unique ID. Must be one continuous word,
// use underscores if necessary.
Expand Down Expand Up @@ -37,7 +37,7 @@ title: Martial arts and techniques JSON file contents

### Techniques

```cpp
```json
"id" : "tec_debug_arpen", // Unique ID. Must be one continuous word
"name" : "phasing strike", // In-game name displayed
"unarmed_allowed" : true, // Can an unarmed character use this technique
Expand Down Expand Up @@ -75,7 +75,7 @@ title: Martial arts and techniques JSON file contents

### Buffs

```cpp
```json
"id" : "debug_elem_resist", // Unique ID. Must be one continuous word
"name" : "Elemental resistance", // In-game name displayed
"description" : "+Strength bash armor, +Dexterity acid armor, +Intelligence electricity armor, +Perception fire armor.", // In-game description
Expand All @@ -96,7 +96,7 @@ title: Martial arts and techniques JSON file contents

The bonuses arrays contain any number of bonus entries like this:

```cpp
```json
{
"stat": "damage",
"type": "bash",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ player's current kill count that must be killed to complete the mission.
### goal_condition

For "MGOAL_CONDITION", defines the condition that must be satisified for the mission to be
considered complete. Conditions are explained in more detail in [NPCs.md](./NPCs.md), and are used
considered complete. Conditions are explained in more detail in [NPCs.md](./NPCs), and are used
here in exactly the same way.

### dialogue
Expand Down Expand Up @@ -144,7 +144,7 @@ If any of these optional fields are present they can be objects with the followi

#### effect

This is an effects array, exactly as defined in [NPCs.md](./NPCs.md), and can use any of the values
This is an effects array, exactly as defined in [NPCs.md](./NPCs), and can use any of the values
from effects. In all cases, the NPC involved is the quest giver.

#### reveal_om_ter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ List of scenttype_id ignored by this monster. scent_types are defined in scent_t
(string)

Symbol and color representing monster in-game. The symbol must be a UTF-8 string, that is exactly
one console cell width (may be several Unicode characters). See [COLOR.md](./COLOR.md) for details.
one console cell width (may be several Unicode characters). See [COLOR.md](../graphics/COLOR) for details.

## "size"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ talk topic. This goes on until the dialogue is finished, or the NPC turns hostil
Note that it is perfectly fine to have a response that switches the topic back to itself.

NPC missions are controlled by a separate but related JSON structure and are documented in
[the missions docs](MISSIONS_JSON.md).
[the missions docs](MISSIONS_JSON).

Two topics are special:

Expand Down Expand Up @@ -633,8 +633,8 @@ effects should be arranged in a list and are processed in the order listed.
(optional `assign_mission_target` parameters) | With no other parameters, updates the overmap tile
at the player's current location with the changes described in `mapgen_update_id` (or for each
`mapgen_update_id` in the list). The `assign_mission_target` parameters can be used to change the
location of the overmap tile that gets updated. See [the missions docs](MISSIONS_JSON.md) for
`assign_mission_target` parameters and [the mapgen docs](MAPGEN.md) for `mapgen_update`.
location of the overmap tile that gets updated. See [the missions docs](MISSIONS_JSON) for
`assign_mission_target` parameters and [the mapgen docs](../map/mapgen) for `mapgen_update`.

#### Deprecated

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ most useful when the group is very specific to the place it is used and wont eve
else.

As an example: monster death drops (`death_drops` entry in the `MONSTER` object, check
[here](./JSON_INFO.md)) can do this. If the monster is very specific (e.g. a special robot, a unique
[here](../JSON_INFO)) can do this. If the monster is very specific (e.g. a special robot, a unique
endgame monster), the item spawned upon its death won't (in that form) appear in any other group.

Therefore, this snippet:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ whenever the item is spawned a copy of relic data is attached to the item instan

Relic data object can contain the following fields:

```cpp
```json
{
"name": "Boots of Haste", // Overrides default item name
"moves": 100, // (optional) Activation move cost (default 100)
Expand All @@ -27,7 +27,7 @@ Relic data object can contain the following fields:
Relics can recharge under certain conditions. Recharge method is defined as follows (all fields
optional):

```cpp
```json
{
"type": "time", // Defines what resource is consumed. Default: time
"req": "none", // Defines under what conditions recharge works. Default: none (no special requirements)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ However, the following variables impact where and how often stuff gets applied:

**required** Values: _json_ - required

```
```json
"object": { (more json here) }
```

Expand All @@ -117,13 +117,13 @@ a list of IDs, or with a nested list (of lists) of IDs.

With the first form, simply give the ID of an overmap terrain from `overmap_terrain.json`:

```
```json
"om_terrain": "oter_id"
```

In the second form, provide a list of IDs:

```
```json
"om_terrain": [ "house", "house_base" ]
```

Expand Down Expand Up @@ -213,7 +213,7 @@ by "terrain" and optionally "furniture" or other entries below.

Usage:

```
```json
"rows": [ "row1...", "row2...", ..., "row24..." ]
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,15 +198,15 @@ referenced overmap terrains (e.g. the `_north` version for all).
| `id` | Unique id. |
| `name` | Name for the location shown in game. |
| `sym` | Symbol used when drawing the location, like `"F"` (or you may use an ASCII value like `70`). |
| `color` | Color to draw the symbol in. See [COLOR.md](COLOR.md). |
| `color` | Color to draw the symbol in. See [COLOR.md](../graphics/COLOR). |
| `looks_like` | Id of another overmap terrain to be used for the graphical tile, if this doesn't have one. |
| `connect_group` | Specify that this overmap terrain might be graphically connected to its neighbours, should a tileset wish to. It will connect to any other `overmap_terrain` with the same `connect_group`. |
| `see_cost` | Affects player vision on overmap. Higher values obstruct vision more. |
| `travel_cost` | Affects pathfinding cost. Higher values are harder to travel through (reference: Forest = 10 ) |
| `extras` | Reference to a named `map_extras` in region_settings, defines which map extras can be applied. |
| `mondensity` | Summed with values for adjacent overmap terrains to influence density of monsters spawned here. |
| `spawns` | Spawns added once at mapgen. Monster group, % chance, population range (min/max). |
| `flags` | See `Overmap terrains` in [JSON_FLAGS.md](src/content/docs/en/json/reference/JSON_FLAGS). |
| `flags` | See `Overmap terrains` in [JSON_FLAGS.md](../JSON_FLAGS). |
| `mapgen` | Specify a C++ mapgen function. Don't do this--use JSON. |
| `mapgen_straight` | Specify a C++ mapgen function for a LINEAR feature variation. |
| `mapgen_curved` | Specify a C++ mapgen function for a LINEAR feature variation. |
Expand Down Expand Up @@ -290,7 +290,7 @@ level value and then only specify it for individual entries that differ.
| `city_distance` | Min/max distance from a city that the special may be placed. Use -1 for unbounded. |
| `city_sizes` | Min/max city size for a city that the special may be placed near. Use -1 for unbounded. |
| `occurrences` | Min/max number of occurrences when placing the special. If UNIQUE flag is set, becomes X of Y chance. |
| `flags` | See `Overmap specials` in [JSON_FLAGS.md](src/content/docs/en/json/reference/JSON_FLAGS). |
| `flags` | See `Overmap specials` in [JSON_FLAGS.md](../JSON_FLAGS). |
| `rotate` | Whether the special can rotate. True if not specified. |

### Example
Expand Down Expand Up @@ -344,7 +344,7 @@ subset of that for an overmap special, and consequently will not be repeated in
City buildings are not subject to the same quantity limitations as overmap specials, and in fact the
occurrences attribute does not apply at all. Instead, the placement of city buildings is driven by
the frequency assigned to the city building within the `region_settings`. Consult
[REGION_SETTINGS.md](REGION_SETTINGS.md) for more details.
[REGION_SETTINGS.md](./REGION_SETTINGS) for more details.

### Fields

Expand Down Expand Up @@ -426,7 +426,7 @@ the frequency assigned to the city building within the `region_settings`. Consul
| `terrain` | `overmap_terrain` to be placed when the placement location matches `locations`. |
| `locations` | List of `overmap_location` that this subtype applies to. Can be empty; signifies `terrain` is valid as is. |
| `basic_cost` | Cost of this subtype when pathfinding a route. Default 0. |
| `flags` | See `Overmap connections` in [JSON_FLAGS.md](src/content/docs/en/json/reference/JSON_FLAGS). |
| `flags` | See `Overmap connections` in [JSON_FLAGS.md](../JSON_FLAGS). |

## Overmap Location

Expand Down
Loading

0 comments on commit 31c8476

Please sign in to comment.