Lib.InGameWiki 1.5.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package Lib.InGameWiki --version 1.5.0                
NuGet\Install-Package Lib.InGameWiki -Version 1.5.0                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Lib.InGameWiki" Version="1.5.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Lib.InGameWiki --version 1.5.0                
#r "nuget: Lib.InGameWiki, 1.5.0"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Lib.InGameWiki as a Cake Addin
#addin nuget:?package=Lib.InGameWiki&version=1.5.0

// Install Lib.InGameWiki as a Cake Tool
#tool nuget:?package=Lib.InGameWiki&version=1.5.0                

How to install

  1. Open your mod project in visual studio.
  2. Right click on References>Manage NuGet Packages
  3. Inside the package manager window, click Browse and search for 'Lib.InGameWiki'.
  4. Select the package (author: Epicguru) and select Install.
  5. Package should now be installed. Under references, click on InGameWiki and find the properties tab.

How to add basic auto-generated wiki

  1. Create a new C# file in your project called Wiki.cs
  2. Put this code in the file:
using InGameWiki;
using Verse;

namespace YourModNamespace
{
    [StaticConstructorOnStartup]
    internal static class Wiki
    {
        static Wiki()
        {
            // Get a reference to your mod instance.
            Mod myMod = MyModClass.Instance;
            
            // Create and register a new wiki.
            var wiki = ModWiki.Create(myMod);
            
            // Check if wiki creation was successful. If not, exit from the method.
            if(wiki == null)
                return;
            
            // Change some wiki properties.
            wiki.WikiTitle = "MyMod: My wiki";
        }
    }
}
  1. Edit the code to work with your mod; change namespace, get a reference to your mod class, change wiki title etc.

Note: If you are confused as how to get the reference to your mod class, see this example file for an example mod class. If you are familiar with C# modding, you probably already have one.

How to add custom pages

In your mod folder, next to the Textures, Assemblies, About folders, create a new folder called Wiki. Inside this folder, you can add custom pages.

Click here to see how to create custom pages.

You can also add custom content to auto-generated item pages. For example, add images and text to the page that was generated for a gun added by your mod.

Click here to see how to add content to existing auto-generated pages.

How to exclude certain defs

The wiki mod takes all of the defs added by your mod and discards certain ones, such as Motes, Projectiles, Blueprints etc. However, sometimes you want to tell the mod to ignore a specific def. This could be either to hide content from the player, or just because it gives no useful information.

Suppose that you want to remove the generated page for a def called MyBoringDef. The steps are as follows:

  1. Go into your Wiki folder. See here for more info on folder structure.
  2. Create a new file called Exclude.txt. Spelling is imporant!
  3. Open the txt file.
  4. Type the name(s) of the def that you want to exclude, such as MyBoringDef. One def name per line.
  5. Save the file.

Inside the Excluded.txt file, blank lines are ignored. You can also type comments by starting the line with // such as // I am a comment.

Example mod

This wiki mod was initially created for my mod Antimatter Annihilation:

Link to Antimatter Annihilation repository

There you will find all the wiki files, folder structures and every source file required to make a fully funcional wiki.

WIP documentation.

Product Compatible and additional computed target framework versions.
.NET Framework net472 is compatible.  net48 was computed.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETFramework 4.7.2

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
15.0.1 139 4/9/2024
15.0.0 110 4/9/2024
1.7.1 520 5/30/2021
1.7.0 371 5/30/2021
1.6.0 429 5/30/2021
1.5.0 444 9/24/2020
1.4.0 439 7/6/2020
1.3.0 431 6/5/2020
1.2.0 470 5/27/2020
1.1.0 489 5/24/2020
1.0.1 511 5/22/2020
1.0.0 444 5/22/2020

Wiki API updated to allow mods to have only optional support of the wiki.