Skip to content

ardittristan/VTTNPCGen

Repository files navigation

GitHub All Releases Donate

Not Enough NPCs

This module adds a customizable NPC Generator to Foundry.

Foundry 0.7: Because of a mistake normal install for versions pre 1.0.0 are broken, please use this manifest if you want to download version 0.5.0 for foundry 0.7

Installation

To install, import this Manifest into your module browser.

Usage

General Usage

A new button should've been added to the bottom of the Actors tab named Generate NPC. This button opens a window where you can select what you want to include in the generation. If you're satisfied with your generation, click Accept to save the NPC to a NPC sheet.

Custom Images

On the generator application there is an image settings button. Clicking this button will pop up the image setting list, any folder and it's you put in here will be used with it's subdirectories for searching icons. Make sure you don't have too many subdirectories in the folder or it might take a while to generate a npc. To select a folder with the filepicker, just select any file in the folder and it'll automatically remove the filename from the textbox once closed.

Custom Data

It is possible to import custom data into the generator. The data get's loaded from JSON. In the settings there is an option to open a JSON editor where you can add your own entries. For some formatting examples you can look at Examples, or double click on a tab in the editor to see the default data.

If you don't want to use the default data but only your custom data. You can toggle the default data on and off at the bottom of the editor.

Changelog

Check the Changelog

Credits

A lot of the generator data comes from Cellule/dndGenerator

 

Api usage

Though not recommended there is an api that can be used to generate npcs.

API info

 
npcGen.generateNPC(amount = 1, options = npcGen.defaultApiOptions, fillDefault = false);

  • amount is amount of npcs to generate
  • options is an object with all the options for the generator, how this object looks can be found in the console when clicking generate in the npc generator. If no options are provided everything default is enabled.
  • fillDefault makes missing options default to true if enabled (otherwise they default to false)