Skip to content

Commit

Permalink
adding guidebooks
Browse files Browse the repository at this point in the history
  • Loading branch information
Peptide90 committed Nov 12, 2024
1 parent c3a81e5 commit edc9cd0
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ Nuclear 14 Game Design
- [Adding a Weapon](en/n14/yaml-contributing/adding-a-weapon.md)
- [Adding a Loadout](en/n14/yaml-contributing/adding-a-loadout.md)
- [Adding Music and Sounds](en/n14/yaml-contributing/adding-music-and-sounds.md)
- [Adding Guidebooks](en/n14/yaml-contributing/adding-guidebooks.md)

- [Mapping](en/n14/mapping.md)
- [PR Guidelines](en/n14/mapping/guidelines.md)
Expand Down
35 changes: 35 additions & 0 deletions src/en/n14/yaml-contributing/adding-guidebooks.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Guidebook Entries
Guidebooks are the equivalent of an in-game wiki and can be hooked into the codebase to automatically generate information or import pictures etc.
Guidebooks have a prototype found in `Resources/Prototypes/Guidebook` or in our case `Resources/Prototypes/_Nuclear14/Guidebooks` and each yaml file is split roughly by the structure you see in game.

For example in `Nuclear14.yml` we have the following guideEntry prototype:
```
- type: guideEntry
id: Nuclear14
name: guide-entry-nuclear14
text: "/ServerInfo/_Nuclear14/Guidebooks/nuclear14.xml"
children:
- N14Crafting
- Factions
- WeaponsAmmo
```
The name is a localisation string, so you'll need to head to `Resources/Locale/en-US/_Nuclear14/guidebooks.ftl` to see the translated name or add any new entries.

The `text` field is the link to the actual contents of the guidebook page, in .xml format.

`children:` is the list of subpages under that heading. So in our case in the guidebook in-game you'll see a Nuclear14 (this entry) and when you click it, you'll se the contents of as shown in the `text:` field but also links to the drop down links to the `children:` pages.

# Guidebook Contents
As mentioned you can find the directory of a guidebooks contents in its `text:` field so lets dive into the above example which can be found at `Resources/ServerInfo/_Nuclear14/Guidebooks/nuclear14.xml`.

These files are in xml format and can be edited in any generic text editor and viewed in a browser. You can view some example xml syntax for formatting [here](https://www.w3schools.com/xml/xml_syntax.asp), and view our existing guidebooks for help formatting.

We can do some useful things with guidebooks such as automatically generate a list of reagents based on their group. See here:
`<GuideReagentGroupEmbed Group="Chems"/>`
This code embeds all reagents with the group "Chems" which is one of the fields in a reagent prototype specified in yaml.

We can also embed singular reagents which will give information about that reagent:
`<GuideReagentEmbed Reagent="Water"/>`

And we can embed entities for their icons:
`<GuideEntityEmbed Entity="N14MaterialRadscorpionTail"/>`
2 changes: 1 addition & 1 deletion src/en/n14/yaml-contributing/adding-music-and-sounds.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Format
All audio in Space Station 14 / Nuclear 14 is stored in the `Resources/Audio` and `_Nuclear14` subfolder respectively. All audio is in .ogg format and you can use many free online converters to change from your chosen audio format to .ogg.
All audio in Space Station 14 / Nuclear 14 is stored in the `Resources/Audio` and `_Nuclear14` subfolder respectively. All audio is in .ogg format and should be MONO not stereo and you can use many free online converters to change from your chosen audio format to .ogg.

Once you've chosen an audio file to add, you'll also need to create an `attributions.yml` file which has all the copyright information in for that file or files. This looks like this:
```
Expand Down

0 comments on commit edc9cd0

Please sign in to comment.