RadGen

From Valve Developer Community
Revision as of 16:22, 21 September 2023 by JimWood (talk | contribs) (Initial page creation)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
English (en)Translate (Translate)
RadGen
Download
TypeThird Party Tool
EngineSource Source
PlatformsWindows Windows
 

RadGen (Radar Generator) is a tool for Counter-Strike 2 Counter-Strike 2. This tool can generate highly customisable overviews for maps using meshes, entities and/or materials, by assigning them to specific Selection Sets.

It can also be used in either a Material based workflow, or a Selection Set based workflow.

Installation

Download .NET Runtimes
  1. Download and install the latest .NET 5 runtime
  2. Download and install the latest .NET Core 3.1 runtime
  3. Download and install the latest .NET Framework 4.5 runtime
  4. This file may also be needed to create VTFs for Danger Zone maps: https://www.microsoft.com/en-ie/download/details.aspx?id=48145
Copy Files
  1. Extract the contents of the zip folder into your Game folder. It should be somewhere like C:\Program Files (x86)\Steam\steamapps\common\Counter-Strike Global Offensive\game
Note.pngNote:If you want to use Yanzl's sbsar file for making valve style overviews, move it wherever you would prefer it to be. If not, delete it.
FGD
  1. Copy radgen_entities.fgd to your /game/csgo folder.
  2. Copy gameinfo.gi to your /game/csgo_core folder and overwrite the file currently there. Alternatively, just add the line '"radgen_entities.fgd" "1"' under Hammer -> fgd_files in the hierarchy.
  3. This last step currently disables you from playing on official Valve servers. Remove this change to be able to play on Valve servers again.
Command Sequences
  1. Source 2's Hammer does not allow you to set custom compile settings, meaning that RadGen cannot be ran from within Hammer currently. To generate your radar, you will need to run the .exe provided in a console window, like so (Windows):
  2. Search for "cmd" in Windows search bar
  3. Depending on where CSGO/CS2 is stored on your machine, replacing the "...", type cd ...\Counter-Strike Global Offensive\game\bin\JERC2\JERC2
  4. Depending on where CSGO/CS2 is stored on your machine, replacing the "...", type RadGen.exe -g "...\Counter-Strike Global Offensive\game\csgo" -vmapFilepath "...\Counter-Strike Global Offensive\content\csgo_addons\{addonnameHere}\maps\{mapnameHere}.vmap.txt"

Bundled Software

Included with RadGen is Yanzl's radargen_radgen.sbsar file, which allows you to create a Valve style radar with ease using RadGen and Substance Designer.

  1. Enable Export Raw Masks in radgen_config.
  2. Generate the overview using RadGen. Raw mask files will be exported to the /_radgen_extras folder
  3. Drag radargen_radgen.sbsar into Substance Designer, and use the raw mask files as inputs.
  4. Save as .tga file format.

Usage

To get started, add a radgen_config entity into the map.

Two auto Selection Sets are created automatically: 'RadGen - Point Entities' & 'RadGen - Mesh Entities'. It is potentially recommended to disable these when compiling a level, as some meshes may be visible in-game when tied to certain entities.

There are two workflows supported by RadGen:

  1. Material based workflow
  2. Selection Set based workflow

Workflow 1 (Material based)

You may want to use separate meshes to your playable map itself. I find this a much cleaner way to work with overviews, and it removes the annoyance of having to check Selection Sets every time you duplicate a mesh to make sure you don't accidentally leave it inside a wrong Selection Set. Everything for the radar should go into a custom Selection Set named RadGen (including radgen_box mesh entities), excluding the point entities.

RadGen will only display mesh faces with a RadGen texture applied to them (except Ignore). These include Path, Overlap, Cover, Door, Ladder and Danger. Remove is the exception, which will not allow anything to display within its volume. Ignore will be completely ignored, and is just a nice way to show mesh faces you don't want to draw. You can apply the textures to all faces on a mesh, but it may cause slight issues when using stroke around your meshes, so if you notice any slight issues with stroke then that is likely the cause. In this scenario, only apply the texture to the top face.

Mesh entities such as bombsites are drawn. For bombsites, you can set A and B by giving them the targetnames 'bombsite_a' and 'bombsite_b'. However, you might prefer to create separate meshes using the RadGen bombsite materials, for example. These take priority over entities.

Selection Set

Name Works with What to add Description
radgen Meshes, Mesh Entities, Point Entities Everything. Everything in here will be used when generating the overview.

Materials

These are the materials that can be used with the Material based workflow.

Image Material name Description
File:RadGen path.png radgen/path Displays a Path.
File:RadGen overlap.png radgen/overlap Displays an Overlap.
File:RadGen cover.png radgen/cover Displays cover.
File:RadGen remove.png radgen/remove Defines a volume to not display anything in.
File:RadGen door.png radgen/door Defines a volume as a Door.
File:RadGen ladder.png radgen/ladder Defines a volume as a Ladder.
File:RadGen danger.png radgen/danger Defines a volume as a Danger.
File:RadGen buyzone.png radgen/buyzone Defines a volume as a Buyzone.
File:RadGen bombsite a.png radgen/bombsite_a Defines a volume as a Bombsite A.
File:RadGen bombsite b.png radgen/bombsite_b Defines a volume as a Bombsite B.
File:RadGen rescue zone.png radgen/rescue_zone Defines a volume as a Rescue Zone.
File:RadGen hostage.png radgen/hostage Defines a volume as a Hostage.
File:RadGen t spawn.png radgen/t_spawn Defines a volume as T Spawn.
File:RadGen ct spawn.png radgen/ct_spawn Defines a volume as CT Spawn.
File:RadGen ignore.png radgen/ignore Does nothing, an option for unused mesh sides.
File:RadGen radgen overlays.png radgen/radgen_overlays Example for use on info_overlay and radgen_info_overlay entities. Optional.
File:RadGen radgen box.png radgen/radgen_box Example for use on radgen_box entities. Optional.

Workflow 2 (Selection Set based)

You can also use the same workflow as TAR, avoiding the need of using the RadGen materials, and allowing you to use your already placed meshes for the overview. The available selection sets are: 'radgen_remove', 'radgen_path', 'radgen_overlap', 'radgen_cover', 'radgen_door', 'radgen_ladder', 'radgen_danger'. You will want to place anything else in the normal 'radgen' Selection Set, as done in the Material based workflow.

Selection Sets

Name Works with What to add Description
radgen_path Meshes, Mesh Entities Accessible path areas. The accessible ground areas the player can walk on.
radgen_overlap Meshes, Mesh Entities Accessible overlapping ground areas. The accessible path areas the player can walk on that are above a radgen_path area in the same overview level.
radgen_cover Meshes, Mesh Entities Cover. The cover in the level, displayed on top of paths.
radgen_remove Meshes, Mesh Entities Inaccessible path areas. The inaccessible path areas. Stops the overview including anything in this area. A workaround to messy meshwork.
radgen_door Meshes, Mesh Entities Doors. The doors in the level.
radgen_ladder Meshes, Mesh Entities Ladders. The ladders in the level.
radgen_danger Meshes, Mesh Entities Any dangerous places in the level. Adds a semi-transparent overlay on top of accessible paths in a level, denoting that these areas can damage players.
radgen Meshes, Mesh Entities, Point Entities Everything else. Any other materials/entities that do not have their own selection set should be added here, as they support the Material Based workflow only.

Entities

These entities allow for greater customisation of radars.

Icon Classname Description Keyvalues
File:Radgen config.png radgen_config Configure the main functionality.
Workshop ID (workshopId) <string>
Used for Danger Zone maps for duplicating the overview (for the tablet) into the correct location for packing
Overview Gamemode Type (overviewGamemodeType) <choices>
  • 0: Standard
  • 1: Danger Zone
Danger Zone Uses (dangerZoneUses) <choices>
Defines which filepaths to export the overview to (only used if Overview Gamemode Type is set to Danger Zone)
  • 0: Both
  • 1: Tablet
  • 2: Spawn Select
Alternate Output Directory (alternateOutputPath) <string>
DO NOT USE BACKSLASHES. An alternate base output directory. Leave blank if you want to output to /game/csgo/ only. Don't include /resource/overviews/. Eg. C:/Dropbox/RadGen/
Only Output to Alternate Path (onlyOutputToAlternatePath) <choices>
  • 0: No
  • 1: Yes
Export Multilevel Radar (exportRadarAsSeparateLevels) <choices>
Exports multiple separate radars (if there are any radgen_divider entities)
  • 0: No
  • 1: Yes
Separate Multilevel Radar Gradients (useSeparateGradientEachLevel) <choices>
Uses a new gradient for each level instead of one gradient for all levels combined
  • 0: No
  • 1: Yes
Ignore Displacement X/Y Changes (ignoreDisplacementXYChanges) <choices>
Ignores changes on the X and Y axis for subdivision displacements, as they can cause graphical bugs on overviews
  • 0: No
  • 1: Yes
Use Model Vertices (useModelVertices) <choices>
EXPERIMENTAL - Uses model vertices to calculate faces to show as cover on the overview. By default, it uses bounding boxes (not experimental).
  • 0: No
  • 1: Yes
Background Image Filename (backgroundFilename) <string>
For custom images, place them inside the following folder: .../Counter-Strike Global Offensive/csgo/materials/RadGen/backgrounds/
Radar Size Multiplier (float) (radarSizeMultiplier) <float>
A multiplier for altering the size of the level in the radar
Overlap Alpha (Whole Number) (overlapAlpha) <integer>
The alpha value for overlap mesh sides (0-255)
Danger Alpha (Whole Number) (dangerAlpha) <integer>
The alpha value for danger mesh sides (0-255)
Path Colour High (pathColourHigh) <color255>
Colour of path world meshes at the highest point
Path Colour Low (pathColourLow) <color255>
Colour of path world meshes at the lowest point
Overlap Colour High (overlapColourHigh) <color255>
Colour of overlap world meshes at the highest point
Overlap Colour Low (overlapColourLow) <color255>
Colour of overlap world meshes at the lowest point
Cover Colour High (coverColourHigh) <color255>
Colour of cover world meshes at the highest point
Cover Colour Low (coverColourLow) <color255>
Colour of cover world meshes at the lowest point
Door Colour (doorColour) <color255>
Colour of door world meshes
Ladder Colour (ladderColour) <color255>
Colour of ladder world meshes
Danger Colour (dangerColour) <color255>
Colour of danger world meshes
Overlays Colour (overlaysColour) <color255>
Colour of info_overlay and radgen_info_overlay (unless overridden) entities
Stroke Width (Whole Number) (strokeWidth) <integer>
Width of stroke to use
Stroke Colour (strokeColour) <color255>
Colour of the stroke
Stroke Around Path Materials (strokeAroundPathMaterials) <choices>
  • 0: No
  • 1: Yes
Stroke Around Overlap Materials (strokeAroundOverlapMaterials) <choices>
  • 0: No
  • 1: Yes
Stroke Around Remove Materials (strokeAroundRemoveMaterials) <choices>
  • 0: No
  • 1: Yes
Stroke Around Entities (strokeAroundEntities) <choices>
  • 0: No
  • 1: Yes
Stroke Around Mesh Entities (strokeAroundMeshEntities) <choices>
Currently, if there is more than one mesh in an entity, it will not combine them, so they will keep their individual borders
  • 0: No
  • 1: Yes
Stroke Around Overlays (strokeAroundOverlays) <choices>
  • 0: No
  • 1: Yes
Default Level Num (Whole Number) (defaultLevelNum) <integer>
Enable Levels As Backgrounds (levelBackgroundEnabled) <choices>
Adds all levels as a background for each level when using multiple radar levels
  • 0: No
  • 1: Yes
Levels Background Darken Alpha (Whole Number) (levelBackgroundDarkenAlpha) <integer>
The alpha value of the black overlay to apply onto the background levels (0-255)
Levels Background Blur Alpha (Whole Number) (levelBackgroundBlurAmount) <integer>
The amount of gaussian blur to apply to the background levels
Higher Level Output Name (higherLevelOutputName) <string>
The higher level radar name RadGen uses for naming
Lower Level Output Name (lowerLevelOutputName) <string>
The lower level radar name RadGen uses for naming
Export .TXT (exportTxt) <choices>
Overview Gamemode Type set to Standard only
  • 0: No
  • 1: Yes
Export .TGA (exportTga) <choices>
  • 0: No
  • 1: Yes
Export .PNG (exportPng) <choices>
  • 0: No
  • 1: Yes
Export .JPG (exportJpg) <choices>
  • 0: No
  • 1: Yes
Export Raw Masks (exportRawMasks) <choices>
Export the raw masks. Designed for use with Yanzl's Substance Designer tool to make a radar imitating Valve's style
  • 0: No
  • 1: Yes
Export Background Levels Image (exportBackgroundLevelsImage) <choices>
Exports background levels image (if 'Export Multilevel Radar' is selected and there are any radgen_divider entities)
  • 0: No
  • 1: Yes
Export Resolution (Whole Number) (exportResolution) <integer>
Export resolution for each file format
Max Num of Vertices Per Mesh Face (Whole Number) (maxNumberOfVerticesPerMeshFaceLimit) <integer>
The maximum number of vertices a face can have for it to be included when creating the overview. Faces with more vertices than this will be ignored. Use with caution, as a high number and messy mesh topology can cause this to take a very long time.
Use Subdivision (useSubdivision) <choices>
EXPERIMENTAL - Uses subdivision displacement changes on appropriate meshes, rather than just the mesh's position.
  • 0: No
  • 1: Yes
File:Radgen divider.png radgen_divider A divider between different levels of the radar.
Mins (mins) <vector>
Maxs (maxs) <vector>
File:Radgen ceiling.png radgen_ceiling Overrides the minimum height value of a radar level that is used for gradients.
File:Radgen floor.png radgen_floor Overrides the maximum height value of a radar level that is used for gradients.
File:Radgen info overlay.png radgen_info_overlay An info_overlay with the ability to set a colour for this overlay instead of using the radgen_config's overlay colour.
Pitch Yaw Roll (Y Z X) (angles) <string>
This is the overlay direction. Pitch is rotation around the Y axis, yaw is the rotation around the Z axis, and roll is the rotation around the X axis. (Yaw is used for rotating the overlay in the overview)
Material (material) <material>
Order Num (Whole Number) (orderNum) <integer>
Override Colour (overrideColour) <choices>
Uses the colour set on this entity instead of the radgen_config's overlay colour value
  • 0: No
  • 1: Yes
Colour (R G B) (rendercolor) <color255>
Colour Alpha (Whole Number) (colourAlpha) <integer>
The alpha value of the overlay (0-255)
Stroke Colour (R G B) (colourStroke) <color255>
Stroke Colour Alpha (Whole Number) (colourStrokeAlpha) <integer>
The alpha value of the overlay stroke (0-255)
File:Radgen radgen box.png radgen_box A Mesh Entity that can specify showing a unique colour when displayed in a radar. Increases customisability for what users can do.

An example of this would be to showcase the connections between different teleporters in a map.

Order Num (Whole Number) (orderNum) <integer>
Colour (R G B) (rendercolor) <color255>
Colour Alpha (Whole Number) (colourAlpha) <integer>
The alpha value of the RadGen box (0-255)
Stroke Colour (R G B) (colourStroke) <color255>
Stroke Colour Alpha (Whole Number) (colourStrokeAlpha) <integer>
The alpha value of the RadGen box stroke (0-255)
Stroke Width (Whole Number) (strokeWidth) <integer>
Width of stroke to use

Customisation

The options that can be tweaked to create the radar how you want it.

Image
File:RadGen config customisation.png

Useful Links

See also