1.0.0 • Published 5 years ago
@nathanhoad/saywhat-core v1.0.0
@nathanhoad/saywhat-core
A collection of utilities for working with SayWhat projects.
npm install @nathanhoad/saywhat-core
Usage
Converting Lines/Responses to/from text
textToLinesandlinesToText: Convert the "lines" part of a node to/from its text representation.textToResponsesandresponsesToText: Convert the "responses" part of a node to/from its text representation.
Working with Nodes
findLinksFromNode: Get a list of nodes that this node might exit out to.findLinksToNode: Get a list of nodes that lead to this node.filterNodes: Filter a list of nodes by matching various properties to a string.getNodesByChildId: Get a dictionary of lines/responses within a node. The key is the line/response ID and the value is the node.
Exporting
projectToXmlandprojectToResX: Converts a SayWhat project to XML/ResX for MonoGame, etc.projectToJson: Converts a SayWhat project JSON structure to a flat JSON array of dialogue objects.projectToTres: Converts a Saywhat project into a Godot Resource.
1.0.0
5 years ago