diff --git a/.gitignore b/.gitignore index 3ea60107..a6b25bff 100644 --- a/.gitignore +++ b/.gitignore @@ -8,4 +8,5 @@ *.unityproj *.sln -*.userprefs \ No newline at end of file +*.userprefs +Assets/.~lock.* diff --git a/Assets/Fungus/Flowchart/Editor/SequenceEditor.cs b/Assets/Fungus/Flowchart/Editor/BlockEditor.cs similarity index 100% rename from Assets/Fungus/Flowchart/Editor/SequenceEditor.cs rename to Assets/Fungus/Flowchart/Editor/BlockEditor.cs diff --git a/Assets/Fungus/Flowchart/Editor/SequenceEditor.cs.meta b/Assets/Fungus/Flowchart/Editor/BlockEditor.cs.meta similarity index 100% rename from Assets/Fungus/Flowchart/Editor/SequenceEditor.cs.meta rename to Assets/Fungus/Flowchart/Editor/BlockEditor.cs.meta diff --git a/Assets/Fungus/Flowchart/Editor/SequenceInspector.cs b/Assets/Fungus/Flowchart/Editor/BlockInspector.cs similarity index 100% rename from Assets/Fungus/Flowchart/Editor/SequenceInspector.cs rename to Assets/Fungus/Flowchart/Editor/BlockInspector.cs diff --git a/Assets/Fungus/Flowchart/Editor/SequenceInspector.cs.meta b/Assets/Fungus/Flowchart/Editor/BlockInspector.cs.meta similarity index 100% rename from Assets/Fungus/Flowchart/Editor/SequenceInspector.cs.meta rename to Assets/Fungus/Flowchart/Editor/BlockInspector.cs.meta diff --git a/Assets/Fungus/Flowchart/Editor/FlowchartEditor.cs b/Assets/Fungus/Flowchart/Editor/FlowchartEditor.cs index 09585f73..5e671054 100644 --- a/Assets/Fungus/Flowchart/Editor/FlowchartEditor.cs +++ b/Assets/Fungus/Flowchart/Editor/FlowchartEditor.cs @@ -23,6 +23,7 @@ namespace Fungus protected SerializedProperty hideComponentsProp; protected SerializedProperty runSlowDurationProp; protected SerializedProperty saveSelectionProp; + protected SerializedProperty localizationIdProp; protected SerializedProperty variablesProp; protected virtual void OnEnable() @@ -32,6 +33,7 @@ namespace Fungus hideComponentsProp = serializedObject.FindProperty("hideComponents"); runSlowDurationProp = serializedObject.FindProperty("runSlowDuration"); saveSelectionProp = serializedObject.FindProperty("saveSelection"); + localizationIdProp = serializedObject.FindProperty("localizationId"); variablesProp = serializedObject.FindProperty("variables"); } @@ -48,6 +50,7 @@ namespace Fungus EditorGUILayout.PropertyField(hideComponentsProp); EditorGUILayout.PropertyField(runSlowDurationProp); EditorGUILayout.PropertyField(saveSelectionProp); + EditorGUILayout.PropertyField(localizationIdProp); GUILayout.BeginHorizontal(); GUILayout.FlexibleSpace(); @@ -55,14 +58,6 @@ namespace Fungus { EditorWindow.GetWindow(typeof(FlowchartWindow), false, "Flowchart"); } - if (GUILayout.Button(new GUIContent("Export Text", "Export all story text in .fountain format."))) - { - FountainExporter.ExportStrings(flowchart); - } - if (GUILayout.Button(new GUIContent("Import Text", "Import story text from a file in .fountain format."))) - { - FountainExporter.ImportStrings(flowchart); - } GUILayout.FlexibleSpace(); GUILayout.EndHorizontal(); diff --git a/Assets/Fungus/Flowchart/Editor/FountainExporter.cs b/Assets/Fungus/Flowchart/Editor/FountainExporter.cs deleted file mode 100644 index e45fd6b7..00000000 --- a/Assets/Fungus/Flowchart/Editor/FountainExporter.cs +++ /dev/null @@ -1,187 +0,0 @@ -using UnityEditor; -using UnityEngine; -using System.Collections; -using System.Collections.Generic; -using System.Linq; -using System.Reflection; -using System.IO; - -namespace Fungus -{ - - /** - * Import and export a Fungus story in the .fountain screenplay format. - * The exported file contains special tags in note blocks which map the - * story text to the corresponding commands. - */ - public class FountainExporter - { - - public static void ExportStrings(Flowchart flowchart) - { - if (flowchart == null) - { - return; - } - - string path = EditorUtility.SaveFilePanel("Export strings", "", - flowchart.name + ".txt", ""); - - if(path.Length == 0) - { - return; - } - - // Write out character names - - string exportText = "Title: " + flowchart.name + "\n"; - exportText += "Draft date: " + System.DateTime.Today.ToString("d") + "\n"; - exportText += "\n"; - - // In every block, write out Say & Menu text in order - Block[] blocks = flowchart.GetComponentsInChildren(); - foreach (Block block in blocks) - { - // Check for any Say, Menu or Comment commands - bool hasText = false; - foreach (Command c in block.commandList) - { - System.Type t = c.GetType(); - if (t == typeof(Say) || - t == typeof(Menu) || - t == typeof(Comment)) - { - hasText = true; - } - } - if (!hasText) - { - continue; - } - - exportText += "." + block.blockName.ToUpper() + "\n\n"; - - foreach (Command c in block.commandList) - { - if (c.GetType() == typeof(Say)) - { - string idText = ""; - Say say = c as Say; - - if (say.character == null) - { - exportText += "NO CHARACTER\n"; - } - else - { - exportText += say.character.nameText.ToUpper() + "\n"; - } - - idText += "[[Say," + c.itemId + "]]\n"; - - exportText += idText; - - // Fountain requires blank dialogue lines to contain 2 spaces or else - // they will be interpreted as ACTION text. - string trimmedText = say.storyText.Trim(); - string[] lines = trimmedText.Split(new [] { '\r', '\n' }); - foreach (string line in lines) - { - string trimmed = line.Trim(); - if (line.Length == 0) - { - exportText += " \n"; - } - else - { - exportText += trimmed + "\n"; - } - } - - exportText += "\n"; - } - else if (c.GetType() == typeof(Menu)) - { - exportText += "MENU\n"; - - string idText = ""; - Menu menu = c as Menu; - idText += "[[Menu," + c.itemId + "]]\n"; - - exportText += idText + menu.text.Trim() + "\n\n"; - } - else if (c.GetType() == typeof(Comment)) - { - string idText = ""; - Comment comment = c as Comment; - idText += "[[Comment," + c.itemId + "]]\n"; - - exportText += idText + comment.commentText.Trim() + "\n\n"; - } - } - } - - File.WriteAllText(path, exportText); - } - - public static void ImportStrings(Flowchart flowchart) - { - string path = EditorUtility.OpenFilePanel("Import strings", "", ""); - - if(path.Length == 0) - { - return; - } - - string stringsFile = File.ReadAllText(path); - - StringsParser parser = new StringsParser(); - List items = parser.ProcessText(stringsFile); - - // Build dict of commands - Dictionary commandDict = new Dictionary(); - foreach (Command c in flowchart.gameObject.GetComponentsInChildren()) - { - commandDict.Add (c.itemId, c); - } - - foreach (StringsParser.StringItem item in items) - { - if (item.parameters.Length != 2) - { - continue; - } - - string stringType = item.parameters[0]; - if (stringType == "Say") - { - int itemId = int.Parse(item.parameters[1]); - Say sayCommand = commandDict[itemId] as Say; - if (sayCommand != null) - { - sayCommand.storyText = item.bodyText; - } - } - else if (stringType == "Menu") - { - int itemId = int.Parse(item.parameters[1]); - Menu menuCommand = commandDict[itemId] as Menu; - if (menuCommand != null) - { - menuCommand.text = item.bodyText; - } - } - else if (stringType == "Comment") - { - int itemId = int.Parse(item.parameters[1]); - Comment commentCommand = commandDict[itemId] as Comment; - if (commentCommand != null) - { - commentCommand.commentText = item.bodyText; - } - } - } - } - } - -} diff --git a/Assets/Fungus/Flowchart/Scripts/Flowchart.cs b/Assets/Fungus/Flowchart/Scripts/Flowchart.cs index efd3bb55..f76aa841 100644 --- a/Assets/Fungus/Flowchart/Scripts/Flowchart.cs +++ b/Assets/Fungus/Flowchart/Scripts/Flowchart.cs @@ -109,6 +109,12 @@ namespace Fungus [Tooltip("Saves the selected block and commands when saving the scene.")] public bool saveSelection = true; + /** + * Unique identifier for identifying this flowchart in localized string keys. + */ + [Tooltip("Unique identifier for this flowchart in localized string keys. This id must be provided for localization string export to work.")] + public string localizationId = ""; + /** * Unique id to assign to the next created item. * Increases monotonically every time a new item is added to the Flowchart. @@ -672,15 +678,25 @@ namespace Fungus foreach (Match match in results) { string key = match.Value.Substring(2, match.Value.Length - 3); + + // Look for matching variable first foreach (Variable variable in variables) { if (variable.key == key) { string value = variable.ToString(); subbedText = subbedText.Replace(match.Value, value); - break; + return subbedText; } } + + // Next look for matching localized string + string localizedString = Localization.GetLocalizedString(key); + if (localizedString != null) + { + subbedText = subbedText.Replace(match.Value, localizedString); + return subbedText; + } } return subbedText; diff --git a/Assets/Fungus/Flowchart/Scripts/StringsParser.cs b/Assets/Fungus/Flowchart/Scripts/StringsParser.cs deleted file mode 100644 index 9dce7ea9..00000000 --- a/Assets/Fungus/Flowchart/Scripts/StringsParser.cs +++ /dev/null @@ -1,96 +0,0 @@ -using UnityEngine; -using System.Collections; -using System.Collections.Generic; -using System.Text.RegularExpressions; -using Fungus; - -namespace Fungus -{ - /** - * Parses an exported strings file using the Fountain file format for screenplays - * See http://fountain.io for details. - * We only support a small subset of Fountain markup, and use note tags to embed meta data to - * bind dialogue text to the corresponding Say / Menu commands. - */ - public class StringsParser - { - public class StringItem - { - public string[] parameters; - public string bodyText; - } - - public virtual List ProcessText(string text) - { - List items = new List(); - - // Split text into lines. Add a newline at end to ensure last command is always parsed - string[] lines = Regex.Split(text + "\n", "(?<=\n)"); - - int i = 0; - while (i < lines.Length) - { - string line = lines[i].Trim(); - - if (!(line.StartsWith("[[") && line.EndsWith("]]"))) - { - i++; - continue; - } - - string blockTag = line.Substring(2, line.Length - 4); - - // Find next empty line, #, [[ or eof - int start = i + 1; - int end = lines.Length - 1; - for (int j = start; j <= end; ++j) - { - string line2 = lines[j].Trim(); - - if (line2.Length == 0 || - line2.StartsWith("#") || - line2.StartsWith("[[")) - { - end = j; - break; - } - } - - if (end > start) - { - string blockBuffer = ""; - for (int j = start; j <= end; ++j) - { - blockBuffer += lines[j].Trim() + "\n"; - } - - blockBuffer = blockBuffer.Trim(); - - StringItem item = CreateItem(blockTag, blockBuffer); - if (item != null) - { - items.Add(item); - } - } - - i = end + 1; - } - - return items; - } - - protected StringItem CreateItem(string commandInfo, string bodyText) - { - string[] parameters = commandInfo.Split(new char[] { ',' }); - if (parameters.Length > 0) - { - StringItem item = new StringItem(); - item.parameters = parameters; - item.bodyText = bodyText; - return item; - } - - return null; - } - } -} diff --git a/Assets/Fungus/Narrative/Editor/LocalizationEditor.cs b/Assets/Fungus/Narrative/Editor/LocalizationEditor.cs new file mode 100644 index 00000000..0b30477e --- /dev/null +++ b/Assets/Fungus/Narrative/Editor/LocalizationEditor.cs @@ -0,0 +1,106 @@ +using UnityEditor; +using UnityEngine; +using System.Collections; +using System.Collections.Generic; +using System.IO; +using Rotorz.ReorderableList; + +namespace Fungus +{ + + [CustomEditor(typeof(Localization))] + public class LocalizationEditor : Editor + { + protected SerializedProperty activeLanguageProp; + protected SerializedProperty localizationFileProp; + + protected virtual void OnEnable() + { + activeLanguageProp = serializedObject.FindProperty("activeLanguage"); + localizationFileProp = serializedObject.FindProperty("localizationFile"); + } + + public override void OnInspectorGUI() + { + serializedObject.Update(); + + Localization localization = target as Localization; + + EditorGUILayout.PropertyField(activeLanguageProp); + EditorGUILayout.PropertyField(localizationFileProp); + + if (GUILayout.Button(new GUIContent("Export Localization File"))) + { + ExportLocalizationFile(localization); + } + + if (GUILayout.Button(new GUIContent("Export Standard Text"))) + { + ExportStandardText(localization); + } + + if (GUILayout.Button(new GUIContent("Import Standard Text"))) + { + ImportStandardText(localization); + } + + serializedObject.ApplyModifiedProperties(); + } + + public virtual void ExportLocalizationFile(Localization localization) + { + string path = EditorUtility.SaveFilePanel("Export Localization File", "Assets/", + "localization.csv", ""); + if (path.Length == 0) + { + return; + } + + string csvData = localization.GetCSVData(); + File.WriteAllText(path, csvData); + AssetDatabase.Refresh(); + + ShowNotification(localization); + } + + public virtual void ExportStandardText(Localization localization) + { + string path = EditorUtility.SaveFilePanel("Export Standard Text", "Assets/", "standard.txt", ""); + if (path.Length == 0) + { + return; + } + + string textData = localization.GetStandardText(); + File.WriteAllText(path, textData); + AssetDatabase.Refresh(); + + ShowNotification(localization); + } + + public virtual void ImportStandardText(Localization localization) + { + string path = EditorUtility.OpenFilePanel("Import Standard Text", "Assets/", "txt"); + if (path.Length == 0) + { + return; + } + + string textData = File.ReadAllText(path); + localization.SetStandardText(textData); + + ShowNotification(localization); + } + + protected virtual void ShowNotification(Localization localization) + { + EditorWindow window = EditorWindow.GetWindow(typeof(FlowchartWindow), false, "Flowchart"); + if (window != null) + { + window.ShowNotification(new GUIContent(localization.notificationText)); + localization.notificationText = ""; + } + } + } + +} diff --git a/Assets/Fungus/Flowchart/Editor/FountainExporter.cs.meta b/Assets/Fungus/Narrative/Editor/LocalizationEditor.cs.meta similarity index 76% rename from Assets/Fungus/Flowchart/Editor/FountainExporter.cs.meta rename to Assets/Fungus/Narrative/Editor/LocalizationEditor.cs.meta index e54b9dc3..ba8a068c 100644 --- a/Assets/Fungus/Flowchart/Editor/FountainExporter.cs.meta +++ b/Assets/Fungus/Narrative/Editor/LocalizationEditor.cs.meta @@ -1,6 +1,6 @@ fileFormatVersion: 2 -guid: c91ad6ef6a0734046bd93dde4b0e59d1 -timeCreated: 1426502899 +guid: ab0caac085485491fb32dbf86efefef1 +timeCreated: 1428581512 licenseType: Free MonoImporter: serializedVersion: 2 diff --git a/Assets/Fungus/Narrative/Editor/MenuEditor.cs b/Assets/Fungus/Narrative/Editor/MenuEditor.cs index e153b078..4a253caf 100644 --- a/Assets/Fungus/Narrative/Editor/MenuEditor.cs +++ b/Assets/Fungus/Narrative/Editor/MenuEditor.cs @@ -11,6 +11,7 @@ namespace Fungus public class MenuEditor : CommandEditor { protected SerializedProperty textProp; + protected SerializedProperty descriptionProp; protected SerializedProperty targetBlockProp; protected SerializedProperty hideIfVisitedProp; protected SerializedProperty setMenuDialogProp; @@ -18,6 +19,7 @@ namespace Fungus protected virtual void OnEnable() { textProp = serializedObject.FindProperty("text"); + descriptionProp = serializedObject.FindProperty("description"); targetBlockProp = serializedObject.FindProperty("targetBlock"); hideIfVisitedProp = serializedObject.FindProperty("hideIfVisited"); setMenuDialogProp = serializedObject.FindProperty("setMenuDialog"); @@ -34,6 +36,8 @@ namespace Fungus serializedObject.Update(); EditorGUILayout.PropertyField(textProp); + + EditorGUILayout.PropertyField(descriptionProp); BlockEditor.BlockField(targetBlockProp, new GUIContent("Target Block", "Block to call when option is selected"), diff --git a/Assets/Fungus/Narrative/Editor/NarrativeMenuItems.cs b/Assets/Fungus/Narrative/Editor/NarrativeMenuItems.cs index 6761b444..ee4450ad 100644 --- a/Assets/Fungus/Narrative/Editor/NarrativeMenuItems.cs +++ b/Assets/Fungus/Narrative/Editor/NarrativeMenuItems.cs @@ -50,6 +50,12 @@ namespace Fungus { FlowchartMenuItems.SpawnPrefab("StagePosition"); } + + [MenuItem("Tools/Fungus/Create/Localization", false, 57)] + static void CreateLocalization() + { + FlowchartMenuItems.SpawnPrefab("Localization"); + } } } \ No newline at end of file diff --git a/Assets/Fungus/Narrative/Editor/SayEditor.cs b/Assets/Fungus/Narrative/Editor/SayEditor.cs index 76fee36a..d58f11f8 100644 --- a/Assets/Fungus/Narrative/Editor/SayEditor.cs +++ b/Assets/Fungus/Narrative/Editor/SayEditor.cs @@ -100,6 +100,7 @@ namespace Fungus protected SerializedProperty characterProp; protected SerializedProperty portraitProp; protected SerializedProperty storyTextProp; + protected SerializedProperty descriptionProp; protected SerializedProperty voiceOverClipProp; protected SerializedProperty showAlwaysProp; protected SerializedProperty showCountProp; @@ -114,6 +115,7 @@ namespace Fungus characterProp = serializedObject.FindProperty("character"); portraitProp = serializedObject.FindProperty("portrait"); storyTextProp = serializedObject.FindProperty("storyText"); + descriptionProp = serializedObject.FindProperty("description"); voiceOverClipProp = serializedObject.FindProperty("voiceOverClip"); showAlwaysProp = serializedObject.FindProperty("showAlways"); showCountProp = serializedObject.FindProperty("showCount"); @@ -170,7 +172,9 @@ namespace Fungus } EditorGUILayout.PropertyField(storyTextProp); - + + EditorGUILayout.PropertyField(descriptionProp); + EditorGUILayout.BeginHorizontal(); EditorGUILayout.PropertyField(extendPreviousProp); diff --git a/Assets/Fungus/Narrative/Resources/Localization.prefab b/Assets/Fungus/Narrative/Resources/Localization.prefab new file mode 100644 index 00000000..c9845980 --- /dev/null +++ b/Assets/Fungus/Narrative/Resources/Localization.prefab @@ -0,0 +1,54 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &149266 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 4 + m_Component: + - 4: {fileID: 480768} + - 114: {fileID: 11438504} + m_Layer: 0 + m_Name: Localization + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &480768 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 149266} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 2.05546069, y: -3.16485739, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 +--- !u!114 &11438504 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 149266} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: e5724422a635e425bae0af9ffe2615d6, type: 3} + m_Name: + m_EditorClassIdentifier: + activeLanguage: + localizationFile: {fileID: 0} +--- !u!1001 &100100000 +Prefab: + m_ObjectHideFlags: 1 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: [] + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 0} + m_RootGameObject: {fileID: 149266} + m_IsPrefabParent: 1 diff --git a/Assets/Fungus/Narrative/Resources/Localization.prefab.meta b/Assets/Fungus/Narrative/Resources/Localization.prefab.meta new file mode 100644 index 00000000..a3a58803 --- /dev/null +++ b/Assets/Fungus/Narrative/Resources/Localization.prefab.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ffbd0831d997545eab75c364da082c1b +timeCreated: 1428580452 +licenseType: Free +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Fungus/Narrative/Scripts/Character.cs b/Assets/Fungus/Narrative/Scripts/Character.cs index a4abf6af..82d9e319 100644 --- a/Assets/Fungus/Narrative/Scripts/Character.cs +++ b/Assets/Fungus/Narrative/Scripts/Character.cs @@ -1,12 +1,14 @@ using UnityEngine; +using UnityEngine.Serialization; using System.Collections; using System.Collections.Generic; +using System; namespace Fungus { [ExecuteInEditMode] - public class Character : MonoBehaviour + public class Character : MonoBehaviour { public string nameText; // We need a separate name as the object name is used for character variations (e.g. "Smurf Happy", "Smurf Sad") public Color nameColor = Color.white; @@ -16,8 +18,9 @@ namespace Fungus public FacingDirection portraitsFace; public PortraitState state; + [FormerlySerializedAs("notes")] [TextArea(5,10)] - public string notes; + public string description; static public List activeCharacters = new List(); diff --git a/Assets/Fungus/Narrative/Scripts/Commands/Menu.cs b/Assets/Fungus/Narrative/Scripts/Commands/Menu.cs index 763cd8d0..5ae26e31 100644 --- a/Assets/Fungus/Narrative/Scripts/Commands/Menu.cs +++ b/Assets/Fungus/Narrative/Scripts/Commands/Menu.cs @@ -11,7 +11,7 @@ namespace Fungus "Menu", "Displays a multiple choice menu")] [AddComponentMenu("")] - public class Menu : Command + public class Menu : Command { // Menu displays a menu button which will execute the target block when clicked @@ -22,6 +22,9 @@ namespace Fungus public string text = "Option Text"; + [Tooltip("Notes about the option text for other authors, localization, etc.")] + public string description = ""; + [FormerlySerializedAs("targetSequence")] public Block targetBlock; diff --git a/Assets/Fungus/Narrative/Scripts/Commands/Say.cs b/Assets/Fungus/Narrative/Scripts/Commands/Say.cs index 5af02575..0a75aced 100644 --- a/Assets/Fungus/Narrative/Scripts/Commands/Say.cs +++ b/Assets/Fungus/Narrative/Scripts/Commands/Say.cs @@ -9,10 +9,13 @@ namespace Fungus "Say", "Writes text in a dialog box.")] [AddComponentMenu("")] - public class Say : Command + public class Say : Command { [TextArea(5,10)] - public string storyText; + public string storyText = ""; + + [Tooltip("Notes about this story text for other authors, localization, etc.")] + public string description = ""; [Tooltip("Character that is speaking")] public Character character; diff --git a/Assets/Fungus/Narrative/Scripts/Commands/SetLanguage.cs b/Assets/Fungus/Narrative/Scripts/Commands/SetLanguage.cs new file mode 100644 index 00000000..57be8053 --- /dev/null +++ b/Assets/Fungus/Narrative/Scripts/Commands/SetLanguage.cs @@ -0,0 +1,35 @@ +using UnityEngine; +using System.Collections; + +namespace Fungus +{ + [CommandInfo("Narrative", + "Set Language", + "Set the active language for the scene. A Localization object with a localization file must be present in the scene.")] + [AddComponentMenu("")] + public class SetLanguage : Command + { + public string languageCode; + + public override void OnEnter() + { + Localization localization = GameObject.FindObjectOfType(); + if (localization != null) + { + localization.SetActiveLanguage(languageCode); + } + + Continue(); + } + + public override string GetSummary() + { + return languageCode; + } + + public override Color GetButtonColor() + { + return new Color32(184, 210, 235, 255); + } + } +} \ No newline at end of file diff --git a/Assets/Fungus/Flowchart/Scripts/StringsParser.cs.meta b/Assets/Fungus/Narrative/Scripts/Commands/SetLanguage.cs.meta similarity index 52% rename from Assets/Fungus/Flowchart/Scripts/StringsParser.cs.meta rename to Assets/Fungus/Narrative/Scripts/Commands/SetLanguage.cs.meta index 03e7f056..712a8ab6 100644 --- a/Assets/Fungus/Flowchart/Scripts/StringsParser.cs.meta +++ b/Assets/Fungus/Narrative/Scripts/Commands/SetLanguage.cs.meta @@ -1,8 +1,12 @@ fileFormatVersion: 2 -guid: 0f02aedc631824200a4abe95774a44f5 +guid: 3fc625e237d6048bf86f34835d8266d9 +timeCreated: 1428591017 +licenseType: Free MonoImporter: serializedVersion: 2 defaultReferences: [] executionOrder: 0 icon: {instanceID: 0} userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Fungus/Narrative/Scripts/Localization.cs b/Assets/Fungus/Narrative/Scripts/Localization.cs new file mode 100644 index 00000000..b629a4ff --- /dev/null +++ b/Assets/Fungus/Narrative/Scripts/Localization.cs @@ -0,0 +1,601 @@ +/** + * CSVParser by Ideafixxxer. http://www.codeproject.com/Tips/741941/CSV-Parser-Csharp + * This code is licensed under the CPOL open source license. + * http://www.codeproject.com/info/cpol10.aspx + */ + +using UnityEngine; +#if UNITY_EDITOR +using UnityEditor; +#endif +using System; +using System.Collections; +using System.Collections.Generic; +using System.IO; +using Ideafixxxer.CsvParser; + +namespace Fungus +{ + + /** + * Multi-language localization support. + */ + public class Localization : MonoBehaviour + { + /** + * Currently active language, usually defined by a two letter language code (e.g DE = German) + */ + public string activeLanguage = ""; + + protected static Dictionary localizedStrings = new Dictionary(); + + /** + * Temp storage for a single item of standard text and its localizations + */ + protected class TextItem + { + public string description = ""; + public string standardText = ""; + public Dictionary localizedStrings = new Dictionary(); + } + + /** + * CSV file containing localization data + */ + public TextAsset localizationFile; + + /** + * Stores any notification message from export / import methods. + */ + [NonSerialized] + public string notificationText = ""; + + public virtual void Start() + { + if (localizationFile != null && + localizationFile.text.Length > 0) + { + SetActiveLanguage(activeLanguage); + } + } + + /** + * Looks up the specified string in the localized strings table. + * For this to work, a localization file and active language must have been set previously. + * Return null if the string is not found. + */ + public static string GetLocalizedString(string stringId) + { + if (localizedStrings == null) + { + return null; + } + + if (localizedStrings.ContainsKey(stringId)) + { + return localizedStrings[stringId]; + } + + return null; + } + + /** + * Convert all text items and localized strings to an easy to edit CSV format. + */ + public virtual string GetCSVData() + { + // Collect all the text items present in the scene + Dictionary textItems = FindTextItems(); + + // Update text items with localization data from CSV file + if (localizationFile != null && + localizationFile.text.Length > 0) + { + AddCSVDataItems(textItems, localizationFile.text); + } + + // Build CSV header row and a list of the language codes currently in use + string csvHeader = "Key,Description,Standard"; + List languageCodes = new List(); + foreach (TextItem textItem in textItems.Values) + { + foreach (string languageCode in textItem.localizedStrings.Keys) + { + if (!languageCodes.Contains(languageCode)) + { + languageCodes.Add(languageCode); + csvHeader += "," + languageCode; + } + } + } + + // Build the CSV file using collected text items + int rowCount = 0; + string csvData = csvHeader + "\n"; + foreach (string stringId in textItems.Keys) + { + TextItem textItem = textItems[stringId]; + + string row = CSVSupport.Escape(stringId); + row += "," + CSVSupport.Escape(textItem.description); + row += "," + CSVSupport.Escape(textItem.standardText); + + foreach (string languageCode in languageCodes) + { + if (textItem.localizedStrings.ContainsKey(languageCode)) + { + row += "," + CSVSupport.Escape(textItem.localizedStrings[languageCode]); + } + else + { + row += ","; // Empty field + } + } + + csvData += row + "\n"; + rowCount++; + } + + notificationText = "Exported " + rowCount + " localization text items."; + + return csvData; + } + + /** + * Buidls a dictionary of localizable text items in the scene. + */ + protected Dictionary FindTextItems() + { + Dictionary textItems = new Dictionary(); + + // Export all character names + foreach (Character character in GameObject.FindObjectsOfType()) + { + // String id for character names is CHARACTER. + TextItem textItem = new TextItem(); + textItem.standardText = character.nameText; + textItem.description = character.description; + string stringId = "CHARACTER." + character.nameText; + textItems[stringId] = textItem; + } + + // Export all Say and Menu commands in the scene + // To make it easier to localize, we preserve the command order in each exported block. + Flowchart[] flowcharts = GameObject.FindObjectsOfType(); + foreach (Flowchart flowchart in flowcharts) + { + // Have to set a unique localization id to export strings + if (flowchart.localizationId.Length == 0) + { + continue; + } + + Block[] blocks = flowchart.GetComponentsInChildren(); + foreach (Block block in blocks) + { + foreach (Command command in block.commandList) + { + string stringId = ""; + string standardText = ""; + string description = ""; + + System.Type type = command.GetType(); + if (type == typeof(Say)) + { + // String id for Say commands is SAY... + Say sayCommand = command as Say; + standardText = sayCommand.storyText; + description = sayCommand.description; + stringId = "SAY." + flowchart.localizationId + "." + sayCommand.itemId + "."; + if (sayCommand.character != null) + { + stringId += sayCommand.character.nameText; + } + } + else if (type == typeof(Menu)) + { + // String id for Menu commands is MENU.. + Menu menuCommand = command as Menu; + standardText = menuCommand.text; + description = menuCommand.description; + stringId = "MENU." + flowchart.localizationId + "." + menuCommand.itemId; + } + else + { + continue; + } + + TextItem textItem = null; + if (textItems.ContainsKey(stringId)) + { + textItem = textItems[stringId]; + } + else + { + textItem = new TextItem(); + textItems[stringId] = textItem; + } + + // Update basic properties,leaving localised strings intact + textItem.standardText = standardText; + textItem.description = description; + } + } + } + + return textItems; + } + + /** + * Adds localized strings from CSV file data to a dictionary of text items in the scene. + */ + protected virtual void AddCSVDataItems(Dictionary textItems, string csvData) + { + CsvParser csvParser = new CsvParser(); + string[][] csvTable = csvParser.Parse(csvData); + + if (csvTable.Length <= 1) + { + // No data rows in file + return; + } + + // Parse header row + string[] columnNames = csvTable[0]; + + for (int i = 1; i < csvTable.Length; ++i) + { + string[] fields = csvTable[i]; + if (fields.Length < 3) + { + // No standard text or localized string fields present + continue; + } + + string stringId = fields[0]; + + if (!textItems.ContainsKey(stringId)) + { + if (stringId.StartsWith("CHARACTER.") || + stringId.StartsWith("SAY.") || + stringId.StartsWith("MENU.")) + { + // If it's a 'built-in' type this probably means that item has been deleted from its flowchart, + // so there's no need to add a text item for it. + continue; + } + + // Key not found. Assume it's a custom string that we want to retain, so add a text item for it. + TextItem newTextItem = new TextItem(); + newTextItem.description = CSVSupport.Unescape(fields[1]); + newTextItem.standardText = CSVSupport.Unescape(fields[2]); + textItems[stringId] = newTextItem; + } + + TextItem textItem = textItems[stringId]; + + for (int j = 3; j < fields.Length; ++j) + { + if (j >= columnNames.Length) + { + continue; + } + string languageCode = columnNames[j]; + string languageEntry = CSVSupport.Unescape(fields[j]); + + if (languageEntry.Length > 0) + { + textItem.localizedStrings[languageCode] = languageEntry; + } + } + } + } + + /** + * Scan a localization CSV file and copies the strings for the specified language code + * into the text properties of the appropriate scene objects. + */ + public virtual void SetActiveLanguage(string languageCode) + { + if (!Application.isPlaying) + { + // This function should only ever be called when the game is playing (not in editor). + return; + } + + if (localizationFile == null) + { + // No localization file set + return; + } + + localizedStrings.Clear(); + + CsvParser csvParser = new CsvParser(); + string[][] csvTable = csvParser.Parse(localizationFile.text); + + if (csvTable.Length <= 1) + { + // No data rows in file + return; + } + + // Parse header row + string[] columnNames = csvTable[0]; + + if (columnNames.Length < 3) + { + // No languages defined in CSV file + return; + } + + // First assume standard text column and then look for a matching language column + int languageIndex = 2; + for (int i = 3; i < columnNames.Length; ++i) + { + if (columnNames[i] == languageCode) + { + languageIndex = i; + break; + } + } + + if (languageIndex == 2) + { + // Using standard text column + // Add all strings to the localized strings dict, but don't replace standard text in the scene. + // This allows string substitution to work for both standard and localized text strings. + for (int i = 1; i < csvTable.Length; ++i) + { + string[] fields = csvTable[i]; + if (fields.Length < 3) + { + continue; + } + + localizedStrings[fields[0]] = fields[languageIndex]; + } + return; + } + + // Using a localized language text column + // 1. Add all localized text to the localized strings dict + // 2. Update all scene text properties with localized versions + + // Cache a lookup table of characters in the scene + Dictionary characterDict = new Dictionary(); + foreach (Character character in GameObject.FindObjectsOfType()) + { + characterDict[character.nameText] = character; + } + + // Cache a lookup table of flowcharts in the scene + Dictionary flowchartDict = new Dictionary(); + foreach (Flowchart flowChart in GameObject.FindObjectsOfType()) + { + flowchartDict[flowChart.localizationId] = flowChart; + } + + for (int i = 1; i < csvTable.Length; ++i) + { + string[] fields = csvTable[i]; + + if (fields.Length < languageIndex + 1) + { + continue; + } + + string stringId = fields[0]; + string languageEntry = CSVSupport.Unescape(fields[languageIndex]); + + if (languageEntry.Length > 0) + { + localizedStrings[stringId] = languageEntry; + PopulateTextProperty(stringId, languageEntry, flowchartDict, characterDict); + } + } + } + + /** + * Populates the text property of a single scene object with a new text value. + */ + public virtual bool PopulateTextProperty(string stringId, + string newText, + Dictionary flowchartDict, + Dictionary characterDict) + { + string[] idParts = stringId.Split('.'); + if (idParts.Length == 0) + { + return false; + } + + string stringType = idParts[0]; + if (stringType == "SAY") + { + if (idParts.Length != 4) + { + return false; + } + + string flowchartId = idParts[1]; + if (!flowchartDict.ContainsKey(flowchartId)) + { + return false; + } + Flowchart flowchart = flowchartDict[flowchartId]; + + int itemId = int.Parse(idParts[2]); + + if (flowchart != null) + { + foreach (Say say in flowchart.GetComponentsInChildren()) + { + if (say.itemId == itemId && + say.storyText != newText) + { + #if UNITY_EDITOR + Undo.RecordObject(say, "Set Text"); + #endif + + say.storyText = newText; + return true; + } + } + } + } + else if (stringType == "MENU") + { + if (idParts.Length != 3) + { + return false; + } + + string flowchartId = idParts[1]; + if (!flowchartDict.ContainsKey(flowchartId)) + { + return false; + } + Flowchart flowchart = flowchartDict[flowchartId]; + + int itemId = int.Parse(idParts[2]); + + if (flowchart != null) + { + foreach (Menu menu in flowchart.GetComponentsInChildren()) + { + if (menu.itemId == itemId && + menu.text != newText) + { + #if UNITY_EDITOR + Undo.RecordObject(menu, "Set Text"); + #endif + + menu.text = newText; + return true; + } + } + } + } + else if (stringType == "CHARACTER") + { + if (idParts.Length != 2) + { + return false; + } + + string characterName = idParts[1]; + if (!characterDict.ContainsKey(characterName)) + { + return false; + } + + Character character = characterDict[characterName]; + if (character != null && + character.nameText != newText) + { + #if UNITY_EDITOR + Undo.RecordObject(character, "Set Text"); + #endif + + character.nameText = newText; + return true; + } + } + + return false; + } + + /** + * Returns all standard text for SAY & MENU commands in the scene using an + * easy to edit custom text format. + */ + public virtual string GetStandardText() + { + // Collect all the text items present in the scene + Dictionary textItems = FindTextItems(); + + string textData = ""; + int rowCount = 0; + foreach (string stringId in textItems.Keys) + { + if (!stringId.StartsWith("SAY.") && !(stringId.StartsWith("MENU."))) + { + continue; + } + + TextItem languageItem = textItems[stringId]; + + textData += "#" + stringId + "\n"; + textData += languageItem.standardText.Trim() + "\n\n"; + rowCount++; + } + + notificationText = "Exported " + rowCount + " standard text items."; + + return textData; + } + + /** + * Sets standard text on scene objects by parsing a text data file. + */ + public virtual void SetStandardText(string textData) + { + // Cache a lookup table of characters in the scene + Dictionary characterDict = new Dictionary(); + foreach (Character character in GameObject.FindObjectsOfType()) + { + characterDict[character.nameText] = character; + } + + // Cache a lookup table of flowcharts in the scene + Dictionary flowchartDict = new Dictionary(); + foreach (Flowchart flowChart in GameObject.FindObjectsOfType()) + { + flowchartDict[flowChart.localizationId] = flowChart; + } + + string[] lines = textData.Split('\n'); + + int updatedCount = 0; + + string stringId = ""; + string buffer = ""; + foreach (string line in lines) + { + // Check for string id line + if (line.StartsWith("#")) + { + if (stringId.Length > 0) + { + // Write buffered text to the appropriate text property + if (PopulateTextProperty(stringId, buffer.Trim(), flowchartDict, characterDict)) + { + updatedCount++; + } + } + + // Set the string id for the follow text lines + stringId = line.Substring(1, line.Length - 1); + buffer = ""; + } + else + { + buffer += line; + } + } + + // Handle last buffered entry + if (stringId.Length > 0) + { + if (PopulateTextProperty(stringId, buffer.Trim(), flowchartDict, characterDict)) + { + updatedCount++; + } + } + + notificationText = "Updated " + updatedCount + " standard text items."; + } + } + +} \ No newline at end of file diff --git a/Assets/Fungus/Narrative/Scripts/Localization.cs.meta b/Assets/Fungus/Narrative/Scripts/Localization.cs.meta new file mode 100644 index 00000000..f3417a1f --- /dev/null +++ b/Assets/Fungus/Narrative/Scripts/Localization.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: e5724422a635e425bae0af9ffe2615d6 +timeCreated: 1427886378 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Fungus/Thirdparty/CSVParser.meta b/Assets/Fungus/Thirdparty/CSVParser.meta new file mode 100644 index 00000000..355e936b --- /dev/null +++ b/Assets/Fungus/Thirdparty/CSVParser.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 3469ab31c1c9d4c2da1ae42edc001ded +folderAsset: yes +timeCreated: 1428523768 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Fungus/Thirdparty/CSVParser/CSVSupport.cs b/Assets/Fungus/Thirdparty/CSVParser/CSVSupport.cs new file mode 100644 index 00000000..ef964fde --- /dev/null +++ b/Assets/Fungus/Thirdparty/CSVParser/CSVSupport.cs @@ -0,0 +1,48 @@ +using UnityEngine; +using System.Collections; +using System.Text.RegularExpressions; +using System.Linq; +using System; + +namespace Fungus +{ + + // Some CSV utilities cobbled together from stack overflow answers + // CSV escape & unescape from http://stackoverflow.com/questions/769621/dealing-with-commas-in-a-csv-file + // http://answers.unity3d.com/questions/144200/are-there-any-csv-reader-for-unity3d-without-needi.html + public static class CSVSupport + { + public static string Escape( string s ) + { + s = s.Replace("\n", "\\n"); + + if ( s.Contains( QUOTE ) ) + s = s.Replace( QUOTE, ESCAPED_QUOTE ); + + if ( s.IndexOfAny( CHARACTERS_THAT_MUST_BE_QUOTED ) > -1 ) + s = QUOTE + s + QUOTE; + + return s; + } + + public static string Unescape( string s ) + { + s = s.Replace("\\n", "\n"); + + if ( s.StartsWith( QUOTE ) && s.EndsWith( QUOTE ) ) + { + s = s.Substring( 1, s.Length - 2 ); + + if ( s.Contains( ESCAPED_QUOTE ) ) + s = s.Replace( ESCAPED_QUOTE, QUOTE ); + } + + return s; + } + + private const string QUOTE = "\""; + private const string ESCAPED_QUOTE = "\"\""; + private static char[] CHARACTERS_THAT_MUST_BE_QUOTED = { ',', '"', '\n' }; + } + +} diff --git a/Assets/Fungus/Thirdparty/CSVParser/CSVSupport.cs.meta b/Assets/Fungus/Thirdparty/CSVParser/CSVSupport.cs.meta new file mode 100644 index 00000000..2ddf37bd --- /dev/null +++ b/Assets/Fungus/Thirdparty/CSVParser/CSVSupport.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 4468f4dcfdfbf46b088949ea57ed6135 +timeCreated: 1427897861 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Fungus/Thirdparty/CSVParser/CsvParser.cs b/Assets/Fungus/Thirdparty/CSVParser/CsvParser.cs new file mode 100755 index 00000000..7d702aad --- /dev/null +++ b/Assets/Fungus/Thirdparty/CSVParser/CsvParser.cs @@ -0,0 +1,218 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text; + +namespace Ideafixxxer.CsvParser +{ + public class CsvParser + { + private const char CommaCharacter = ','; + private const char QuoteCharacter = '"'; + + #region Nested types + + private abstract class ParserState + { + public static readonly LineStartState LineStartState = new LineStartState(); + public static readonly ValueStartState ValueStartState = new ValueStartState(); + public static readonly ValueState ValueState = new ValueState(); + public static readonly QuotedValueState QuotedValueState = new QuotedValueState(); + public static readonly QuoteState QuoteState = new QuoteState(); + + public abstract ParserState AnyChar(char ch, ParserContext context); + public abstract ParserState Comma(ParserContext context); + public abstract ParserState Quote(ParserContext context); + public abstract ParserState EndOfLine(ParserContext context); + } + + private class LineStartState : ParserState + { + public override ParserState AnyChar(char ch, ParserContext context) + { + context.AddChar(ch); + return ValueState; + } + + public override ParserState Comma(ParserContext context) + { + context.AddValue(); + return ValueStartState; + } + + public override ParserState Quote(ParserContext context) + { + return QuotedValueState; + } + + public override ParserState EndOfLine(ParserContext context) + { + context.AddLine(); + return LineStartState; + } + } + + private class ValueStartState : LineStartState + { + public override ParserState EndOfLine(ParserContext context) + { + context.AddValue(); + context.AddLine(); + return LineStartState; + } + } + + private class ValueState : ParserState + { + public override ParserState AnyChar(char ch, ParserContext context) + { + context.AddChar(ch); + return ValueState; + } + + public override ParserState Comma(ParserContext context) + { + context.AddValue(); + return ValueStartState; + } + + public override ParserState Quote(ParserContext context) + { + context.AddChar(QuoteCharacter); + return ValueState; + } + + public override ParserState EndOfLine(ParserContext context) + { + context.AddValue(); + context.AddLine(); + return LineStartState; + } + } + + private class QuotedValueState : ParserState + { + public override ParserState AnyChar(char ch, ParserContext context) + { + context.AddChar(ch); + return QuotedValueState; + } + + public override ParserState Comma(ParserContext context) + { + context.AddChar(CommaCharacter); + return QuotedValueState; + } + + public override ParserState Quote(ParserContext context) + { + return QuoteState; + } + + public override ParserState EndOfLine(ParserContext context) + { + context.AddChar('\r'); + context.AddChar('\n'); + return QuotedValueState; + } + } + + private class QuoteState : ParserState + { + public override ParserState AnyChar(char ch, ParserContext context) + { + //undefined, ignore " + context.AddChar(ch); + return QuotedValueState; + } + + public override ParserState Comma(ParserContext context) + { + context.AddValue(); + return ValueStartState; + } + + public override ParserState Quote(ParserContext context) + { + context.AddChar(QuoteCharacter); + return QuotedValueState; + } + + public override ParserState EndOfLine(ParserContext context) + { + context.AddValue(); + context.AddLine(); + return LineStartState; + } + } + + private class ParserContext + { + private readonly StringBuilder _currentValue = new StringBuilder(); + private readonly List _lines = new List(); + private readonly List _currentLine = new List(); + + public void AddChar(char ch) + { + _currentValue.Append(ch); + } + + public void AddValue() + { + _currentLine.Add(_currentValue.ToString()); + _currentValue.Remove(0, _currentValue.Length); + } + + public void AddLine() + { + _lines.Add(_currentLine.ToArray()); + _currentLine.Clear(); + } + + public List GetAllLines() + { + if (_currentValue.Length > 0) + { + AddValue(); + } + if (_currentLine.Count > 0) + { + AddLine(); + } + return _lines; + } + } + + #endregion + + public string[][] Parse(string csvData) + { + var context = new ParserContext(); + + string[] lines = csvData.Split('\n'); + + ParserState currentState = ParserState.LineStartState; + foreach (string next in lines) + { + foreach (char ch in next) + { + switch (ch) + { + case CommaCharacter: + currentState = currentState.Comma(context); + break; + case QuoteCharacter: + currentState = currentState.Quote(context); + break; + default: + currentState = currentState.AnyChar(ch, context); + break; + } + } + currentState = currentState.EndOfLine(context); + } + List allLines = context.GetAllLines(); + return allLines.ToArray(); + } + } +} \ No newline at end of file diff --git a/Assets/Fungus/Thirdparty/CSVParser/CsvParser.cs.meta b/Assets/Fungus/Thirdparty/CSVParser/CsvParser.cs.meta new file mode 100644 index 00000000..8c45d08a --- /dev/null +++ b/Assets/Fungus/Thirdparty/CSVParser/CsvParser.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 803c0d4d8bc9447d1b20e1f4fb86120f +timeCreated: 1428171346 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/FungusExamples/Sherlock/TheExperiment.unity b/Assets/FungusExamples/Sherlock/TheExperiment.unity index 340ea564..2805b6e6 100644 --- a/Assets/FungusExamples/Sherlock/TheExperiment.unity +++ b/Assets/FungusExamples/Sherlock/TheExperiment.unity @@ -562,7 +562,7 @@ MonoBehaviour: - {fileID: 21300000, guid: 58f5b79d262f6814bb4ebb44e29efe90, type: 3} - {fileID: 21300000, guid: 84cdbfde1b7d4c24ab7071894480d5db, type: 3} portraitsFace: 1 - notes: + description: --- !u!1 &170680003 GameObject: m_ObjectHideFlags: 0 @@ -3181,10 +3181,10 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 050fb9e6e72f442b3b883da8a965bdeb, type: 3} m_Name: m_EditorClassIdentifier: - commandId: 73 + itemId: 73 errorMessage: indentLevel: 0 - targetSequence: {fileID: 1390555371} + targetBlock: {fileID: 1390555371} --- !u!114 &1390555292 MonoBehaviour: m_ObjectHideFlags: 2 @@ -3196,11 +3196,12 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 841589fc622bc494aa5405f416fa1301, type: 3} m_Name: m_EditorClassIdentifier: - commandId: 77 + itemId: 77 errorMessage: indentLevel: 0 text: Don't drink the coffee - targetSequence: {fileID: 1390555302} + description: + targetBlock: {fileID: 1390555302} hideIfVisited: 0 setMenuDialog: {fileID: 0} --- !u!114 &1390555293 @@ -3215,7 +3216,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: d2f6487d21a03404cb21b245f0242e79, type: 3} m_Name: m_EditorClassIdentifier: - parentSequence: {fileID: 0} + parentBlock: {fileID: 0} --- !u!114 &1390555294 MonoBehaviour: m_ObjectHideFlags: 2 @@ -3227,11 +3228,12 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 841589fc622bc494aa5405f416fa1301, type: 3} m_Name: m_EditorClassIdentifier: - commandId: 76 + itemId: 76 errorMessage: indentLevel: 0 text: Drink the coffee - targetSequence: {fileID: 1390555312} + description: + targetBlock: {fileID: 1390555312} hideIfVisited: 0 setMenuDialog: {fileID: 0} --- !u!114 &1390555295 @@ -3249,7 +3251,7 @@ MonoBehaviour: scrollPos: {x: 2878.33252, y: 1016.83801} variablesScrollPos: {x: 0, y: 0} variablesExpanded: 1 - sequenceViewHeight: 411 + blockViewHeight: 400 zoom: 1 scrollViewRect: serializedVersion: 2 @@ -3257,7 +3259,7 @@ MonoBehaviour: y: -1729.35046 width: 5969.4458 height: 2818.85034 - selectedSequence: {fileID: 1390555371} + selectedBlock: {fileID: 1390555371} selectedCommands: - {fileID: 1390555358} variables: @@ -3267,7 +3269,8 @@ MonoBehaviour: colorCommands: 1 hideComponents: 1 saveSelection: 1 - nextCommandId: 93 + localizationId: + nextItemId: 102 --- !u!4 &1390555296 Transform: m_ObjectHideFlags: 0 @@ -3292,10 +3295,11 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: ec422cd568a9c4a31ad7c36d0572b9da, type: 3} m_Name: m_EditorClassIdentifier: - commandId: 30 + itemId: 30 errorMessage: indentLevel: 0 storyText: ' Here, I need you to drink this.' + description: character: {fileID: 137130844} portrait: {fileID: 0} voiceOverClip: {fileID: 0} @@ -3324,7 +3328,8 @@ MonoBehaviour: y: -1082.83801 width: 120 height: 40 - sequenceName: START + itemId: 96 + blockName: START description: runSlowInEditor: 0 eventHandler: {fileID: 0} @@ -3367,7 +3372,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 3ac5ce55bc698fa4290939ef6e426501, type: 3} m_Name: m_EditorClassIdentifier: - commandId: 64 + itemId: 64 errorMessage: indentLevel: 0 stage: {fileID: 0} @@ -3397,10 +3402,11 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: ec422cd568a9c4a31ad7c36d0572b9da, type: 3} m_Name: m_EditorClassIdentifier: - commandId: 75 + itemId: 75 errorMessage: indentLevel: 0 storyText: '{t}(Do I really want to do this?){/t}' + description: character: {fileID: 1880195408} portrait: {fileID: 0} voiceOverClip: {fileID: 0} @@ -3422,11 +3428,12 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 841589fc622bc494aa5405f416fa1301, type: 3} m_Name: m_EditorClassIdentifier: - commandId: 79 + itemId: 79 errorMessage: indentLevel: 0 text: Leave - targetSequence: {fileID: 1390555362} + description: + targetBlock: {fileID: 1390555362} hideIfVisited: 0 setMenuDialog: {fileID: 0} --- !u!114 &1390555302 @@ -3447,7 +3454,8 @@ MonoBehaviour: y: -947.838013 width: 120 height: 40 - sequenceName: Don't Drink + itemId: 95 + blockName: Don't Drink description: runSlowInEditor: 0 eventHandler: {fileID: 0} @@ -3473,10 +3481,10 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 050fb9e6e72f442b3b883da8a965bdeb, type: 3} m_Name: m_EditorClassIdentifier: - commandId: 17 + itemId: 17 errorMessage: indentLevel: 0 - targetSequence: {fileID: 1390555304} + targetBlock: {fileID: 1390555304} --- !u!114 &1390555304 MonoBehaviour: m_ObjectHideFlags: 2 @@ -3495,7 +3503,8 @@ MonoBehaviour: y: -879.838013 width: 120 height: 40 - sequenceName: What now? + itemId: 98 + blockName: What now? description: runSlowInEditor: 0 eventHandler: {fileID: 0} @@ -3516,11 +3525,12 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 841589fc622bc494aa5405f416fa1301, type: 3} m_Name: m_EditorClassIdentifier: - commandId: 78 + itemId: 78 errorMessage: indentLevel: 0 text: Talk to Sherlock. - targetSequence: {fileID: 1390555308} + description: + targetBlock: {fileID: 1390555308} hideIfVisited: 0 setMenuDialog: {fileID: 0} --- !u!114 &1390555306 @@ -3534,10 +3544,11 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: ec422cd568a9c4a31ad7c36d0572b9da, type: 3} m_Name: m_EditorClassIdentifier: - commandId: 80 + itemId: 80 errorMessage: indentLevel: 0 storyText: (What should I do now?) + description: character: {fileID: 1880195408} portrait: {fileID: 0} voiceOverClip: {fileID: 0} @@ -3565,7 +3576,8 @@ MonoBehaviour: y: -1152.83801 width: 120 height: 40 - sequenceName: Splash + itemId: 101 + blockName: Splash description: runSlowInEditor: 0 eventHandler: {fileID: 1390555325} @@ -3599,7 +3611,8 @@ MonoBehaviour: y: -800.838013 width: 135 height: 40 - sequenceName: Talk to Sherlock + itemId: 97 + blockName: Talk to Sherlock description: runSlowInEditor: 0 eventHandler: {fileID: 0} @@ -3620,7 +3633,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: d1dc785fd3508440db335f3b5654c96c, type: 3} m_Name: m_EditorClassIdentifier: - commandId: 15 + itemId: 15 errorMessage: indentLevel: 0 chooseText: '{t}Changed your mind?{/t}' @@ -3641,7 +3654,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 9a61ea20fbb744ca2a363c33ad65cd89, type: 3} m_Name: m_EditorClassIdentifier: - commandId: 16 + itemId: 16 errorMessage: indentLevel: 0 variable: {fileID: 0} @@ -3659,7 +3672,7 @@ MonoBehaviour: stringRef: {fileID: 0} stringVal: optionText: No - targetSequence: {fileID: 1390555304} + targetBlock: {fileID: 1390555304} hideOnSelected: 0 --- !u!114 &1390555311 MonoBehaviour: @@ -3673,7 +3686,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 9a61ea20fbb744ca2a363c33ad65cd89, type: 3} m_Name: m_EditorClassIdentifier: - commandId: 14 + itemId: 14 errorMessage: indentLevel: 0 variable: {fileID: 0} @@ -3691,7 +3704,7 @@ MonoBehaviour: stringRef: {fileID: 0} stringVal: optionText: Yes - targetSequence: {fileID: 1390555312} + targetBlock: {fileID: 1390555312} hideOnSelected: 0 --- !u!114 &1390555312 MonoBehaviour: @@ -3711,7 +3724,8 @@ MonoBehaviour: y: -951.838013 width: 120 height: 40 - sequenceName: Drink + itemId: 94 + blockName: Drink description: runSlowInEditor: 0 eventHandler: {fileID: 0} @@ -3750,10 +3764,11 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: ec422cd568a9c4a31ad7c36d0572b9da, type: 3} m_Name: m_EditorClassIdentifier: - commandId: 23 + itemId: 23 errorMessage: indentLevel: 0 storyText: "Hmm... I'll have to revise my {clue}hypothesis\u2026" + description: character: {fileID: 137130844} portrait: {fileID: 0} voiceOverClip: {fileID: 0} @@ -3776,10 +3791,11 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: ec422cd568a9c4a31ad7c36d0572b9da, type: 3} m_Name: m_EditorClassIdentifier: - commandId: 22 + itemId: 22 errorMessage: indentLevel: 0 storyText: Wait, {question}{flash=0.1}what? + description: character: {fileID: 1880195408} portrait: {fileID: 0} voiceOverClip: {fileID: 0} @@ -3802,10 +3818,11 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: ec422cd568a9c4a31ad7c36d0572b9da, type: 3} m_Name: m_EditorClassIdentifier: - commandId: 21 + itemId: 21 errorMessage: indentLevel: 0 storyText: No, that's not right. + description: character: {fileID: 137130844} portrait: {fileID: 0} voiceOverClip: {fileID: 0} @@ -3828,10 +3845,11 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: ec422cd568a9c4a31ad7c36d0572b9da, type: 3} m_Name: m_EditorClassIdentifier: - commandId: 20 + itemId: 20 errorMessage: indentLevel: 0 storyText: '{worried}Like an idiot who should stop encouraging you.' + description: character: {fileID: 1880195408} portrait: {fileID: 0} voiceOverClip: {fileID: 0} @@ -3854,10 +3872,11 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: ec422cd568a9c4a31ad7c36d0572b9da, type: 3} m_Name: m_EditorClassIdentifier: - commandId: 1 + itemId: 1 errorMessage: indentLevel: 0 storyText: All right. It's been 30 minutes. How do you feel? + description: character: {fileID: 137130844} portrait: {fileID: 0} voiceOverClip: {fileID: 0} @@ -3880,7 +3899,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 207aecf668a0345388087ccf522f9957, type: 3} m_Name: m_EditorClassIdentifier: - commandId: 19 + itemId: 19 errorMessage: indentLevel: 0 duration: 1 @@ -3900,7 +3919,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 207aecf668a0345388087ccf522f9957, type: 3} m_Name: m_EditorClassIdentifier: - commandId: 18 + itemId: 18 errorMessage: indentLevel: 0 duration: 1 @@ -3920,10 +3939,11 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: ec422cd568a9c4a31ad7c36d0572b9da, type: 3} m_Name: m_EditorClassIdentifier: - commandId: 0 + itemId: 0 errorMessage: indentLevel: 0 storyText: '{answer}Excellent.' + description: character: {fileID: 137130844} portrait: {fileID: 0} voiceOverClip: {fileID: 0} @@ -3946,10 +3966,11 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: ec422cd568a9c4a31ad7c36d0572b9da, type: 3} m_Name: m_EditorClassIdentifier: - commandId: 5 + itemId: 5 errorMessage: indentLevel: 0 storyText: Suit yourself. + description: character: {fileID: 137130844} portrait: {fileID: 0} voiceOverClip: {fileID: 0} @@ -3972,10 +3993,11 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: ec422cd568a9c4a31ad7c36d0572b9da, type: 3} m_Name: m_EditorClassIdentifier: - commandId: 4 + itemId: 4 errorMessage: indentLevel: 0 storyText: '{shout}Still not ok{wp},{/wp} Sherlock!' + description: character: {fileID: 1880195408} portrait: {fileID: 0} voiceOverClip: {fileID: 0} @@ -3998,10 +4020,11 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: ec422cd568a9c4a31ad7c36d0572b9da, type: 3} m_Name: m_EditorClassIdentifier: - commandId: 3 + itemId: 3 errorMessage: indentLevel: 0 storyText: The hallucinogen was in the {answer}gas, not the coffee. + description: character: {fileID: 137130844} portrait: {fileID: 0} voiceOverClip: {fileID: 0} @@ -4024,11 +4047,12 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: ec422cd568a9c4a31ad7c36d0572b9da, type: 3} m_Name: m_EditorClassIdentifier: - commandId: 2 + itemId: 2 errorMessage: indentLevel: 0 storyText: No thanks. The last time I drank your coffee, I spent the day running from an imaginary dog. + description: character: {fileID: 1880195408} portrait: {fileID: 0} voiceOverClip: {fileID: 0} @@ -4050,7 +4074,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: d2f6487d21a03404cb21b245f0242e79, type: 3} m_Name: m_EditorClassIdentifier: - parentSequence: {fileID: 1390555307} + parentBlock: {fileID: 1390555307} --- !u!114 &1390555326 MonoBehaviour: m_ObjectHideFlags: 2 @@ -4062,10 +4086,11 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: ec422cd568a9c4a31ad7c36d0572b9da, type: 3} m_Name: m_EditorClassIdentifier: - commandId: 74 + itemId: 74 errorMessage: indentLevel: 0 storyText: Of course. + description: character: {fileID: 1880195408} portrait: {fileID: 0} voiceOverClip: {fileID: 0} @@ -4088,10 +4113,11 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: ec422cd568a9c4a31ad7c36d0572b9da, type: 3} m_Name: m_EditorClassIdentifier: - commandId: 12 + itemId: 12 errorMessage: indentLevel: 0 storyText: Why don't you test it yourself? + description: character: {fileID: 1880195408} portrait: {fileID: 0} voiceOverClip: {fileID: 0} @@ -4114,10 +4140,11 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: ec422cd568a9c4a31ad7c36d0572b9da, type: 3} m_Name: m_EditorClassIdentifier: - commandId: 11 + itemId: 11 errorMessage: indentLevel: 0 storyText: '{clue}Your words inspire such confidence.' + description: character: {fileID: 1880195408} portrait: {fileID: 0} voiceOverClip: {fileID: 0} @@ -4140,10 +4167,11 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: ec422cd568a9c4a31ad7c36d0572b9da, type: 3} m_Name: m_EditorClassIdentifier: - commandId: 10 + itemId: 10 errorMessage: indentLevel: 0 storyText: It's for an experiment. + description: character: {fileID: 137130844} portrait: {fileID: 0} voiceOverClip: {fileID: 0} @@ -4166,10 +4194,11 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: ec422cd568a9c4a31ad7c36d0572b9da, type: 3} m_Name: m_EditorClassIdentifier: - commandId: 9 + itemId: 9 errorMessage: indentLevel: 0 storyText: '{worried}... Why?' + description: character: {fileID: 1880195408} portrait: {fileID: 0} voiceOverClip: {fileID: 0} @@ -4192,10 +4221,11 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: ec422cd568a9c4a31ad7c36d0572b9da, type: 3} m_Name: m_EditorClassIdentifier: - commandId: 8 + itemId: 8 errorMessage: indentLevel: 0 storyText: '{answer}{flash=0.1}Well you arrived at just the right time.' + description: character: {fileID: 137130844} portrait: {fileID: 0} voiceOverClip: {fileID: 0} @@ -4218,10 +4248,11 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: ec422cd568a9c4a31ad7c36d0572b9da, type: 3} m_Name: m_EditorClassIdentifier: - commandId: 7 + itemId: 7 errorMessage: indentLevel: 0 storyText: '{confused}I do live here, you know.' + description: character: {fileID: 1880195408} portrait: {fileID: 0} voiceOverClip: {fileID: 0} @@ -4244,11 +4275,12 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: ec422cd568a9c4a31ad7c36d0572b9da, type: 3} m_Name: m_EditorClassIdentifier: - commandId: 13 + itemId: 13 errorMessage: indentLevel: 0 storyText: '{question}I can''t observe the effects of the experiment if I''m the one participating.' + description: character: {fileID: 137130844} portrait: {fileID: 0} voiceOverClip: {fileID: 0} @@ -4271,10 +4303,11 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: ec422cd568a9c4a31ad7c36d0572b9da, type: 3} m_Name: m_EditorClassIdentifier: - commandId: 6 + itemId: 6 errorMessage: indentLevel: 0 storyText: THE EXPERIMENT + description: character: {fileID: 0} portrait: {fileID: 0} voiceOverClip: {fileID: 0} @@ -4296,10 +4329,10 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 050fb9e6e72f442b3b883da8a965bdeb, type: 3} m_Name: m_EditorClassIdentifier: - commandId: 86 + itemId: 86 errorMessage: indentLevel: 0 - targetSequence: {fileID: 1390555298} + targetBlock: {fileID: 1390555298} --- !u!114 &1390555336 MonoBehaviour: m_ObjectHideFlags: 2 @@ -4312,10 +4345,10 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 050fb9e6e72f442b3b883da8a965bdeb, type: 3} m_Name: m_EditorClassIdentifier: - commandId: 24 + itemId: 24 errorMessage: indentLevel: 0 - targetSequence: {fileID: 1390555440} + targetBlock: {fileID: 1390555440} --- !u!114 &1390555337 MonoBehaviour: m_ObjectHideFlags: 2 @@ -4328,7 +4361,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 3ac5ce55bc698fa4290939ef6e426501, type: 3} m_Name: m_EditorClassIdentifier: - commandId: 29 + itemId: 29 errorMessage: indentLevel: 0 stage: {fileID: 0} @@ -4359,7 +4392,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 3ac5ce55bc698fa4290939ef6e426501, type: 3} m_Name: m_EditorClassIdentifier: - commandId: 28 + itemId: 28 errorMessage: indentLevel: 0 stage: {fileID: 0} @@ -4390,7 +4423,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: accc065c3e9a6457496f075b1bd49adc, type: 3} m_Name: m_EditorClassIdentifier: - commandId: 33 + itemId: 33 errorMessage: indentLevel: 0 spriteRenderer: {fileID: 1789234734} @@ -4409,7 +4442,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: accc065c3e9a6457496f075b1bd49adc, type: 3} m_Name: m_EditorClassIdentifier: - commandId: 32 + itemId: 32 errorMessage: indentLevel: 0 spriteRenderer: {fileID: 1789234734} @@ -4428,7 +4461,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 3ac5ce55bc698fa4290939ef6e426501, type: 3} m_Name: m_EditorClassIdentifier: - commandId: 31 + itemId: 31 errorMessage: indentLevel: 0 stage: {fileID: 0} @@ -4459,7 +4492,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 3ac5ce55bc698fa4290939ef6e426501, type: 3} m_Name: m_EditorClassIdentifier: - commandId: 27 + itemId: 27 errorMessage: indentLevel: 0 stage: {fileID: 0} @@ -4490,7 +4523,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 3ac5ce55bc698fa4290939ef6e426501, type: 3} m_Name: m_EditorClassIdentifier: - commandId: 26 + itemId: 26 errorMessage: indentLevel: 0 stage: {fileID: 0} @@ -4520,7 +4553,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: bc30c92f7ffe3d746ac76cd528d616e5, type: 3} m_Name: m_EditorClassIdentifier: - commandId: 72 + itemId: 72 errorMessage: indentLevel: 0 control: 2 @@ -4541,7 +4574,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 3ac5ce55bc698fa4290939ef6e426501, type: 3} m_Name: m_EditorClassIdentifier: - commandId: 25 + itemId: 25 errorMessage: indentLevel: 0 stage: {fileID: 0} @@ -4572,7 +4605,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 3ac5ce55bc698fa4290939ef6e426501, type: 3} m_Name: m_EditorClassIdentifier: - commandId: 40 + itemId: 40 errorMessage: indentLevel: 0 stage: {fileID: 0} @@ -4603,7 +4636,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 3ac5ce55bc698fa4290939ef6e426501, type: 3} m_Name: m_EditorClassIdentifier: - commandId: 39 + itemId: 39 errorMessage: indentLevel: 0 stage: {fileID: 0} @@ -4634,7 +4667,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 3ac5ce55bc698fa4290939ef6e426501, type: 3} m_Name: m_EditorClassIdentifier: - commandId: 37 + itemId: 37 errorMessage: indentLevel: 0 stage: {fileID: 0} @@ -4665,7 +4698,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 3ac5ce55bc698fa4290939ef6e426501, type: 3} m_Name: m_EditorClassIdentifier: - commandId: 38 + itemId: 38 errorMessage: indentLevel: 0 stage: {fileID: 0} @@ -4696,10 +4729,11 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: ec422cd568a9c4a31ad7c36d0572b9da, type: 3} m_Name: m_EditorClassIdentifier: - commandId: 35 + itemId: 35 errorMessage: indentLevel: 0 storyText: ' Don''t worry. It won''t kill you.' + description: character: {fileID: 137130844} portrait: {fileID: 0} voiceOverClip: {fileID: 0} @@ -4722,7 +4756,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 3ac5ce55bc698fa4290939ef6e426501, type: 3} m_Name: m_EditorClassIdentifier: - commandId: 36 + itemId: 36 errorMessage: indentLevel: 0 stage: {fileID: 0} @@ -4753,7 +4787,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 3ac5ce55bc698fa4290939ef6e426501, type: 3} m_Name: m_EditorClassIdentifier: - commandId: 34 + itemId: 34 errorMessage: indentLevel: 0 stage: {fileID: 0} @@ -4783,7 +4817,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 3ac5ce55bc698fa4290939ef6e426501, type: 3} m_Name: m_EditorClassIdentifier: - commandId: 63 + itemId: 63 errorMessage: indentLevel: 0 stage: {fileID: 0} @@ -4813,7 +4847,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 3ac5ce55bc698fa4290939ef6e426501, type: 3} m_Name: m_EditorClassIdentifier: - commandId: 65 + itemId: 65 errorMessage: indentLevel: 0 stage: {fileID: 0} @@ -4843,10 +4877,11 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: ec422cd568a9c4a31ad7c36d0572b9da, type: 3} m_Name: m_EditorClassIdentifier: - commandId: 66 + itemId: 66 errorMessage: indentLevel: 0 storyText: Right.... Good luck with that. + description: character: {fileID: 1880195408} portrait: {fileID: 0} voiceOverClip: {fileID: 0} @@ -4868,7 +4903,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 3ac5ce55bc698fa4290939ef6e426501, type: 3} m_Name: m_EditorClassIdentifier: - commandId: 67 + itemId: 67 errorMessage: indentLevel: 0 stage: {fileID: 0} @@ -4898,7 +4933,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: accc065c3e9a6457496f075b1bd49adc, type: 3} m_Name: m_EditorClassIdentifier: - commandId: 85 + itemId: 85 errorMessage: indentLevel: 0 spriteRenderer: {fileID: 1612042692} @@ -4916,7 +4951,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: fb77d0ce495044f6e9feb91b31798e8c, type: 3} m_Name: m_EditorClassIdentifier: - commandId: 92 + itemId: 92 errorMessage: indentLevel: 0 variable: {fileID: 1390555396} @@ -4944,7 +4979,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: accc065c3e9a6457496f075b1bd49adc, type: 3} m_Name: m_EditorClassIdentifier: - commandId: 84 + itemId: 84 errorMessage: indentLevel: 0 spriteRenderer: {fileID: 884427801} @@ -4962,7 +4997,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 3315ad2ebb85443909a1203d56d9344e, type: 3} m_Name: m_EditorClassIdentifier: - commandId: 83 + itemId: 83 errorMessage: indentLevel: 0 duration: 3 @@ -4977,7 +5012,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: accc065c3e9a6457496f075b1bd49adc, type: 3} m_Name: m_EditorClassIdentifier: - commandId: 82 + itemId: 82 errorMessage: indentLevel: 0 spriteRenderer: {fileID: 1612042692} @@ -5001,7 +5036,8 @@ MonoBehaviour: y: -878.838013 width: 152 height: 40 - sequenceName: 'END: NO COURAGE' + itemId: 99 + blockName: 'END: NO COURAGE' description: runSlowInEditor: 0 eventHandler: {fileID: 0} @@ -5023,7 +5059,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 207aecf668a0345388087ccf522f9957, type: 3} m_Name: m_EditorClassIdentifier: - commandId: 57 + itemId: 57 errorMessage: indentLevel: 0 duration: 1 @@ -5042,7 +5078,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 3ac5ce55bc698fa4290939ef6e426501, type: 3} m_Name: m_EditorClassIdentifier: - commandId: 56 + itemId: 56 errorMessage: indentLevel: 0 stage: {fileID: 0} @@ -5072,7 +5108,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 3ac5ce55bc698fa4290939ef6e426501, type: 3} m_Name: m_EditorClassIdentifier: - commandId: 55 + itemId: 55 errorMessage: indentLevel: 0 stage: {fileID: 0} @@ -5102,10 +5138,11 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: ec422cd568a9c4a31ad7c36d0572b9da, type: 3} m_Name: m_EditorClassIdentifier: - commandId: 58 + itemId: 58 errorMessage: indentLevel: 0 storyText: Ah John, {pleased}there you are. + description: character: {fileID: 137130844} portrait: {fileID: 0} voiceOverClip: {fileID: 0} @@ -5127,7 +5164,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 207aecf668a0345388087ccf522f9957, type: 3} m_Name: m_EditorClassIdentifier: - commandId: 71 + itemId: 71 errorMessage: indentLevel: 0 duration: 1 @@ -5146,7 +5183,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: bc30c92f7ffe3d746ac76cd528d616e5, type: 3} m_Name: m_EditorClassIdentifier: - commandId: 68 + itemId: 68 errorMessage: indentLevel: 0 control: 2 @@ -5166,10 +5203,11 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: ec422cd568a9c4a31ad7c36d0572b9da, type: 3} m_Name: m_EditorClassIdentifier: - commandId: 70 + itemId: 70 errorMessage: indentLevel: 0 storyText: Your {stat-up}courage{/stat-up} has increased! + description: character: {fileID: 0} portrait: {fileID: 0} voiceOverClip: {fileID: 0} @@ -5191,7 +5229,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: f1ff0f540016ff64ab1556db6fe1e10f, type: 3} m_Name: m_EditorClassIdentifier: - commandId: 69 + itemId: 69 errorMessage: indentLevel: 0 display: 2 @@ -5217,7 +5255,8 @@ MonoBehaviour: y: -883.838013 width: 132 height: 40 - sequenceName: 'END: COURAGE' + itemId: 100 + blockName: 'END: COURAGE' description: runSlowInEditor: 0 eventHandler: {fileID: 0} @@ -5238,7 +5277,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 3ac5ce55bc698fa4290939ef6e426501, type: 3} m_Name: m_EditorClassIdentifier: - commandId: 54 + itemId: 54 errorMessage: indentLevel: 0 stage: {fileID: 0} @@ -5268,7 +5307,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 3ac5ce55bc698fa4290939ef6e426501, type: 3} m_Name: m_EditorClassIdentifier: - commandId: 53 + itemId: 53 errorMessage: indentLevel: 0 stage: {fileID: 0} @@ -5298,7 +5337,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 3ac5ce55bc698fa4290939ef6e426501, type: 3} m_Name: m_EditorClassIdentifier: - commandId: 52 + itemId: 52 errorMessage: indentLevel: 0 stage: {fileID: 0} @@ -5328,7 +5367,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 3ac5ce55bc698fa4290939ef6e426501, type: 3} m_Name: m_EditorClassIdentifier: - commandId: 51 + itemId: 51 errorMessage: indentLevel: 0 stage: {fileID: 0} @@ -5358,7 +5397,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 3ac5ce55bc698fa4290939ef6e426501, type: 3} m_Name: m_EditorClassIdentifier: - commandId: 50 + itemId: 50 errorMessage: indentLevel: 0 stage: {fileID: 0} @@ -5388,7 +5427,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 3ac5ce55bc698fa4290939ef6e426501, type: 3} m_Name: m_EditorClassIdentifier: - commandId: 49 + itemId: 49 errorMessage: indentLevel: 0 stage: {fileID: 0} @@ -5418,7 +5457,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 3ac5ce55bc698fa4290939ef6e426501, type: 3} m_Name: m_EditorClassIdentifier: - commandId: 48 + itemId: 48 errorMessage: indentLevel: 0 stage: {fileID: 0} @@ -5448,7 +5487,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 3ac5ce55bc698fa4290939ef6e426501, type: 3} m_Name: m_EditorClassIdentifier: - commandId: 47 + itemId: 47 errorMessage: indentLevel: 0 stage: {fileID: 0} @@ -5478,7 +5517,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 3ac5ce55bc698fa4290939ef6e426501, type: 3} m_Name: m_EditorClassIdentifier: - commandId: 46 + itemId: 46 errorMessage: indentLevel: 0 stage: {fileID: 0} @@ -5508,11 +5547,12 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: ec422cd568a9c4a31ad7c36d0572b9da, type: 3} m_Name: m_EditorClassIdentifier: - commandId: 45 + itemId: 45 errorMessage: indentLevel: 0 storyText: '{shout}No nausea? {shout}Dizziness? {shout}Feeling of sudden and impending doom?' + description: character: {fileID: 137130844} portrait: {fileID: 0} voiceOverClip: {fileID: 0} @@ -5534,7 +5574,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 3ac5ce55bc698fa4290939ef6e426501, type: 3} m_Name: m_EditorClassIdentifier: - commandId: 44 + itemId: 44 errorMessage: indentLevel: 0 stage: {fileID: 0} @@ -5564,7 +5604,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 3ac5ce55bc698fa4290939ef6e426501, type: 3} m_Name: m_EditorClassIdentifier: - commandId: 43 + itemId: 43 errorMessage: indentLevel: 0 stage: {fileID: 0} @@ -5594,7 +5634,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 3ac5ce55bc698fa4290939ef6e426501, type: 3} m_Name: m_EditorClassIdentifier: - commandId: 42 + itemId: 42 errorMessage: indentLevel: 0 stage: {fileID: 0} @@ -5624,7 +5664,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 3ac5ce55bc698fa4290939ef6e426501, type: 3} m_Name: m_EditorClassIdentifier: - commandId: 41 + itemId: 41 errorMessage: indentLevel: 0 stage: {fileID: 0} @@ -5654,7 +5694,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: accc065c3e9a6457496f075b1bd49adc, type: 3} m_Name: m_EditorClassIdentifier: - commandId: 81 + itemId: 81 errorMessage: indentLevel: 0 spriteRenderer: {fileID: 31336594} @@ -5672,7 +5712,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: accc065c3e9a6457496f075b1bd49adc, type: 3} m_Name: m_EditorClassIdentifier: - commandId: 91 + itemId: 91 errorMessage: indentLevel: 0 spriteRenderer: {fileID: 884427801} @@ -5690,7 +5730,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: accc065c3e9a6457496f075b1bd49adc, type: 3} m_Name: m_EditorClassIdentifier: - commandId: 90 + itemId: 90 errorMessage: indentLevel: 0 spriteRenderer: {fileID: 31336594} @@ -5708,7 +5748,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: bc30c92f7ffe3d746ac76cd528d616e5, type: 3} m_Name: m_EditorClassIdentifier: - commandId: 61 + itemId: 61 errorMessage: indentLevel: 0 control: 1 @@ -5728,7 +5768,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: bc30c92f7ffe3d746ac76cd528d616e5, type: 3} m_Name: m_EditorClassIdentifier: - commandId: 62 + itemId: 62 errorMessage: indentLevel: 0 control: 0 @@ -5748,7 +5788,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: bc30c92f7ffe3d746ac76cd528d616e5, type: 3} m_Name: m_EditorClassIdentifier: - commandId: 59 + itemId: 59 errorMessage: indentLevel: 0 control: 2 @@ -5768,7 +5808,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: bc30c92f7ffe3d746ac76cd528d616e5, type: 3} m_Name: m_EditorClassIdentifier: - commandId: 60 + itemId: 60 errorMessage: indentLevel: 0 control: 1 @@ -5788,7 +5828,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 10cd462c89cb047158ccfb8a8df3f60a, type: 3} m_Name: m_EditorClassIdentifier: - commandId: 88 + itemId: 88 errorMessage: indentLevel: 0 spriteRenderer: {fileID: 884427801} @@ -5804,7 +5844,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 10cd462c89cb047158ccfb8a8df3f60a, type: 3} m_Name: m_EditorClassIdentifier: - commandId: 89 + itemId: 89 errorMessage: indentLevel: 0 spriteRenderer: {fileID: 31336594} @@ -5820,7 +5860,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 10cd462c89cb047158ccfb8a8df3f60a, type: 3} m_Name: m_EditorClassIdentifier: - commandId: 87 + itemId: 87 errorMessage: indentLevel: 0 spriteRenderer: {fileID: 1612042692} @@ -5857,7 +5897,8 @@ MonoBehaviour: y: -1010.35046 width: 142 height: 40 - sequenceName: Drink the Coffee? + itemId: 93 + blockName: Drink the Coffee? description: runSlowInEditor: 0 eventHandler: {fileID: 0} @@ -6170,7 +6211,7 @@ GameObject: - 4: {fileID: 1675553599} - 212: {fileID: 1675553598} m_Layer: 0 - m_Name: background + m_Name: Background m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 @@ -6364,7 +6405,7 @@ MonoBehaviour: - {fileID: 21300000, guid: d7af8fdea3ead3c4b8a4e54d014b255d, type: 3} - {fileID: 21300000, guid: d38d394fe4d92ae4da3d41e6ff3b0385, type: 3} portraitsFace: 2 - notes: + description: --- !u!4 &1880195409 Transform: m_ObjectHideFlags: 0