Repository navigation
[main/2026-10-08-1819] scr_company_order:143 #1633
Copy link
Copy link
Labels
Priority: CriticalCrash/hardlock/save corruptionCrash/hardlock/save corruption
Description
Game version
main/2026-10-08-1819
Operating System
Windows 10
Description
Error Details:
Pop :: Execution Error - Variable Index [-1] out of range [11] - -6.TTRPG(101722,-1)
Stacktrace:
- scr_company_order:143 >> TTRPG[co] = _company_marines.units;
- scr_promote:anonymous:68 >> scr_company_order(obj_popup.manag);
- scr_buttons:draw:659 >> _method();
- draw_popup_promotion:269 >> promote_button.draw(all_good && target_role > 0);
- obj_popup_Draw_64:4 >> draw_popup_promotion();
User Message:
The error happens when you try to promote units on the "fleet units management" screen, that can be opened via Manage Units button with a fleet is selected.
The Promote button is only available on that screen if you save and load first. And the error only happens when promoting via that specific screen. Promoting via default management screen doesn't cause errors.
Also, during this save/load sequence, a lot of these errors pop out in last_messages (for different squads and roles):
01:36:27 | ERROR | obj_ini_Create_0:anonymous:326 >> Failed to load squad 043BD046-4E4E-4941-8F0B-3C2EAC768E2D
{ longMessage : "ERROR in action number 1
of Alarm Event for alarm 0 for object obj_saveload:
Push :: Execution Error - Variable Index [6] out of range [0] - -7._roles(100781,6)
at gml_Script_role_hierarchy (line 187) - _roles[eROLE.DREADNOUGHT],
", script : "gml_Script_role_hierarchy", line : 187, stacktrace : [ "gml_Script_role_hierarchy (line 187)","gml_Script_determine_leader@anon@23026@UnitSquad@scr_squads (line 575) - var hierarchy = role_hierarchy();","gml_Script_load@anon@19382@UnitSquad@scr_squads (line 486) - determine_leader();","gml_Script_anon@5360@gml_Object_obj_ini_Create_0 (line 324) - _squad.load(_data);","gml_Script_scr_load (line 48) - obj_ini.deserialize(ini_save_data);","gml_Object_obj_saveload_Alarm_0 (line 80) - scr_load(3, global.load);" ], message : "Push :: Execution Error - Variable Index [6] out of range [0] - -7._roles(100781,6)" }
Steps to reproduce
- Start a new game, save it and load.
- Go into manage fleet units screen, via
Manage Unitsbutton with fleet is selected. - Selected any units, press promote button, select company, role, confrim.
- The error appears.
Upload screenshots
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Priority: CriticalCrash/hardlock/save corruptionCrash/hardlock/save corruption
Activity
lyra-cactus commentedon Oct 8, 2026
Investigation Report - Issue #1633: scr_company_order:143 crash on fleet promote + squad load failures
1. Summary
Issue #1633 reports two linked symptoms on
main/2026-10-08-1819(Windows 10):Manage Unitsbutton with a fleet selected) raises:Pop :: Execution Error - Variable Index [-1] out of range [11] - -6.TTRPG(101722,-1)atscr_company_order:143 >> TTRPG[co] = _company_marines.units;last_messagesfills withFailed to load squad <uuid>caused by:Push :: Execution Error - Variable Index [6] out of range [0] - -7._roles(100781,6) at gml_Script_role_hierarchy (line 187) - _roles[eROLE.DREADNOUGHT],Both were reproduced by: new game -> save -> load -> fleet
Manage Units-> select units ->Promote-> choose company/role -> confirm.Root causes found:
scr_company_order(-1): fleet/adhoc manage view usesobj_controller.managing == -1. The promotion popup copies that value intoobj_popup.managand then unconditionally callsscr_company_order(manag)with-1.obj_ini.TTRPGhas length 11 (indices0..10), soTTRPG[-1]throws.sel_promotingenablement:sel_promotingis only recalculated whenmanaging > 0, is never reset byscr_ui_refresh()/group_selection(), and is persisted by controller serialization. After a save/load it stays1, so thePromotebutton appears enabled in the fleet view where it was previously disabled. This explains "only available on that screen if you save and load first".obj_ini.deserialize()loadssquad_structs(which callsUnitSquad.load()->determine_leader()->role_hierarchy()->active_roles()) before it restoresplayer_role_data. At that pointplayer_role_data == [], soactive_roles()returns[]and every indexed access_roles[eROLE.*]fails. First failure is_roles[6](eROLE.DREADNOUGHT == 6).All three should be fixed together. Fixing only (A) hides the crash but leaves broken squad leaders and an unintended promotion path.
2. Evidence and Code Walkthrough
2.1 TTRPG layout - valid companies are 0..10
TTRPGis created as 11 slots (HQ + 10 companies):https://github.com/Adeptus-Dominus/ChapterMaster/blob/main/objects/obj_ini/Create_0.gml#L110
collect_company()/collect_role_group()iterate0..companiesinclusive:https://github.com/Adeptus-Dominus/ChapterMaster/blob/main/scripts/scr_UnitGroup/scr_UnitGroup.gml#L640-L642
https://github.com/Adeptus-Dominus/ChapterMaster/blob/main/scripts/scr_UnitGroup/scr_UnitGroup.gml#L660-L677
So
-1is never a validTTRPGindex. The error textout of range [11]is the array length,-1is the bad index.2.2 Crash site -
scr_company_order()https://github.com/Adeptus-Dominus/ChapterMaster/blob/main/scripts/scr_company_order/scr_company_order.gml#L57-L68
https://github.com/Adeptus-Dominus/ChapterMaster/blob/main/scripts/scr_company_order/scr_company_order.gml#L141-L147
Note
collect_company(-1)itself does not crash (its loopfor com 0..companiessimply matches no company because_wanted_companies != comfor allcom), but the final writebackTTRPG[-1]does.2.3 Caller - promotion popup
bind_methodhttps://github.com/Adeptus-Dominus/ChapterMaster/blob/main/scripts/scr_promote/scr_promote.gml#L34-L70
promote_button.bind_method = function() { units_to_move = new UnitGroup([]); // ... for (var i = 0; i < array_length(obj_controller.display_unit); i++) { if ((obj_controller.man[i] == "man") && (obj_controller.man_sel[i] == 1) && (obj_controller.ma_exp[i] >= min_exp)) { var _unit = obj_controller.display_unit[i]; units_to_move.push(_unit); } } units_to_move.move_to_company(target_comp); // ... update_role + alter_equipment ... with (obj_controller) { scr_management(1); } with (obj_ini) { scr_company_order(obj_popup.manag); // L68 - manag == -1 in fleet view scr_company_order(obj_popup.target_comp); // L69 - valid 0..10 } // ... reset_manage_arrays + update_general_manage_view ... };Stacktrace in the issue matches exactly:
scr_buttons:draw:659 >> _method();scr_promote:anonymous:68 >> scr_company_order(obj_popup.manag);scr_company_order:143 >> TTRPG[co] = _company_marines.units;draw_popup_promotion:269 >> promote_button.draw(...)obj_popup_Draw_64:4 >> draw_popup_promotion();(see https://github.com/Adeptus-Dominus/ChapterMaster/blob/main/objects/obj_popup/Draw_64.gml#L1-L4 )2.4 Where does
manag == -1come from?Popup draw copies controller state, clamping only
> 10:https://github.com/Adeptus-Dominus/ChapterMaster/blob/main/scripts/scr_promote/scr_promote.gml#L144-L150
Popup default is
manag = 0(see https://github.com/Adeptus-Dominus/ChapterMaster/blob/main/objects/obj_popup/Create_0.gml#L44 ), but draw overwrites it every frame.Fleet
Manage Unitsexplicitly enters adhoc mode withmanaging = -1:https://github.com/Adeptus-Dominus/ChapterMaster/blob/main/objects/obj_fleet_select/Create_0.gml#L77-L83
https://github.com/Adeptus-Dominus/ChapterMaster/blob/main/scripts/scr_UnitGroup/scr_UnitGroup.gml#L969-L991
Squad-selection path does the same:
https://github.com/Adeptus-Dominus/ChapterMaster/blob/main/scripts/scr_UnitGroup/scr_UnitGroup.gml#L1024-L1030
And
scr_ui_manageexplicitly branches on it:https://github.com/Adeptus-Dominus/ChapterMaster/blob/main/scripts/scr_ui_manage/scr_ui_manage.gml#L88-L90
update_general_manage_view()also branches:https://github.com/Adeptus-Dominus/ChapterMaster/blob/main/scripts/scr_unit_quick_find_pane/scr_unit_quick_find_pane.gml#L617-L635
So
-1means "adhoc / ship-manage selection, not a company". Passing it to a company-indexed function is a contract violation.Even if the
-1guard were added, the current reorder is still wrong for adhoc: fleet units can come from multiple source companies, but the code only reordersmanagandtarget_comp.move_to_company()itself handles heterogeneous sources correctly per-unit:https://github.com/Adeptus-Dominus/ChapterMaster/blob/main/scripts/scr_marine_struct/scr_marine_struct.gml#L411-L424
https://github.com/Adeptus-Dominus/ChapterMaster/blob/main/scripts/scr_UnitGroup/scr_UnitGroup.gml#L93-L121
but
marine_numbernormalisation / rank ordering for every touched source company is skipped. Contrast the transfer path, which correctly reorders all companies:https://github.com/Adeptus-Dominus/ChapterMaster/blob/main/scripts/scr_transfer_marines/scr_transfer_marines.gml#L75-L80
and guards view refresh with
managing > 0:https://github.com/Adeptus-Dominus/ChapterMaster/blob/main/scripts/scr_transfer_marines/scr_transfer_marines.gml#L84-L103
The promote path should follow the same pattern.
2.5 Why is Promote only enabled after save/load? Stale
sel_promotingButton enablement:
https://github.com/Adeptus-Dominus/ChapterMaster/blob/main/scripts/scr_ui_manage/scr_ui_manage.gml#L1283-L1294
sel_promotinginitial value:https://github.com/Adeptus-Dominus/ChapterMaster/blob/main/objects/obj_controller/Create_0.gml#L407
sel_promoting = 0;Only writer is
Alarm_6, gated onmanaging > 0:https://github.com/Adeptus-Dominus/ChapterMaster/blob/main/objects/obj_controller/Alarm_6.gml#L1-L12
Every refresh schedules
alarm[6] = 7:https://github.com/Adeptus-Dominus/ChapterMaster/blob/main/scripts/scr_ui_refresh/scr_ui_refresh.gml#L1-L12
https://github.com/Adeptus-Dominus/ChapterMaster/blob/main/scripts/scr_unit_quick_find_pane/scr_unit_quick_find_pane.gml#L630-L631
but when
managing == -1the alarm body does nothing, leaving the old value intact.group_selection()->scr_ui_refresh()clears display arrays but does not resetsel_promoting:https://github.com/Adeptus-Dominus/ChapterMaster/blob/main/scripts/scr_company_view/scr_company_view.gml#L14-L42 (reset_manage_arrays clears
ma_promotebut notsel_promoting)https://github.com/Adeptus-Dominus/ChapterMaster/blob/main/scripts/scr_UnitGroup/scr_UnitGroup.gml#L989-L991
Meanwhile controller serialization copies all non-excluded instance vars:
https://github.com/Adeptus-Dominus/ChapterMaster/blob/main/objects/obj_controller/Create_0.gml#L1070-L1117
sel_promoting,managing,man_sel,ma_promote, etc. are not inexcluded_from_save, socopy_serializable_fields()persists them. Load restores them verbatim:https://github.com/Adeptus-Dominus/ChapterMaster/blob/main/scripts/scr_load/scr_load.gml#L56-L84
Sequence explaining the report:
sel_promoting == 0. Open fleet view directly ->managing == -1, alarm does nothing, button stays disabled. No crash possible.alarm[6]setssel_promoting == 1. (Or save while in that state.)sel_promoting == 1. Load restores it.managing == -1,ma_promote[]is repopulated byother_manage_data()(see https://github.com/Adeptus-Dominus/ChapterMaster/blob/main/scripts/scr_company_view/scr_company_view.gml#L227-L366 ),man_size > 0after selection, and stalesel_promoting == 1makespromote_possible == true.setup_promotion_popup()(https://github.com/Adeptus-Dominus/ChapterMaster/blob/main/scripts/scr_promote/scr_promote.gml#L1-L11 ) succeeds, then confirm hits (A).other_manage_data()does computema_promote[]for adhoc units too (called fromgroup_selectionat https://github.com/Adeptus-Dominus/ChapterMaster/blob/main/scripts/scr_UnitGroup/scr_UnitGroup.gml#L1020 ), so per-row data is valid; only thesel_promotingflag logic is missing formanaging == -1.2.6 Save/load squad failures -
role_hierarchy()with empty_rolesrole_hierarchy():https://github.com/Adeptus-Dominus/ChapterMaster/blob/main/scripts/scr_company_order/scr_company_order.gml#L153-L197
Enum:
https://github.com/Adeptus-Dominus/ChapterMaster/blob/main/scripts/enums/enums.gml#L25-L61
active_roles():https://github.com/Adeptus-Dominus/ChapterMaster/blob/main/scripts/is_specialist/is_specialist.gml#L19-L26
active_game_ini()returnsobj_iniwhenobj_creationdoes not exist (normal loaded game):https://github.com/Adeptus-Dominus/ChapterMaster/blob/main/scripts/scr_controller_helpers/scr_controller_helpers.gml#L9-L11
If
player_role_data == [], result is[](length 0). Then_roles[6]throwsVariable Index [6] out of range [0], exactly the logged error.Why is it
[]during load?obj_inistarts with:https://github.com/Adeptus-Dominus/ChapterMaster/blob/main/objects/obj_ini/Create_0.gml#L19-L20
deserialize()then handles squads beforeplayer_role_data:player_role_data: https://github.com/Adeptus-Dominus/ChapterMaster/blob/main/objects/obj_ini/Create_0.gml#L354-L370 (30+ lines later)UnitSquad.load()->determine_leader():https://github.com/Adeptus-Dominus/ChapterMaster/blob/main/scripts/scr_squads/scr_squads.gml#L474-L487
https://github.com/Adeptus-Dominus/ChapterMaster/blob/main/scripts/scr_squads/scr_squads.gml#L573-L609
The
deserialize()exclusion list also confirmsplayer_role_datais deferred (https://github.com/Adeptus-Dominus/ChapterMaster/blob/main/objects/obj_ini/Create_0.gml#L219-L241 ), but the explicit restore was placed after the squad block. Fresh games do not hit this becausescr_initialize_custom()setsplayer_role_databeforegame_start_squads()creates squads.Impact: the
catchindeserializelogs but keeps a half-loaded squad (squads[$uid]already inserted,squad_leaderstillundefined,determine_leader()never completed). Repeated for every squad, matching "a lot of these errors ... for different squads and roles" in the issue.3. Proposed Fixes
Order by safety / minimality. All are ASCII-only, no new
.yyfiles needed.Fix 1 (required) - Guard
scr_company_order()against non-company indicesFile:
scripts/scr_company_order/scr_company_order.gmlAt the top of
scr_company_order(company), early-exit whencompany < 0 || company > obj_ini.companies(or> 10). Optionally log at debug level. This turns the hard crash into a no-op and protects every other caller (switch_view_company,sort_all_companies, future code) from the same contract violation.Rationale: matches existing
scr_company_view()validation philosophy (see https://github.com/Adeptus-Dominus/ChapterMaster/blob/main/scripts/scr_company_view/scr_company_view.gml#L140-L144 which errors on bad company), but non-throwing is correct here because adhoc callers may legitimately not have a company. Keep the existingtry/catchbelow it.Fix 2 (required) - Promotion confirm must reorder actually-affected companies, not
managFile:
scripts/scr_promote/scr_promote.gml,promote_button.bind_method(https://github.com/Adeptus-Dominus/ChapterMaster/blob/main/scripts/scr_promote/scr_promote.gml#L34-L70 )Current:
Problems:
managcan be-1(crash), and even when valid it misses other source companies when the selection spans companies (fleet view always can).Recommended replacement (mirrors transfer logic at https://github.com/Adeptus-Dominus/ChapterMaster/blob/main/scripts/scr_transfer_marines/scr_transfer_marines.gml#L75-L80 ):
var _source_companies = {}; for (var i = 0; i < units_to_move.number(); i++) { // capture BEFORE move_to_company mutates unit.company // or snapshot before the move_to_company(target_comp) call above }Concretely, snapshot before
units_to_move.move_to_company(target_comp):var _affected = {}; for (var i = 0; i < units_to_move.number(); i++) { _affected[$ string(units_to_move.units[i].company)] = true; } _affected[$ string(target_comp)] = true; units_to_move.move_to_company(target_comp); // ... update_role / alter_equipment ... with (obj_ini) { var _keys = struct_get_names(_affected); for (var i = 0; i < array_length(_keys); i++) { scr_company_order(real(_keys[i])); } }Simplest acceptable variant if per-company tracking is unwanted: loop
0..obj_ini.companiesliketransfer_marines()does. Slightly heavier but consistent and obviously correct.Also fix the post-promote view refresh in the same function. Current:
For
managing == -1,update_general_manage_view()delegates toupdate_adhoc_manage()->group_selection()which is correct (re-collects by ship/system filter). Verifyselection_datais still valid after the move (units changed company but not location, so the ship filter still matches). Ifupdate_general_manage_view()proves fragile here, callupdate_adhoc_manage()explicitly whenmanaging == -1, mirroringjail_selection():https://github.com/Adeptus-Dominus/ChapterMaster/blob/main/scripts/scr_unit_quick_find_pane/scr_unit_quick_find_pane.gml#L693-L699
Do not call
scr_company_order(manag)whenmanag < 0.Fix 3 (required, choose A or B) - Decide whether Promote should exist in fleet/adhoc view
Option 3A - Disable (restores pre-save/load behavior, smallest change):
group_selection()(https://github.com/Adeptus-Dominus/ChapterMaster/blob/main/scripts/scr_UnitGroup/scr_UnitGroup.gml#L969-L991 ) orscr_ui_refresh()(https://github.com/Adeptus-Dominus/ChapterMaster/blob/main/scripts/scr_ui_refresh/scr_ui_refresh.gml#L1-L12 ), setobj_controller.sel_promoting = 0;when entering adhoc (managing = -1).var promote_possible = sel_promoting > 0 && managing > 0 && ...in https://github.com/Adeptus-Dominus/ChapterMaster/blob/main/scripts/scr_ui_manage/scr_ui_manage.gml#L1288Alarm_6guard (https://github.com/Adeptus-Dominus/ChapterMaster/blob/main/objects/obj_controller/Alarm_6.gml#L2 ) to explicitly clearsel_promoting = 0whenmanaging == -1instead of leaving it stale.This is the conservative fix the issue reporter likely expects ("Promote button is only available ... if you save and load first" implies it should not be available there).
Option 3B - Support (more work, better UX):
Alarm_6to recalculatesel_promotingformanaging == -1using the samema_promote[]/ specialist checks thatother_manage_data()already populates for adhoc units. Then Fix 2 makes the action safe.get_unit_promotion_options()(https://github.com/Adeptus-Dominus/ChapterMaster/blob/main/objects/obj_popup/Create_0.gml#L119-L259 ),calculate_equipment_needs()(https://github.com/Adeptus-Dominus/ChapterMaster/blob/main/scripts/scr_popup_functions/scr_popup_functions.gml#L276-L356 ), anddraw_popup_promotion()company label logic (https://github.com/Adeptus-Dominus/ChapterMaster/blob/main/scripts/scr_promote/scr_promote.gml#L150-L167 ) for multi-company selections.Recommendation: ship 3A now (with Fixes 1+2 as safety net), track 3B as a feature. Fix 2 is still needed even under 3A because stale clients / edge paths could still invoke the popup.
Also fix
draw_popup_promotion()clamping to handle negative:Currently only
> 10is clamped (https://github.com/Adeptus-Dominus/ChapterMaster/blob/main/scripts/scr_promote/scr_promote.gml#L147-L149 ). The popup title usesmanagfor the roman-numeral label;-1falls through to empty string. Clamping to0(HQ) for display while not using it for reorder keeps display sane.Fix 4 (required) - Load
player_role_databeforesquad_structsinobj_ini.deserialize()File:
objects/obj_ini/Create_0.gml, functiondeserialize.Move the block at https://github.com/Adeptus-Dominus/ChapterMaster/blob/main/objects/obj_ini/Create_0.gml#L354-L370 (
if (struct_exists(save_data, "player_role_data")) ...) to before the marine/squad blocks at https://github.com/Adeptus-Dominus/ChapterMaster/blob/main/objects/obj_ini/Create_0.gml#L290-L329 , i.e. immediately after the livery/squad_typesrestores and beforeload_marine_struct/ squadload().Why this order:
TTRPG_stats.load_json_data()andUnitSquad.load()->determine_leader()->role_hierarchy()->active_roles()all depend onplayer_role_data.squad_typesshould also be restored before squads (it already is at https://github.com/Adeptus-Dominus/ChapterMaster/blob/main/objects/obj_ini/Create_0.gml#L286-L288 - keep that ordering).After the move, the
Variable Index [6] out of range [0]errors should disappear on the issue's repro (new game -> save -> load). Verify by loading the reporter's save and checkinglast_messageshas noFailed to load squadentries andobj_ini.squadsleaders are structs.Do not "fix" this by adding a fallback
if (array_length(_roles) == 0) return []insiderole_hierarchy()alone: that would silence the crash but leave every squad leaderundefined, preserving the corruption. Ordering is the real fix. A debug assertion onarray_length(_roles) > eROLE.DREADNOUGHTis acceptable as documentation, but not a substitute.Fix 5 (optional hardening, low priority)
switch_view_company()already only callsscr_company_order(new_view)fornew_view <= 10(https://github.com/Adeptus-Dominus/ChapterMaster/blob/main/scripts/scr_company_view/scr_company_view.gml#L472-L480 ) - no change needed, but add a comment notingmanaging == -1must never reachscr_company_order.TTRPG[company]direct indexers (move_to_company,find_company_open_slotat https://github.com/Adeptus-Dominus/ChapterMaster/blob/main/scripts/scr_company_view/scr_company_view.gml#L44-L58 ) for the same-1assumption; they are only reached with validatedtarget_comptoday (target_company_radiobuilds0..companies, https://github.com/Adeptus-Dominus/ChapterMaster/blob/main/scripts/scr_promote/scr_promote.gml#L114-L141 ), but a sharedis_valid_company()helper would prevent recurrence.4. Verification Plan
Manage Units-> select marines -> confirm stalesel_promoting == 1makesPromoteclickable (before Fix 3A). Apply Fixes 1+2, repeat promotion from fleet view (if 3B) or confirm button is disabled (if 3A). NoTTRPG[-1]error.marine_numbersequence is contiguous in both source and target companies;tally_marines()counts unchanged except role changes.Failed to load squadinlast_messages/obj_saveloadalarm path (https://github.com/Adeptus-Dominus/ChapterMaster/blob/main/scripts/scr_load/scr_load.gml#L44-L49 ), and spot-checkfetch_squad(id).squad_leaderis a struct anddetermine_leader()returns without exception.sel_promoting == 1in company view, load, enter fleet view, assertsel_promoting == 0andPromotealpha is0.5/ click does nothing.docs/AGENTS.md), GoboCat formatting, no new.yyfiles.5. Files Referenced
scripts/scr_company_order/scr_company_order.gml-scr_company_order()L57-L151,role_hierarchy()L153-L197 (DREADNOUGHT at L187)scripts/scr_promote/scr_promote.gml-setup_promotion_popup()L1-L111,bind_methodL34-L89 (reorder L67-L70),draw_popup_promotion()L143-L271 (manag L146-L150, draw L269)objects/obj_popup/Draw_64.gml- dispatch L1-L4objects/obj_popup/Create_0.gml- defaults (manag = 0L44,target_comp = -1L65),get_unit_promotion_optionsL119-L259objects/obj_fleet_select/Create_0.gml-Manage UnitsL77-L83scripts/scr_UnitGroup/scr_UnitGroup.gml-group_selectionL969-L1038 (managing = -1L990/L1029),collect_companyL640-L642,UnitGroup.move_to_companyL93-L121scripts/scr_marine_struct/scr_marine_struct.gml-move_to_companyL411-L424objects/obj_controller/Alarm_6.gml-managing > 0gate L2,sel_promotinglogic L12-L339objects/obj_controller/Create_0.gml-sel_promoting = 0L407,serializeL1070-L1117scripts/scr_ui_manage/scr_ui_manage.gml-promote_possibleL1288-L1294, adhoc branch L88-L90scripts/scr_ui_refresh/scr_ui_refresh.gml-alarm[6] = 7L11scripts/scr_company_view/scr_company_view.gml- validation L140-L144,other_manage_dataL227-L366,find_company_open_slotL44-L58scripts/scr_unit_quick_find_pane/scr_unit_quick_find_pane.gml-update_general_manage_viewL617-L635,update_adhoc_manageL587-L615,jail_selectionpattern L693-L699scripts/scr_transfer_marines/scr_transfer_marines.gml- correct all-company reorder L75-L80,managing > 0guards L84-L103objects/obj_ini/Create_0.gml-TTRPGinit L110,player_role_data = []L19, squad load L314-L329, role data restore L354-L370, exclusions L219-L241scripts/scr_squads/scr_squads.gml-UnitSquad.loadL474-L487,determine_leaderL573-L609 (hierarchy L575)scripts/is_specialist/is_specialist.gml-active_rolesL19-L26scripts/scr_controller_helpers/scr_controller_helpers.gml-active_game_iniL9-L11scripts/enums/enums.gml-eROLEL25-L61 (DREADNOUGHT = 6)scripts/scr_load/scr_load.gml- INI+controller load L44-L114scripts/scr_popup_functions/scr_popup_functions.gml-calculate_equipment_needsL276-L379