GamePreference
type GamePreference = {
/**
* If true, the game will automatically forward to the next sentence when the player has finished the current sentence
* @default false
*/
autoForward: boolean;
/**
* If true, the game will allow the player to skip the dialog
* @default true
*/
skip: boolean;
/**
* If true, the game will show the dialog
* @default true
*/
showDialog: boolean;
/**
* The multiplier of the dialog speed
*
* Dialog speed will apply to:
* - The text speed
* - The auto-forward delay
* @default 1.0
*/
gameSpeed: number;
/**
* The speed of the text effects in characters per second.
* @default 10
*/
cps: number;
/**
* The volume of the voice
* @default 1
*/
voiceVolume: number;
/**
* Fade duration in milliseconds when ending voice in fade mode
* @default 0
*/
voiceFadeDuration: number;
/**
* How to end voice playback at the end of a sentence
* @default "stop"
*/
voiceEndMode: "fade" | "stop" | "none";
/**
* The volume of the background music
* @default 1
*/
bgmVolume: number;
/**
* The volume of the sound effects
* @default 1
*/
soundVolume: number;
/**
* The volume of the global audio
* @default 1
*/
globalVolume: number;
/**
* The delay in milliseconds before the game starts skipping actions
*
* This is used to prevent the game from skipping actions too quickly when the player presses the skip key.
*
* Set to 0 to skip actions immediately when the player presses the skip key.
* @default 500
*/
skipDelay: number;
/**
* The interval in milliseconds between each skip action.
* ex: 100 ms means the player can skip 10 actions per second.
* higher value means slower skipping.
* @default 100
*/
skipInterval: number;
};autoForward
Whether to automatically forward the game.
When enabled, the game will automatically forward to the next sentence when the current sentence is finished.
The game will wait for a duration of GameConfig.elements.say.autoForwardDelay before forwarding.
skip
When enabled, the player can skip the current sentence by pressing the GameConfig.elements.say.nextKey.
showDialog
Whether to show the dialog box.
gameSpeed
The multiplier of the dialog speed, default is 1.0.
Dialog speed will apply to:
- The text speed
- The auto-forward delay
cps
The speed of the text effects in characters per second.
voiceVolume
The volume of the voice.
voiceFadeDuration
The fade duration in milliseconds used when voiceEndMode is set to fade.
Use this to control how long the voice fades out before the next sentence starts.
voiceEndMode
Controls how voice playback ends when a sentence completes.
fade: fade out the voice overvoiceFadeDurationmilliseconds.stop: stop playback immediately (default).none: leave the voice running even after the sentence ends.
Use voiceFadeDuration together with fade when you need a smooth transition.
bgmVolume
The volume of the background music.
soundVolume
The volume of the sound effects.
globalVolume
The volume of the global audio. This is an independent multiplier affecting all the audio in the game.
skipDelay
The delay in milliseconds before the game starts skipping actions.
This is used to prevent the game from skipping actions too quickly when the player presses the skip key.
Set to 0 to skip actions immediately when the player presses the skip key.
skipInterval
The interval in milliseconds between each skip action.
For example, 100 ms means the player can skip 10 actions per second. A higher value means slower skipping.