-
Notifications
You must be signed in to change notification settings - Fork 11
added globalEvents flags json and documentation md file #45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
d1d567d
a78cd0e
4229d46
db64291
3f1440f
3959f04
560bfed
99bebe0
09473f1
20c3349
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| 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 |
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Overall documentation could use work, it reads a little choppy still. |
| 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. | ||
DetKewlDog marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| ```json | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would avoid copying the contents of |
||
| { | ||
| "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. | ||
|
|
||
|  | ||
|
|
||
| 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. | ||
|
|
||
|  | ||
|
|
||
| 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" | ||
| } | ||
| ``` | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| { | ||
| "0": "Stratagem", | ||
| "1": "Briefing", | ||
| "2": "Success", | ||
| "3": "Fail" | ||
| } |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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