A module for Foundry VTT. Allows you to use a rolltable as the Display Name for a token so each new token will get a random name. It can also roll random biographies for tokens when used with Better Rolltables.
I picked this module up in December 2023 as it hadn't been updated in a while. I have it working for what I need for DnD5e. Anything else that doesn't work will be reviewd at as bug reports come in here on GitHub.
First, grab your random name table and drag it into a Journal entry. That will give you some
text that looks similar to @UUID[RollTable.OfTzIzGy7fyCgGz7]{Elf First Name}
. Now, open the Actor
and click Prototype Token. Paste your @UUID[RollTable...
text into the Token Name. When you drag your Actor
onto the map to create a new Token, its name will be randomized!
If you are working directly with a compendium, then the string will instead look like @UUID[Compendium.monks-enhanced-journal.person-names.RollTable.AQBywLCajYDmBTay]{Dwarf Last Name}
.
When multiple lines are returned from a table, the lines will be joined together with a space. For example, you could have a roll table formula of 1d1, and have two results which are also tables for a firstname and a lastname, both with range 1-1.
Story tables are currently bugged in Better Rolltables. When this changes, we will update this README with instructions on how to randomize biographies.
This module provides a few methods under the game.allGoblinsHaveNames
namespace for use in macros or other modules.
game.allGoblinsHaveNames.rerollSelectedTokens()
- Re-rolls the names of all selected tokens.game.allGoblinsHaveNames.rollFromTableString(tableStr)
- Takes a string like@RollTable[...
or@Compendium[...
and returns a random result from that table.
You can install this module through the Foundry module UI.
You can file an issue on github if you're running into a bug or reach me on the Foundry VTT discord as Gandamir.