Me again...
I'm looking for a way to build multiple game modes within the same mod. That's it for now!
I'm currently blocked and lost. Let's start with what I can see with other mods (from basic UI to code).
Half-Life Pre-25th vs. 25th
- (25th) In the NewGameDialog.res file, there is a "PlayGameAlt" command that launches Uplink. With SDK, Uplink doesn't appear, so this command might be associated with something in the code??
- (Pre-25th) In the same file, there is a "Play" command, but you can add engine commands. (i.e. "command" "engine map c1a0")
- skills are not associated with any sort of command in this file (Easy, Medium, Hard). How does the game know?
- I can modify the UI, but I CAN'T change how it operates. (Wouldn't be able to remove the Skills and just add a button with a command that redirects to a map and a skill. I absolutely need to select a skill to execute a "command".
- They modified GameMenu.res instead, adding a bunch of commands.
- They allowed view for Custom Games and redirect the user to other mods (.dll) that operate differently. It doesn't seem efficient IMO, am I right?
- gamerules files - seem only to be a if else command via InstallGameRules. Redirect to singleplayer_gamerules or multiplayer_gamerules.
My questions
- What's the best practice to create multiple single-player gamerules that modify mainly weapons, models, player, etc? Should I create a mode1_gamerules file and mode1_weapon, mode1_player, etc. files that override some elements of the regular files? (For example, I know there's a player.cpp and CSplayer.cpp file in CS SDK)
- Which file would I have to change/duplicate for each game mode (world?)
- How do I connect those game mode to the UI? (obviously, I don't think it could work with a simple "engine" command in the .res, or even an associated .cfg file).
1. Create those modes and their triggers in the code.
2. Create an ALERT print in the console during Precache to test that these modes are correctly triggered when loaded.
3. Connect those modes with UI buttons (Ideally through a NewGameDialogue window, but I don't mind via the GameMenu
... If you made it that far, thank you!