Modding Tutorials/Testing mods
In this tutorial we will look into testing our mods.
What you'll learn
You'll learn several methods to test your mods.
While testing your mods you might want to spawn in weapons, activate events or damage colonists, etcetera. This can be achieved using the game's Development mode.
To use this mode, you need to activate it:
- Run Rimworld;
- Press the "Options" button in the main menu;
- Under Gameplay, the middle column, tick "Development mode".
Now that Development mode is activated, create a new world and colony and test your mod:
- Create world;
- Create a colony, probably on Free Build difficulty;
- The following icons: .. can now be found in the top-right;
- Open the debug log = Clicking this opens the debug log;
- Open the package editor = Opens the package editor, which allows you to preview and modify Sounds and Hair;
- Open the view settings = Allows you to activate graphic overlays and cheats like Fast Research;
- Open debug actions menu = This menu allows you to do all sorts of things;
- Incidents allows you to spawn in raids or execute incidents;
- Actions - Misc contains a few buttons that complete research, continue the in-game tutorial, etcetera;
- Tools - General contains explosions and damaging things, snow actions, plant growth and some more advanced AI visualizations;
- Tools - Pawns holds tools which alter Pawn appearance, levels, health and jobs;
- Tools - Spawning allows you to spawn Pawns, Items in different stack sizes, Terrain and Filth;
- Autotests contains some stress tests like spawning in an entire colony in different stages, burning everything and killing lots of pawns at once.
- Open debug logging menu = Contains buttons which log parts of the game in the Debug Log;
- Open the inspector = Gives a lot more information when hovering over things;
- Toggle god mode = Toggles God mode, which allows you to build things without cost;
- Pause the game when an error is logged = Toggles exactly what it says.
Testing specific content
To test guns you'll want to enable Development mode and spawn in the guns you want to test using Debug Actions Menu -> Tools - Spawning -> Spawn weapons.
Apparel works in the same way, but you don't spawn it in via Spawn weapons.
Once again, using Development mode spawn in pawns using Tools - Spawning -> Spawn pawns.
If your mod adds new weapons, you'll want to see how often raiders spawn with them. Start a raid using the Debug Actions Menu -> Incidents.
Incident mods can be tested using Debug Actions Menu -> Incidents.