scmJS docs

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.

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[];

race

race(value: number): string;

A SIDE race byte.

races

races(): NamedValue[];

playerGroup

playerGroup(value: number): string;

One of the 27 trigger player groups (Player 1Non Allied Victory Players).

playerGroups

playerGroups(): NamedValue[];

condition

condition(type: number): string;

A TRIG condition type.

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.

switch

switch(index: number): string;

A switch's name (0-based), or Switch N.

player

player(slot: number): string;

Player N for a slot (0-based).

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.

NamedValueinterface

interface NamedValue
value: number
label: string

Seen in

scmJS 0.1.0 · Generated from the repository. StarCraft and Brood War are trademarks of Blizzard Entertainment; this project ships none of their data.