ICBM
Not enough ratings
Official Modding Guides - Radars
By ledrobi
Developer Guide to Modding
   
Award
Favorite
Favorited
Unfavorite
Radar description
Radars are described in the Units/Radar.txt file.

These are not units, but a component of a unit. I.e. each unit can have one or several Radars. Also Radars are not only usual “real world” radars, but actually any mean of detection - can also be, for example, optics or sonar or any other kind of sensor.

To add a new Radar you need to describe it. The radar description format is:

[RADAR] “NAME” Tech "technology" Range float_value MaxHeight float_value PreciseTargeting Yes/No CanCalculateLaunchPosition Yes/No CanDetect unit_type RadarColor float_r float_g float_b float_a GlobalShowType show_type DoNotShow MinRange float_value Sector float_value Precision float_value ImprovedBy tech_modifier ImprovedBy Unit tech_modifier AffectedBy tech_modifier AffectedBy Unit tech_modifier AffectedBy Range tech_modifier Type “defined_type”

[RADAR] “NAME” starts the radar description. NAME is any unique string defining the internal radar name. This name will be used to add this radar to some units, etc.

Tech “technology” defines the name of technology from the tech description file this radar is based on. This field is obligatory. Note that the display name for this radar will be taken from the name of this technology. It is a good practice to have a separate technology for every radar type and not base any radar on technologies directly listed in the tech tree - use their 0-cost descendants for it.

Range float_value defines the radar range (in km), i.e. how far the radar can see. float_value is any floating point number, like 1, 100, 50.25, 511.2332 and such. Default is 20.

MaxHeight float_value sets what is the maximum altitude (in km) of the unit/missile this radar is still able to detect. The default value is 100.

PreciseTargeting Yes/No - defines if this radar is able to provide the precise target coordinates required by some of the missiles. Default is No.

CanCalculateLaunchPosition Yes/No - defines if the radar has the possibility to reveal a hidden enemy unit by detecting the missile it launched. Default is No.

CanDetect unit_type - defines the type of the unit this radar can see. If this radar can see more than one unit type, add a separate CanDetect for each unit type. Available unit types are:
    Ground
  • Naval
  • Subwater // surfaced submarine will return Naval type
  • Airborne
  • Satellite
  • Missile
  • HighMissile // this is a missile that has MaxElevation > 0
  • SubwaterMissile // this is a missile that has Subwater property set
  • City
  • AbstractPosition // not used for radars
By default no one unit type can be detected.


RadarColor float_r float_g float_b float_a - defines the color of the radar range visible on the map. Each value defines a color component and should be between 0 and 1. Note that the ranges with the same color are usually drawn together, so the lower-range radar with the same color as some higher-range radar will not be visible for the same unit unless the higher-range radar range drawing is switched off. Default value is (0.0, 0.0, 0.15, 0.15)

GlobalShowType show_type - defines in what group the range of this radar will be shown when the “Show Radar Ranges” button is pressed. If you need the radar to be shown in several groups, set GlobalShowType for each separately. Available show types are:
  • OVERHORIZONT_RANGES
  • LW_RANGES
  • SW_RANGES
  • SONAR_RANGES
  • SPACE_RANGES
  • SATELLITE_RANGES
  • SAM_RANGES
  • ABM_RANGES
  • MRBM_RANGES
  • ICBM_RANGES

By default, no GlobalShowType is set.

DoNotShow is a property that signals the game to not show the range of this radar by default, so the user must manually switch the range showing on to see it.

The properties MinRange, Sector and Precision can be set but they are not used currently.

Type “defined_type” allows you to use some previously defined types as a template for this radar, see type template description

ImprovedBy and AffectedBy allow modification of values of the radar properties based on the availability of technologies, unit modifiers, etc. For more details see Tech Modifiers. The properties that are allowed to be modified are: Range, MaxHeight
Type template description
To save on defining the same set of properties for the number of radars.

Do create a type template use

[TYPE] "NAME"

Then you can set the following properties:
  • CanDetect
  • PreciseTargeting
  • CanCalculateLaunchPosition
  • GlobalShowType
  • DoNotShow
  • Color

Example of the type template description:

[TYPE] "LongWave" PreciseTargeting No CanDetect Ground CanDetect Naval CanDetect Airborne CanDetect Missile CanDetect HighMissile GlobalShowType LW_RANGES [TYPE] "OverHorizon" PreciseTargeting Yes CanCalculateLaunchPosition Yes CanDetect HighMissile RadarColor 0.0 0.05 0.1 0.15 GlobalShowType OVERHORIZONT_RANGES
Modification of the properties (from v1.01)
Sometimes you do not want to create a new radar type, but to modify the existing one in your mod.
The simple way to do it is to just define it again using the same NAME as the original radar.
However this is not the best solution if you consider compatibility of different mods.

You can also modify the radar more granularly. To unit modification write this:

[RADAR] "NAME" MODIFY

Then you can change individual properties of the radar as if adding them to the original item.

While numerical properties like Range and single-value properties like Tech are re-defined when you set them again, multi-properties like CanDetect or ImprovedBy are accumulated (added to the already existing ones). So you may need to delete some existing properties.
To do this, add the keyword DELETE before property.

DELETE ImprovedBy “technology” - removes all the Improve-type modifications related to the “technology” tech
DELETE AffectedBy “technology” - removes all the Affect-type modifications related to the “technology” tech
DELETE CanDetect unit_type - removes the possibility to detect unit_type type of units
DELETE GlobalShowType show_type - removes this radar from show_type showing group
DELETE DoNotShow - clears the DoNotShow property

You can also mass-delete several properties using the RESET keyword:

RESET ImprovedBy - removes all the Improve-type modifications
RESET AffectedBy - removes all the Affect-type modifications
RESET CanDetect - removes the possibility to detect any unit type
RESET GlobalShowType - removes this radar from any showing group

Example of the modification:

[RADAR] "STD Long Wave" MODIFY Range 1000 Delete CanDetect HighMissile Reset ImprovedBy ImprovedBy "LW_Mk2" Set Range 1200
9 Comments
L_Chabb 30 Dec, 2022 @ 12:48pm 
Dang I was looking for the 'map making' guide & Im only seeing 2 guides both seem irrelevant
tried search term map making no joy
Hey Coldfinger387: Can you tell me what is that format you were talking about? dot what .[???]
LocalBuddyRemoveBorder 3 Mar, 2021 @ 9:01am 
I have a rather difficult question, are there any modding guide for creating a new map? Like a complete different map texture? Thank you so much for the support!
mjl1966 24 Feb, 2021 @ 9:59pm 
What is this tech file you speak of and where are they? I see lots of tech references in mod files, but cannot find where this "tech" is actually annotated/defined/lives.
ledrobi  [author] 10 Dec, 2020 @ 8:47am 
We're working on new guides :) in the meantime, you can join the discord server to know more. It has a #mods channel where we will answer all your questions
coldfinger387 3 Dec, 2020 @ 9:21am 
Cool stuff, but can you maybe do a mapping guide?
Or is that only possible with proprietary software, considering the wierd format your map uses?
lastpicture 29 Nov, 2020 @ 9:22am 
Found the solution myself. You have to make a "MODS" Folder and put another folder with your files into it. See other mods for template. Each mod folder has to have a info.txt!
lastpicture 29 Nov, 2020 @ 5:23am 
But how do I even get the game to load my files as mod?
Urfisch 24 Nov, 2020 @ 1:43am 
More infos on how to mod the game are highly appreciated!
JcDentonQ 23 Nov, 2020 @ 9:17am 
Thanks for the guide, any more infos on modding this game ? I downloaded some availlable mods to see their structure but for exemple, how can you upload a mod to the workshop ? I didn't see any modding options wether in-game or within the game's launcher.