Skip to content

Conversation

Starkku
Copy link
Contributor

@Starkku Starkku commented Aug 25, 2025

Refactoring / code changes

  • Rewrote IsSimpleDeployer logic, all deploy logic save for the 'aftermath' aka resetting unit to guard mission (and handling Ares' type conversion) is now handled on Phobos' side. Any Ares code besides the aforementioned type conversion is disabled if Phobos is active.
  • Moved IsSimpleDeployer code from Hooks.Unload.cpp to Hooks.IsSimpleDeployer.cpp as there is now much more of it (over 400 lines).
  • Some Phobos hooks related to the matter have been consolidated e.g deploy and undeploy-related things are now handled in one hook each, with common code being in helper functions.
  • Replaced use of TechnoClass Animation StageClass timer with a new bespoke one and simplified the deploy animation timer logic to allow easy use with all types of animations (normal and reversed) as well as animations using non-standard Start/End setups without any extra calculations. It also eliminates hypothetical conflict scenario where the TechnoClass animation timer is used for something else while also deploying (to my knowledge this does not currently occur, however).

Migration

  • IsSimpleDeployer units now obey deploying facing constraint even without deploying animation. To disable this, set DeployDir (defaults to [AudioVisual] -> DeployDir to -1.
  • DeployingAnim.AllowAnyDirection has been superceded by DeployDir. Use value of -1 to re-enable the no facing restriction.

New Features

  • DeployingAnims can be used to set a list of directional deploy anims to use instead of only one animation that DeployAnim supports.
  • DeployDir can now be used to customize facing constraint for deploying irregardless of presence of deploy animation. Units will automatically begin deploying once they are facing the correct way if constrained.

Bugfixes

  • IsSimpleDeployer BalloonHover=true units with DeployToLand=false are no longer forced to land when hovering.
  • If DeployingAnim with Shadow=true is played for unit currently in air its shadow will now be drawn on ground.
  • DeployingAnim now supports both Normalized=true and Reverse=true. Keep in mind Reverse uses LoopEnd for frame amount instead of End even without LoopCount > 1.
  • DeployingAnim using unit drawer now also tint accordingly with the unit.
  • Fixed an issue with move sounds not correctly updating on type conversion for jumpjet units.

Interactions

  • Convert.Deploy displays 'no deploy' cursor if the new type is not allowed to move to the cell due to SpeedType etc.

Documentation


IsSimpleDeployer facing and animation customization

  • In vanilla game only units with DeployingAnim were constrained to a specific deploy facing and it was not customizable per unit. DeployDir can be set to override this per unit (defaults to [AudioVisual] -> DeployDir), including using value of -1 to disable the facing restriction.
  • Multiple new options for deploy animations:
    • DeployingAnims can be used instead of DeployingAnim (if both are set, DeployingAnims takes precedence) to define a list of direction-specific deploy animations to play. Largest power of 2 the number of listed animations falls to is used as number of directions/animations. Less than 8 animations listed results in only first listed one being used.
    • DeployingAnim.KeepUnitVisible determines if the unit is not hidden while the animation is playing.
    • DeployingAnim.ReverseForUndeploy controls whether or not the animation is played in reverse for undeploying.
    • DeployingAnim.UseUnitDrawer controls whether or not the animation is displayed in the unit's palette and team colours or regular animation palette, including a potential custom palette.

In rulesmd.ini:

[SOMEVEHICLE]                          ; VehicleType
DeployDir=                             ; Facing type (integers from 0-7 or -1)
DeployingAnims=                        ; List of AnimationTypes
DeployingAnim.KeepUnitVisible=false    ; boolean
DeployingAnim.ReverseForUndeploy=true  ; boolean
DeployingAnim.UseUnitDrawer=true       ; boolean

Copy link

github-actions bot commented Aug 25, 2025

Nightly build for this pull request:

This comment is automatic and is meant to allow guests to get latest nightly builds for this pull request without registering. It is updated on every successful build.

@yawnallday
Copy link

Can the IsSimpleDeployer and passenger Unload functions be separated?while NoManualUnload=yes

@Starkku
Copy link
Contributor Author

Starkku commented Aug 27, 2025

Can the IsSimpleDeployer and passenger Unload functions be separated?while NoManualUnload=yes

Probably doable but I think conditional changes on deploy cursor and/or deploy functionality itself is something that should be explored outside this PR.


For any people who may be testing, waypoint mode not working correctly on jumpjet units with IsSimpleDeployer=true anymore is a known issue pending further investigation.

Copy link
Contributor

@CrimRecya CrimRecya left a comment

Choose a reason for hiding this comment

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

LGTM, only a minor issue.
Additionally, I think that return condition ? addr1 : addr2; may be better?

@Coronia Coronia added Tested ⚙️T1 T1 maintainer review is sufficient Fix and merge this labels Aug 30, 2025
- Fix issue causing non-BalloonHover jumpjets not landing correctly
- Fix issue causing IsSimpleDeployer jumpjets to not use waypoint mode correctly
- Apply some minor optimizations to the drawing hook
@Starkku Starkku force-pushed the feature/simpledeployer-rework branch from 196c4e9 to 07aaeac Compare August 30, 2025 10:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Fix and merge this ⚙️T1 T1 maintainer review is sufficient Tested
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants