Garry's Mod

Garry's Mod

80 ratings
Random Deathmatch [OUTDATED]
   
Award
Favorite
Favorited
Unfavorite
Content Type: Addon
Addon Type: Gamemode
Addon Tags: Fun
File Size
Posted
Updated
46.389 KB
16 Aug, 2016 @ 9:38pm
12 Jun, 2019 @ 1:52pm
41 Change Notes ( view )

Subscribe to download
Random Deathmatch [OUTDATED]

Description
!! THIS ADDON IS OUTDATED !!
I have not touched Random Deathmatch in a long time, and it seems that my already-unstable code is starting to break down. Unfortunately, I do not have the time to work on this addon right now and I can't say if or when I will again. I'm sorry to disappoint anyone. For those interested, my code is available on GitHub (see bottom) if you are determined enough to take this addon into your own hands.

A deathmatch gamemode, but you build up your arsenal with every player you kill!

Every player spawns with their fists and one other weapon. On death, they will drop about half of their weapons on the floor. As such, players will have to kill each other to get more weapons than just the one they spawn with, and the round becomes a fight to collect (and maintain) the best collection!

Maps: If you want to make any maps for this gamemode, the prefix is "rdm_". If you're just looking for reccomendations, I would say TTT, Counter Strike, TF2, or any other FPS-centered maps would be best.

Commands: These are very important if you want to get your other weapon addons working with rdm.

rdm_printweapon: Prints the class name of the weapon you are holding.

rdm_tableprint: Prints out the table that RDM uses to get weapon loadouts. Use this to check what your current loadouts are.
rdm_tablesave: Saves the loadout table to the loadouts.txt
rdm_tablereload: Reloads the loadout table from loadouts.txt

rdm_primary_add: Adds each argument you list to the table of weapons players can spawn with (use class names!) End your argument with ^* to make the argument a wildcard, and every weapon that starts with whatever you listed will be added (e.g. rdm_spawn_add m9k_^* adds all weapons starting with m9k_ ).
rdm_melee_add: See above. Use for melee weapon table.
rdm_aux_add: See above. Use for auxiliary weapon table.
rdm_nodrop_add: See above. Use for noDrop table.

rdm_primary_remove: Remove the specified weapon class names from the table of weapons that people can spawn with.
rdm_melee_remove: See above. Use for melee weapon table.
rdm_aux_remove: See above. Use for auxiliary weapon table.
rdm_nodrop_remove: See above. Use for noDrop table.

rdm_primary_removeall: Remove all instances of each weapon class from the table of weapons people can spawn with (you can rdm_spawn_add the same weapon multiple times to make it more common, and rdm_spawn_remove only removes one at a time.) Use ^* to wildcard and remove all weapons that start with the same text, as with the wildcard in rdm_spawn_add.
rdm_melee_removeall: See above. Use for melee weapon table.
rdm_aux_removeall: See above. Use for auxiliary weapon table.
rdm_nodrop_removeall: See above. Use for noDrop table.

Loadouts.txt:
Loadouts.txt is generated after running an RDM game at least once.

In your GMod data folder, under randomdeathmatch, is loadouts.txt.

This file is in JSON format. This is how RDM saves and loads your loadout settings each game. The commands provided above edit this, but the file exists so that you can also do so by hand.

As for how it works or what JSON format is, unfortunately you'll have to look that up yourself; it's a bit much to put in one description. Just stick to the commands if you can't figure it out.

(P.S. Yes, the name is inspired by RDM in Trouble in Terrorist Town)
Popular Discussions View All (2)
7
14 May, 2019 @ 5:56pm
Server.cfg Example!
oaktal
0
11 Jun, 2019 @ 6:57pm
tables.txt example
oaktal
31 Comments
¿LλMBDᴬ? 31 Dec, 2020 @ 10:25am 
please make random deathmatch again PLS pls please becase the gamemode sound really cool:steamthumbsup:
EclipsePlays 6 Jun, 2020 @ 6:22pm 
Thanks @ChickenDinner for the update. I did play around with LUA a few years back, so I might sit down and see if I can fix it, but I'm very inexperienced so I'll leave it up to more advanced coders for now.
oaktal  [author] 6 Jun, 2020 @ 12:40pm 
@lordg52, on the offchance that you're still using RDM and it still works for you: no, I didn't include any playermodel selector if that's what you asked about. It should work with the Enhanced Playermodel Selector addon though (provided it still works at all).
oaktal  [author] 6 Jun, 2020 @ 12:39pm 
@EclipsePlays, sorry to hear that you're having issues with the addon. I can't remember seeing that error message during my time working on this thing, but it's very likely that something has broken with a recent update. I haven't worked on this addon in a long time, and I'm sure it wasn't entirely sound when I made it in the first place.

I hate to leave this addon in the dust for a second time now, but I unfortunately do not have the time to work out any issues or update the addon right now. That being said, if you or anyone else knows your GMod Lua, anybody is free to pick up my work via the GitHub repository I made (see bottom of description).

Sorry I couldn't help you, and I'm sorry to everyone for having to abandon this addon for the time being. I am going to update the title and description to reflect that this addon is most likely outdated.
EclipsePlays 5 Jun, 2020 @ 8:06pm 
I can't seem to get this addon to work at all. I've ran the game with in installed, closed it, ran it again, and every time it gives me the following error

[Random Deathmatch] gamemodes/randomdeathmatch/gamemode/rdm_player.lua:11: bad argument #1 to 'random' (number expected, got nil)
1. random - [C]:-1
2. Call - gamemodes/randomdeathmatch/gamemode/rdm_player.lua:11
3. unknown - gamemodes/base/gamemode/player.lua:276
4. Spawn - [C]:-1
5. unknown - gamemodes/base/gamemode/player.lua:115

My friends and I only spawn with fists, can anyone help us?
lordg52 27 Nov, 2019 @ 11:46pm 
is there a way to change the models with this?
sike Mapo 15 Oct, 2018 @ 5:10pm 
@ChickenDinner awesome! although im pretty sure if you're allowed to save and read files with glua, you might be able to add a way to save weapons.

try out the io library and see if it works, idk.
oaktal  [author] 15 Oct, 2018 @ 5:06pm 
@deR1t Sure, your comment wasnt very helpful syntax-wise, but it prompted me to just use a system of tables and commands to add more weapons. As of this instant, you have to add the new weapons every time you start a game or change a map (though changing the server.cfg on a dedicated server might avert that, but i havent tested it yet). However, everything else is functioning a lot better than before.
sike Mapo 13 Oct, 2018 @ 11:27pm 
whoa hello there!
i just got cancer from reading my other comment I posted because I've learned so much since then!

just here to say cool and leave again. :p
good luck on finishing!
oaktal  [author] 13 Oct, 2018 @ 5:58pm 
Well, luckily for everyone who wants me to *actually work on this damn addon*, I've gained some more understanding about how gmod works by playing around with TTT servers and the like.

I've been looking for a coding project again recently, and I think it would be best if I picked this up again. All of my source code was lost when I switched computers, but it was only like 100 lines in the first place so it shouldn't be that hard to restart.

When I rewrite it, I'll make sure to restructure the code so that instead of attempting to hack together a list of all the weapons somebody has installed, they will enable them manually through a convar (like @deR1t suggested). That way, when somebody hosts a server they can just put the whole list in their server.cfg.

I'll start work tomorrow (October 14th).