// Process Text and Text related commands public void ReadLine(Line line) { Debug.Log("Storytext is " + line.StoryText); if (line.StoryText == null) { SpeakerNameTextBox.text = " "; StoryTextBox.text = " "; return; } CurrentSpeaker = line.Speaker; if (CurrentSpeaker == null || CurrentSpeaker == none) { CurrentSpeaker = LastSpeaker; SpeakerName = CurrentSpeaker.ToString("g"); } else { LastSpeaker = CurrentSpeaker; SpeakerName = CurrentSpeaker.ToString("g"); } SpeakerNameTextBox.text = SpeakerName; StoryTextBox.text = line.StoryText; }
void Update() { if (Input.GetKeyDown(KeyCode.Space)) { if (Index >= CurrentChapter.Text.Count) { Index = 0; } // TEMP // Resets the index at the end for testing purposes. // Text Handling CurrentSpeaker = CurrentChapter.Text[Index].Speaker; if (CurrentSpeaker == null || CurrentSpeaker == CharName.none) { SpeakerName = LastSpeaker.ToString("g"); } else { LastSpeaker = CurrentSpeaker; SpeakerName = CurrentSpeaker.ToString("g"); } StoryText = CurrentChapter.Text[Index].StoryText; SpeakerNameTextBox.text = (StoryText != null) ? SpeakerName : " "; StoryTextBox.text = (StoryText != null) ? StoryText : " "; // Command Handling Commands = CurrentChapter.Text[Index].Commands; if (Commands != null) { CommandString = ""; foreach (Command command in Commands) { CommandString += command.ToString(); if (command.CommandName == CommandName.enter) { } } } print( $"Index:{Index} {SpeakerName}: {StoryText} {(CommandString!=""?"("+CommandString+")":"")}" // TEMP ); Index++; } if (Input.GetKeyDown(KeyCode.I)) { print(Backgrounds[0].FilePath); } }
//How to parse the articles for a character: //Using Brawlbox v0.68b, you can view a character's extra data offsets (header data specific to that character) //by opening the character's moveset file and going to MoveDef_FitChar->Sections->data //Go the properties and view the ExtraOffsets collection. //Use this to set up the struct for the character accordingly (find their struct by name below). //You can view the int offset of each article in the Articles list under data, //So just match those offsets to the list, get the index and use it to parse them. //Articles and parameter lists names must start with _article or _params public static OffsetHolder GetOffsets(CharName character) { Type[] types = Assembly.GetExecutingAssembly().GetTypes().Where( t => String.Equals(t.FullName, "Ikarus.MovesetFile.ExtraDataOffsets+" + character.ToString(), StringComparison.Ordinal)).ToArray(); if (types.Length != 0) { return(Activator.CreateInstance(types[0]) as OffsetHolder); } return(null); }