Add Passengers/Occupants Cameo Display#2272
Conversation
- Show passenger cameo icons and counts above vehicles when selected
- Toggle via hotkey Toggle Unit Passengers with CSF-configurable messages
- Two modes: Permanent (ShowUnitPassengers=true) and Toggleable (ShowUnitPassengers.Toggleable=true)
- Icons use CAMEO_PAL, arranged bottom-to-top with fixed bottom boundary
New INI tags:
[AudioVisual] ShowUnitPassengers, ShowUnitPassengers.Toggleable,
ShowUnitPassengers.EnabledMessage, ShowUnitPassengers.DisabledMessage
[TechnoType] ShowPassengers, ShowPassengers.Toggleable,
Passengers.PerRow, Passengers.BottomOffset
c1aba96 to
5e17992
Compare
|
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. |
1bfa9f5 to
5d6ddbc
Compare
|
I think this should be T1 level... |
34bec10 to
bdedc8c
Compare
I raised the level because she is a first-time contributor. |
|
To Chinese users:
|
|
I think this is should be T1 level...
This is not appropriate. |
1d133f4 to
8fac7ff
Compare
- Show passenger cameo icons (SHP/PCX) and counts above vehicles when selected - Toggle via hotkey Toggle Unit Passengers with CSF-configurable messages - Two modes: Permanent (ShowUnitPassengers=true) and Toggleable (ShowUnitPassengers.Toggleable=true) - Icons use CAMEO_PAL/SHP, with PCX cameo fallback, arranged bottom-to-top with fixed bottom boundary New INI tags: [AudioVisual] ShowUnitPassengers, ShowUnitPassengers.Toggleable [TechnoType] ShowPassengers, ShowPassengers.PerRow, ShowPassengers.BottomOffset
8fac7ff to
1f1f0db
Compare
|
Here are the additional test items. |
- Move ToggleUnitPassengers include and MakeCommand to end of lists - Place CameoPCX.Read before AltCameoPCX.Read per Ares convention - Cache bottomOffset.Get() to avoid repeated calls - Remove redundant passengerCounts.empty() check (already guards on NumPassengers)
|
To testers: At the current stage, the following need to be tested:
|
- Rename fallback strings to 'Unit Passenger Icons' per review feedback - Merge three Whats-New lines into one summary line with anchor link
…ngelog New features belong in Changelog > #### New:, not Breaking changes
…omOffset, fix display order and screen bounds
…etail to Passengers Display section
|
@TaranDahl I think I've addressed all the changes you requested. Could you please re‑review? (Ah…I hope this doesn't interfere with your normal work. Please feel free to re‑review whenever it's convenient for you.) |
…lds to end of blocks in TechnoType
Move ShowPassengers_Enable as master switch with early return; merge redundant shouldShow branches; move CameoPalette.LoadFromINI after ShowPassengers reads to match declaration order
CSF: MSG:PassengerCameoDisplayEnabled/Disabled, TXT_PASSENGERCAMEO/_DESC. Fix passenger vector reversal for LIFO list. Docs: section title, description text, INI defaults.
- Rename TogglePassengers to ToggleCameos - Add ShowCameo.CustomPalette tag (artmd.ini) - Fix building passenger display order (LIFO reverse + Y flip) - Fix occupant display order (FIFO, no reverse) - Update docs with full CN/EN bilingual documentation
…ix formatting - Move ShowCameo.Enable to its own [Phobos] block in Show Cameo section - Rewrite Show Cameo docs to be concise, English-only, following Phobos style - Remove Chinese from comments in Body.Visuals.cpp - Remove blank line before CameoPalette in TechnoType/Body.cpp - Fix ; placement in serialization chain
…rrectly with Y flip - When OverlapPrimary=true, earlier (visual top) cameos should cover later (visual bottom) ones - For buildings, the Y flip reverses visual order but draw order still followed cameoCounts - Fix: draw buildings in reverse cameoCounts order so visual top draws last
- Move Toggle Cameos to end of Hotkey Commands section - Move ShowCameo changelog entry from Breaking changes to New features - Move ShowCameo declarations to end of public block in Rules/Body.h - Restore blank line before BuildingSelectBracketPosition in Enum.h - Move ShowCameo_Enable to end of Config struct in Phobos.h - Move ShowCameo_Enable fields to end of Config blocks in Phobos.INI.cpp - Move ToggleCameos files to end of Commands block in Phobos.vcxproj
…-New - Move Toggle Cameos to after Deselect Object(s), before Loading screen - Remove ShowCameo.Enable from New user settings (0.2 version log) - Remove duplicate ShowCameo entry from Vanilla fixes (already in New section)
| In `artmd.ini`: | ||
| ```ini | ||
| [SOMETECHNO] ; TechnoType | ||
| ShowCameo.CustomShape= ; SHP filename | ||
| ShowCameo.CustomPalette= ; PAL filename | ||
| ``` |
There was a problem hiding this comment.
Oh wow, that makes sense... I forgot again. Something like a banner, hmm — yes, we do need support for custom PCX.
But WAIT…
The purpose of custom shapes is simply to expand the ways mods can display passengers or occupants. For example, an SHK could show a lightning bolt icon or animation, and a YURI could show a small mind-control icon or animation... So just custom SHP support might already be sufficient for these needs. As for custom PCX, I haven't yet figured out how it could be used.
There was a problem hiding this comment.
As for custom PCX, I haven't yet figured out how it could be used.
Any difference with the CameoPCX?
There was a problem hiding this comment.
[SOMETECHNO] ; TechnoType
ShowCameo.CustomShape= ; SHP filename
ShowCameo.CustomPCX= ; PCX filename
ShowCameo.CustomPalette= ; PAL filename
It has been added…But I haven't tested whether it works properly (I think it should).
Perhaps my inspiration came from a YR-based mod called Extreme Starry, but regardless, this feature provides players with a more convenient way to view the passengers inside vehicles.
When you select a single vehicle or building, cameo icons and counts of passengers/occupants inside are displayed above the unit, giving you a quick overview of what's inside. Two activation modes are available:
Features
Supports two unit types: passengers (Passengers) and garrisoned occupants (Occupant)
Only shown when a single unit is selected (not box-selection)
Layout: horizontal rows, fixed bottom boundary, auto wrap upward when exceeding PerRow, first-entered unit displayed at the top.
Example: A–E (letters represent entry order), 2 icons per row:
AB
CD
E (centered)
(bottom)
Translucency: set ShowCameo.Translucency = 0/25/50/75, SHP only
Overlap customization:
ShowCameo.OverlapXY: overlap percentage between adjacent cameos (supports negative values)
ShowCameo.OffsetXY: pixel offset adjustment (supports negative values)
ShowCameo.OverlapPrimary: controls overlay direction, true = earlier cameo covers later, false = later covers earlier
Custom SHP support:
ShowCameo.CustomShape in artmd.ini to specify a per-unit custom SHP icon (animated SHPs supported)
ShowCameo.CustomPalette to specify a custom palette; falls back to CameoPalette or the default cameo.pal
New INI Tags:
In RA2MD.INI:
In rulesmd.ini:
In artmd.ini:
CSF Entries:
Fallback text is used if the CSF label is not found.