Counter-Strike 2

Counter-Strike 2

View Stats:
SpartanK Sep 18, 2019 @ 10:27pm
Creating a custom game mode GS:GO
I'm looking for some help from people who are experienced in modifying the games settings and making server mods. I want to create custom game modes to play offline with bots on the LAN, perhaps basic for now, and then more complex later.

I know I can play other games that might be closer to what I'm trying to make but the point is I'm interested in the actual modification process and being able to customise games and rules as much as possible.

So far I have created a cfg called gamemode_new.cfg file and put all the var changes I want in it

1) I go to main game, start a practice game (casual) with bots on the level I want to use
2) Open dev console and run exec gamemode_new
3) The new game restarts with all the tweaked settings
4) The game can be played successfully within some limitations

To be clear, I want to make a game mode that can be used within reason on any map, I'm not trying to create a specific map with custom rules. I know that creating 1 specific map I should be able to spawn ents and give them properties I need.

Some problems I'm noticing:
- Some of the vars don't seem to want to change or be working
- This is limited to only altering available console commands
- Some command vars only work in certain gamemodes
- Some settings perhaps require sv_cheats to be on which I don't really want as clients could just override the game rules and give themselves guns
- It doesn't allow me flexibility to do things on events such as when a player spawns

An example game - Which can be tweaked with gameplay time, if the settings aren't right. This is essentially a mini and tweaked version of dangerzone.
Basic version

20+ players
Free for all with random spawn points
No respawn, last man standing or 2 min rounds
Unlimited rounds but has a max game time of say 20 minutes
Start with a pistol + low or no money
Earn money by getting kills
Buy equipment throughout the game to powerup or pickup dropped items
Basic rankings from kills
New round starts from scratch again

What I've described above is pretty much working but I want the ability to refine the game
Advanced version

Players on both 'teams' cs and t, have access to the exact same weapon set
Start with 300 health (300 max health) - (Note: I can manually set everyone to 300 health but I can't make people spawn with 300 health automatically each round, and this doesn't address the maxhealth part)
Start with 3x healthshot, up to 100 health per shot (instead of 50)
Healthshots are purchasable in the buy menu at anytime
Points are awarded based on the position you finished
Team score is ignored

More advanced version
Perhaps a custom weapons buy menu with a specific set of weapons, same for all players. Maybe adjusted prices and even adjusted adjusted stats
Maybe a balancing system to favour weaker players as the game progresses, i.e. cash rewards scale based on points difference. Health could be scaled automatically on a per player basis.
Ammo can be bought
Healthshots, armour, weapons, ammo and cash can be found at random on the ground or in crates (this may require custom maps)
Each player has a limited amount of lives (per round), i.e 2-5 lives. When they die, they lose a life but retain their guns and cash.
Adding in specific objectives
Eliminate joining a team ct or t which would be unnecessary
Game can be solo or in small squads, 2-5 players per squad


Other things:
I want players to either be able to carry multiple weapons or change between them without having to rebuy weapons they already have (either bought or collected, where guns not in your inventory are automatically picked up). So...

- Players start with single pistol and knife
- Any gun they buy becomes marked as owned, they can switch to it at any time without rebuying, but the amount of ammo remains when switching and is not refreshed
- Any gun they automatically collect by walking over it is added as owned (already owned guns are left on the ground but ammo is added to your gun and removed from the floor gun
- Any gun that is dropped (maybe useful in squad play) is removed from your inventory and needs to be rebought.


If I could learn how to create more advanced custom games, it would enable me to work on other ideas I have. If anyone is experienced in this kind of thing and is interested to make it, I'd love to collaborate and learn. Welcome any invites to modder or developer groups.
< >
Showing 1-3 of 3 comments
d-luX Sep 18, 2019 @ 11:03pm 
I think the easiest way would to install a dedicated server with sourcemod. Sourcemod has a lot of plugins which can modify the game.

GameServer : https://developer.valvesoftware.com/wiki/Counter-Strike:_Global_Offensive_Dedicated_Servers

MetaMod (required for sourcemod) : https://www.metamodsource.net/

Sourcemod : https://www.sourcemod.net/

Sourcemod plugins : https://www.sourcemod.net/plugins.php?cat=0&mod=21&title=&author=&description=&search=1


If you have experience with programming then you can try creating vscripts. You do not need an extra server, but it's more difficult.

https://developer.valvesoftware.com/wiki/CSGO_Vscript_Examples

https://developer.valvesoftware.com/wiki/List_of_Counter-Strike:_Global_Offensive_Script_Functions

https://github.com/search?q=vscript
Originally posted by SpartanK:
I'm looking for some help from people who are experienced in modifying the games settings and making server mods. I want to create custom game modes to play offline with bots on the LAN, perhaps basic for now, and then more complex later.

I know I can play other games that might be closer to what I'm trying to make but the point is I'm interested in the actual modification process and being able to customise games and rules as much as possible.

So far I have created a cfg called gamemode_new.cfg file and put all the var changes I want in it

1) I go to main game, start a practice game (casual) with bots on the level I want to use
2) Open dev console and run exec gamemode_new
3) The new game restarts with all the tweaked settings
4) The game can be played successfully within some limitations

To be clear, I want to make a game mode that can be used within reason on any map, I'm not trying to create a specific map with custom rules. I know that creating 1 specific map I should be able to spawn ents and give them properties I need.

Some problems I'm noticing:
- Some of the vars don't seem to want to change or be working
- This is limited to only altering available console commands
- Some command vars only work in certain gamemodes
- Some settings perhaps require sv_cheats to be on which I don't really want as clients could just override the game rules and give themselves guns
- It doesn't allow me flexibility to do things on events such as when a player spawns

An example game - Which can be tweaked with gameplay time, if the settings aren't right. This is essentially a mini and tweaked version of dangerzone.
Basic version

20+ players
Free for all with random spawn points
No respawn, last man standing or 2 min rounds
Unlimited rounds but has a max game time of say 20 minutes
Start with a pistol + low or no money
Earn money by getting kills
Buy equipment throughout the game to powerup or pickup dropped items
Basic rankings from kills
New round starts from scratch again

What I've described above is pretty much working but I want the ability to refine the game
Advanced version

Players on both 'teams' cs and t, have access to the exact same weapon set
Start with 300 health (300 max health) - (Note: I can manually set everyone to 300 health but I can't make people spawn with 300 health automatically each round, and this doesn't address the maxhealth part)
Start with 3x healthshot, up to 100 health per shot (instead of 50)
Healthshots are purchasable in the buy menu at anytime
Points are awarded based on the position you finished
Team score is ignored

More advanced version
Perhaps a custom weapons buy menu with a specific set of weapons, same for all players. Maybe adjusted prices and even adjusted adjusted stats
Maybe a balancing system to favour weaker players as the game progresses, i.e. cash rewards scale based on points difference. Health could be scaled automatically on a per player basis.
Ammo can be bought
Healthshots, armour, weapons, ammo and cash can be found at random on the ground or in crates (this may require custom maps)
Each player has a limited amount of lives (per round), i.e 2-5 lives. When they die, they lose a life but retain their guns and cash.
Adding in specific objectives
Eliminate joining a team ct or t which would be unnecessary
Game can be solo or in small squads, 2-5 players per squad


Other things:
I want players to either be able to carry multiple weapons or change between them without having to rebuy weapons they already have (either bought or collected, where guns not in your inventory are automatically picked up). So...

- Players start with single pistol and knife
- Any gun they buy becomes marked as owned, they can switch to it at any time without rebuying, but the amount of ammo remains when switching and is not refreshed
- Any gun they automatically collect by walking over it is added as owned (already owned guns are left on the ground but ammo is added to your gun and removed from the floor gun
- Any gun that is dropped (maybe useful in squad play) is removed from your inventory and needs to be rebought.


If I could learn how to create more advanced custom games, it would enable me to work on other ideas I have. If anyone is experienced in this kind of thing and is interested to make it, I'd love to collaborate and learn. Welcome any invites to modder or developer groups.
To be able to use sv_cheats commands can't you turn it on run all the commands then turn it off?
SpartanK Sep 23, 2019 @ 3:12am 
I would have to try that, but I'm guessing it would disable the commands that require cheats.
< >
Showing 1-3 of 3 comments
Per page: 1530 50

Date Posted: Sep 18, 2019 @ 10:27pm
Posts: 3