Jump to content

[CS:GO] Round-to-round map randomization guide

Recommended Posts

A few months ago, I wrote a guide on how to vary CS:GO maps round-to-round using logic_case and logic_eventlistener entities. Would be nice to hear some feedback from you guys regarding my guide's accuracy, as well as any additions I should add:

How to Randomize Your Map Round-to-Round in Hammer

I owe of lot of the guide's contents to Reddit user Nymphalow and Valve's developer wiki. I do have some questions regarding some game_player_equip flags, however. Specifically, if you scroll down to the "Starting Weapons" section, you'll see that, for the game_player_equip entity named "equip_players," I say that you should only enable the "Only Strip Same Weapon Type" flag. In Nymphalow's original post, on the other hand, Nymphalow says that the "equip_players" game_player_equip entity only enable the "Use Only" flag. In my experience, though, having only "Use Only" checked caused a crapton of weapons to spawn, while having only the "Only Strip Same Weapon Type" flag checked caused the trigger_multiple entity to correctly spawn only 1 weapon. Hopefully, someone knowledgeable can help clear up this issue. I think I figured out how to use "Use Only" with game_player_equip and trigger_multiple. See my post here.

You probably won't be using many of these randomization techniques in a competitive map (heard people really disliked cs_havana for doing just that). However, I do think there's a bunch of potential for round-to-round variation in AIM, Coop and obstacle course maps, for those who want to give those maps more replayability. In fact (self-promotion ahead!), here are some maps I've created that uses some of the concepts explained in my guide:

Edited by sn0wsh00

Share this post

Link to post
Share on other sites

Ok, so I probably figured out the whole "use only" thing with regards to game_player_equip. It turns out what Nymphalow probably meant to say was:

  1. For "equip_player", make sure that "Use Only" and "Only Strip Weapon Type" are checked
  2. In the trigger_multiple output, the "Via this input" field should be "Use" instead of "TriggerForActivatedPlayer." Given that "Use" is by default a non-FGD input, "Use" will appear red.

I'll update the guide to incorporate this new way to randomize weapons once I get close to finishing my aim_six_arenas spinoff.

Shoutout to @Kokopelli's Snowball Fight - Country House map for showing how to correctly do this.

Edited by sn0wsh00
Formatting, credit

Share this post

Link to post
Share on other sites

Talk about really randomizing your stuff: OrelStealth has just released a map with procedural generation:


Skimming through the decompiled files, it looks like most of the procedural generation was done through Vscript combined with a bunch of prop_dynamic entities.

Edited by sn0wsh00

Share this post

Link to post
Share on other sites

Just added a new way to randomize weapons to the guide. You can read how I did it on Steam, but I'll post the method here on Mapcore as well because it's always good to have a backup.

So, suppose you want a round where the terrorists and counter-terrorists spawn with a Tec-9 and Five-Seven respectively, and another round where they spawn with a Glock and a USP-S. To do this,

  1. Create a logic_eventlistener entity and name it ListenRoundStart. Set "Event Name" to round_start.
  2. Create two filter_activator_team entities. Name one filter_t and the other filter_ct
  3. Create two math_counter entities. Name one counter_ct and the other counter_t. For both counters, set the minimum legal value to 0 and the maximum legal value to 20.
  4. Create four game_player_equip entities. Name them equip_ct_usps, equip_t_glock, equip_ct_57 and equip_t_tec9
  5. For all four game_player_equip entities, make sure the "Use Only" and "Strip All Weapons First" flags are checked
  6. Disabling SmartEdit, add entries for weapon_knife for the four game_player_equip entities.
  7. Keeping SmartEdit disabled, add an entry of weapon_usp_silencer for equip_ct_usps, weapon_glock for equip_t_glock, weapon_fiveseven for equip_ct_57 and weapon_tec9 for equip_t_tec9. You should have two weapon entries for each game_player_equip, as shown here.
  8. Create a logic_case entity called counter_chooser and create two outputs for OnCase01 and two outputs for OnCase02
  9. For the first OnCase01 output, set target entity to counter_ct and input to SetValue. For the other OnCase01 output, set target entity to counter_t. For both OnCase01 outputs, set parameter override to 10. Do the same thing for the two OnCase02 outputs, but set the parameter override value for those outputs to 20. The output table for counter_chooser should look like this.
  10. Create two more logic_case entities named logic_ct_chooser and logic_t_chooser
  11. Under class info for both logic_ct_chooser and logic_t_chooser, set the Case 01 value to 10 and the Case 02 value to 20, as shown here.
  12. Under logic_ct_chooser outputs tab, create an output for OnCase01 with a target entity of equip_ct_usps and a "Via this input" of Use. Because Use is not a default FGD input, the word "Use" will appear red. Don't worry about this, though, as CS:GO will recognize this input.
  13. Create an output for OnCase02, and do the same thing you did with OnCase01, but replace the target entity with equip_ct_57. The logic_ct_chooser outputs tab should now look like this.
  14. For logic_t_chooser, do what you did with logic_ct_chooser, but replace the the target entities of equip_ct_usps and equip_ct_57 with equip_t_glock and equip_t_tec9 respectively
  15. Back at the ListenRoundStart logic_eventlistener outputs table, create an output named OnEventFired, set target entity to counter_chooser and "Via this input" to PickRandom.

Now it's time to create the trigger_multiple brushes:

  1. Create a single trigger_multiple brush around CT spawn and a single trigger_multiple brush around T spawn. Name those trigger_multiples wep_spawn_ct and wep_spawn_t respectively. Once again, if you have multiple group spawns, simply copy the trigger_multiple brushes to the other spawn areas, keeping the same entity and filter names. The output table should look like this.
  2. Set "Filter Name" for wep_spawn_ct and wep_spawn_t to filter_ct and filter_t respectively
  3. Set "Delay Before Reset" to -1
  4. In wep_spawn_t, set "My output named" to OnStartTouch, "Targets entities named" to counter_t, "Via this input" to GetValue and a delay of at least 0.01 seconds (this delay is necessary for the game_player_equip entities to work). Also make sure "Fire once only" is unchecked
  5. Do the same thing with wep_spawn_ct, but change "Targets entities named" to counter_ct.

As you can tell, there's a lot of entities that need to be created to randomize player weapons round-to-round. Fortunately, I made a chart to visually show how all these entities relate to each other:





I made a map that shows off all the concepts in this post. You can download it at the link below:


Edited by sn0wsh00
link to map, wording

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...