Skip to content

Conversation

@Stubbjax
Copy link

This change introduces a feature to automatically archive replays. Whenever the Last Replay (or 00000000.rep) is saved, a copy is placed within an archive directory located at Command and Conquer Generals Zero Hour Data\ArchivedReplays. This ensures that replays can never be accidentally lost, and effectively and reliably replicates the SAVE REP feature of GenTool.

Replays are saved in the format YYYYMMDD_HHMMSS.rep for simplicity and to avoid conflicts (though this time is local to the system and does not consider conflicts with foreign replays or changes from DST). Any conflicts that do occur are simply overridden (as this is only likely with multi-instance, it doesn't really matter). Possible future changes could involve a more complex naming scheme or adding an accompanying meta file in a similar fashion to GenTool. It might also be worth considering a limiter option; i.e. keep the last # amount of replays.

The feature can be enabled by adding ArchiveReplays = yes to the Options.ini.

Options.ini

  AntiAliasing = 2
+ ArchiveReplays = yes
  BuildingOcclusion = yes
  CampaignDifficulty = 2
  ...

@Stubbjax Stubbjax self-assigned this Oct 16, 2025
@Stubbjax Stubbjax added Enhancement Is new feature or request GenTool Relates to GenTool Minor Severity: Minor < Major < Critical < Blocker Gen Relates to Generals ZH Relates to Zero Hour labels Oct 16, 2025
@L3-M L3-M added this to the GenTool features replication milestone Oct 16, 2025
Copy link

@xezon xezon left a comment

Choose a reason for hiding this comment

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

Do you plan to make follow up changes to improve file naming and maybe folders?

@Stubbjax
Copy link
Author

Do you plan to make follow up changes to improve file naming and maybe folders?

Yes. This is intended as a first pass to limit the scope of changes.

@xezon xezon added Approved Pull Request was approved and removed GenTool Relates to GenTool labels Oct 24, 2025
bobtista added a commit to bobtista/GeneralsGameCode that referenced this pull request Oct 25, 2025
Reverting unification of these files to avoid conflicts with:
- PR TheSuperHackers#654 (tomsons26): Cleans up inconsistencies
- PR TheSuperHackers#670 (zzambers): Replacements for rest of asm code
- PR TheSuperHackers#688 (tomsons26): Backports various things from ZH
- PR TheSuperHackers#1066 (xezon): Prevent AMD/ATI driver crash
- PR TheSuperHackers#1703 (Stubbjax): Add replay archive feature
- PR TheSuperHackers#1741 (Skyaero42): Remove redundant include guards

Files reverted:
- BitFlagsIO.h, DataChunk.h, GameType.h, List.h
- Money.h, Radar.h, Recorder.h, SpecialPowerMaskType.h, StackDump.h
- NameKeyGenerator.cpp, GameCommon.cpp, StackDump.cpp
@xezon xezon changed the title feat: Add replay archive feature feat(recorder): Add replay archive feature Oct 25, 2025
@xezon xezon changed the title feat(recorder): Add replay archive feature feat(recorder): Implement replay archive feature Oct 25, 2025
@xezon xezon merged commit 07be406 into TheSuperHackers:main Oct 25, 2025
19 checks passed
bobtista added a commit to bobtista/GeneralsGameCode that referenced this pull request Oct 26, 2025
Reverting unification of these files to avoid conflicts with:
- PR TheSuperHackers#654 (tomsons26): Cleans up inconsistencies
- PR TheSuperHackers#670 (zzambers): Replacements for rest of asm code
- PR TheSuperHackers#688 (tomsons26): Backports various things from ZH
- PR TheSuperHackers#1066 (xezon): Prevent AMD/ATI driver crash
- PR TheSuperHackers#1703 (Stubbjax): Add replay archive feature
- PR TheSuperHackers#1741 (Skyaero42): Remove redundant include guards

Files reverted:
- BitFlagsIO.h, DataChunk.h, GameType.h, List.h
- Money.h, Radar.h, Recorder.h, SpecialPowerMaskType.h, StackDump.h
- NameKeyGenerator.cpp, GameCommon.cpp, StackDump.cpp
bobtista added a commit to bobtista/GeneralsGameCode that referenced this pull request Oct 26, 2025
…#1703 merge

PR TheSuperHackers#1703 (replay archive feature) added new methods to Recorder.cpp
but we kept Recorder.h/cpp in Generals/MD (not unified). Need to sync
the header with the implementation.
@Stubbjax Stubbjax deleted the archive-replays branch October 28, 2025 11:18
fbraz3 pushed a commit to fbraz3/GeneralsX that referenced this pull request Nov 10, 2025
Introduces a feature to automatically archive replays. Can be enabled by adding ArchiveReplays=yes to Options.ini

Whenever the Last Replay (or 00000000.rep) is saved, a copy is placed within an archive directory located at Command and Conquer Generals Zero Hour Data\ArchivedReplays. This ensures that replays can never be accidentally lost. Replays are saved in the format YYYYMMDD_HHMMSS.rep for simplicity and to avoid conflicts.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Approved Pull Request was approved Enhancement Is new feature or request Gen Relates to Generals Minor Severity: Minor < Major < Critical < Blocker ZH Relates to Zero Hour

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants