feat: Finished squad modding and tavish dark angels work#1165
Conversation
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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 thehomeworld_existskey 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.gmlandscripts/scr_squads/scr_squads.gmlsuggest chapter/squad overrides may persist when fields are absent, causing incorrect setup across transitions. scripts/scr_company_order/scr_company_order.gmlandscripts/scr_initialize_custom/scr_initialize_custom.gmlalso show logic-flow concerns (stalebaseguard 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, andscripts/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.
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>
There was a problem hiding this comment.
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.
Purpose and Description
Testing done
Related things and/or additional context
Summary by cubic
Adds per-company
squad_builderand 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 offtype_data.baseinstead oftype.New Features
scr_chapter_newnow readssquad_builderandcompanies;scr_initialize_custommerges builders intochapter_squad_arrangement, injectscustom_squadsintosquad_types, and applies per-company counts (e.g., veterans, vehicles).UnitSquad.base(default"tactical"); command checks usebase == "command"in company ordering and management UI;base_squads.jsonmarks command squads; fixedUnitGroupsquad index scoping.1): expanded JSON with artifacts and slot assignments, full/complex/company liveries, updated names/titles and fleet/specialists;squad_builderauto-builds 1st (Deathwing) and 2nd (Ravenwing) with required command squads; newdeathwing_*andravenwing_*squads withallowed_companiesandtype_data.base.Migration
"base": "command"undertype_data(defaults to"tactical").type == "command_squad"withbase == "command".Written for commit b797505. Summary will update on new commits.