Markdown Best Practices
Keep formatting simple
Use Markdown sparingly to emphasize important words or phrases. Overusing bold, italic, or colors can make dialogue harder to read.
Combine styles thoughtfully
You can mix inline Markdown with brace tokens (e.g. **Bold** and {color=#00ff00:green}), but keep combinations clear and avoid nesting too deeply.
Use nesting for impact
Nesting brace tokens (e.g. {stroke=color="#ff0000" thickness="2":{size=32:Warning!}}) is powerful, but should be reserved for special emphasis like warnings or dramatic dialogue.
Maintain readability
Choose sizes and colors that remain legible. Extremely large sizes or low-contrast colors may reduce accessibility.
Highlight sparingly
Use {mark=#ffff00:highlight} for key words or phrases, not entire sentences. This keeps the reader’s focus sharp.
Consistent style across characters
Apply formatting consistently for each character. For example, one character might always speak in {smallcaps:small caps} to distinguish their voice.
Test combined effects
Preview your dialogue with multiple styles applied to ensure the final rendering looks as intended and doesn’t clash visually.
Do & Don’t Examples
| Do | Don’t |
|---|
| Use **bold** for emphasis on key words. | Make entire sentences bold — it reduces readability. |
Mix inline Markdown with one brace token (e.g. **Bold** and {color=#00ff00:green}). | Nest multiple brace tokens deeply (e.g. {size=32:{stroke=…:{mark=…}}}). |
Choose high‑contrast colors like {color=#ff0000:Red}. | Use low‑contrast colors (e.g. yellow text on white background). |
| Apply {mark=#ffff00:highlight} to single words or phrases. | Highlight entire paragraphs — it overwhelms the reader. |
Keep sizes moderate (e.g. {size=28:Big}). | Use extreme sizes (e.g. {size=200:HUGE}) that break layout. |
| Give each character a consistent style (e.g. one always speaks in {smallcaps:small caps}). | Change formatting randomly between lines for the same character. |
Type References
Character
Represents a character defined with newCharacter.
export type Character = {
name:string|{variable:string,identifier:string},
textColor:krulColor3,
nameColor:krulColor3
}
generalProperties
Used in editVariable to specify whether you’re editing with a literal value or another variable.
export type generalProperties = {
type: "variable" | "value",
value: string | number | boolean | nil,
}
sayOptions
Optional settings for say and addText.
export type sayOptions = {
customTextSpeed?: number,
overrideTextColor?: krulColor3,
async?: boolean,
voicelineName?: string,
playVoicelineEachLetter?: boolean,
clickToFillState?: boolean,
skipResume?: number | boolean,
disableSkipWhitespace?: boolean,
replace?: { pattern: string, replaceWith: generalProperties }[],
}
EnableAndDisable
Used in enable and disable to toggle player features.
export type EnableAndDisable = {
name: "allowSaving" | "allowSkipping" | "allowAuto",
}
movementAnimation
Used in showOptions.animation to animate asset movement.
export type movementAnimation = {
direction: Enum.EasingDirection,
style: Enum.EasingStyle,
AppliedX: krulUDim,
AppliedY: krulUDim,
Time: number,
}
EffectsLayer
Numeric layer used in darkenScreen to control render order.
export type EffectsLayer = number
PopData
Controls how an asset is popped in/out.
export type PopData = {
size: { xs: number, xo: number, ys: number, yo: number },
pos: { xs: number, xo: number, ys: number, yo: number },
async: boolean,
}
darkenScreenAnimation
Animation settings for darkenScreen.
export type darkenScreenAnimation = {
direction: Enum.EasingDirection,
style: Enum.EasingStyle,
Time: number,
}
showOptions
Optional settings for show.
export type showOptions = {
customizedSize?: krulUDim2,
animation?: movementAnimation,
async?: boolean,
anchor?: krulUDim,
customZIndex?: number,
animationSkippable?: boolean,
}
hideOptions
Optional settings for hide.
export type hideOptions = {
animation:movementAnimation | nil,
async:boolean | nil,
animationSkippable:boolean | nil
}
Label
Represents a label target for jumps.
export type Label = {
name: string,
spot: number,
}
Choice
Used in insertChoice.
export type Choice = {
text: string,
nextLabel: string,
}
Input
Used in insertInput.
export type InputSettings = {
minLetters:number,
maxLetters:number | nil
}
Different types to replace UDim and such
export type krulVector3 = {X:number,Y:number,Z:number}
export type krulVector2 = {X:number,Y:number}
export type krulColor3 = {v1:number,v2:number,v3:number}
export type krulUDim = {Scale:number,Offset:number}
export type krulUDim2 = {X:{Scale:number,Offset:number},Y:{Scale:number,Offset:number}}
StoryPiece
Represents a queued story action.
export type StoryPiece = {
character?: Character,
text?: string,
options?: sayOptions,
type?: "say" | "text" | "choice",
choices?: Choice[],
}