Skip to content
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

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

Jade-Harleyy
Copy link

@Jade-Harleyy Jade-Harleyy commented Apr 10, 2024

This PR adds:

  • Buttons for the remaining content editors to the main menu.
  • Singleplayer mission/sandbox modes (latter accessible by selecting no available missions for the former).

image

New Localization Tags:

  • leveleditorbutton - Level Editor
  • particleeditorbutton - Particle Editor
  • eventeditorbutton - Event Editor
  • spriteeditorbutton - Sprite Editor
  • newmissionbutton - Start Mission

Modified Localization Tags:

  • campaignlabel - Campaign => Singleplayer
  • newgamebutton - New Game => New Campaign
  • loadgamebutton - Load Game => Load Campaign

Implement singleplayer mission and sandbox modes.
@EebleSheembl
Copy link

Need

@PanmanS
Copy link

PanmanS commented Apr 10, 2024

This would significantly simplify testing for specific missions when quickstart doesnt suffice and serve lobby is too long to load

@Regalis11
Copy link
Collaborator

Buttons for the remaining content editors to the main menu.

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.

@NotWendy
Copy link

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.
I understand you don't want players to get the wrong impression of what the mission mode is supposed to be by trying it out before its big overhaul happens. But with the value it already brings to the game, I think you can consider adding it to the main menu early.

@WrillWasTaken
Copy link

This would significantly simplify testing for specific missions when quickstart doesnt suffice and serve lobby is too long to load

wouldn't the better solution be to just add difficulty, bot count and biome to the quickstart command?

Copy link
Collaborator

@Regalis11 Regalis11 left a 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.

@Regalis11 Regalis11 added Feature request Request a new feature to be added Code Programming task Waiting Cannot be worked on/reviewed/tested at the moment for some reason labels Jun 27, 2024
Copy link
Collaborator

@Regalis11 Regalis11 left a 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,
Copy link
Collaborator

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

Copy link
Author

Choose a reason for hiding this comment

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

Fixed.

};
*/
Copy link
Collaborator

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

Copy link
Author

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;
Copy link
Collaborator

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

Copy link
Author

Choose a reason for hiding this comment

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

Fixed.

}
}
}
}
Copy link
Collaborator

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 })
Copy link
Collaborator

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?

Copy link
Author

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 })
Copy link
Collaborator

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?

Copy link
Author

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();
}
}
Copy link
Collaborator

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
Copy link
Collaborator

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.

Copy link
Author

Choose a reason for hiding this comment

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

Fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Code Programming task Feature request Request a new feature to be added Waiting Cannot be worked on/reviewed/tested at the moment for some reason
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants