Nuclide
Software Development Kit for id Technology
|
Conditional map entity overrides. More...
Conditional map entity overrides.
This is a very customizable system that applies changes to levels/maps depending on a variable amount of parameters. It was invented specifically for Nuclide and designed to work together with EntityDefs.
All MapTweaks are defined within scripts/maptweaks.txt
.
Let's take a look at an example MapTweak:
The hldm_tweaks
is just a user-defined name. It doesn't affect functionality.
The when-cvar
and when-serverinfo
lines are checks. each one is checked individually and only if all are positive will the replace
lines take effect.
You can have as many lines in there as you like.
Other than equals
, you can also use one of the following keywords when comparing values:
At this time, when-cvar
and when-serverinfo
only do comparisons on numbers. So you cannot check for strings at this time.
Classes | |
struct | mapTweak_t |
Data holding MapTweak entries. More... | |
Functions | |
void | MapTweaks_Init (void) |
Called upon server init, after all EntityDef have been initialized. More... | |
bool | MapTweak_EntitySpawn (entity) |
Will take an existing entity, and apply the currently valid map tweaks to it. More... | |
void | MapTweak_ListActive (void) |
bool MapTweak_EntitySpawn | ( | entity | targetEntity | ) |
Will take an existing entity, and apply the currently valid map tweaks to it.
void MapTweak_ListActive | ( | void | ) |
void MapTweaks_Init | ( | void | ) |
Called upon server init, after all EntityDef have been initialized.