DEV (dev) - Script
Educators & Designers: help improving this quest!
Comments and feedback: discuss in the Forum
Improve translations: comment the Google Sheet
Improve the script: propose an edit here
quest_start
// dev | DEV
//
// Country: Italy - Firenze
// Content: Living document for testing Yarn features
// and documenting available commands
//--------------------------------------------
// INIT
// every quest starts with an INIT node
// to initialize existing variables and declare new ones
// title of a node must be unique to this quest
// create a new node for anything that must be referenced multiple times
// that makes understanding of the flow easier
// position is used to place the node in the Graph view in the Editor
// group is used to organize the nodes in the Graph view in the Editor
group: docs
// tags are used to add metadata to the node
// actor is the speaking character, used mostly for voice overs
// - Default | female, neutral, clear diction, mid pitch, minimal emotion
// - SILENT | no spoken words, but can use non-verbal sounds
// - NARRATOR | male, warm, engaging, enthusiastic
// - SPECIAL | fx voice, like a robot or an animal
// - ADULT_F | warm, conversational, adaptable
// - ADULT_M | natural, medium pitch, flexible tone
// - SENIOR_F | warm, gentle rasp, storyteller cadence
// - SENIOR_M | deeper, slower, authoritative but kind
// - KID_F | bright, energetic, quick speech, high pitch
// - KID_M | playful, curious, lively tone, mid-high pitch
actor: NARRATOR
// color us used like this:
// - red for important nodes like init and quest end
// - blue for NPCs
// - yellow for items
// - green for tasks
// - purple for activities
color: red
// type is used to identify special nodes like panel, Quiz
// - panel is fullscreen
// - panel_endgame is a special panel that shows the endgame screen
// - quiz shows a quiz with image choiches
type: panel
---
// these are the common variables
<<set $EASY_MODE = false>>
<<set $IS_DESKTOP = false>>
<<set $TOTAL_COINS = 0>>
<<set $COLLECTED_ITEMS = 0>>
<<set $MAX_PROGRESS = 0>>
<<set $CURRENT_PROGRESS = 0>>
<<set $CURRENT_ITEM = "">>
// here we declare new variables for this quest
<<declare $doorUnlocked = false>>
Welcome to the DEV quest! #line:0973921
<<card food_baguette>>
You can use this quest to test features and commands. #line:0196a6d
<<asset backpack>>
// shadow line example
You played the activity well! #line:0597e46
DOCS_GLOBAL_VARIABLE
group: docs
---
<<if $EASY_MODE >>
You are in EASY MODE! #line:006edd6
<<else>>
You are in NORMAL MODE! #line:02f8aaa
<<endif>>
<<if $IS_DESKTOP >>
You are on DESKTOP! #line:0afe11a
<<else>>
You are on MOBILE! #line:0245038
<<endif>>
DOCS_ACTIONS
//--------------------------------------------
// DOCS COMMANDS
// these are the commands available in all Scripts
//--------------------------------------------
group: docs
---
// execute the configured action in the actionManager
<<action action_id>>
DOCS_ACTIVITY
group: docs
actor:
---
// launches an activity and set a yarn node to jump when completed
<<activity activity_setting_id return_node>>
// a third optional parameter can set the difficulty
<<activity activity_setting_id return_node tutorial>>
<<activity activity_setting_id return_node easy>>
<<activity activity_setting_id return_node normal>>
<<activity activity_setting_id return_node expert>>
// to get the result of a specific activity
// (0 = failed, >= 1 = completed)
<<if GetActivityResult("id_activity_setting") > 0>>
You played the activity well! #line:0872c3a
<<endif>>
// this returns the result of the activity played
<<if GetActivityResult("") > 0>>
<<endif>>
DOCS_AREA
group: docs
---
// set the area (walls), turnng off the previous one
<<area full_area>>
// switch off the current area.
<<area off>>
DOCS_ASSETS
group: docs
---
// instead of a card, uses a direct Asset Id
<<asset id_asset>>
// hides the current image
<<asset_hide>>
DOCS_CAMERA
group: docs
---
// focus the camera on a target (interactable, area, map point)
<<camera_focus palace>>
// back to player
<<camera_reset>>
DOCS_CARDS
group: docs
---
// uses the card Id to show a card
<<card food_baguette>>
// if accepts 2 additional parameters
// zoom - shows the card in zoom mode
// silent - shows the card without title / audio
<<card food_baguette zoom silent>>
// obviously can set just one of them
<<card food_baguette silent>>
<<card food_baguette zoom>>
// hides the current card
<<card_hide>>
DOCS_COOKIES
group: docs
---
// adds cookies to the player (can be negative)
<<cookies_add 5>>
<<if GetCookies() >= 10>>
<<endif>>
DOCS_INVENTORY
group: docs
actor: ADULT_F
---
// adds the item = card to the inventory (needs to be collectable!)
<<inventory id_card add>>
<<inventory id_card>> // same as add
<<inventory id_card remove>>
// Inventory has custom functions to check items
<<if item_count("flag_france") >= 2>>
You have more than 2 Flags of France #line:08a1058 #native
another line #line:0563122
<<endif>>
<<if has_item("flag_france")>>
You have a Flag of France #line:kidm_0b932d0
<<endif>>
<<if has_item_at_least("flag_france", 3)>>
You have at least 3 Flags of France #line:0d694f1
<<endif>>
<<if can_collect("flag_france")>>
You can collect a Flag of France #line:03da430
<<endif>>
DOCS_TASKS
group: docs
---
// starts a task
You can add the decription with #task:id_task_configuration
<<task_start id_task_configuration>>
// end a task... if you say nothing, its a success
<<task_end id_task_configuration>>
<<task_end id_task_configuration fail>>
<<task_end>> // or even without the id to end current task
DOCS_PARTY
group: docs
---
// makes a NPC join a party following the player
<<party_join interactable_id>>
// asks a NPC to leave the party
<<party_release interactable_id>>
// if no id, remove all
<<party_release>>
// the default formation in "line", but other are available
<<party_formation "line">>
<<party_formation "circle">>
<<party_formation "V">>
DOCS_QUEST
group: docs
---
// end current quest and calculate stars based on progress
<<quest_end>>
// end the current quest with n (0, 1,2,3) stars
<<quest_end 3>>
DOCS_TARGET
group: docs
---
// put a target element on a target
<<target target_chest>>
// removes any target
<<target off>>
DOCS_YARN_BUILTIN
group: docs
---
// --- Yarn built-in commands ---
<<wait 3>> // waits for 3 seconds
<<stop>> // stops the current dialogue>>
test_dialog
group: dialog
tags: noRepeatLastLine
---
Enter the house #shadow:0f92df5
the fish is still here #line:08da0cf #customtag #native
Butter! #line:05edb53
<<card butter>>
Good butter #line:090e4bd
Option 2 #line:07243c2
You chose 2 #line:03649cf
Option 3 #line:0c56f8c
You chose 3 #line:0278662
Option 4 #line:0131912
You chose 4 #line:077dcad
And this is fish #line:099d213
<<card food_fish>>
<<card food_fish zoom>>
We like it! #line:04d8ba8
First Line v1 #line:04a8afc
First Line v2 #line:08cbb53
test_inventory
group: inventory
---
I am hungry. how about some food? #line:0bdf566
<<if has_item_at_least("food_baguette", 3)>>
I need 3 baguettes! #line:00c341e
<<inventory food_baguette remove>>
<<inventory food_baguette remove>>
<<inventory food_baguette remove>>
<<else>>
You don't have enough baguettes! #line:0c0d786
<<if has_item("food_fish")>>
But you have some fish! #line:06c9370
<<endif>>
Thank you. #line:0a7921b
<<endif>>
got_baguette
group: inventory
---
You found a baguette! #line:dev_got_baguette
<<inventory food_baguette add>>
got_fish
group: inventory
---
An healthy fish! #line:dev_got_fish
<<inventory food_fish add>>
area_change
group: area
---
Now i'll let you go around. #line:0aa3b5d
<<area full_area>>
test_cards
group: cards
---
Now i show you some cards #line:05edfca
<<card food_fish>>
Please look at its details #line:0adbe4f
<<card food_fish zoom>>
go back to the menu and browse the cards #line:017a620
and now... #line:04ade19
<<card food_baguette>>
Good, isnt' it? #line:04b02ce
<<card_hide>>
GO back to work now. #line:0970ed1
test_cookies
group: cookies
---
Do you want 5 cookies? #line:0eb42ea
Yes #line:027a7a8
Here you are! Enjoy! #line:0e5578d
<<cookies_add 5>>
No #line:0675243
Ok, no cookies for you! #line:0662df0
<<if GetCookies() >= 10>>
You have a lot of cookies! #line:0d2d1d7
<<endif>>
test_camera
group: camera
---
Now i show you the map of the playgroud #line:0c58bd8
<<camera_focus map_tutorial>>
Do you see that point? #line:03e0224
<<camera_focus map_tutorial_detail>>
Now Look at that palace! #line:0c1b2e4
<<camera_focus palace>>
Nice isnt' it? #line:04daace
<<camera_reset>>
test_actions
tags:
group: actions
actor: KID_F
---
<<action activate_elevator>>
Action Pre "pre_actions" and action_post "post_actions" #line:0a67b25
Do you want to open the Chest? #line:03cae39
Yes #line:067231b
<<action open_chest>>
No #line:05d9657
<<action stop_elevator>>
task_collect_apples
tags:
group: tasks
color: green
---
<<if HasCompletedTask("collect_apples")>>
Thank you! you finished this task #line:dev_task_collect_apples_2
<<elseif GetCollectedItem("collect_apples") > 0 >>
I need more apples! #line:dev_task_collect_apples_3
<<else>>
<<jump task_collect_apples_info>>
<<endif>>
task_collect_apples_info
tags:
group: tasks
color: green
type: task
---
Collect 4 apples! #line:dev_task_collect_apples_1 #task:collect_apples
This is the description of this task. #line:063c743
<<task_start collect_apples task_collect_apples_done>>
task_collect_apples_done
tags:
group: tasks
color: green
---
Well done! Go back to the robot #line:dev_test_task_done_1
task_open_chest
tags:
group: tasks
color: green
---
<<if HasCompletedTask("open_chest")>>
Thanks you! I needed that #line:073d718
<<else>>
Reach and open that chest! #line:0c31fab
<<area off>>
<<target target_chest>>
<<task_start open_chest task_open_chest_done>>
<<endif>>
task_open_chest_done
tags:
group: tasks
color: green
---
Well done! You opened the chest. #line:04e697a
<<target off>>
item_chest
tags:
group: actions
color: yellow
actor: NARRATOR
---
A good chest! #line:dev_item_chest_1
<<action open_chest>>
npc_join_party
group: party
---
Do you want to join my party? #line:0b1f3e1
Yes #line:0d1f4e3
<<party_join npc_party_1>>
Now i'm following you! #line:019353a
No #line:0a8e1c3
ok #line:0c4e4ec
npc_leave_party
group: party
---
Want to change Party? #line:048e84e
Formation Circle #line:00c2f84
<<party_formation circle >>
Formation Line #line:03d5333
<<party_formation line >>
Formation V #line:08ea78a
<<party_formation v >>
Release Party #line:01f2e9a
<<party_release>>
test_quiz
group: quiz
tags:
type: quiz
---
Calculate 3*2 #line:dev_test_quiz_1 #card:fr_figure_triangle
four #line:dev_test_quiz_2 #card:number_4
<<jump test_quiz_wrong>>
six #line:dev_test_quiz_3 #card:bouillabaisse
<<jump test_quiz_correct>>
eight #line:dev_test_quiz_4 #card:food_bread
<<jump test_quiz_wrong>>
ten #line:03cdf2b #card:food_olive_oil
<<jump test_quiz_wrong>>
test_quiz_correct
group: quiz
---
YES! Correct. #line:0eb010e
test_quiz_wrong
group: quiz
---
No. Do you want to try again? #line:0e2b8d7
Yes #line:08ff2b9
<<jump test_quiz>>
No #line:042881c
endgame
group: endgame
color: red
---
You can end this quest with... #line:027bdca
NOOOO i don't want end #line:014a238
YES, let's end #line:0751111
<<quest_end>>
<<jump close_game>>
close_game
group: endgame
color: red
type: panel_endgame
---
THis is the last message! goodybye #line:01c70f4
NPCGIoconda
assetimage: antura_hero
---
<<asset food_tomato>>
ciao, stefano #line:0c0329c
ti piacciono le foto? #line:0b9b60d
<<asset food_fish>>
vuoi arancia? #line:0c2bd41
<<asset food_orange>>
<<action play_sfx>>
vuoi olio? #line:034ed48
<<asset food_oil>>
<<action play_sfx>>
ora chiudo #line:0baeb5f
<<asset_hide>>
Activity Order #line:0087ab1
<<activity activity_test>>
<<jump activity_done>>
Suona sfx #line:0f02889
<<action play_sfx>>
Apri Baule #line:053f800
<<action open_chest>>
activity_done
---
Activity finished. #line:0ce187d
test_setactive
---
Now i'll activate gameObject test_setactive #line:0ef2850
<<SetActive TestSetActive_Crate>>
And now i'll switch it off #line:0a360b1
<<SetActive TestSetActive_Crate false>>
Nice, isn't it? #line:06bd992
NPCGreeting2
assetimage: pirates
---
// <<activity activity_memory>>
Hallo #line:08ecb6c
How are you? #line:00b7839
Good #line:0991140
Good to hear that #line:0b3477e
Bad #line:08607a4
Oh, I am sorry to hear that #line:0e6ecb2
Neutral #line:05f3ea5
I see, I hope it gets better soon #line:0802baf
What do you want to do with coins? #line:0bcd506
NPCGreeting3
tags:
---
<<declare $coins = 0>>
What do you want to do with {0} coins? #line:0a1994c
Open the door #line:0e11bee
<<set $doorUnlocked = true>>
The door is open #line:0cac01d
Stay at home #line:07f4239
You stay at home #line:079b16e
<<set $coins = $coins + 10>>
Chest_01
---
<<if $doorUnlocked>>
The door is open #line:0e22a89
<<jump EntroInCasa>>
<<else>>
The door is closed #line:05086bc
<<endif>>
note_for_the_editors
style: note
---
Custom note #line:04d621e
this is useful to leave notes for the editors #line:0520fb4
like reminders of things to do #line:078fe99
or things to check #line:0982259
or things to fix #line:096379b
EntroInCasa
---
Enter the house #line:0f92df5
coin_machine
tags:
group: variables
---
I'll give you 100 coins. #line:06427f9
<<set $TOTAL_COINS = $TOTAL_COINS + 100>>
test_mood
tags: mood=HAPPY
actor: GUIDE_F
---
Happy Mood #line:0a6e648
random_lines
actor: SENIOR_F
group: random
---
Smart random Line 1 #line:07193d8
Smart random Line 2 #line:06fe9a7
Smart random Line 3 #line:032e777
multiple_lines
group: random
actor: KID_M
---
This is Hint 1 #line:0423295
This is Hint 2 #line:00d69e5
Hint 3 #line:08966ba
activity_canvas
group: activities
color: purple
---
<<if GetActivityResult("canvas_beach_settings") > 0>>
You already completed canvas 1! #line:00dc701
<<endif>>
Do you want to play Activity CANVAS? #line:0532f99
Yes #line:0103ffa
<<activity canvas_beach_settings activity_canvas_result>>
No #line:08a0b03
activity_canvas2
group: activities
color: purple
---
<<if GetActivityResult("canvas_beach2_settings") > 0>>
You already completed canvas 2! #line:006bcc5
<<endif>>
Do you want to play Activity CANVAS 2? #line:0fbe532
Yes #line:03b9f38
<<activity canvas_beach2_settings activity_canvas2>>
No #line:09e165e
activity_canvas_result
group: activities
color: purple
---
<<if GetActivityResult("") > 0>>
You played well! #line:04fd2ce
<<else>>
Try again. #line:0797e1e
<<endif>>
activity_jigsaw
group: activities
color: purple
---
Activity JIGSAW PUZZLE! #line:0d97ed9
<<activity jigsaw_toureiffel_settings activity_jigsaw_result>>
activity_jigsaw_result
group: activities
color: purple
---
<<if GetActivityResult("jigsaw_toureiffel_settings") > 0>>
You played JIGSAW PUZZLE activity well! #line:041075b
<<else>>
Try again. #line:0921ca5
<<endif>>
activity_memory
group: activities
color: purple
---
<<if GetActivityResult("memory_baguette_settings") > 0>>
You played MEMORY activity well! #line:0940d53
<<endif>>
Activity MEMORY! #line:0727144
<<activity memory_baguette_settings activity_memory_result expert>>
activity_memory_result
group: activities
color: purple
---
<<if GetActivityResult("memory_baguette_settings") > 0>>
You played MEMORY activity well! #line:03121d7
<<else>>
Try again. #line:0d146ef
<<endif>>
activity_match
group: activities
color: purple
---
Activity MATCH! #line:0949b00
<<activity match_zoo_1_settings activity_match_result>>
activity_match_result
group: activities
color: purple
---
<<if GetActivityResult("match_zoo_1_settings") > 0>>
You played MATCH activity well! #line:0426701
<<else>>
Try again. #line:07643ad
<<endif>>
activity_money
group: activities
color: purple
---
Activity MONEY! #line:05b81d1
<<activity money_level_1_settings activity_money_result>>
activity_money_result
group: activities
color: purple
---
<<if GetActivityResult("money_level_1_settings") > 0>>
You played MONEY activity well! #line:0a63bb1
<<else>>
Try again. #line:02b103d
<<endif>>
activity_order
group: activities
color: purple
---
Activity ORDER! #line:08e289f
<<activity order_baguetterecipe_settings activity_order_result>>
activity_order_result
group: activities
color: purple
---
<<if GetActivityResult("order_baguetterecipe_settings") > 0>>
You played ORDER activity well! #line:05527db
<<else>>
Try again. #line:04681e2
<<endif>>
activity_piano
group: activities
color: purple
---
Play this PIANO Melody! #line:0e11b77
<<activity piano_framartino_settings activity_piano_result>>
activity_piano_result
group: activities
color: purple
---
<<if GetActivityResult("piano_framartino_settings") > 0>>
You played the PIANO activity well! #line:0b9f1af
<<else>>
Try again. #line:04c91cd
<<endif>>