-- Generated by rpg_script_api; do not edit. Profile rpg.script/5. -- Runtime contract only; the engine does not link Luau Analysis. -- The Script host, with exported configuration and copied object members in the light profile. Invocation lifetime; typed index; no persistent ID. declare extern type Self with -- GetProperty: Reads an exported property from the host's effective configuration. Unknown keys fault; metadata table edits cannot change the copied configuration. Exported key <=64 bytes; copied effective value. GetProperty: (self: Self, name: string) -> boolean | number | string -- Name: The copied effective object name. Read-only; <=128 bytes. Name: string -- Tags: Effective Blueprint and placement tags in sorted order. Editing the copy changes no object. Read-only copied array; <=64 tags of <=64 bytes; bulk output charged. Tags: {string} -- HasTag: Tests copied effective tag membership. Tag <=64 bytes. HasTag: (self: Self, tag: string) -> boolean -- GetLights: Returns a dense array in ComponentId order. Self lights require the self capability. At most 8; bulk output charged. GetLights: (self: Self) -> {Light} -- FindLight: Returns a named light or nil. Duplicate matching names fault. Name <=128 bytes; at most 8 inspected; bulk work charged. FindLight: (self: Self, name: string) -> Light? -- After: Defining or accessing this name faults as reserved. Timers are deferred. Reserved; no promised signature. end -- The handler first argument; in light OnUsed it represents the using Character. It cannot read self configuration. Invocation lifetime; typed index; copied object members in light profile. declare extern type EventContext with -- Name: The event's copied Character name remains available after disconnect or transfer. Read-only captured Character name; at most 128 bytes. Name: string -- Tags: Effective Blueprint and placement tags in sorted order. Editing the copy changes no object. Read-only copied array; <=64 tags of <=64 bytes; bulk output charged. Tags: {string} -- HasTag: Tests copied effective tag membership. Tag <=64 bytes. HasTag: (self: EventContext, tag: string) -> boolean -- GetLights: Returns a dense array in ComponentId order. Self lights require the self capability. At most 8; bulk output charged. GetLights: (self: EventContext) -> {Light} -- FindLight: Returns a named light or nil. Duplicate matching names fault. Name <=128 bytes; at most 8 inspected; bulk work charged. FindLight: (self: EventContext, name: string) -> Light? end -- Reads copied player facts and stages the existing declared gold reward. It never accesses a live World object. Dialogue entries only. export type Player = { -- Level: Returns total level, or nil when the copied player has no build. No arguments. Level: () -> number?, -- ClassLevel: Returns the copied class level, or nil without a build. An unknown rules key with a build faults. Rules key <=64 bytes. ClassLevel: (id: string) -> number?, -- Alignment: Returns the copied alignment, or nil when unavailable. No arguments. Alignment: () -> string?, -- SkillRanks: Returns copied skill ranks, or nil without a build. An unknown rules key with a build faults. Rules key <=64 bytes; half-rank precision. SkillRanks: (id: string) -> number?, -- SkillUsable: Returns whether the copied build can use a skill, or nil without a build. Unknown rules keys fault when a build exists. Rules key <=64 bytes. SkillUsable: (id: string) -> boolean?, -- Gold: Returns copied gold including this entry's staged gold proposal. No arguments. Gold: () -> number, -- ItemCount: Returns the copied inventory count for a Blueprint, or zero when absent. Blueprint UUID <=36 bytes; valid asset ID. ItemCount: (id: string) -> number, -- ProposeGiveGold: Stages gold within the entry's literal give_gold envelope. Later Gold reads see it; faults discard all proposals. Integer 0..1000000; declared give_gold envelope; once. ProposeGiveGold: (value: number) -> (), } -- Reads the invocation's declared quest facts from copied context. Dialogue entries only. export type Quest = { -- Stage: Returns the copied stage of a declared quest. Undeclared quests fault. Quest UUID <=36 bytes; declared quest. Stage: (id: string) -> number, -- Done: Returns whether a declared quest is complete. Undeclared quests fault. Quest UUID <=36 bytes; declared quest. Done: (id: string) -> boolean, } -- Reads declared conversation facts and stages bounded variable proposals over copied input. Dialogue entries only. export type Dialogue = { -- Flag: Returns a declared flag, defaulting to zero when unset. Undeclared names fault. Declared key <=64 bytes. Flag: (name: string) -> number, -- Variable: Returns a declared variable, including this entry's proposals, or zero when unset. Undeclared names fault. Declared key <=64 bytes. Variable: (name: string) -> number, -- RewardClaimed: Returns whether the declared reward was claimed. Undeclared names fault. Declared key <=64 bytes. RewardClaimed: (name: string) -> boolean, -- Check: Returns passed or failed for a resolved declared check, or nil when unresolved. Undeclared names fault. Declared key <=64 bytes. Check: (name: string) -> string?, -- Param: Returns an entry parameter. Asset parameters are copied UUID strings; undeclared parameters fault. Tooling uses any because the type is supplied by the entry's literal parameter declaration. Declared key <=64 bytes; validated entry arguments. Param: (name: string) -> any, -- ProposeSetVariable: Stages replacement of a declared variable for an effect entry. Later reads see the staged value; conditions cannot propose. Declared target <=64 bytes; integer -1000000000..1000000000; <=8 variable proposals. ProposeSetVariable: (name: string, value: number) -> (), -- ProposeAddVariable: Stages addition to a declared variable for an effect entry. The resulting value clamps to the variable bounds and later reads see it. Declared target <=64 bytes; integer -1000000000..1000000000; <=8 variable proposals. ProposeAddVariable: (name: string, value: number) -> (), } -- Queries copied objects in the event host Area, in instanced-placement order. Light-effect profile; declared tags only. export type Area = { -- FindByTag: Returns a dense array in placement order. More than 64 matches faults instead of truncating. Declared tag <=64 bytes; at most 64 results; bulk output charged. FindByTag: (tag: string) -> {Object}, -- FindFirstByTag: Returns the first object in placement order or nil, even when more than 64 match. Declared tag <=64 bytes; bulk output charged. FindFirstByTag: (tag: string) -> Object?, -- Send: Defining or accessing this name faults as reserved. Custom event delivery is deferred. Reserved; no promised signature. } -- A copied object; equality is canonical. No persistent identity or live World access. Invocation-local typed index. declare extern type Object with -- Name: The copied effective object name. Read-only; <=128 bytes. Name: string -- Tags: Effective Blueprint and placement tags in sorted order. Editing the copy changes no object. Read-only copied array; <=64 tags of <=64 bytes; bulk output charged. Tags: {string} -- HasTag: Tests copied effective tag membership. Tag <=64 bytes. HasTag: (self: Object, tag: string) -> boolean -- GetLights: Returns a dense array in ComponentId order. Self lights require the self capability. At most 8; bulk output charged. GetLights: (self: Object) -> {Light} -- FindLight: Returns a named light or nil. Duplicate matching names fault. Name <=128 bytes; at most 8 inspected; bulk work charged. FindLight: (self: Object, name: string) -> Light? end -- Reads copied baseline plus staged changes. Any fault discards every write. World validates the stamped proposal at commit. Invocation-local typed index; 256 distinct staged writes. declare extern type Light with -- Enabled: Stages enabled state; subsequent reads see the write. Readable and assignable; strict boolean. Enabled: boolean -- Intensity: Stages intensity; signed zero is canonicalized and subsequent reads see float32. Readable and assignable; finite float32 0..100000. Intensity: number -- Color: Returns a copied color. Assign the complete r/g/b table to replace it; editing a returned table does not stage writes. Readable and assignable; finite float32 channels 0..1; bulk output charged. Color: {r: number, g: number, b: number} -- Kind: The copied light kind. Read-only; point or spot. Kind: string -- Range: The copied light range. Read-only; finite float32 .01..256. Range: number -- Shadows: Whether the authored light casts shadows. Read-only. Shadows: boolean end -- GetUses: Reads the copied committed use count. Pending proposals do not change this value. OnUsed; committed count, 0..1000000. declare GetUses: () -> number -- SetUses: Proposes the next durable use count. A successful OnUsed must publish the same count; any later fault discards the proposal. OnUsed; integer 0..1000000; once per event. declare SetUses: (value: number) -> () -- PublishUses: Proposes the public use count. It must equal SetUses at successful completion of the transaction. OnUsed; integer 0..1000000; once per event. declare PublishUses: (value: number) -> () -- Player: Reads copied player facts and stages the existing declared gold reward. It never accesses a live World object. Dialogue entries only. declare Player: Player -- Quest: Reads the invocation's declared quest facts from copied context. Dialogue entries only. declare Quest: Quest -- Dialogue: Reads declared conversation facts and stages bounded variable proposals over copied input. Dialogue entries only. declare Dialogue: Dialogue -- self: Identifies the Script host within this invocation. Equality is canonical; no persistent ID or World pointer is exposed. Opaque invocation-local typed index; read-only. declare self: Self -- OnUsed: Defines the use handler. Light declarations select copied object/light access and light-only proposals; other handlers retain the uses transaction. Dialogue entries receive opaque EventContext. Tier-1 uses or declared light-effect transaction; fresh heap. -- OnOpened: Runs after a validated open commits. No return values; counter or light-only effects. Door shared edge or Container per-viewer subscription; Tier 1. -- OnClosed: Runs after a close commits, including Container access loss or departure. Door shared edge or Container per-viewer withdrawal; Tier 1. -- OnEnter: Runs on Area membership entry after Module join or old Area exit. Area owner; Tier 1. -- OnExit: Runs on Area departure before destination entry or Module leave. Area owner; Tier 1. -- OnModuleStart: Runs after restore and recovery departures, before new joins. Module owner; counter profile; Tier 1. -- OnPlayerJoin: Runs before the joining Character's Area entry. Module owner; counter profile; Tier 1. -- OnPlayerLeave: Runs after the departing Character's Area exit. Module owner; counter profile; Tier 1. -- IsFirstStart: Returns the captured first admitted start flag, saved atomically with the start event, including a faulting start. Only inside OnModuleStart. declare IsFirstStart: () -> boolean -- Area: Queries copied objects in the event host Area, in instanced-placement order. Light-effect profile; declared tags only. declare Area: Area -- OnMessage: Defining or accessing this name faults as reserved. Custom event handlers are deferred. Reserved; no promised signature.