@nathanhoad/saywhat-core
v1.0.0
Published
A collection of SayWhat parsing and exporting utilities
Downloads
2
Readme
@nathanhoad/saywhat-core
A collection of utilities for working with SayWhat projects.
npm install @nathanhoad/saywhat-core
Usage
Converting Lines/Responses to/from text
textToLines
andlinesToText
: Convert the "lines" part of a node to/from its text representation.textToResponses
andresponsesToText
: 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
projectToXml
andprojectToResX
: 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.