api.names
NamesApi
The names behind the numbers a map stores, so a plugin that shows raw values need not
carry the game's tables itself. The per-map ones (string, location, switch,
player) read the open scenario and answer a placeholder without one; the rest are
the editor's own tables — the same names StarEdit shows.
- unit
- units
- upgrade
- upgrades
- tech
- techs
- weapon
- weapons
- playerType
- playerTypes
- race
- races
- playerGroup
- playerGroups
- condition
- conditions
- action
- actions
- aiScript
- string
- location
- switch
- player
- tile
Members
unit
unit(id: number): string;
StarEdit's name for a units.dat id; Any unit / Men / Buildings / Factories for the trigger classes 228–231.
units
units(): NamedValue[];
upgrade
upgrade(id: number): string;
upgrades
upgrades(): NamedValue[];
tech
tech(id: number): string;
techs
techs(): NamedValue[];
weapon
weapon(id: number): string;
weapons
weapons(): NamedValue[];
playerType
playerType(value: number): string;
An OWNR / IOWN controller byte: Human, Computer, Neutral, …
playerTypes
playerTypes(): NamedValue[];
races
races(): NamedValue[];
playerGroup
playerGroup(value: number): string;
One of the 27 trigger player groups (Player 1 … Non Allied Victory Players).
playerGroups
playerGroups(): NamedValue[];
conditions
conditions(): NamedValue[];
action
action(type: number, briefing?: boolean): string;
A TRIG action type, or an MBRF one with briefing.
actions
actions(briefing?: boolean): NamedValue[];
aiScript
aiScript(code: number): string;
The script behind a Run AI Script code (the four characters as a little-endian u32); the code itself when unknown.
string
string(index: number): string | null;
The open map's string at an index; null for 0, out of range, or no map.
location
location(index: number): string;
A location slot's name (0-based; 63 is Anywhere), or StarEdit's default for it.
tile
tile(id: number): string | null;
The terrain a MTXM / TILE id belongs to (Dirt, High Dirt, a cliff, …), or null without the tileset graphics.
Types
Declarations only this group names.