YarnSpinner Provides a method for generating CRC32 hashes of strings. Computes a CRC32 checksum from the given bytes. The bytes to generate a checksum for. A CRC32 checksum derived from . Computes a CRC32 checksum from the given string. This method converts the string to a UTF-8 encoding, and then computes a CRC32 checksum from those bytes. The string to generate a checksum for. A CRC32 checksum derived from . Gets the CRC-32 hash of as a string containing 8 lowercase hexadecimal characters. This method converts the string to a UTF-8 encoding, and then computes a CRC32 checksum from those bytes. The string to get the checksum of. The string containing the checksum. A line of dialogue, sent from the to the game. When the game receives a , it should do the following things to prepare the line for presentation to the user. Use the value in the field to look up the appropriate user-facing text in the string table. Use to replace all substitutions in the user-facing text. Use to parse all markup in the line. You typically do not create instances of this struct yourself. They are created by the during program execution. Initialises a new instance of the struct. The unique line ID for this content. The list of values that should be substituted into the final line. The string ID for this line. The values that should be inserted into the user-facing text before delivery. A set of s, sent from the to the game. You typically do not create instances of this struct yourself. They are created by the during program execution. An option to be presented to the user. Gets the that should be presented to the user for this option. See the documentation for the class for information on how to prepare a line before presenting it to the user. Gets the identifying number for this option. When the user selects this option, this value should be used as the parameter for . Gets the name of the node that will be run if this option is selected. The value of this property not be valid if this is a shortcut option. Gets a value indicating whether the player should be permitted to select this option. If this value is , this option had a line condition on it that failed. The option will still be delivered to the game, but, depending on the needs of the game, the game may decide to not allow the player to select it, or not offer it to the player at all. This is intended for situations where games wish to show options that the player _could_ have taken, if some other condition had been met (e.g. having enough "charisma" points). Gets the s that should be presented to the user. A command, sent from the to the game. You do not create instances of this struct yourself. They are created by the during program execution. Gets the text of the command. Represents a method that receives diagnostic messages and error information from a . The text that this delegate receives may be output to a console, or sent to a log. The text that should be logged. Contains methods for parsing raw text into a . Parses a string into markup, given a locale. The text to parse. The locale to use when parsing the text. Represents different kinds of variables that can be fetched from a using . The kind of the variable cannot be determined. It may not be known to the system. The variable's value is stored in memory, and may be persisted to disk. The variable's value is computed at run-time, and is not persisted to disk. Provides a mechanism for retrieving values. Given a variable name, attempts to fetch a value for the variable, either from storage, initial values found in , or by evaluating a smart variable found in . The type of the value to return. The fetched value will be converted to this type, if possible. The name of the variable. If this method returns , this parameter will contain the fetched value. if a value could be fetched; otherwise. Gets the kind of variable named . The name of the variable. A enum representing the kind of the variable named . Gets or sets the Yarn that stores information about the initial values of variables, and is able to produce values for smart variables. Gets or sets the object to use when evaluating smart variables. Provides a mechanism for storing values. Stores a in this VariableStorage. The name to associate with this variable. The string to store. Stores a in this VariableStorage. The name to associate with this variable. The number to store. Stores a in this VariableStorage. The name to associate with this variable. The boolean value to store. Removes all variables from storage. A simple concrete implementation of that keeps all variables in memory. Represents the method that is called when the Dialogue delivers a . The that has been delivered. Represents the method that is called when the Dialogue delivers an . The that has been delivered. Represents the method that is called when the Dialogue delivers a . The that has been delivered. Represents the method that is called when the Dialogue reaches the end of a node. The name of the node. This method may be called multiple times over the course of code execution. A node being complete does not necessarily represent the end of the conversation. Represents the method that is called when the Dialogue begins executing a node. The name of the node. Represents the method that is called when the dialogue has reached its end, and no more code remains to be run. Represents the method that is called when the dialogue anticipates that it will deliver lines. This method should begin preparing to run the lines. For example, if a game delivers dialogue via voice-over, the appropriate audio files should be loaded. This method serves to provide a hint to the game that a line _may_ be run. Not every line indicated in may end up actually running. This method may be called any number of times during a dialogue session. The collection of line IDs that may be delivered at some point soon. Co-ordinates the execution of Yarn programs. Gets or sets the object that provides access to storing and retrieving the values of variables. Invoked when the Dialogue needs to report debugging information. Invoked when the Dialogue needs to report an error. The default name of the node that execution will start from. The value to indicate to the dialogue runner that no option was selected and dialogue should fall through to the rest of the program. Gets or sets the compiled Yarn program. Gets a value indicating whether the Dialogue is currently executing Yarn instructions. Gets or sets the that is called when a line is ready to be shown to the user. Gets or sets the that is called when a set of options are ready to be shown to the user. The Options Handler delivers an to the game. Before can be called to resume execution, must be called to indicate which was selected by the user. If is not called, an exception is thrown. Gets or sets the that is called when a command is to be delivered to the game. Gets or sets the that is called when a node is started. Gets or sets the that is called when a node is complete. Gets or sets the that is called when the dialogue reaches its end. Gets or sets the that is called when the dialogue anticipates delivering some lines. The virtual machine to use when running dialogue. The virtual machine to use when evaluating smart variables. This is kept separate from the main VM in order to prevent evaluating smart variables from modifying the evaluation state of dialogue. Gets the that this Dialogue uses to locate functions. When the Dialogue is constructed, the Library is initialized with the built-in operators like +, -, and so on. Gets or sets the content saliency strategy used by this . A content saliency strategy is a class that implements and selects the most appropriate content in a line group, or any other situation where content saliency is relevant. Initializes a new instance of the class. The that this Dialogue should use. Loads all nodes from the provided . This method replaces any existing nodes have been loaded. The to use. Loads a compiled from a file. The path of the file to load. This method replaces the current value of with the result of loading the file. This method does not compile Yarn source. To compile Yarn source code into a , Refer to the Yarn compiler. Prepares the that the user intends to start running a node. The name of the node that will be run. The node have been loaded by calling . After this method is called, you call to start executing it. If has been set, it may be called when this method is invoked, as the Dialogue determines which lines may be delivered during the node's execution. Thrown when no node named startNode has been loaded. Signals to the that the user has selected a specified . After the Dialogue delivers an , this method must be called before is called. The ID number that should be passed as the parameter to this method should be the field in the that represents the user's selection. The ID number of the Option that the user selected. Thrown when the Dialogue is not expecting an option to be selected. Thrown when selectedOptionID is not a valid option ID. Signals that the currently running content has completed synchronously. This method is not intended to be called by user code. Starts, or continues, execution of the current Program. This method repeatedly executes instructions until one of the following conditions is encountered: The or is called. After calling either of these handlers, the Dialogue will wait until is called. Continue may be called from inside the or , or may be called at any future time. The is called. When this occurs, the Dialogue is waiting for the user to specify which of the options has been selected, and must be called before is called again.) The Program reaches its end. When this occurs, must be called before is called again. An error occurs while executing the Program. This method has no effect if it is called while the is currently in the process of executing instructions. Immediately stops the . Gets the names of the nodes in the currently loaded Program. If no program is currently loaded, an empty collection is returned. Gets the name of the node that this Dialogue is currently executing. If has never been called, this value will be . Returns the string ID that contains the original, uncompiled source text for a node. The name of the node. The string ID. A node's source text will only be present in the string table if its tags header contains rawText. Because the class is designed to be unaware of the contents of the string table, this method does not test to see if the string table contains an entry with the line ID. You will need to test for that yourself. Returns the tags for the node . The tags for a node are defined by setting the tags header in the node's source code. This header must be a space-separated list. The name of the node. The node's tags, or if the node is not present in the Program. Gets the value of the header named on the node named , or if the header can't be found. If the node has more than one header named , the first one is used. The name of the node. The name of the header. The value of the first header on the node with the specified header value. Thrown when the program is not loaded, the program contains no nodes, or the program does not contain a node named . Gets the collection of headers present on the node named . The name of the node to get headers for. A collection of key-values pairs, each one representing a header on the node. Thrown when the program is not loaded, the program contains no nodes, or the program does not contain a node named . Unloads all nodes from the Dialogue. Gets a value indicating whether a specified node exists in the Program. The name of the node. if a node named nodeName exists in the Program, otherwise. Begins analysis of the by the The Context that performs the analysis Queries the for what content could possibly run if the node group nodeGroup was run. This method evaluates all nodes in the given node group, and returns a object for each node. This object contains the current number of passing and failing 'when' clauses on the node, as well as the complexity score for that node. This is the same information that's passed to a object's method. This method is read-only, and calling it will not modify any variable state. Note that this method does not filter its output, and may include content options whose is greater than zero. It's up to the caller of this function to filter out these options if they're not wanted. This method can be used to see if any content will appear when a given node group is run. If the collection returned by this method is empty, then running this node group will not result in any content. This can be used, for example, to decide whether to show a 'character can be spoken to' indicator. You can also examine the individal objects to see if any content is available that passes a filter, such as whether content might appear that has a user-defined 'plot critical' tag. The name of the node group to get available content for. A collection of objects that may appear if and when the node group is run. Thrown when is not a valid node name. Returns if the node group has any potential nodes to be run based on the current salient selector. The name of the node group. True if there is any salient content for the requested node group Gets a value indicating whether is the name of a valid node group in the program. The name of the node group to check. if is the name of a node group; otherwise. Thrown when is null. The internal random number generator used by functions like 'random' and 'dice'. An exception that is thrown by when there is an error in executing a . A collection of functions that can be called from Yarn programs. You do not create instances of this class yourself. The class creates one of its own, which you can access via the property. Returns a with a given name. The name of the function to retrieve. The . Thrown when a function named name is not present in the library. Loads functions from another . The library to import functions from. If the other library contains a function with the same name as one in this library, the function in the other library takes precedence. Registers a new function that returns a value, which can be called from a Yarn program. The name of the function. The method to be invoked when the function is called. The return type of the function. Thrown when a function named already exists in the . Thrown when name is null. The return type of the function. The type of the function's first argument. The return type of the function. The type of the function's first argument. The type of the function's second argument. The return type of the function. The type of the function's first argument. The type of the function's second argument. The type of the function's third argument. The return type of the function. The type of the function's first argument. The type of the function's second argument. The type of the function's third argument. The type of the function's fourth argument. The return type of the function. The type of the function's first argument. The type of the function's second argument. The type of the function's third argument. The type of the function's fourth argument. The type of the function's fifth argument. Gets a value indicating whether this contains a function named name. The name of the function to look for. true if a function exists in this Library; false otherwise. Removes a function from the Library. The name of the function to remove. If no function with the given name is present in the Library, this method does nothing. Registers the methods found inside a type. The type to register methods from. Generates a unique tracking variable name. This is intended to be used to generate names for visting. Ideally these will very reproduceable and sensible. For now it will be something terrible and easy. The name of the node that needs to have a tracking variable created. The new variable name. Gets the user-facing string for a given key from the code dump helper's string table. The key to fetch a string for. The found string, or if none was found. Gets the description for a given variable, if it exists. The name of the variable. The description for the variable, or if none was found. Gets the mapping of instruction indices to named labels found in the node. The name of the node. The instruction label mapping. A compiled Yarn program. A complete Yarn program. Identifies and returns a list of all line and option IDs inside the node. The name of the node whos line IDs you covet. The line IDs of all lines and options inside the node, or if doesn't exist in the program. Gets the collection of nodes that contain the code for evaluating a smart variable. Attempts to fetch a value for a variable named from this program's collection of initial values. The type of variable to retrieve. The name of the variable to retrieve a value for. On return, contains the value of the variable, or the default value of if not known. Depending on what is, this value may be . if an initial value for was found; otherwise. Thrown the stored initial value found for is not known to this version of Yarn Spinner. Thrown when the initial value found for cannot be cast or converted to . Gets a value indicating the kind of variable represents. The name of a variable. The kind of variable that represents. Field number for the "name" field. The name of the program. Field number for the "nodes" field. The collection of nodes in this program. Field number for the "initial_values" field. The collection of initial values for variables; if a PUSH_VARIABLE instruction is run, and the value is not found in the storage, this value will be used Field number for the "language_version" field. The version of the Yarn Spinner language that this program was compiled under. An instruction in a Yarn Program. Field number for the "jumpTo" field. Jumps to a specified position in the current node. Field number for the "peekAndJump" field. Peeks a number on the stack, and jumps to that position in the current node. Field number for the "runLine" field. Runs a line of dialogue. Field number for the "runCommand" field. Runs a command. Field number for the "addOption" field. Adds an option to the 'pending options' list. Field number for the "showOptions" field. Shows all options in the 'pending options' list, then clears the list. Field number for the "pushString" field. Pushes a string onto the stack. Field number for the "pushFloat" field. Pushes a floating point number onto the stack. Field number for the "pushBool" field. Pushes a boolean onto the stack. Field number for the "jumpIfFalse" field. Peeks a boolean on the stack, and if it's false, jumps to the indicated position in the current node. Field number for the "pop" field. Pops a value of any kind off the stack. Field number for the "callFunc" field. Calls a named function. Field number for the "pushVariable" field. Pushes the value of the named variable onto the stack. Field number for the "storeVariable" field. Peeks a value of any kind on the stack, and stores it in the indicated variable. Field number for the "stop" field. Halts execution. Field number for the "runNode" field. Jumps to the start of a named node. Field number for the "peekAndRunNode" field. Peeks a string on the stack, and jumps to the start of that node. Field number for the "detourToNode" field. Field number for the "peekAndDetourToNode" field. Field number for the "return" field. Field number for the "addSaliencyCandidate" field. Pops a boolean from the stack, and adds a saliency candidate to the current list. Field number for the "addSaliencyCandidateFromNode" field. Add a saliency candidate to the current list, given a node name. Field number for the "selectSaliencyCandidate" field. Attempt to select a single saliency candidate from the current list: - if one is selected, pushes the destination of that candidate and the value 'true' - if none is selected, pushes the value 'false' In all circumstances, clears the saliency candidate list before returning. Enum of possible cases for the "InstructionType" oneof. Container for nested types declared in the Instruction message type. Field number for the "value" field. The value to push. Field number for the "value" field. The value to push. Field number for the "value" field. The value to push. Field number for the "destination" field. The instruction number in the current node to jump to. Field number for the "lineID" field. The ID of the localised content that should be shown for this line. Field number for the "substitutionCount" field. The number of substitutions present in this line that must be popped off the stack. Field number for the "commandText" field. The text of the command to send to the client. Field number for the "substitutionCount" field. The number of substitutions present in this command that must be popped off the stack. Field number for the "lineID" field. The ID of the content that should be shown for this option. Field number for the "destination" field. The instruction number in the current node to jump to if this option is selected. Field number for the "substitutionCount" field. The number of substitutions present in this option that must be popped off the stack. Field number for the "hasCondition" field. A value indicating whether this instruction has a line condition on it, whose evaluated value must be popped off the stack. Field number for the "destination" field. The instruction number in the current node to jump to. Field number for the "functionName" field. The name of the function to call. Field number for the "variableName" field. The name of the variable whose value should be pushed onto the stack. Field number for the "variableName" field. The name of the variable whose value should be updated with the value currently on top of the stack. Field number for the "nodeName" field. The name of the node to begin running. Field number for the "nodeName" field. Field number for the "contentID" field. The unique ID for this piece of content, such as a line ID. Field number for the "complexityScore" field. The complexity score of the candidate. Field number for the "destination" field. The instruction number in the current node to jump to if this candidate is selected. Field number for the "nodeName" field. The name of the node to get saliency information from. Field number for the "destination" field. The instruction number in the current node to jump to if this candidate is selected. A node of Yarn script, contained within a , and containing s. A collection of instructions Gets the collection of tags defined for this node, if any. If no tags are defined, returns an empty collection. The name of the header that indicates which node group a node belongs to. Gets the name of the variable used for tracking the number of times this node has completed, or if this node is not tracked. Gets a value indicating whether this node is the 'hub' node for a node group. Gets an enumerable containing the names of variables that must be evaluated in order to determine whether this node can be selected as a piece of salient content. The list of variables is stored in the header as a semicolon-delimited string. Gets the content saliency condition complexity score for this node. An integer representing the content saliency condition complexity score if a valid header is found; otherwise, returns -1 if the header is not present or does not contain a valid value. Gets the name of the node group that this node is a part of, or if it is not part of a node group. Field number for the "name" field. The name of this node. Field number for the "instructions" field. The list of instructions in this node. Field number for the "headers" field. The headers present on this node. A content saliency strategy that returns the first of the best, least-recently seen choices from the provided options. This strategy stores information about the number of times each piece of content has been seen in the provided . Initalises a new instance of the class. The variable storage to use when determining which content to show. Thrown when the provided argument is null. Gets the variable storage to use for storing information about how often we've seen content. This method increments the view count for , so that the next time QueryBestContent is run, it has an updated count of the number of times the content has been viewed. A content saliency strategy that returns the best of the provided options. This strategy always selects the single best of the available items, regardless of how many times it has been seen before. For a saliency strategy that takes into account how recently content has been seen, see . Indicates what type of content a represents. The content represents a node in a node group. The content represents a line in a line group. Represents a piece of content that may be selected by an . Initializes a new instance of the ContentSaliencyOption class with the specified content ID. A string representing the unique identifier for the content. Thrown when the provided ID is null. Gets the number of conditions that passed for this piece of content. Get the number of conditions that failed for this piece of content. Gets a string that uniquely identifies this content. Gets the complexity score of this option. Gets the type of content that this option represents. This information may be used by custom classes to allow them to have different behaviour depending on the type of the content. Gets a unique variable name that can be used for tracking the view count of a specific piece of content. This value is if is or empty. The destination instruction that the virtual machine will jump to if this option is selected. This property is internal to Yarn Spinner, and is used by the class. A content saliency strategy that always returns the first non-failing item in the list of available options. This saliency strategy is used when a has no provided saliency strategy, but is required to make a decision. Contains methods for choosing a piece of content from a collection of options. Chooses an item from content that is the most appropriate (or salient) for the user's current context. Implementations of this method should not modify any state - that is, they should be 'read-only' operations. If a strategy needs to record information about when a piece of content has been selected, it should do it in the method. A collection of content items. This collection may be empty. An item from that is the most appropriate for display, or if no content should be displayed. Called by Yarn Spinner to indicate that a piece of salient content has been selected, and this system should update any state related to how it selects content. If a content saliency strategy does not need to keep track of any state, then this method can be empty. The content that has been selected. A content saliency strategy that returns a random choice of the best, least-recently seen choices from the provided options. This strategy stores information about the number of times each piece of content has been seen in the provided . Initializes a new instance of the class. The variable storage to use when determining which content to show. Thrown when the provided argument is null. Gets the variable storage to use for storing information about how often we've seen content. This method increments the view count for , so that the next time QueryBestContent is run, it has an updated count of the number of times the content has been viewed. Contains extension methods for . Returns a random element from . This method uses System.Random to make a selection, which is cryptographically insecure. This means that this method should not be used for security-critical decisions. The type of element in . The collection to choose an item from. A random element in . Thrown when contains no items. A lightweight, static 'virtual machine' designed for evaluating smart variables. This class implements a subset of the operations, and is designed for evaluating smart variable implementation nodes. Evaluates a smart variable. The type of the variable to return. The name of the smart variable. An object that can be used for fetching variable values. A containing functions to use while evaluating the variable. On return, the computed value of the smart variable. if the variable could be fetched as type ; otherwise. Thrown if or is null. Thrown if is null or empty. Thrown if an error occurs during the evaluation of the variable. Retrieves a collection of content saliency options available for the specified node group. This method iterates through all nodes in the program to find those that belong to the specified node group. It calculates the complexity score and counts the number of conditions that pass or fail for each node, then creates a saliency option for each qualifying node. The name of the node group to search for available content. The object to use when accessing variables. The library containing function definitions. An enumerable collection of objects representing available content saliency options for the specified node group. Thrown when the provided is not a valid node group name in the program. Represents any type. This type is used in circumstances when a type is known to have a value, but the specific type is not known or required to be known. This is the parent type of all types. A type that represents boolean values. The base type for all enumeration types. Initialises a new instance of the class. A type that represents enumerations. Initializes a new instance of the class that represents an enum type. This type has no methods of its own, and is a subtype of . The name of this method. A string that describes this method. Gets the type of this enum's members. Gets the collection of enum cases in this enum. Adds a new case to this enumeration type. The name of the case. The member to add for the given name. A type that represents a function. Functions have parameters and a return type, and can be called from script. Instances of this type are created when the host application registers new functions (such as through using the methods or similar.) Gets the type of value that this function returns. Gets the list of the parameter types that this function is called with. The length of this list also determines the number of parameters this function accepts (also known as the function's arity). Gets the type of the parameter at the given index. The index of the parameter to get the type for. The type of the parameter. If is beyond the length of , and is not , is returned. Thrown when is less than zero, or is beyond the length of and is . Gets the type of value that this type of function accepts as a variadic parameter. This value is if this type of function does not accept variadic parameters. Initialises a new instances of the class. The type of the value that this type of function returns. The types of the parameters that this type of function accepts. Adds a new parameter to the function. The type of parameter to add. Defines properties that describe a type in the Yarn language. Gets the name of this type. Gets the parent of this type. All types have as their ultimate parent type (except for itself.) Gets a more verbose description of this type. Gets the collection of type information for this type's type members. A type that represents floating-point number values. A type that represents string values. Initializes a new instance of the class. Provides properties used to work with members of a type. Gets or sets the type of this member. Represents a property that belongs to a type and contains a read-only value. This kind of type member is useful for constant properties, like enum cases. Gets the type of this property. Gets the value that is stored in this property. Gets a string describing this property. Provides the base class for all concrete types. Gets the name of this type. Gets the parent of this type. Gets a string describing this type. Gets the collection of methods that are defined on this type. Gets a dictionary containing the members of this type. Gets the collection of types that this type may be converted to. Gets the depth of this type in the hierarchy, measured as the total number of parent-child relationships between this type and a root of the type system. and have a depth of zero. Registers that this type is convertible to . Checks if this type is convertible to the type represented by . A type is convertible to another type if: there is an explicit conversion available, or it is a descendant of that type, or the two types are identical. The type to check. if this type is convertible to . Initialises a new instance of the class with a collection of methods. The methods that belong to this type. Gets whether this type is an ancestor of . The type to check. if this type is an ancestor of ; otherwise. Contains the built-in types available in the Yarn language. Gets the type representing strings. Gets the type representing numbers. Gets the type representing boolean values. Gets the type representing any value. Gets the type representing a typing error. Gets the collection of all built-in types. Gets a dictionary that maps CLR types to their corresponding Yarn types. Contains utility methods for working with types and their methods. Returns the type that contains the actual implementation of the method indicated by , given a type or sub-type. This method checks to see if contains a concrete implementation of a method named . If it does, is returned; otherwise, the parent of is checked, and so on up the hierarchy. If no type in 's parent chain implements a method named , this method returns . The type, or sub-type, to start searching for an implementation for the method. The name of the method to search for. The object that contains an implementation of . Thrown if is . Thrown if methodName is or empty. Checks to see if is equal to , or if exists in 's type hierarchy. The parent type to check against. The type to check if it's a subtype of . if is the same or a subtype of ; otherwise. Represents a read-only value in the Yarn Spinner virtual machine. Converts this to type . The type to convert to. A value of type T. A value from inside Yarn. Initializes a new instance of the class, using the specified object. If the value is another , its contents will be copied into the new instance. Thrown when the value is not a , string, int, float, double, bool, or null. The value that this should contain. Compares this to another object. The other object must either be another instance of , or null. The object to compare to. Returns the same results as . Thrown when obj is not a . Converts this value to a string. The string representation of this value A value used by an Instruction. A value used by an Instruction. Convenience constructor for the Operand type. so that we don't need to have two separate steps for creating and then preparing the Operand The boolean value to be made into the operand Convenience constructor for the Operand type. so that we don't need to have two separate steps for creating and then preparing the Operand The string value to be made into the operand Convenience constructor for the Operand type. so that we don't need to have two separate steps for creating and then preparing the Operand The float value to be made into the operand Field number for the "string_value" field. A string. Gets whether the "string_value" field is set Clears the value of the oneof if it's currently set to "string_value" Field number for the "bool_value" field. A boolean (true or false). Gets whether the "bool_value" field is set Clears the value of the oneof if it's currently set to "bool_value" Field number for the "float_value" field. A floating point number. Gets whether the "float_value" field is set Clears the value of the oneof if it's currently set to "float_value" Enum of possible cases for the "value" oneof. Lists the available operators that can be used with Yarn values. A unary operator that returns its input. A binary operator that represents equality. A binary operator that represents a value being greater than another. A binary operator that represents a value being greater than or equal to another. A binary operator that represents a value being less than another. A binary operator that represents a value being less than or equal to another. A binary operator that represents inequality. A binary operator that represents a logical or. A binary operator that represents a logical and. A binary operator that represents a logical exclusive or. A binary operator that represents a logical not. A unary operator that represents negation. A binary operator that represents addition. A binary operator that represents subtraction. A binary operator that represents multiplication. A binary operator that represents division. A binary operator that represents the remainder operation. Contains methods for evaluating the value of smart variables Evaluate the value of a smart variable named . The type of the returned value. The name of the variable. On return, contains the returned value of the smart variable, or the value of if a smart variable named could not be found or its value could not be returned as type . if the smart variable was evaluated, otherwise. The name of the node that we're currently in. The instruction number in the current node. The current list of options that will be delivered when the next RunOption instruction is encountered. The value stack. Pushes a object onto the stack. The value to push onto the stack. Removes a value from the top of the stack, and returns it. The value that was at the top of the stack when this method was called. Peeks at a value from the stack. The value at the top of the stack. Clears the stack. Reset the state of the VM The that this virtual machine is running. The VirtualMachine is not running a node. The VirtualMachine is waiting on option selection. Call before calling . The VirtualMachine has finished delivering content to the client game, and is waiting for to be called. The VirtualMachine is delivering a line, options, or a commmand to the client game. The VirtualMachine is in the middle of executing code. Resumes execution. Runs a series of tests to see if the is in a state where can be called. Throws an exception if it can't. Thrown when the is not in a state where could be called. Holder for reflection information generated from yarn_spinner.proto File descriptor for yarn_spinner.proto Field number for the "key" field. The name of the header. Field number for the "value" field. The value of the header. A single Yarn instruction. Field number for the "opcode" field. The operation that this instruction will perform. Field number for the "operands" field. The list of operands, if any, that this instruction uses. Container for nested types declared in the InstructionV1 message type. The type of instruction that this is. Jumps to a named position in the node. opA = string: label name Peeks a string from stack, and jumps to that named position in the node. No operands. Delivers a string ID to the client. opA = string: string ID Delivers a command to the client. opA = string: command text Adds an entry to the option list (see ShowOptions). - opA = string: string ID for option to add - opB = string: destination to go to if this option is selected - opC = number: number of expressions on the stack to insert into the line - opD = bool: whether the option has a condition on it (in which case a value should be popped off the stack and used to signal the game that the option should be not available) Presents the current list of options to the client, then clears the list. The most recently selected option will be on the top of the stack when execution resumes. No operands. Pushes a string onto the stack. opA = string: the string to push to the stack. Pushes a floating point number onto the stack. opA = float: number to push to stack Pushes a boolean onto the stack. opA = bool: the bool to push to stack Pushes a null value onto the stack. No operands. Jumps to the named position in the the node, if the top of the stack is not null, zero or false. opA = string: label name Discards top of stack. No operands. Calls a function in the client. Pops as many arguments as the client indicates the function receives, and the result (if any) is pushed to the stack. opA = string: name of the function Pushes the contents of a variable onto the stack. opA = name of variable Stores the contents of the top of the stack in the named variable. opA = name of variable Stops execution of the program. No operands. Pops a string off the top of the stack, and runs the node with that name. No operands. Provides a mechanism for producing replacement text for a marker. Produces replacement text for a marker. The marker to process into replacement text. A that contains the child text contained within . Use the methods on this stringbuilder to produce any text needed from this marker. The child attributes of . A BCP-47 locale code that represents the locale in which any processing should take place. If the original text being processed by is "[a] text1 [b/] text2 [/a]", then the following facts will be true: will contain the text "text1 text2". will contain a MarkupAttribute named "b". The collection of diagnostics produced during processing, and the number of invisible characters created during processing. A bundle of results from processing replacement markers. The collection of diagnostics produced during processing, if any. The number of invisible characters added into the line during processing. This will vary depending on what the replacement markup needs to do. When only inserting rich-text tags, this should be the length of all inserted text. For example "this is text with [bold]some bold[/bold] elements" translated into Unity style rich-text become "this is text with <b>some bold</b> elements". In this case then the value of InvisibleCharacters would be seven. When only modifying the content of the children text, such as making all text upper case, this should be 0. For example "this is text with [upper]some uppercased[/upper] elements" is transformed into "this is text with SOME UPPERCASED elements". The number of invisible character will be zero. When adding new content into the line (regardless of being added at the start, end, or middle) this should be zero but the replacement processor should make sure to shift along it's children attributes where appropriate. For example "this is text with [emph]some emphasised[/emph] elements" transformed into "this is text with !!some emphasised!! elements" the value of InvisibleCharacters would be zero. In this case however the childAttributes in would need to be shifted down two. Convenience constructor for replacement markup results. The diagnostics generated during processing the number of invisible characters generated during processing. Convenience form of for when there are no diagnostics. the number of invisible characters generated during processing. Parses text and produces markup information. The name of the property in replacement attributes that contains the text of the attribute. The name of the implicitly-generated character attribute. The name of the 'name' property, on the implicitly-generated character attribute. The name of the property to use to signify that trailing whitespace should be trimmed if a tag had preceding whitespace or begins the line. This property must be a bool value. The name of the attribute to use to indicate that no marker processing should occur. A dictionary that maps the names of attributes to an object that can generate replacement text for those attributes. The original text that this line parser is parsing. A string reader used for reading through the . Registers an object as a marker processor for a given marker name. When a marker processor is registered for a marker name, the parser will ask the processor for text to insert into the plain text. This allows users of the class to dynamically replace text in a line. The nomarkup tag is implemented in this way by the class directly; the class uses this mechanism to implement the select, plural and ordinal markers. The name of the marker that should use this marker processor. The object that should be invoked when markers with this name are encountered. Removes any marker processor associated with a given marker name. The name of the marker. Represents a diagnostic message produced during markup parsing. Gets the text of the diagnostic. Gets the zero-based column index of the start of the range at which this diagnostic appears. Initialises a new instance of the struct. The diagnostic text. The zero-based first column of the diagnostic's range. Parses a string of text and produces a markup parse result. The text to parse. The locale to use when processing markers, as a BCP-47 locale tag. If , markers that are split as part of the markup parsing process will not be re-merged before returning the result. If , markers will be sorted based on their position in the input.å If true, the parser will attempt to detect a character name in the text and add a [character] attribute for it. A markup parse result. Replaces all substitution markers in a text with the given substitution list. This method replaces substitution markers - for example, {0} - with the corresponding entry in . If contains a substitution marker whose index is not present in , it is ignored. The text containing substitution markers. The list of substitutions. , with the content from inserted. A marker processor that handles the built-in markers [select] [plural], and [ordinal]. An exception representing something going wrong when parsing markup. Initializes a new instance of the class. Initializes a new instance of the class. An explanation of the exception. Initializes a new instance of the class. An explanation of the exception. The exception that caused this exception. The result of parsing a line of marked-up text. You do not create instances of this struct yourself. It is created by objects that can parse markup, such as . The original text, with all parsed markers removed. The list of s in this parse result. Initializes a new instance of the struct. The plain text. The list of attributes. Gets the first attribute with the specified name, if present. The name of the attribute to get. When this method returns, contains the attribute with the specified name, if the attribute is found; otherwise, the default . This parameter is passed uninitialized. if the contains an attribute with the specified name; otherwise, . Returns the substring of covered by Position and Length properties. If the attribute's property is zero, this method returns the empty string. This method does not check to see if is an attribute belonging to this MarkupParseResult. As a result, if you pass an attribute that doesn't belong, it may describe a range of text that does not appear in . If this occurs, an will be thrown. The attribute to get the text for. The text contained within the attribute. Thrown when attribute's and properties describe a range of text outside the maximum range of . Deletes an attribute from this markup. This method deletes the range of text covered by , and updates the other attributes in this markup as follows: Attributes that start and end before the deleted attribute are unmodified. Attributes that start before the deleted attribute and end inside it are truncated to remove the part overlapping the deleted attribute. Attributes that have the same position and length as the deleted attribute are deleted, if they apply to any text. Attributes that start and end within the deleted attribute are deleted. Attributes that start within the deleted attribute, and end outside it, have their start truncated to remove the part overlapping the deleted attribute. Attributes that start after the deleted attribute have their start point adjusted to account for the deleted text. This method does not modify the current object. A new is returned. If is not an attribute of this , the behaviour is undefined. The attribute to remove. A new object, with the plain text modified and an updated collection of attributes. Represents a range of text in a marked-up string. You do not create instances of this struct yourself. It is created by objects that can parse markup, such as . Initializes a new instance of the struct using specified values. The position in the plain text where this attribute begins. The position in the original source text where this attribute begins. The number of text elements in the plain text that this attribute covers. The name of the attribute. The properties associated with this attribute. Initializes a new instance of the struct, using information taken from an opening . The marker that represents the start of this attribute. The number of text elements in the plain text that this attribute covers. Creates a new based on the current instance whose is shifted towards the end of the string by characters. The number of characters to shift by. A new with an updated . Gets the position in the plain text where this attribute begins. Gets the number of text elements in the plain text that this attribute covers. Gets the name of the attribute. Gets the properties associated with this attribute. Gets the position in the original source text where this attribute begins. Gets a property named from this attribute, if present. The name of the property. On return, the property's value if found, or zero if not. if a property named was found; otherwise. Gets a float property named from this attribute, if present. The name of the property. On return, the property's value if found, or zero if not. if a property named was found; otherwise. Gets an integer property named from this attribute, if present. The name of the property. On return, the property's value if found, or zero if not. if a property named was found; otherwise. Gets a string property named from this attribute, if present. The name of the property. On return, the property's value if found, or if not. if a property named was found; otherwise. Gets a boolean property named from this attribute, if present. The name of the property. On return, the property's value if found, or if not. if a property named was found; otherwise. A property associated with a . You do not create instances of this struct yourself. It is created by objects that can parse markup, such as . Initializes a new instance of the struct. The name of the property. The value of the property. Gets the name of the property. Gets the value of the property. A value associated with a . You do not create instances of this struct yourself. It is created by objects that can parse markup, such as . Gets the integer value of this property. This property is only defined when the property's is . Gets the float value of this property. /// This property is only defined when the property's is . Gets the string value of this property. This property is only defined when the property's is . Gets the bool value of this property. This property is only defined when the property's is . Gets the value's type. Represents a marker (e.g. [a]) in line of marked up text. You do not create instances of this struct yourself. It is created by objects that can parse markup, such as . Initializes a new instance of the struct. The name of the marker. The position of the marker. The position of the marker in the original text. The properties of the marker. The type of the marker. Gets the name of the marker. For example, the marker [wave] has the name wave. Gets the position of the marker in the plain text. Gets the list of properties associated with this marker. Gets the type of marker that this is. Gets or sets the position of this marker in the original source text. Gets the property associated with the specified key, if present. The name of the property to get. When this method returns, contains the value associated with the specified key, if the key is found; otherwise, the default . This parameter is passed uninitialized. if the contains an element with the specified key; otherwise, . A type of . An integer. A float. A string. A bool. A type of . An open marker. For example, [a]. A closing marker. For example, [/a]. A self-closing marker. For example, [a/]. The close-all marker, [/]. Specifies that null is allowed as an input even if the corresponding type disallows it. Specifies that null is disallowed as an input even if the corresponding type allows it. Specifies that an output may be null even if the corresponding type disallows it. Specifies that an output will not be null even if the corresponding type allows it. Specifies that an input argument was not null when the call returns. Specifies that when a method returns , the parameter may be null even if the corresponding type disallows it. Initializes the attribute with the specified return value condition. The return value condition. If the method returns this value, the associated parameter may be null. Gets the return value condition. Specifies that when a method returns , the parameter will not be null even if the corresponding type allows it. Initializes the attribute with the specified return value condition. The return value condition. If the method returns this value, the associated parameter will not be null. Gets the return value condition. Specifies that the output will be non-null if the named parameter is non-null. Initializes the attribute with the associated parameter name. The associated parameter name. The output will be non-null if the argument to the parameter specified is non-null. Gets the associated parameter name. Applied to a method that will never return under any circumstance. Specifies that the method will not return if the associated Boolean parameter is passed the specified value. Initializes the attribute with the specified parameter value. The condition parameter value. Code after the method will be considered unreachable by diagnostics if the argument to the associated parameter matches this value. Gets the condition parameter value. Specifies that the method or property will ensure that the listed field and property members have not-null values. Initializes the attribute with a field or property member. The field or property member that is promised to be not-null. Initializes the attribute with the list of field and property members. The list of field and property members that are promised to be not-null. Gets field or property member names. Specifies that the method or property will ensure that the listed field and property members have not-null values when returning with the specified return value condition. Initializes the attribute with the specified return value condition and a field or property member. The return value condition. If the method returns this value, the associated parameter will not be null. The field or property member that is promised to be not-null. Initializes the attribute with the specified return value condition and list of field and property members. The return value condition. If the method returns this value, the associated parameter will not be null. The list of field and property members that are promised to be not-null. Gets the return value condition. Gets field or property member names.