Skip to content

bugfix(sideslist): Add the general skirmish sides that Generals maps lack - #3484

Open
tintinhamans wants to merge 1 commit into
TheSuperHackers:mainfrom
tintinhamans:arctic/fix/legacy-map-skirmish-sides
Open

tintinhamans wants to merge 1 commit into
TheSuperHackers:mainfrom
tintinhamans:arctic/fix/legacy-map-skirmish-sides

Conversation

@tintinhamans

@tintinhamans tintinhamans commented Oct 12, 2026 •

Copy link
Copy Markdown

Closes #1772

Generals maps only have SkirmishAmerica, SkirmishChina and SkirmishGLA. Player::initFromDict turns a general AI into a human player with no AI when no map side matches its Side, so on these maps the generals never move. The 1.03 filter hides Armored Fury and Scorched Earth for this reason.

prepareForMP_or_Skirmish now adds the general sides and teams the way Add Skirmish Players in WorldBuilder does, so the standard skirmish scripts bind to them. Only for maps saved by the Generals WorldBuilder with the three original factions and no general, and only when all nine fit. Behind !RETAIL_COMPATIBLE_CRC, a general that plays desyncs against retail. The 1.03 filter stays in retail builds.

The map pickers warn when such a map is selected.

Map Sides added Warning
Generals map yes yes
Generals map with own AI scripts or no room for all generals no yes, generals will not work
Zero Hour map no no

Retail compatible builds never add sides.

@coderabbitai

coderabbitai Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 0fe68a16-ca70-4025-9db7-f56c4f54dbd6

📥 Commits

Reviewing files that changed from the base of the PR and between dc8dcda and f8e2cef.


📒 Files selected for processing (4)
  • Core/GameEngine/Include/GameLogic/SidesList.h
  • Core/GameEngine/Source/GameClient/MapUtil.cpp
  • Core/GameEngine/Source/GameLogic/Map/PolygonTrigger.cpp
  • Core/GameEngine/Source/GameLogic/Map/SidesList.cpp

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 1 remain after this review.



Walkthrough

The change records polygon-trigger chunk versions, detects legacy maps without Zero Hour skirmish sides, conditionally adds missing sides, and warns during LAN, skirmish, and WOL map selection. It also limits the Armored Fury and Scorched Earth exclusions to Zero Hour builds with retail-compatible CRC mode.

Changes

Map compatibility

Layer / File(s) Summary
Version-aware skirmish-side preparation
Core/GameEngine/Include/GameLogic/PolygonTrigger.h, Core/GameEngine/Source/GameLogic/Map/PolygonTrigger.cpp, Core/GameEngine/Include/GameLogic/SidesList.h, Core/GameEngine/Source/GameLogic/Map/SidesList.cpp
Polygon-trigger parsing records the chunk version. In non-retail-compatible builds, side preparation checks faction sets, scripts, trigger version, and capacity before adding eligible missing factions and singleton teams.
Map detection and warnings
Core/GameEngine/Include/GameClient/MapUtil.h, Core/GameEngine/Source/GameClient/MapUtil.cpp
Map inspection reads map side and script data to detect maps without General sides and determine whether sides can be added. The map-list exclusions apply only to Zero Hour builds with retail-compatible CRC mode. Warning text varies according to side eligibility and build configuration.
Map-selection warning calls
GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/{LanMapSelectMenu,SkirmishMapSelectMenu,WOLMapSelectMenu}.cpp
LAN, skirmish, and WOL map confirmation paths call the warning function with the selected map name.

Priority: ➖ Normal

Estimated code review effort: 3 (Moderate) | ~25 minutes

Change: Bug fix · Severity of issue fixed: Medium

Sequence Diagram(s)

sequenceDiagram
  participant SkirmishMapSelectMenuSystem
  participant warnIfMapLacksSkirmishSides
  participant isGeneralsMapWithoutGeneralSides
  participant MessageBox
  SkirmishMapSelectMenuSystem->>warnIfMapLacksSkirmishSides: selected map name
  warnIfMapLacksSkirmishSides->>isGeneralsMapWithoutGeneralSides: inspect map
  isGeneralsMapWithoutGeneralSides-->>warnIfMapLacksSkirmishSides: missing-side result
  warnIfMapLacksSkirmishSides->>MessageBox: display warning
Loading

Merge Risk: ⚪ Minimal · up to f8e2c

The previously identified stale-version problem is fixed for normal map loading. No actionable merge-blocking risk remains on the established evidence.

Pre-merge checks | Passed 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check Passed The title clearly identifies the main change: adding missing general skirmish sides to Generals maps.
Description check Passed The description is directly related to the changes. It explains the missing Generals sides, the conditional repair logic, warnings, and retail-compatible build behavior.
Linked Issues check Passed Issue #1772 reports that Armored Fury and Scorched Earth are filtered from Zero Hour and asks if they can return. The change keeps the filter in RETAIL_COMPATIBLE_CRC builds for compatibility. In non-…
Out of Scope Changes check Passed The changes stay within issue #1772. Map parsing identifies legacy Generals maps. SidesList repairs the missing skirmish configuration under the stated eligibility checks. PolygonTrigger version acces…

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@tintinhamans
tintinhamans force-pushed the arctic/fix/legacy-map-skirmish-sides branch from a654a93 to b488b9c Compare October 12, 2026 01:20
@greptile-apps

greptile-apps Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

RetriggerConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; the previous name-conflict finding is fixed.

Summary

The PR adds missing general sides to eligible Generals maps and warns users when selecting them.

  • Eligible Generals maps gain the missing Zero Hour skirmish sides.
  • Map pickers warn when a Generals map lacks general skirmish sides.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Load map] --> B{Generals map with original factions only?}
  B -- No --> C[Keep existing sides]
  B -- Yes --> D{No custom AI scripts, no name conflicts, enough room?}
  D -- No --> C
  D -- Yes --> E{Retail-compatible build?}
  E -- Yes --> C
  E -- No --> F[Add all missing general sides and teams]
  F --> G[Prepare skirmish players]
  C --> G
Loading

Reviews (3) · Last reviewed commit: "bugfix(sideslist): Add the general skirm..." · Reviewed by Greptile

Comment thread Core/GameEngine/Source/GameLogic/Map/SidesList.cpp Outdated
@tintinhamans
tintinhamans force-pushed the arctic/fix/legacy-map-skirmish-sides branch from b488b9c to dc8dcda Compare October 12, 2026 01:31
Comment thread Core/GameEngine/Source/GameLogic/Map/SidesList.cpp Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: af6ce4e8-183e-4d73-a36a-5926446a2e4a
📥 Commits

Reviewing files that changed from the base of the PR and between 0e6a06c and dc8dcda.

📒 Files selected for processing (9)
  • Core/GameEngine/Include/GameClient/MapUtil.h
  • Core/GameEngine/Include/GameLogic/PolygonTrigger.h
  • Core/GameEngine/Include/GameLogic/SidesList.h
  • Core/GameEngine/Source/GameClient/MapUtil.cpp
  • Core/GameEngine/Source/GameLogic/Map/PolygonTrigger.cpp
  • Core/GameEngine/Source/GameLogic/Map/SidesList.cpp
  • GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/LanMapSelectMenu.cpp
  • GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/SkirmishMapSelectMenu.cpp
  • GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/WOLMapSelectMenu.cpp

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 2 remain after this review.

Comment thread Core/GameEngine/Source/GameLogic/Map/PolygonTrigger.cpp Outdated
@tintinhamans
tintinhamans force-pushed the arctic/fix/legacy-map-skirmish-sides branch from dc8dcda to f8e2cef Compare October 12, 2026 01:51
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.

Maps Armored Fury and Scorched Earth are disabled in Zero Hour

1 participant