Left 4 Dead 2

Left 4 Dead 2

Admin Menu 2.0
Menoly 30 Sep, 2019 @ 6:04am
Adding things to admin menu.
If I wanted to add stuff to admin menu what do I need to know and how would I go about it?
< >
Showing 1-9 of 9 comments
Maur0  [developer] 30 Sep, 2019 @ 1:52pm 
For now I can not add or improve this mod. And I do not want to put many things like 3, 4 or more pages because it would be a disaster, just put the most important and most used commands.

If you really want to add commands to the menu, here are some tools:
  1. GCFScape[nemesis.thewavelength.net]: With this you can open vpk files that contain the folders with the files and be able to extract them.
  2. notepad++[notepad-plus-plus.org]: Here it will be easier to modify the file with the commands / scripts.
  3. left 4 dead 2 authoring tools: You will need it to be able to obtain the vpk file and be able to upload your vpk file in the workshop in case you want to publish it in public or friends.

Now more or less how to start everything:

1- With the GCFScape program, you can open vpk files and extract the folder that includes the file. I suggest you create a new folder and name it "admin menu" and then enter the folder "scripts".

2- Already having this, now you can modify the file. I recommend you use the Notepad ++ program to make it easier and more comfortable. You will see that at the beginning it is difficult to understand how to add commands. But little by little you will understand how it works.

3- Here is an example such as the commands:
"Menu" { "Title" "Admin Menu" "1" { "command" "play buttons/button14; show_menu AddAdmins" "label" " Manage Admins" } "2" { "command" "play buttons/button14; show_menu Admin" "label" " Survivor Commands" } "3" { "command" "play buttons/button14; show_menu WeaponMenu" "label" " Weapon Commands" } "4" { "command" "play buttons/button14; show_menu Infected" "label" " Infected Commands" } "5" { "command" "play buttons/button14; show_menu Warp" "label" " Warp Commands" } "6" { "command" "play buttons/button14; show_menu Cvars" "label" " Cvar commands" } "7" { "command" "play buttons/button14; show_menu Extras" "label" " Extra Commands" } " " { "command" "play buttons/button14; show_menu Menu" "label" " " } "9" { "command" "play buttons/button14; show_menu Menu2" "label" " >> Next" } "0" { "command" "play buttons/button14" "label" " Exit" } }
As you will see it is a bit complicated to understand. But the most important thing is to see well what to modify. Inside the quotes you are putting like this:
Title = ""Add the title of the page"
"command" = The first allows sound when you give the number key, the second is the function of the given command and the last is which menu is kept open.
Label = Same as title, but it serves to rename the use command.
Each number gives the commands you add. My recommendation is that it be from 1 to 7. 8 would be for back, 9 for next and 0 to cancel / close the menu.
Above the title is what will identify the main page. Where it says "menu", it also works when you add page by page, such as survivors, infected, weapons, cvars, etc. And it opens with the command: show_menu <name of the page command>".
Maur0  [developer] 30 Sep, 2019 @ 1:58pm 
4- Once you are done modifying the file. Having to install the left 4 dead 2 authorings tools located at:
>Right click Left 4 Dead 2 and go down "Properties"
>Then you search, left 4 dead 2 autorings tools and give it to install.
>Wait about 4 min (depends on your internet).
>And there you will have several files and the most important to compile as a vpk file is here: C:\Program Files (x86)\Steam\steamapps\common\Left 4 Dead 2\bin
>And there you will have the vpk file. You can send it to the desktop for easy use.

5- When you already have the folder named as mod, inside the modified file. There you will have to drag the folder and take it inside the vpk file to copy it. Once done you send the vpk file to the addons folder (which I can imagine where it is).

6- And that's it, enjoy the modified menu.
Maur0  [developer] 30 Sep, 2019 @ 2:02pm 
Sorry I have given you a lot of information and it is a complicated way to understand. But do not hesitate to ask me some details. Remember that you must close the commands and texts inside the quotes. And to avoid failures, make sure that each command is closed with the keys = {}. And the semicolon goes along with the commands to reset and use them at the same time you give it the key.

By the way anything you can google or ask in the discussion forums to modders who know how to use scripting commands.

Let me know anything if it works for you. I sincerely believe that I am retiring from doing more mod update.
Menoly 1 Oct, 2019 @ 7:17am 
Alright thank you I'll be on this soon.
Originally posted by Maur0:
For now I can not add or improve this mod. And I do not want to put many things like 3, 4 or more pages because it would be a disaster, just put the most important and most used commands.

If you really want to add commands to the menu, here are some tools:
  1. GCFScape[nemesis.thewavelength.net]: With this you can open vpk files that contain the folders with the files and be able to extract them.
  2. notepad++[notepad-plus-plus.org]: Here it will be easier to modify the file with the commands / scripts.
  3. left 4 dead 2 authoring tools: You will need it to be able to obtain the vpk file and be able to upload your vpk file in the workshop in case you want to publish it in public or friends.

Now more or less how to start everything:

1- With the GCFScape program, you can open vpk files and extract the folder that includes the file. I suggest you create a new folder and name it "admin menu" and then enter the folder "scripts".

2- Already having this, now you can modify the file. I recommend you use the Notepad ++ program to make it easier and more comfortable. You will see that at the beginning it is difficult to understand how to add commands. But little by little you will understand how it works.

3- Here is an example such as the commands:
"Menu" { "Title" "Admin Menu" "1" { "command" "play buttons/button14; show_menu AddAdmins" "label" " Manage Admins" } "2" { "command" "play buttons/button14; show_menu Admin" "label" " Survivor Commands" } "3" { "command" "play buttons/button14; show_menu WeaponMenu" "label" " Weapon Commands" } "4" { "command" "play buttons/button14; show_menu Infected" "label" " Infected Commands" } "5" { "command" "play buttons/button14; show_menu Warp" "label" " Warp Commands" } "6" { "command" "play buttons/button14; show_menu Cvars" "label" " Cvar commands" } "7" { "command" "play buttons/button14; show_menu Extras" "label" " Extra Commands" } " " { "command" "play buttons/button14; show_menu Menu" "label" " " } "9" { "command" "play buttons/button14; show_menu Menu2" "label" " >> Next" } "0" { "command" "play buttons/button14" "label" " Exit" } }
As you will see it is a bit complicated to understand. But the most important thing is to see well what to modify. Inside the quotes you are putting like this:
Title = ""Add the title of the page"
"command" = The first allows sound when you give the number key, the second is the function of the given command and the last is which menu is kept open.
Label = Same as title, but it serves to rename the use command.
Each number gives the commands you add. My recommendation is that it be from 1 to 7. 8 would be for back, 9 for next and 0 to cancel / close the menu.
Above the title is what will identify the main page. Where it says "menu", it also works when you add page by page, such as survivors, infected, weapons, cvars, etc. And it opens with the command: show_menu <name of the page command>".
is there any way you can make it so you can become infected in survival and campaign
Maur0  [developer] 4 Aug, 2020 @ 11:57am 
@🥪The Panini🥪- Go to this guide and you will see that you can play as infected in various gamemodes.
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=1396360144
Originally posted by Maur0:
@🥪The Panini🥪- Go to this guide and you will see that you can play as infected in various gamemodes.
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=1396360144
But that changes the gamemode. i wanna be able to play as infected in campaign
Maur0  [developer] 4 Aug, 2020 @ 7:29pm 
@🥪The Panini🥪- On the contrary. You did a trick to be able to play as infected in campaign, realism or survival mode.

Just do these steps:
  1. Inside your server you write this command in the chatbox: !cvar mp_gamemode versus
  2. Now you change from infected (default M key).
  3. Put this command back: !cvar mp_gamemode coop
  4. Now you put the command !kill all or !restart to restart the game.
  5. Done! You are already an infected in campaign mode.

To consider:
  • Before doing this you will need to put the command !cvar sb_all_bot_game 1, !cvar allow_all_bot_survivor_team 1 and !cvar vs_max_team_switches 100 to allow bots to play alone without humans and the other to switch teams unlimited.
  • During campaign mode as infected, you will not be able to respawn as ghost. For you will have to use the command !z_spawn hunter auto. This allows spawn as a hunter and the car allows spawn in favor of the Director where he puts you. It should be noted that my admin menu contains for infected spawn to facilitate it.

You can also use the gamemode.txt file to add a command that allows you to play as infected in various modes. Look for them in the workshop.
Originally posted by Maur0:
@🥪The Panini🥪- On the contrary. You did a trick to be able to play as infected in campaign, realism or survival mode.

Just do these steps:
  1. Inside your server you write this command in the chatbox: !cvar mp_gamemode versus
  2. Now you change from infected (default M key).
  3. Put this command back: !cvar mp_gamemode coop
  4. Now you put the command !kill all or !restart to restart the game.
  5. Done! You are already an infected in campaign mode.

To consider:
  • Before doing this you will need to put the command !cvar sb_all_bot_game 1, !cvar allow_all_bot_survivor_team 1 and !cvar vs_max_team_switches 100 to allow bots to play alone without humans and the other to switch teams unlimited.
  • During campaign mode as infected, you will not be able to respawn as ghost. For you will have to use the command !z_spawn hunter auto. This allows spawn as a hunter and the car allows spawn in favor of the Director where he puts you. It should be noted that my admin menu contains for infected spawn to facilitate it.

You can also use the gamemode.txt file to add a command that allows you to play as infected in various modes. Look for them in the workshop.
thank you
< >
Showing 1-9 of 9 comments
Per page: 1530 50