Repository navigation
Conversation
|
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. |
ported from CnCNet/yrpp-spawner#64 since this is more of a standalone function than a part of disabling save, and is less relevant to Spawner - A timer can be displayed to show how many time has passed since game starts. - The timer will be shown in the format of `TXT_GAMETIME hh:mm:ss`. For localization add `TXT_GAMETIME` into your `.csf` file. - This will show the ingame time by default. It can also be set to show real time by [real time timers](#real-time-timers) - `ShowGameTime.BoardOpacity` can be used to set the opacitiy of background for game time display. - Observer can't see this timer since they've already gotten one on the top of sidebar. In `RA2MD.INI`: ```ini [Phobos] ShowGameTime=false ; boolean ShowGameTime.BoardOpacity=40 ; integer ``` original by Trsdy
201638f to
e138975
Compare
e138975 to
844d408
Compare
844d408 to
fa2f332
Compare
|
I'm not sure that spawner should introduce such features. Perhaps this should be in Phobos? |
This is similar to the existing “Custom Mission” feature. It is originally designed around one game session launching one mission, then the mission ends and the session ends. This also comes with the same constraints. For example, implementing it requires hard-patching certain addresses, which can break if the game proceeds to another mission. Putting the UI toggles in the vanilla launcher is both difficult, inappropriate, and unnecessary. In Spawner, however, it fits naturally through It also complements the " Custom Mission " feature a bit. FYI original PR in Phobos Phobos-developers/Phobos#1402 |
|
Can this PR be merged? Or what else @chaserli needs to do |
|
any updates on this PR? can it be merged? |
97967cf to
05bd60b
Compare
05bd60b to
0565309
Compare
Belonit
left a comment
There was a problem hiding this comment.
I made my own edits, and the original commits of chaserli were left as is. My changes are added on top of them in separate commits:
- added the current
mainto the PR thread. - brought
NoSaveLoadMode.cppto a more readable form. - replaced own
Fetch_CSF_TextwithStringTable::TryFetchStringwith the same fallback texts. - added
IsDisableSaveLoadEnabled()which checks bothSpawner::EnabledandDisableSaveLoad. Mode hooks no longer access missing configuration when the spawner is disabled. TheEndOfGamesetting condition is also protected by theEnabledcheck. - replaced a patch that damaged the save function,
explicit termination viaDebug::FatalErrorAndExitwith recording of the reason in the log. Intentional crash when trying to save saved. Moved mode patches fromSpawner.Hook.cpptoNoSaveLoadMode.cpp. - disabled periodic autosaves with
DisableSaveLoad=yes.
Before this, the standard autosave could get into the save ban and end the game without user action.
@chaserli, I still have questions about ScenarioClass_ReadMapINI_SetEndOfGame, could you please explain:
- Why should
DisableSaveLoadforceEndOfGame=true? According to ASM, this includes the campaign ending path: ifCampaignIndexis non-zero, the game tries to playCampaignClass::FinalMovie, then calls the credits fromCREDITSMD.TXTto show. This changes how the campaign plays out, although no saves are required for the ban itself. - Why force
SkipScore=falseby overriding the map setting? Is a mandatory results screen required in this mode? - For
CustomMissionIDtheEndOfGamesetting is already inSpawner::StartGame()after loading the script. Need to clarify
Why install it additionally when reading a map and force the results screen to turn on. If the goal is to complete a standalone mission without an ending video or credits, the current path requires separate consideration.
Changes require in-game testing.
I'll try to test it today, if I don't have time, then within 3 days
7ac891a to
9071729
Compare
Description
Adds a Hardcore Mode for campaign missions.
When enabled, Hardcore Mode prevents the player from saving or loading the game during a mission, and changes the mission flow to better fit a no-save challenge.
Features
Disables Save, Load, and Delete Game during the mission.
Replaces the normal mission failure prompt with a Hardcore-specific Retry / Leave prompt.
Displays a Hardcore indicator on the loading screen.
hardcorelogo.shpwhen available.TXT_HARDCORE_MODECSF string.Updates the mission end dialog to use an appropriate exit option.
Forces campaign scenarios using Hardcore Mode to end the game normally instead of allowing them to continue through the regular save/load flow.
Configuration
Enable Hardcore Mode with:
in spawn.ini
Additional CSF strings can be provided for localization: