This generates encounters for the Dungeons and Dragons 3.5 system. One can generate encounters of particular levels, times of day, and environments. One can also filter creature types. Treasure and equipment are generated.

npc, character, treasure, encounter, generator, dungeons, dice, equipment, dragons, d20, dnd, gen, 3.5
Install-Package EncounterGen -Version 3.0.5



Generate random Dungeons & Dragons encounters

Build Status


To use EncounterGen, simply use the EncounterGenerator. The environments are listed in the EnvironmentConstants. Levels up to 20 are supported.

Dungeons are currently the only fully-working environments. This is still in development

var encounter = encounterGenerator.GenerateWith(EnvironmentConstants.Dungeon, 15);

Getting the Generators

You can obtain generators from the bootstrapper project. Because the generators are very complex and are decorated in various ways, there is not a (recommended) way to build these generator manually. Please use the Bootstrapper package. Note: if using the EnounterGen bootstrapper, be sure to also load modules for RollGen, TreasureGen, and CharacterGen, as it is dependent on those modules

var kernel = new StandardKernel();
var rollGenModuleLoader = new RollGenModuleLoader();
var treasureGenModuleLoader = new TreasureGenModuleLoader();
var characterGenModuleLoader = new CharacterGenModuleLoader();
var encounterGenModuleLoader = new EncounterGenModuleLoader();


Your particular syntax for how the Ninject injection should work will depend on your project (class library, web site, etc.)

Installing EncounterGen

The project is on Nuget. Install via the NuGet Package Manager.

PM > Install-Package EncounterGen

There's EncounterGen and EncounterGen.Bootstrap - which do I install?

That depends on your project. If you are making a library that will only reference EncounterGen, but does not expressly implement it (such as the DungeonGen project), then you only need the EncounterGen package. If you actually want to run and implement the dice (such as on the DnDGenSite or in the integration tests for EncounterGen), then you need EncounterGen.Bootstrap, which will install EncounterGen as a dependency.