@drincs/pixi-vn-json
v1.13.0
Published
Pixi'VN can be integrated with JSON files to create a visual novel.
Downloads
577
Maintainers
Readme
Pixi’VN + Json Integration
Pixi’VN can be integrated with JSON files to create a visual novel. This method is useful for:
- Add a new narrative to Pixi’VN (It was used to create the integration with ink and Ren'Py)
- Create a external tool to create visual novels with Pixi’VN
( In both these cases it is advisable to notify the developers of Pixi’VN to add the new feature to be helped )
flowchart LR;
K[RenPy] ---> Json;
H[ink] ---> Json;
I[Twine] ---> Json;
J[Yarn Spinner] ---> Json;
Json["Pixi’VN + Json"] ===> PixiVN;
PixiVN["Pixi’VN"]How use Pixi’VN + Json?
First of all you need to install the following library:
npm install @drincs/pixi-vn-jsonyarn add @drincs/pixi-vn-jsonpnpm add @drincs/pixi-vn-jsonbun add @drincs/pixi-vn-jsonAll you need to do to use this integration is create a object using the PixiVNJson Model and use the importPixiVNJson() function to import the object.
{
"$schema": "https://pixi-vn.web.app/schemas/latest/schema.json",
"labels": {
"back_in_london": [
{
"dialogue": "We arrived into London at 9.45pm exactly.",
},
{
"labelToOpen": {
"label": "hurry_home",
"type": "jump",
},
},
],
"hurry_home": [
{
"dialogue": "We hurried home to Savile Row as fast as we could.",
},
{
"end": "label_end",
},
]
}
}import { PixiVNJson, importPixiVNJson} from '@drincs/pixi-vn-json';
import json from "./labels.json";
importPixiVNJson(json);After that you can run the back_in_london label with Pixi’VN functions.
import { narration } from '@drincs/pixi-vn'
narration.call(`back_in_london`, {})