(shouting)

npcParse.lua (Standardized NPC message parsing!)

The second SMBX collab!
Post Reply
Rixithechao
https://www.youtube.com/watch?v=BODxOghVmko
Posts: 1811
Joined: 10 years ago
First name: Mack
https://rixithechao.talkhaus.com/

npcParse.lua (Standardized NPC message parsing!)

Post by Rixithechao »

Copypasta from the SMBX community thread because I'm tired and gonna hit the snoozemat after publishing this

npcParse.lua

Image

Download and documentation

This library loads data both from tables stored in the NPCs' message text and a JSON file in the level folder ("npcdata.json") and stores it in each NPC's pNPC data. You can even specify a message for the NPC to say once the data's been parsed!
This way multiple libraries can utilize the same NPC's message text, though libraries that currently read from the NPC message directly, such as my own cinematX and a few custom NPC ones, will have to be updated with an option to get the information from the pnpc data instead.

(Please note that the debug text shown in the above screenshot is not a feature of npcParse, but part of the test level's code that uses currently-unreleased features of textblox. I may implement it as a feature in a future update, however.)
Delightful Adventure Enhanced is out now!

Image

There's an official ASMT Discord server! Check it out to discuss Demo games and follow their development! thread, invite link

(Entry requires verification, either with a connected Youtube/Twitter/Twitch/etc account or manually by the server staff.)


Itch.io (albums and eventually games), Youtube (dofur pass and I guess other videos)
Post Reply