Please disclose if your mod was created primarily using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
NPC API MelanieMelicious
WIKI SOON. An API for setting up interactive NPCs with dialogue, stores, quests, unlockable dialogue, and built-in save system! Can be built solely in-editor, but also can be edited with code. Find me in Lethal Company Modding Discord.
| Last updated | 2 hours ago |
| Total downloads | 4 |
| Total rating | 0 |
| Categories | Libraries Misc BepInEx |
| Dependency string | MelanieMelicious-NPC_API_MelanieMelicious-1.0.0 |
| Dependants | 0 other packages depend on this package |
This mod requires the following mods to function
BepInEx-BepInExPack
BepInEx pack for Mono Unity games. Preconfigured and ready to use.
Preferred version: 5.4.2305README
NPC API - MelanieMelicious v1.0.0
WIKI SOON. An API for setting up interactive NPCs with dialogue, stores, quests, unlockable dialogue, and built-in save system! Can be built solely in-editor, but also can be edited with code. Find me in Lethal Company Modding Discord.
Previews:

Editor Components
More info in the wiki (if written at the time of you reading this).
| Name | Type | Public Methods | Editor Variables | Overview |
|---|---|---|---|---|
| NPC | MonoBehavior Script | Welcome() | nameBox, welcome, spawnScrapPos | Script you place on the object considered your NPC, alongside its trigger (example, interact trigger) to invoke its Welcome() method as a Unity event. Welcome() opens chat box to the chat node set in the welcome variable. Chat box name is set by the nameBox variable. Any scrap spawns from interacting with this NPC will be located at spawnScrapPos variable. |
| NPCChatNode | Scriptable Object | LockDialogue(int index), UnlockDialogue(int index) | displayText, selectText, selectEvent, saveUnlockedDialogue, allResponses, lockedResponsesIndex, shop, quests | Each NPCChatNode is the data for 1 dialogue option. Display text is what the NPC says, select text is what you say to trigger the NPC using this node, selectEvent for Unity events to play when selecting this option, saveUnlockedDialogue is if this node is intended to have saveable changes per-save, allResponses is a list of all possible responses (quest ones), lockedResponsesIndex is a list of indexes in allResponses that should be locked/hidden by default, shop is for if this node instead opens a shop - and which shop - instead of dialogue, and quests is if this chat node is the center for the input quests. |
| NPCShopNode | Scriptable Object | None | buy, buyByName, buyCost, sell, sellByName, sellMulti, addQuota, tradeWant, tradeWantByName, tradeGive, tradeGiveByName | Each NPCShopNode is the data for 1 shop. Buy is a list of items intended to be buyable, and buyByName is for alternatively fetching the item by itemName, for example, to use third-party mod or vanilla items. Items found by name are added to the normal list after directly referenced ones. Sell, sellByName, tradeWant, tradeWantByName, tradeGive, and tradeGive by name work similarly. BuyCost syncs the buy price of items of the same list index. Selling allows the player to sell specific items, if they are holding them, for their credit value, sellMulti multiplies this value, and addQuota is whether or not this value progresses the quota. TradeWant is what the NPC wants in order to give the player the item of the same index, in tradeGive. |
| NPCQuestNode | Scriptable Object | Progress(int index), DespawnHeld(), ClaimQuest(bool claim) | conditions{requirement, item, itemByName, progress, progressMax}, completeEvent, questDefault, questProgress, questComplete, claimed | Each NPCQuestNode is the data for 1 quest. Progress(int index) allows you to increment progression for a condition based on index, by one. DespawnHeld() despawns current player's held object. ClaimQuest(bool claim) marks a quest as claimed or unclaimed a quest. Conditions are your list of conditions required to be completed, to complete the quest, requirement is a short worded description of what's needed to meet this condition (for future quest UI visualization), item and itemByName are optional, for if your progress is intended to be triggered by handing in an item to the NPC, progress is how much progress this condition is met up to, and progressMax is how much progress you need for this condition to be complete. CompleteEvent is for running Unity events once the quest is completed, questDefault is the dialogue option that shows up in no special scenarios, questProgress is for if the player is holding any item (if applicable) needed by any of the quest conditions, when in the chat node housing the quest, and questComplete is the dialogue for when the player has first completed the quest, and in the chat node housing the quest. |