Scriptable Parser for Portal 2 Demos
    Preparing search index...

    Class StringTable

    A lookup table for various categories of information, used to parse data elsewhere throughout the demo.

    Index

    Constructors

    Properties

    name: string

    Table name - defines what kind of data this table holds. String table names are unique to each table and can be used as an identifier.

    Currently supported are:

    • userinfo: Entries of PlayerInfo, one per player. Table size is 64, though Portal 2 only ever uses the first 2 slots.
    • server_query_info: Entries of QueryPort. One entry, just the port number.
    • instancebaseline: Entries of InstanceBaseline, one per entity class. Fills in default property values.
    • GameRulesCreation: Entries of StringEntryData. Normally just one entry containing the class name of the current game mode's rules (CPortalGameRules or CPortalMPGameRules).
    • InfoPanel: Entries of StringEntryData, unused in Portal 2?
    • lightstyles: Entries of LightStyle, defining light flicker patterns as sequences of ASCII characters.
    • modelprecache: Entries of PrecacheData, one per model. The first non-empty entry is a path to the map file from the mod directory, file extension included. Then follow entries in the form "*<number>", where each represents a brush entity. Finally, the rest are model file paths from the mod directory. Path separators aren't normalized, so some use forward slashes and others use backslashes.
    • genericprecache: Entries of PrecacheData. Unused.
    • soundprecache: Entries of PrecacheData, one per audio file. The name of each entry is a file path from the sound/ directory. Some seem to have a stray ) character at the start.
    • decalprecache: Entries of PrecacheData, one per decal file. The name of each entry is a file path from the mod directory, without a file extension.
    entries: StringTableEntry[] = []

    List of entries found in this table.

    classes: StringTableClass[] = []

    List of classes defined by this table.

    maxEntries?: number

    Set in NetSvcMessage.SvcCreateStringTable. Maximum capacity of this table.

    userDataSize: number = 0

    Set in NetSvcMessage.SvcCreateStringTable. Used for parsing string table updates.

    userDataSizeBits: number = 0

    Set in NetSvcMessage.SvcCreateStringTable. Used for parsing string table updates.

    Methods