Phobos icon indicating copy to clipboard operation
Phobos copied to clipboard

Disguise logic improvements & reimplemented insignia drawing

Open Starkku opened this issue 2 years ago • 1 comments

Disguise logic additions (disguise-based movement speed, ally disguise blinking)

  • ShowAllyDisguiseBlinking, if set to true, will allow players to see blinking disguises on disguised ally units. Additionally observer players can see blinking disguises of all players.
  • UseDisguiseMovementSpeed, if set, makes disguised unit adjust its movement speed to match that of the disguise, if applicable. Note that this applies even when the disguise is revealed, as long as it has not been removed.

In rulesmd.ini:

[General]
ShowAllyDisguiseBlinking=false   ; boolean

[SOMETECHNO]                     ; TechnoType
UseDisguiseMovementSpeed=false   ; boolean

Additionally, there are following changes / fixes to the logic:

  • Fixed disguised infantry not using custom palette for drawing the disguise when needed.
  • Disguised infantry now show appropriate insignia when disguise is visible based on the disguise type and house.

And insignia customization is reimplemented on Phobos' side now to facilitate drawing correct insignia for disguised infantry.

Customizable veterancy insignias

  • You can now customize veterancy insignia of TechnoTypes.
    • Insignia.Rookie|Veteran|Elite can be used to set a custom insignia file for each veterancy stage. Like the original / default file, pips.shp, they are drawn using palette.pal as palette.
    • InsigniaFrame.Rookie|Veteran|Elite can be used to set (zero-based) frame index of the insignia to display for each veterancy stage. Using -1 uses the default setting. Default settings are -1 (none) for rookie, 14 for veteran and 15 for elite.
    • Insignia.ShowEnemy controls whether or not the insignia is shown to enemy players. Defaults to [General] -> EnemyInsignia, which in turn defaults to true.

In rulesmd.ini:

[General]
EnemyInsignia=true        ; boolean

[SOMETECHNO]              ; TechnoType
Insignia.Rookie=          ; filename - excluding the .shp extension
Insignia.Veteran=         ; filename - excluding the .shp extension
Insignia.Elite=           ; filename - excluding the .shp extension
InsigniaFrame.Rookie=-1   ; int, frame of insignia shp (zero-based) or -1 for default
InsigniaFrame.Veteran=-1  ; int, frame of insignia shp (zero-based) or -1 for default
InsigniaFrame.Elite=-1    ; int, frame of insignia shp (zero-based) or -1 for default
Insignia.ShowEnemy=       ; boolean

Insignia customization should function similarly to the equivalent feature introduced by Ares and takes precedence over it if Phobos is used together with Ares.

Starkku avatar May 26 '22 13:05 Starkku

Nightly build for this pull request:

github-actions[bot] avatar May 26 '22 13:05 github-actions[bot]

how about instead of ShowAllyDisguiseBlinking we use AffectedHouses?

Metadorius avatar Oct 11 '22 21:10 Metadorius

how about instead of ShowAllyDisguiseBlinking we use AffectedHouses?

Was originally going to, but then I realized it'd allow weird shit like hiding the blinking from the owner, making the disguised units permanently appear as whatever they are disguised as with no obvious tell. Maybe that'd still be desirable for some, especially if there's also a per unit toggle (yay for ExtMap.Find calls) so I could still implement it regardless.

Starkku avatar Oct 11 '22 22:10 Starkku

Changed ShowAllyDisguiseBlinking to DisguiseBlinkingVisibility which uses AffectedHouse.

Starkku avatar Dec 19 '22 13:12 Starkku

Regarding the insignia drawing one, I don't know if Ares is going to add anything new in future versions or not, but it would be better to have a specific insignia for IFV in repair mode

chaserli avatar Feb 06 '23 08:02 chaserli

Implemented weapon-mode specific insignia for Gunner=true.

Considering this feature as finished now so merging to develop.

Starkku avatar Apr 13 '23 16:04 Starkku