Skip to main content

Type Alias: Options

Options = object

Defined in: packages/core/src/options.ts:5

Properties

author

author: string

Defined in: packages/core/src/options.ts:31


description

description: string

Defined in: packages/core/src/options.ts:8


gameId

gameId: string

Defined in: packages/core/src/options.ts:7


gameName

gameName: string

Defined in: packages/core/src/options.ts:6


gameVersion

gameVersion: string

Defined in: packages/core/src/options.ts:9


initialState

initialState: Record<string, unknown>

Defined in: packages/core/src/options.ts:30

Initial state of the game entities. Use this prop to override default entity values for debugging or testing.

Only supports game entity paths (e.g., { "player": { health: 50 } }). System paths and unknown entities will be ignored. Arrays will be replaced, not merged.

Example

await Game.init({
gameName: 'My Game',
initialState: {
player: { health: 50, name: 'TestPlayer' },
inventory: { gold: 1000, items: ['sword', 'shield'] }
}
});

isDevMode

isDevMode: boolean

Defined in: packages/core/src/options.ts:32


startPassage

startPassage: string

Defined in: packages/core/src/options.ts:10


translations

translations: I18nConfig

Defined in: packages/core/src/options.ts:33