How to remove the "training room" button From your Half-Life Mod Created 1 year ago2023-12-04 18:47:22 UTC by bob123124 bob123124

Created 1 year ago2023-12-04 18:47:22 UTC by bob123124 bob123124

Posted 1 year ago2023-12-04 18:47:22 UTC Post #348148
Just to make it clear i am posting this because the last thread is too old so i cant respond there.
To remove the Training room button from your Half-Life mod , go in your mod folder , make a new folder called resource.
then go in your half life files folder and then in valve\rscource and search for the file "NewGameDialog.res" and copy than inyour modfolder\resources.
Now open the file and scroll down until you see :
"TrainingButton"
{
...
}
now delete that part, save your file and launch the game. When you press new Game the Training room button wont be there.
If you dont trust yourself deleting files i will copy paste the code here and then just delete everything in NewGameDialouge.res and paste this in:

"Resource\NewGameDialog.res"
{
"NewGameDialog"
{
"ControlName" "Frame"
"fieldName" "NewGameDialog"
"xpos" "390"
"ypos" "254"
"wide" "280"
"tall" "302"
"autoResize" "0"
"pinCorner" "0"
"visible" "1"
"enabled" "1"
"tabPosition" "0"
}
"Label4"
{
"ControlName" "Label"
"fieldName" "Label4"
"xpos" "40"
"ypos" "40"
"wide" "220"
"tall" "24"
"autoResize" "0"
"pinCorner" "0"
"visible" "1"
"enabled" "1"
"tabPosition" "0"
"labelText" "#GameUI_Difficulty"
"textAlignment" "west"
"associate" "Difficulty"
"dulltext" "0"
"brighttext" "0"
}
"Difficulty"
{
"ControlName" "ComboBox"
"fieldName" "Difficulty"
"xpos" "40"
"ypos" "68"
"wide" "200"
"tall" "24"
"autoResize" "0"
"pinCorner" "0"
"visible" "1"
"enabled" "1"
"tabPosition" "1"
"textHidden" "0"
"editable" "0"
"maxchars" "-1"
"default" "1"
}

"PlayGame"
{
"ControlName" "Button"
"fieldName" "PlayGame"
"xpos" "40"
"ypos" "180"
"wide" "200"
"tall" "24"
"autoResize" "0"
"pinCorner" "0"
"visible" "1"
"enabled" "1"
"tabPosition" "3"
"labelText" "#GameUI_PlayGame"
"textAlignment" "center"
"dulltext" "0"
"command" "Play"
"default" "0"
}

"PlayGame_Alt"
{
"ControlName" "Button"
"fieldName" "PlayGame_Alt"
"xpos" "40"
"ypos" "216"
"wide" "200"
"tall" "24"
"autoResize" "0"
"pinCorner" "0"
"visible" "0"
"enabled" "1"
"tabPosition" "4"
"labelText" "#GameUI_PlayGame_Alt"
"textAlignment" "center"
"dulltext" "0"
"command" "PlayGameAlt"
"default" "0"
}


"Cancel"
{
"ControlName" "Button"
"fieldName" "Cancel"
"xpos" "166"
"ypos" "264"
"wide" "72"
"tall" "24"
"autoResize" "0"
"pinCorner" "0"
"visible" "1"
"enabled" "1"
"tabPosition" "5"
"labelText" "#GameUI_Cancel"
"textAlignment" "west"
"dulltext" "0"
"command" "Close"
"default" "0"
}
"BuildDialog"
{
"ControlName" "BuildModeDialog"
"fieldName" "BuildDialog"
"xpos" "87"
"ypos" "250"
"wide" "285"
"tall" "665"
"autoResize" "0"
"pinCorner" "0"
"visible" "1"
"enabled" "1"
"tabPosition" "0"
}
}
Posted 1 year ago2023-12-04 20:51:36 UTC Post #348150
Now, I'll even go more in-depth, asking a more complex question.
How/Where do you change the behaviour of the "Play" and "PlayGameAlt"/ command?
I don't mean writing a console-oriented command (i.e. engine map c1a0) but changing the backend code.

You are going to be my saviour if you know that.

The command in question:

"PlayGame_Alt"
{
"ControlName" "Button"
"fieldName" "PlayGame_Alt"
"xpos" "40"
"ypos" "216"
"wide" "200"
"tall" "24"
"autoResize" "0"
"pinCorner" "0"
"visible" "0"
"enabled" "1"
"tabPosition" "4"
"labelText" "#GameUI_PlayGame_Alt"
"textAlignment" "center"
"dulltext" "0"
"command" "PlayGameAlt" <-- That
"default" "0"
}
Posted 1 year ago2023-12-04 23:04:55 UTC Post #348151
^ playgamealt is probably hardcoded to start the map hldemo1. the simple solution is to create a map of said name that is nothing but a room that immediately teleport-changelevel to a map of your choice.
Posted 1 year ago2023-12-04 23:15:46 UTC Post #348152
I was afraid of that... Thanks!
Posted 1 year ago2023-12-05 13:02:13 UTC Post #348153
You can load a map of your choice by adding a button to GameMenu.res.

This is how the Unified SDK does it to load the campaign selection menu:
"3"
{
    "label" "#GameUI_CampaignSelect"
    "command" "engine disconnect; maxplayers 1; map hlu_campaignselect"
}
Posted 1 year ago2023-12-05 16:05:44 UTC Post #348155
This is what I was thinking of doing since things are hardcoded.
I'm currently using the SamVanheer SDK (half-life updated, not unified)
  • Build a map with changelevel triggers that go to the right game mode. I'm currently rebuilding c0a0, allowing Gordon to choose a train associated with the game mode the player wants to play (game rules (i.e. crowbar only, 9mm only, 1hp, etc.) with Original Half-Life maps (for most cases), loading c0a0_gamemode1, 2, 3, and so on).
  • Renaming maps and modifying their changelevel entities to trigger the right "game_mode" map.
Now I just need to find a way to associate gamerules to those maps or game modes
Posted 1 year ago2023-12-05 17:53:53 UTC Post #348157
eeeh well sorry but idk much about halflife im just a 14 year old boy playing around with half life's modding sdk stuff so im sorry but i cant awnser your question😅.
You must be logged in to post a response.