Link Search Menu Expand Document

Generators

The generator editor is used for creating generators, which can be used for drawing random numbers or picking words/phrases from a list. There are four types of generators available:

  • DiceGenerator: This is used to generate random integers (whole numbers) by rolling a number of dice and adding them together. You can also add a flat modifier to the final roll.
  • ShuffleGenerator: This generates a series of numbers between a defined minimum and maximum value, with no repeats (when the generator runs out of unused numbers, the order is shuffled and starts again from the beginning). This roughly simulates a deck of cards.
  • StringTable: This is a list of string values that can be generated randomly (Random mode), in an ordered sequence (Sequential) or in a shuffled sequence (Shuffle). You could use this to easily set up a character who barks a few random lines, without creating a complex network of nodes or variables to track which lines they’ve said recently.
  • NumberTable: This is a list of numbers that can be generated in Random, Shuffle or Sequential mode, in the same way as a StringTable.

To use a generator in-game, call the generate() function with the name of the generator; see the Expression reference for more details.


VNKit and the text of the VNKit documentation is copyright © Axile Studio. This documentation is built in Just the Docs, copyright © 2017-2019 Patrick Marsceill. Just The Docs is distributed by an MIT license.