-
Notifications
You must be signed in to change notification settings - Fork 402
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
More Main Menu Content #13759
base: master
Are you sure you want to change the base?
More Main Menu Content #13759
Conversation
Implement singleplayer mission and sandbox modes.
Need |
This would significantly simplify testing for specific missions when |
I don't think all of these should be included in the main menu. Many of them are not intended to be used the average player, but rather advanced modders who are expected to be able to access them using console commands. If we were to make them visible in the main menu, we would need to localize all the texts in them to all the languages the game supports, and preferably also make them a lot more user-friendly. I also feel a little iffy about including the mission mode in the main menu like this. The mission mode is so underdeveloped that in my opinion it needs to be reworked before it's put into the spotlight like this. |
When I was getting into the game around 1.0, I used the mission mode as a training tool, to understand the very basics of the game, in addition to doing some of the tutorials. It may be underdeveloped right now, but it still works well enough for that purpose, allowing a new player to learn the ropes and fail in a low stakes environment. |
wouldn't the better solution be to just add difficulty, bot count and biome to the quickstart command? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While the rest of the changes look good to me, I don't think we can merge this in it's current form
The "hidden editors" should not be included in the main menu. Many of them are not intended to be used the average player, but rather advanced modders who are expected to be able to access them using console commands. If we were to make them visible in the main menu, we would need to localize all the texts in them to all the languages the game supports, and preferably also make them a lot more user-friendly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably shouldn't have said that the rest of the changes look good to me in the last review without taking a more in-depth look at the other code changes first. 😅 I'm also having second thoughts about how much sense it makes to add the mission mode option to the menu right now:
I'm still of the opinion that the mission mode is so underdeveloped it should not be put into spotlight like this in it's current state (first option in the main menu after the tutorials - I think a new player who assumes such a prominently displayed game mode is something they should start with would get a bad first impression of the game).
We have some plans for overhauling it in the future (some of which we're planning to do alongside the PvP overhaul), with things like options to select upgrades and extra supplies, and to select more than one mission per round. Those will most likely require quite a lot of changes to the "setup ui" and the code, so I feel it's not a good idea to include this sort of a "intermediate" version at this stage. But this PR could be of some use when we start looking into the mission mode overhaul, although I think it does still require some further work: I feel there's some code quality issues here, mainly a lot of copypasted, duplicate code, and dead code that does nothing.
LevelEditor = 11, | ||
ParticleEditor = 12, | ||
EventEditor = 13, | ||
SpriteEditor = 14, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The above enums are unused
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
}; | ||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Commented out code should be removed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
break; | ||
case Tab.SpriteEditor: | ||
CoroutineManager.StartCoroutine(SelectScreenWithWaitCursor(GameMain.SpriteEditorScreen)); | ||
break; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are not (and should not be) used
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
} | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a huge amount of code duplication between this class and CampaignSetupUI. The shared logic should most likely be moved to a shared base class.
#if SERVER | ||
GameMain.Server?.EndGame(); | ||
#else | ||
if (GameMain.GameSession.GameMode is { IsSinglePlayer: true } && GameMain.GameSession.CrewManager is { IsSinglePlayer: true }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure I understand why IsSinglePlayer: true
is checked on both the GameMode and the CrewManager. Is there a situation in which one is singleplayer, and the other isn't?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed, it now only checks if the GameMode has IsSinglePlayer set. Also fixed in CoOpMode.cs.
#if SERVER | ||
GameMain.Server?.EndGame(); | ||
#else | ||
if (GameMain.GameSession.GameMode is { IsSinglePlayer: true } && GameMain.GameSession.CrewManager is { IsSinglePlayer: true }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here, why does IsSinglePlayer: true
need to be checked on both of these?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed; see previous comment.
{ | ||
End(); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a ton of code duplication between this class and GameServer.cs
which handles ending the round in multiplayer.
public CoOpMode(GameModePreset preset, IEnumerable<MissionPrefab> missionPrefabs) : base(preset, ValidateMissionPrefabs(missionPrefabs, MissionPrefab.CoOpMissionClasses)) { } | ||
|
||
public CoOpMode(GameModePreset preset, MissionType missionType, string seed) : base(preset, ValidateMissionType(missionType, MissionPrefab.CoOpMissionClasses), seed) { } | ||
|
||
#if CLIENT |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It'd be better to move the client-specific code to a partial class.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
This PR adds:
New Localization Tags:
leveleditorbutton
- Level Editorparticleeditorbutton
- Particle Editoreventeditorbutton
- Event Editorspriteeditorbutton
- Sprite Editornewmissionbutton
- Start MissionModified Localization Tags:
campaignlabel
- Campaign => Singleplayernewgamebutton
- New Game => New Campaignloadgamebutton
- Load Game => Load Campaign