scmJS docs

api.exchange

ExchangeApi

The file formats behind File ▸ Import / Export: .trg and the strings text.

The file formats File ▸ Import / Export read and write, so a plugin can keep triggers or strings outside the map in a form the editor (and SCMDraft) take back.

Members

encodeTrg

encodeTrg(triggers: TriggerRecord[]): Uint8Array;

Raw 2400-byte TRIG records, SCMDraft's .trg; string indices are the map's own.

decodeTrg

decodeTrg(bytes: Uint8Array): TriggerRecord[];

formatStrings

formatStrings(): string;

The whole string table as index<TAB>text lines, control bytes as <XX>.

parseStrings

parseStrings(text: string): StringImport;

Parse that form (errors names the lines that were not N<TAB>text); tx.strings.import applies it.

Types

Declarations only this group names.

StringImportinterface

interface StringImport
entries: { index: number; text: string; }[]
errors: { line: number; message: string; }[]

Lines that were not N<TAB>text, with their 1-based line numbers.

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