Skip to content

Coordinated multi unit load/unload + tractorbeam -- test PR#7418

Draft
Fx-Doo wants to merge 18 commits intobeyond-all-reason:masterfrom
Fx-Doo:air-trans-tests
Draft

Coordinated multi unit load/unload + tractorbeam -- test PR#7418
Fx-Doo wants to merge 18 commits intobeyond-all-reason:masterfrom
Fx-Doo:air-trans-tests

Conversation

@Fx-Doo
Copy link
Copy Markdown
Contributor

@Fx-Doo Fx-Doo commented Apr 12, 2026

This is a WIP -- desc aswell

  • Use custom script calls (PerformLoad/Unload) and interface between gadget <-> LUS instead of built in engine's script.BeginTransport, passing transportee data along the way.
  • Set up a cargoHandler resplnsible for unit placement within transport, watching current cargo counts and states, interfacing with gadget through unit rules params
  • Set up a transport anim handler responsible for the various transport specific animations (tractor beam logic)
  • set up a generic animation helper that handles generic killed, create, moverate animations.
  • use customizable setup tables for the different unit.
  • create the generic lus that loads those setup and handlers
  • create a shared API: gadget handler <-> API <-> script env

ALREADY FUNCTIONAL:

  • Loading single unit, unloading single unit, with a tractor beam effect
  • loading multiple units sequentially, unloading single unit(s) (per unitID) sequencially or multiple units simultaneously
  • damaging transportees upon death (releaseHeld = true)
  • rearranging transport layout when loading new units
  • Override engine cargo handling (size, capacity) (use huge values), and use internal limiters (nSeat and seat sizes), block allowunittransport when the request exceeds those limitations
  • use either footprint size to get an nseat value for all units or use a customparams value
  • hover at cruise alt, ignore heading, while loading/unloading
  • Validate commands as soon as PerformLoad/Unload is called to avoid additional delays

SOON FUNCTIONAL (ready to be implemented but recquires engine changes that have been proposed):

  • simultaneous multi units load

TO-DOO-LIST:

  • Massive code cleanup (mainly multiple vars that prolly flag similar situations
  • pos caching optimizations: since unit is moved in world space (thats a recquirement) but moving a piece is in unitspace, lots of calls for unitpos, rot, pieceposdir on e1ch animated frames. This needs some thought put into optimizing cached data.
  • live tests as a modoption
  • Unload preview GUI and walkable check (currently unload pos arent exactly deterministic, it's the cmd's pos + realtime link piece pos offset being applied)
  • Make a "gather at area load pos" functionality at least for idle units, so they can all fit within load radius instead of causing transport to move from spot to spot.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 12, 2026

Integration Test Results

16 tests  ±0   8 ✅ ±0   3s ⏱️ ±0s
 1 suites ±0   8 💤 ±0 
 1 files   ±0   0 ❌ ±0 

Results for commit 258124e. ± Comparison against base commit 804331e.

♻️ This comment has been updated with latest results.

Fx-Doo added 2 commits April 15, 2026 10:48
…engine's alignment and height default goals + use FinishCommand on load cmds
…d functions/values

Allows caching some data per unitDefID, and have a single source of truth for unit sizes
Log an error if the API was loaded after the script or handler
}
end

if not gadgetHandler:IsSyncedCode() then
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Perhaps could actually be synced/unsynced "shared", as those could also benefit gui elements?

Fx-Doo added 2 commits April 15, 2026 12:18
…dingRadius but not yet under InRange();

Also delete the "maxHeight" check when checking "InRange"
and use lowered internal load_radius
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant