Skip to content

Commit

Permalink
JSON Documentation Initial Commit; Armor Value Fixing (#14)
Browse files Browse the repository at this point in the history
* Update Readme.md and .gitignore

* Initial Implementation of JSON Documentatioon

* Update build-docs.yml

* Update build-docs.yml

* Update build-docs.yml

* Create json-validate.yml

* Implement default pages for most JSONS

* Update for armor.json values

* Add modifier numbers to armor passives.

* Update from images to code blocks

* Implement Weapon json mappings files

* Implement Planet JSONs documentation

* Implement Warbond jsons documentation

---------

Co-authored-by: Chats <chats@irby.us>
  • Loading branch information
chatterchats and Chats authored Apr 22, 2024
1 parent 09d28f7 commit 93495b9
Show file tree
Hide file tree
Showing 43 changed files with 727 additions and 16 deletions.
79 changes: 79 additions & 0 deletions .github/workflows/build-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
name: Build documentation

on:
push:
branches: ['master']
paths: ['Writerside/**']
workflow_dispatch:

permissions:
id-token: write
pages: write

env:
INSTANCE: 'Writerside/jrd'
ARTIFACT: 'webHelpJRD2-all.zip'
DOCKER_VERSION: '233.14938'

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Build docs using Writerside Docker builder
uses: JetBrains/writerside-github-action@v4
with:
instance: ${{ env.INSTANCE }}
artifact: ${{ env.ARTIFACT }}
docker-version: ${{ env.DOCKER_VERSION }}

- name: Save artifact with build results
uses: actions/upload-artifact@v4
with:
name: docs
path: |
artifacts/${{ env.ARTIFACT }}
artifacts/report.json
retention-days: 7
test:
needs: build
runs-on: ubuntu-latest
steps:
- name: Download artifacts
uses: actions/download-artifact@v4
with:
name: docs
path: artifacts

- name: Test documentation
uses: JetBrains/writerside-checker-action@v1
with:
instance: ${{ env.INSTANCE }}
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
needs: [build, test]
runs-on: ubuntu-latest
steps:
- name: Download artifacts
uses: actions/download-artifact@v4
with:
name: docs

- name: Unzip artifact
run: unzip -O UTF-8 -qq '${{ env.ARTIFACT }}' -d dir

- name: Setup Pages
uses: actions/configure-pages@v4

- name: Package and upload Pages artifact
uses: actions/upload-pages-artifact@v3
with:
path: dir

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
23 changes: 23 additions & 0 deletions .github/workflows/json-validate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: json-yaml-validate
on:
push:
branches:
- main
pull_request:
workflow_dispatch:

permissions:
contents: read
pull-requests: write # enable write permissions for pull request comments

jobs:
json-yaml-validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: json-yaml-validate
id: json-yaml-validate
uses: GrantBirki/json-yaml-validate@v2.7.1 # replace with the latest version
with:
comment: "true" # enable comment mode
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/.idea/
/pdfSourceJRD.html
/pdfSourceJRD.pdf
/webHelpJRD2-all.zip
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ A set of JSON files for developing applications with Helldivers 2

### Goals
Provide a set of 'static' information like planets, factions and sectors.
Applications that need this information (because they map from the API etc)
Applications that need this information (because they map from the API etc.)
can pull this data into their application and whenever new data is discovered and added
they can simply update this repository and get the updated information.

Expand Down
6 changes: 6 additions & 0 deletions Writerside/c.list
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE categories
SYSTEM "https://resources.jetbrains.com/writerside/1.0/categories.dtd">
<categories>
<category id="wrs" name="Writerside documentation" order="1"/>
</categories>
Binary file added Writerside/images/item_armor_list_single.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Writerside/images/item_armor_passive.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Writerside/images/item_armor_slot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Writerside/images/mo_reward_amount_highlighted
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Writerside/images/mo_reward_type.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Writerside/images/mo_reward_type_highlighted.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Writerside/images/mo_task_type_highlighted.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Writerside/images/mo_task_values_highlighted.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Writerside/images/mo_task_valuetypes_image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Writerside/images/reward_type_json_image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Writerside/images/task_type_json_image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
45 changes: 45 additions & 0 deletions Writerside/jrd.tree
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE instance-profile
SYSTEM "https://resources.jetbrains.com/writerside/1.0/product-profile.dtd">

<instance-profile id="jrd"
name="JSON Repo Documentation"
start-page="readme.md">

<toc-element topic="readme.md"/>
<toc-element toc-title="Assignments">
<toc-element toc-title="Tasks">
<toc-element topic="task_types.md"/>
<toc-element topic="task_valueTypes.md"/>
</toc-element>
<toc-element toc-title="Rewards">
<toc-element topic="reward_types.md"/>
</toc-element>
</toc-element>
<toc-element toc-title="Items">
<toc-element toc-title="Armor">
<toc-element topic="item_armor_armor.md"/>
<toc-element topic="items_armor_passives.md"/>
<toc-element topic="item_armor_slot.md"/>
</toc-element>
<toc-element toc-title="Weapons">
<toc-element topic="items_weapons_types.md"/>
<toc-element topic="items_weapons_fire_modes.md"/>
<toc-element topic="item_weapons_traits.md"/>
<toc-element topic="items_weapons_primaries.md"/>
<toc-element topic="items_weapons_secondary.md"/>
<toc-element topic="items_weapons_grenades.md"/>
</toc-element>
<toc-element topic="items_boosters.md"/>
<toc-element topic="items_item_names.md"/>
</toc-element>
<toc-element toc-title="Planets">

<toc-element topic="planet_biomes.md"/>
<toc-element topic="planest_environmentals.md"/>
<toc-element topic="planets_planets.md"/>
</toc-element>
<toc-element topic="Warbonds.md"/>


</instance-profile>
9 changes: 9 additions & 0 deletions Writerside/redirection-rules.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE rules SYSTEM "https://resources.jetbrains.com/writerside/1.0/redirection-rules.dtd">
<rules>
<!-- format is as follows
<rule id="<unique id>">
<accepts>page.html</accepts>
</rule>
-->
</rules>
22 changes: 22 additions & 0 deletions Writerside/topics/Warbonds.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Warbonds

## dictionary
The warbond jsons all follow the same pattern found below. They are a dictionary of key: value pairs, where the key is
the page number of the warbond, and the values of that key are the medals_to_unlock the page to be able to access that
page, and items, a Array of Dicts, where each dict is a singular item in the warbond, containing the item ID and the
medals cost of that item.


```json
{
"1": { // <- Warbond Page Number
"medals_to_unlock": 0, // <- Number of medals spent in the individual warbond to gain access to this page
"items": [ // Array[Dict{}] for each item on the indicated page number.
{
"item_id": 00000, // <- Item ID of item in warbond
"medal_cost": 0 // <- How many medals to buy this item.
}
]
}
}
```
40 changes: 40 additions & 0 deletions Writerside/topics/item_armor_armor.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Armor List

## dictionary
This json contains a dictionary of key: value pairs, representing the armors within the game. These were manually
constructed from the HD2 Items API, as well as manual mapping from what we are able to find in game.

```json
{
"012345": { // itemID of Armor.
"name": "Name of the Armor",
"description": "Armor Description.",
"type": 1, // Type of Armor (Light(0) Medium(1) Heavy(2))
"slot": 1, // Slot identifier. Key of slot.json
"armor_rating": 100,
"speed": 100,
"stamina_regen": 100,
"passive": 0 // Passive identifier. Key of passives.json
}
}
```

### Key
The key values of the dictionary is the item_id of the item.


### Value
The values of each Key are a Dictionary containing the information we've been able to compile about that armor.

#### - Keys
Each Key in the value represents an attribute of the armor.


#### - Values
Name and Description being Strings, with slot and passive being references to their respective json files.
Type is the weight class of the armor, with 0 being light, 1 being medium, and 2 being heavy.
All helmets and Capes are classified as medium.
Armor Rating, Speed, and Stamina Regen all come from what we've been able to see in-game.



13 changes: 13 additions & 0 deletions Writerside/topics/item_armor_slot.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Slot

## dictionary
This json contains a dictionary of key: value pairs, representing the arbitrarily assigned Slot IDs, with the values
being a String representation of the name of slot.

```json
{
"0": "Head",
"1": "Cloak",
"2": "Body"
}
```
21 changes: 21 additions & 0 deletions Writerside/topics/item_weapons_traits.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Traits

## dictionary
This json contains a dictionary of key: value pairs, representing the arbitrarily assigned Weapon Trait IDs, with
the values being string representations of the weapon trait names.

```json
{
"0": "None",
"1": "Light Armor Penetrating",
"2": "Medium Armor Penetration",
"3": "Heavy Armor Penetrating",
"4": "One Handed",
"5": "Rounds Reload",
"6": "Explosive",
"7": "Incendiary",
"8": "Beam",
"9": "Heat"
}

```
14 changes: 14 additions & 0 deletions Writerside/topics/items_armor_passives.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Passives

## dictionary
This json contains a dictionary of key: value pairs, representing the arbitrarily assigned Passive IDs, with the values
being dictionaries containing Name and Description of each known passive.

```json
{
"0": {
"name": "Standard Issue",
"description": "No additional bonuses."
}
}
```
18 changes: 18 additions & 0 deletions Writerside/topics/items_boosters.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Boosters

## dictionary
This json contains a dictionary of key: value pairs, representing the booster itemIds, with the values
being dictionaries containing Name and Description of each known booster.

```json
{
"684729784": {
"name": "Stamina Enhancement",
"description": "Increases all Helldivers' stamina capacity and recovery."
},
"876985512": {
"name": "Localization Confusion",
"description": "Increases the time between enemy encounters."
}
}
```
30 changes: 30 additions & 0 deletions Writerside/topics/items_item_names.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Item Names

## dictionary
This json contains a dictionary of key: value pairs, with the keys being itemIds, with the values
being dictionaries containing item Name and mixID.

Only items that have been data-mined / are in-game have been mapped, except for the starting Liberator,
Peacemaker, and G-12 High Explosive, for which we don't have proper itemIds for, so they have been assigned itemIds of
3, 4, and 2 respectively.

```json
{
"2": {
"name": "G-12 High Explosive",
"mix_id": "2"
},
"3": {
"name": "AR-23 Liberator",
"mix_id": "3"
},
"4": {
"name": "P-2 Peacemaker",
"mix_id": "4"
},
"34232232": {
"name": "SC-30 Trailblazer Scout",
"mix_id": "34232232"
}
}
```
15 changes: 15 additions & 0 deletions Writerside/topics/items_weapons_fire_modes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Fire Modes

## dictionary
This json contains a dictionary of key: value pairs, representing the arbitrarily assigned Weapon Fire Mode IDs, with
the values being string representations of the weapon fire mode names.

```json
{
"0": "Semi Automatic",
"1": "Burst",
"2": "Automatic",
"3": "Pump Action",
"4": "Double Action"
}
```
18 changes: 18 additions & 0 deletions Writerside/topics/items_weapons_grenades.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Grenades

## dictionary
This json contains a dictionary of key: value pairs, with the keys representing the grenade itemIds, with the values
being a dictionary containing weapon attributes.

```json
{
"1": { // <- Grenade Item ID
"name": "Grenade Name",
"description": "Grenade Description",
"damage": 400,
"penetration": 4,
"outer_radius": 7,
"fuse_time": 3.5
}
}
```
Loading

0 comments on commit 93495b9

Please sign in to comment.