Skip to content

feat: Finished squad modding and tavish dark angels work#1165

Merged
OH296 merged 12 commits into
Adeptus-Dominus:mainfrom
OH296:squad_build_modding
May 12, 2026
Merged

feat: Finished squad modding and tavish dark angels work#1165
OH296 merged 12 commits into
Adeptus-Dominus:mainfrom
OH296:squad_build_modding

Conversation

@OH296
Copy link
Copy Markdown
Collaborator

@OH296 OH296 commented May 11, 2026

Purpose and Description

  • Self-descriptive.
  • as per pr title
  • uses the data type of "base" = "command" rather than looking for the squad id "command_squad"
  • adds in company modding from tavish
  • modding provided by tavish for da

Testing done

  • None, and I understand the risks.

Related things and/or additional context


Summary by cubic

Adds per-company squad_builder and company composition overrides, and finishes Dark Angels content with Deathwing/Ravenwing line and command squads, artifacts with slot assignments, and full/complex/company livery data. Command-squad behavior now keys off type_data.base instead of type.

  • New Features

    • Data loading: scr_chapter_new now reads squad_builder and companies; scr_initialize_custom merges builders into chapter_squad_arrangement, injects custom_squads into squad_types, and applies per-company counts (e.g., veterans, vehicles).
    • Engine/UI: added UnitSquad.base (default "tactical"); command checks use base == "command" in company ordering and management UI; base_squads.json marks command squads; fixed UnitGroup squad index scoping.
    • Dark Angels (chapter 1): expanded JSON with artifacts and slot assignments, full/complex/company liveries, updated names/titles and fleet/specialists; squad_builder auto-builds 1st (Deathwing) and 2nd (Ravenwing) with required command squads; new deathwing_* and ravenwing_* squads with allowed_companies and type_data.base.
  • Migration

    • For custom command squads, set "base": "command" under type_data (defaults to "tactical").
    • Replace any checks for type == "command_squad" with base == "command".

Written for commit b797505. Summary will update on new commits.

@github-actions github-actions Bot added Area: JSON Changes to external JSON files or their under-the-hood functionality Size: Epic Type: Feature Adds something new labels May 11, 2026
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

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

0 issues found across 1 file (changes from recent commits).

Shadow auto-approve: would require human review. This PR makes large-scale changes to core game systems by swapping squad identification from type-based to a new base field, adds significant new data and logic for chapter squad building, and touches multiple critical scripts (initialization, company ordering, squad management) with no testing, so

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

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

16 issues found across 8 files

Confidence score: 2/5

  • There is a concrete high-impact regression risk in datafiles/main/chapters/1.JSON: an extra colon in the homeworld_exists key appears to break JSON parsing and can trigger a chapter-load crash.
  • Several medium-severity state-leak issues in scripts/scr_chapter_new/scr_chapter_new.gml and scripts/scr_squads/scr_squads.gml suggest chapter/squad overrides may persist when fields are absent, causing incorrect setup across transitions.
  • scripts/scr_company_order/scr_company_order.gml and scripts/scr_initialize_custom/scr_initialize_custom.gml also show logic-flow concerns (stale base guard behavior and repeated cross-company overwrite loops), which increases behavioral risk until cleaned up.
  • Pay close attention to datafiles/main/chapters/1.JSON, scripts/scr_chapter_new/scr_chapter_new.gml, scripts/scr_squads/scr_squads.gml, scripts/scr_company_order/scr_company_order.gml, and scripts/scr_initialize_custom/scr_initialize_custom.gml - parser breakage and stale state/looping logic can affect chapter initialization and squad behavior.
Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="scripts/scr_initialize_custom/scr_initialize_custom.gml">

<violation number="1" location="scripts/scr_initialize_custom/scr_initialize_custom.gml:1700">
P2: Custom agent: **Code Quality Review**

Nesting depth exceeds 3 levels (if → for → for → if = 4). Rule requires flagging blocks with nesting > 3.</violation>

<violation number="2" location="scripts/scr_initialize_custom/scr_initialize_custom.gml:2365">
P2: Inner loop iterates all 10 companies inside outer loop already iterating all companies. Redundant. Overwrites cross-company mutations (like `companies.tenth.scouts -= _moved_scouts`) repeatedly. Scope overrides to current company `_name`.</violation>
</file>

<file name="scripts/scr_draw_management_unit/scr_draw_management_unit.gml">

<violation number="1" location="scripts/scr_draw_management_unit/scr_draw_management_unit.gml:520">
P3: Custom agent: **Code Quality Review**

Magic string for squad base. Use typed constant/enum instead of raw `"command"`.</violation>
</file>

<file name="scripts/scr_chapter_new/scr_chapter_new.gml">

<violation number="1" location="scripts/scr_chapter_new/scr_chapter_new.gml:484">
P2: `squad_builder` not cleared when missing in chapter data. Old chapter override can leak into later chapter selection.</violation>

<violation number="2" location="scripts/scr_chapter_new/scr_chapter_new.gml:492">
P2: `companies` not cleared when absent in chapter JSON. Previous chapter company overrides can persist and mutate next chapter setup.</violation>
</file>

<file name="scripts/scr_squads/scr_squads.gml">

<violation number="1" location="scripts/scr_squads/scr_squads.gml:227">
P2: `base` not reset when new squad type lacks `type_data.base`; stale value leaks across `change_type()` calls.</violation>
</file>

<file name="scripts/scr_company_order/scr_company_order.gml">

<violation number="1" location="scripts/scr_company_order/scr_company_order.gml:52">
P2: Base-only command guard can skip cleanup for invalid non-command squads when `base` is stale after type changes. Use canonical squad type_data (or reset `base` on change_type) before this check.</violation>
</file>

<file name="datafiles/main/chapters/1.JSON">

<violation number="1" location="datafiles/main/chapters/1.JSON:6">
P2: Lore typo. Primarch name is 'El'Jonson' not 'El'Johnson'.</violation>

<violation number="2" location="datafiles/main/chapters/1.JSON:19">
P1: Key typo. Extra colon breaks JSON parsing for key. Game expects `homeworld_exists`. Triggers crash comment warns about.</violation>

<violation number="3" location="datafiles/main/chapters/1.JSON:122">
P2: Typo. 'MEthias' must be 'Methias'.</violation>

<violation number="4" location="datafiles/main/chapters/1.JSON:134">
P2: Typo. 'El'Johnson' must be 'El'Jonson'. Missing space after comma.</violation>

<violation number="5" location="datafiles/main/chapters/1.JSON:152">
P2: Typo. 'Heavenflall' must be 'Heavenfall'.</violation>

<violation number="6" location="datafiles/main/chapters/1.JSON:182">
P3: Grammar typo. 'an Fallen' should be 'a Fallen'.</violation>

<violation number="7" location="datafiles/main/chapters/1.JSON:212">
P3: Typos. 'he Aegis' instead of 'the Aegis'. 'Hexagramaton' instead of 'Hexagrammaton'.</violation>

<violation number="8" location="datafiles/main/chapters/1.JSON:218">
P3: Grammar typo. 'without damaged' should be 'without damage'.</violation>

<violation number="9" location="datafiles/main/chapters/1.JSON:230">
P3: Capitalization typo. 'its' should be 'Its'.</violation>
</file>

Shadow auto-approve: would not auto-approve because issues were found.

Comment thread datafiles/main/chapters/1.JSON Outdated
Comment thread scripts/scr_initialize_custom/scr_initialize_custom.gml
Comment thread scripts/scr_chapter_new/scr_chapter_new.gml
Comment thread scripts/scr_chapter_new/scr_chapter_new.gml
Comment thread scripts/scr_squads/scr_squads.gml Outdated
Comment thread scripts/scr_draw_management_unit/scr_draw_management_unit.gml
Comment thread datafiles/main/chapters/1.JSON Outdated
Comment thread datafiles/main/chapters/1.JSON Outdated
Comment thread datafiles/main/chapters/1.JSON Outdated
Comment thread datafiles/main/chapters/1.JSON Outdated
OH296 and others added 9 commits May 12, 2026 02:03
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

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

0 issues found across 2 files (changes from recent commits).

Shadow auto-approve: would require human review. This PR adds 2,345 lines of new feature work including squad builder and company overrides, modifies core squad initialization and ordering logic, and the author explicitly states no testing was done, so the risk of breaking existing functionality is too high for auto-approval.

@OH296 OH296 merged commit 86e56b1 into Adeptus-Dominus:main May 12, 2026
9 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: JSON Changes to external JSON files or their under-the-hood functionality Size: Epic Type: Feature Adds something new

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant