diff --git a/.github/workflows/blank.yml b/.github/workflows/blank.yml new file mode 100644 index 0000000..54346fc --- /dev/null +++ b/.github/workflows/blank.yml @@ -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 diff --git a/Writerside/images/globalEvents_flags_briefing.png b/Writerside/images/globalEvents_flags_briefing.png new file mode 100644 index 0000000..4519d2b Binary files /dev/null and b/Writerside/images/globalEvents_flags_briefing.png differ diff --git a/Writerside/images/globalEvents_flags_stratagem.png b/Writerside/images/globalEvents_flags_stratagem.png new file mode 100644 index 0000000..06e6d65 Binary files /dev/null and b/Writerside/images/globalEvents_flags_stratagem.png differ diff --git a/Writerside/jrd.tree b/Writerside/jrd.tree index 9b79291..a0c7de1 100644 --- a/Writerside/jrd.tree +++ b/Writerside/jrd.tree @@ -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> \ No newline at end of file +</instance-profile> diff --git a/Writerside/topics/globalEvents_flags.md b/Writerside/topics/globalEvents_flags.md new file mode 100644 index 0000000..c53f679 --- /dev/null +++ b/Writerside/topics/globalEvents_flags.md @@ -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 +{ + "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" +} +``` \ No newline at end of file diff --git a/globalEvents_flags.json b/globalEvents_flags.json new file mode 100644 index 0000000..bd1fc05 --- /dev/null +++ b/globalEvents_flags.json @@ -0,0 +1,6 @@ +{ + "0": "Stratagem", + "1": "Briefing", + "2": "Success", + "3": "Fail" +}