Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
82 changes: 82 additions & 0 deletions .github/workflows/blank.yml
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not entirely a fan of the name 'blank' for the workflow file, not particularly descriptive.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah i was trying to figure out gh pages, I'll delete it

Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
name: Build documentation

on:
push:
branches: ['master', 'main']
paths: ['Writerside/**', '**/build-docs.yml']
pull_request:
paths: ['Writerside/**', '**/build-docs.yml']
workflow_dispatch:

permissions:
id-token: write
pages: write

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

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]
if: ${{ ! github.event_name == 'pull_request' }}
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
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.
5 changes: 4 additions & 1 deletion Writerside/jrd.tree
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,8 @@
<toc-element topic="warbonds_list.md"/>
<toc-element topic="warbonds_individual.md"/>
</toc-element>
<toc-element toc-title="GlobalEvents">
<toc-element topic="globalEvents_flags.md"/>
</toc-element>

</instance-profile>
</instance-profile>
71 changes: 71 additions & 0 deletions Writerside/topics/globalEvents_flags.md
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall documentation could use work, it reads a little choppy still.
Try moving away from the 'dictionary' style of documentation and describe what global events are, point out which property indicates the global event, and in the example I'm missing what JSON you're showing (is this a planet, dispatch, ...)

Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# Global Events Flags

## dictionary
This json contains a dictionary of key: value pairs, representing the globalEvent flag (which correlates to its type) returned from the Helldivers 2 Status API endpoint.

```json
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would avoid copying the contents of globalEvents_flags here as any update to that file would also need to be made here.
Preferably link to the file itself to make maintenance easier

{
"0": "Stratagem",
"1": "Briefing",
"2": "Success",
"3": "Fail"
}
```
```json
{
"eventId": 1499087,
"id32": 0,
"portraitId32": 0,
"title": "BRIEFING",
"titleId32": 2908633975,
"message": "...",
"messageId32": 46181626,
"race": 1,
"flag": 1, // <-- This one
"assignmentId32": 2311178494,
"effectIds": [],
"planetIndices": []
}
```

### Keys
The key values of the dictionary will be the value that is assigned in the api. In the file you can see that a key of
`"0"` has been assigned to the value `"Stratagem"`, as that is what is shown in the API.

```json
{
"0" // <- The key, which corresponds to the integer in the "flag" field above.
}
```

### Values
The value that is mapped to each key is derived from in-game observation. For example, we have derived that the key `"0"`
is `"Stratagem"` as when in-game, the global event was an additional stratagem that became available for everyone ("Weapons Experimentation" / "Open License" effects).

```json
{
"0": "Stratagem" // <- The value we assigned based off our observations
}
```

As stated above, global events where the value of `flag` is `0` correlate to events where an additional stratagem becomes available for everyone (known as "Weapons Experimentation" / "Open License" effects).

For this kind of global event, the value of `assignmentId32` in the same `globalEvent` object will be the stratagem's internal ID in the game files.

![Global Event with flag=1 in game](../images/globalEvents_flags_stratagem.png)

The other 3 values are all Major Order related, and will trigger an in-game "Incoming Transmission from Super Earth" cutscene when interacting with the war map - in which a modal with a title and text (which are taken from the `title` and `message` properties of the `globalEvent` object respectively) will appear. The text that appears above the modal's top right corner will be determined by the value mapped to the flag assigned by the API.

`"Briefing"` (`flag: 1`) events usually happen at the beginning of Major Orders, while `"Success"` (`flag: 2`) and `"Fail"` (`flag: 3`) appear after a Major Order has been completed or has failed, respectively.

![Briefing](../images/globalEvents_flags_briefing.png)

The text that will appear above the modal will be equal to the the value of `flag` (in uppercase) prepended to the string `"MAJOR ORDER / "` like this:

```json
{
"1": "MAJOR ORDER / BRIEFING",
"2": "MAJOR ORDER / SUCCESS",
"3": "MAJOR ORDER / FAIL"
}
```
6 changes: 6 additions & 0 deletions globalEvents_flags.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"0": "Stratagem",
"1": "Briefing",
"2": "Success",
"3": "Fail"
}