Skip to content

Barks

Sometimes you want the character to banter/bark at certain conditions. The barks pop up above character's head in a speech bubble.

These barks are written in CharaText sheet, and your Chara sheet uses idText cell to link their IDs together.

Cellcalmfovaggrodeadkill
ConditionRandom defaultOn sightIn combatDeath rattleKill confirmed

You can also insert custom sound tags in each entry to make it an audible bark, e.g. "You shall not pass!!<sound=gandalf,0.8>" will have a 80% chance to play sound with ID gandalf when this bark triggers.

Dialog

To add some chatty texts to the character for the **Let's Talk** option, you'll need to have a dialog.xlsx sheet in your LangMod/**/Dialog/ folder.

img

The sheet format is the same as game's dialog sheet at Elin/Package/_Elona/Lang/_Dialog/dialog.xlsx, but you only need the unique sheet and the row with your character's ID.

Drama

A drama is the rich dialog that usually has options and additional actions.

To define a custom drama for the character, use tag addDrama_DramaSheetName and CWL will reroute the drama automatically.

Your custom drama sheet must be placed in your LangMod/**/Dialog/Drama/ folder, and the name must match the tag. For example, use addDrama_MyCharaDrama with Dialog/Drama/MyCharaDrama.xlsx.

Important: you only need to provide 1 copy of the drama sheet, it can be placed in any of language sub folders. CWL supports in-file localization for multiple languages within the same sheet.

You should reference the game drama sheets at Elin/Package/_Elona/Lang/_Dialog/Drama while making your own, or the Tiny Mita example which has a template drama sheet:

img

Hot Reload

Drama sheet can be edited and hot reloaded during game play.

Drama Basic

A drama sheet is executed from top to bottom, and composed of drama lines. A drama line has the following cells(defined as 1st row):

  • step: when filled in, it marks all the subsequent lines as a drama step, until another line with step appears.
  • jump: the step to jump to when this line executes.
  • if / if2: the condition to check before executing this line. If if2 column is also present, then both if and if2 need to be satisfied.
  • action: the action to execute.
  • param: the parameters for the action.
  • actor: The current line speaker. Only fill this when you want to introduce multiple character conversation. Defaults to tg. Append ? to show as ???.
  • id: unique id for this line, this is only and mandatory for text lines.
  • text_XX / text_JP / text_EN / text: the actual dialog content in this line. text_XX is for other languages where XX is the lang code, such as text_CN, text_RU. text column will be used as the last fallback for language code that's missing.

The flow of the drama is connected by drama steps, each drama step contains one or many drama lines, line can be pure dialog, action, and/or conditional at the same time.

main is the default drama step that gets executed first, end is the default step that exits the drama.

When writing your own drama sheet, avoid using step names starting with underscore _ or flag, there are a lot of internally generated steps with such naming and we don't want any collision.

Drama Actions

Text lines are the most common lines, they only have text and id cell filled in and optionally if condition. They require an input to advance to the next line, such as clicking or pressing key.

Action lines(except choice) do not require input and will keep executing. If both action and text are provided, text will be ignored.

Common actions:

actionparamdescription
injectUniqueInsert "Let's Talk" and a lot of useful steps
choiceAdd a choice to the last text line. Requires text and jump
choice/byeInsert a default bye choice
cancelSet right click / escape key behavior. Requires jump, usually set to end
setFlagflag name,value(optional)Set a flag with value or default 1 if not provided
reloadReload the drama so any flag changes made in the current drama can be applied. Requires jump, usually set to main. Don't confuse this with hot reload during development - for that you only need to save the changes and it will be reloaded next time you start the drama
enableToneEnable tone transformation for the drama
addActorAdd a drama actor to use later, text can be used to set a name override. This is done automatically when you fill in new id in actor cell. Requires character id in actor
invokemethod nameCall a method. All of them are hardcoded for specific use. Check CWL Expansion below
setBGimage name(optional)Set an image as background or use empty to clear it. CWL allows you to supply your own png image in Texture folder
BGMBGM idSwitch the BGM to specific one by id. Check the CWL Sound & BGM page for custom BGM
stopBGMStop the BGM and do not continue
lastBGMStop the BGM and continue the last one played
soundsound idPlay a sound by id. Check the CWL Sound & BGM page for custom sounds
waitdurationPause the execution in this line for seconds, good to use when you want the animation or stuff to finish
alphaIn alphaOutdurationAlpha transition(transparency) in seconds
alphaInOutduration,wait timealphaIn first, wait in seconds, then alphaOut
fadeIn fadeOutduration,white/black(optional)Fade transition in seconds
fadeInOutduration,wait time,white/black(optional)fadeIn first, wait in seconds, then fadeOut
hideUItransitionHide the HUD elements with a transition in seconds. Restored when exiting drama
hideDialogHide the drama dialog so you can do cutscenes, however text lines force show dialogs, so you need to combine this with wait
endExplicitly end the drama. Same as jump to drama step end
addKeyItemkeyitem idAdd keyitem with id to the player
dropitem idDrop an item as reward at player's position
addResourceresource name,countAdd home resource by count
shakeShake the screen
slapSlap the drama owner character
destroyItemitem idFind and destroy the item with id from player's inventory
focusImmediately move and focus camera to the drama owner character
focusCharacharacter id,speed(optional)Move and focus camera to the character with id on the same map
focusPCspeed(optional)Move and focus camera to the player
unfocusReset and unfocus camera
destroycharacter idDestroy a character with id on the same map
saveSave game
setHourhourSet the game time in hours

When providing multiple parameters, they are separated by , (comma) with no spaces in between.

Drama Condition

You can attach condition checks to any line by filling in if and/or if2 cells.

conditionparamdescription
hasFlagflag namePlayer has flag set and value is not 0
!hasFlagflag namePlayer doesn`t has flag set or value is 0
hasMelilithCursePlayer has Melilith curse
merchantPlayer is at Merchant Guild
fighterPlayer is at Fighter Guild
thiefPlayer is at Thief Guild
magePlayer is at Mage Guild
hasItemitem idPlayer has item with id in inventory
isCompletedquest idPlayer has completed quest with id

The format for a condition is condition,param. Since hasFlag is used most often, it can be simplified with value check too:

=,example_flag,1
>,example_counter,20
!,exmaple_not_equal_flag,69

Most of the time you only need if column in your sheet. If you think you need more complex condition and feel necessary, you can insert a new column and set the first row (column header) as if2.

Static Evaluation

The if column is evaluated only once on drama load, that means you cannot dynamically enable/disable lines. Use reload or CWL's invoke* condition.

Drama Expansion

Struggling with the built-in action of the drama sheet not achieving the desired effect? Need more condition checks? CWL allows you to add custom drama expansion methods in the DLL and call them in the drama sheet.

Mod Help Integration

Sometimes you may want to provide a bit of hint for players, so they can better experience your awesome drama story. By making mods with CWL, you already gain access to Mod Help, check it out to deliver custom made help pages!