Skip to content
message-circle

GitHub Action

Output Unit Action

v1.0.1 Latest version

Output Unit Action

message-circle

Output Unit Action

Create dialog output units from Daedalus scripts

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Output Unit Action

uses: szapp/output-unit-action@v1.0.1

Learn more about this action in szapp/output-unit-action

Choose a version

Output Unit GitHub Action

CI Coverage Marketplace

GitHub action for generating dialog output units from Daedalus script files.

The action superficially parses Daedalus script files (based off of a source file) for AI_Output commands and generates a valid output unit cutscene library (CSL, ASCII) from them. The resulting file can be used subsequently to for example be committed back to the repository or made available as a workflow artifact on completion (not part of this Action).

Usage

Create a new GitHub Actions workflow in your project, e.g. at .github/workflows/ou.yml. The content of the file should be in the following format. Two optional additional steps are added to illustrate committing the generated file or providing it for download.

name: ou

# Trigger workflow manually and on push events with changes in SRC or D files
on:
  workflow_dispatch:
  push:
    paths:
      - '**.src'
      - '**.SRC'
      - '**.d'
      - '**.D'

permissions:
  contents: write

# The checkout action needs to be run first
jobs:
  output-units:
    name: Generate output units from scripts
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Generate output units
        id: ou
        uses: szapp/output-unit-action@v1
        with:
          srcFile: path/to/Gothic.src # Adjust <--
          outFile: path/to/OU.csl # Adjust <--

      # Optional: If pushed, commit updated file if it changed
      - name: Commit file to repository if changed
        if: github.event_name == 'push' && steps.ou.outputs.changed == 'true'
        run: |
          git config user.name $(git log -1 --format=%an)
          git config user.email $(git log -1 --format=%ae)
          git add .
          git commit -m "Update output units"
          git push

      # Optional: If manually triggered, provide as artifact for download
      - name: Upload file as artifact
        if: github.event_name == 'workflow_dispatch'
        uses: actions/upload-artifact@v4
        with:
          name: Output Units
          path: path/to/OU.csl # Adjust <--
          overwrite: true

Configuration

Inputs

  • srcFile: Path to Daedalus source file (e.g. path/to/Gothic.src) listing relevant scripts. Required.

  • outFile: Path to output file (e.g. path/to/OU.csl). Required.

Outputs

  • changed: Whether or not the output units changed in comparison to an existing outFile. This output can be accessed by subsequent steps as seen in the example above.