Code Monkey home page Code Monkey logo

foundryvtt-npc-chatter's Introduction

NPC Chatter

Your NPCs have things to say. This Module provides a small API that allows your NPCs to randomly chatter off of roll tables defined for them.

Chatter is displayed as ChatBubbles only, and won't dump to the Chat Log.

I recommend you turn off the Core "Pan to Token Speaker" setting or else risk whiplash.

Installation

FoundryGet

Using FoundryGet

foundryget install https://raw.githubusercontent.com/cswendrowski/FoundryVtt-Npc-Chatter/master/module.json

Foundry

Setup

Given a set of Villagers named "Villager A", "Villager B", and "Villager C", setup a "Villager Chatter" roll table or a "Villager" table under a Folder named "NPC Chatter".

This roll table will need at least one option and a dice roll configured to work.

If "Villager A" has specific dialogue that might trigger on top of the generic Villager chatter, add another "Villager A Chatter" table (or "Villager A" in the "NPC Chatter folder) and it will draw from that as well.

Usage

Chatter can only be triggered via scripting. There are a few Macros included as examples - most work out of the box, but some require additional setup.

The easiest macro is the "Timed Global Chatter" macro - just slap it when a Scene Loads, and they will start chattering!

Trigger Happy

Trigger Happy can trigger NPC chatter as well. Here's an example to get you started:

When an Actor walks into a Room (defined by an invisble actor), have a specific Token chatter: @Actor[TriggerA] @Macro[OXyjmVhEGo3eTaJz]{Specific Token Chatter}

API

Global Chatter

Picks a random Chatter Table belonging to a random Actor on the first active scene and displays a ChatBubble with rolled Text off of the random Chatter Table.

async globalChatter()

Global Chatter Every Interval

Every interval as measured in milliseconds, executes globalChatter().

randomGlobalChatterEvery(milliseconds)

Disable Global Chatter

Clears out the timer on randomGlobalChatterEvery

turnOffGlobalTimerChatter()

Token Chatter

Given a Token, tries to find a matching Chatter Table. If none, exits. If one or more, randomly picks one and displays a rolled result from it as a ChatBubble.

async tokenChatter(token)

Selected Chatter

Grabs the currently selected Tokens and tries to find matching Chatter Tables. If none, exits. If one or more, randomly picks one and an elibable Token and displays a rolled result from the Table as a ChatBubble.

  async selectedChatter()

foundryvtt-npc-chatter's People

Contributors

cswendrowski avatar fmordashev avatar toon324 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.