How it works
Authored data. Stats, Item Objects, Item Attributes, Conditions, Quests, Loot Boxes and the other object types are ScriptableObject assets you create in the Game Modules Manager window. They’re saved under Assets/Game Module Objects/, in folders by type and category, and a single GameModuleRepository indexes them all. Every object also has a Dictionaries bag for extra data, such as a sprite, flavor text or a list of starting skills.
Live state. Your character class inherits GameModulesActor, or GameModulesInventoryActor if it uses the grid inventory. The actor holds lists of runtime copies (GameStat, GameItemObject, GameCondition, GameQuest), so every character has its own values. Equipped items, active conditions and quests feed their modifiers into the actor’s stats, and changed stats recompute on their own. You don’t write an update loop for any of it.
Scene setup. Each gameplay scene needs the Blackboard, Save And Load, Timeboard and QuestEventBoard prefabs. The Blackboard shares values and events between systems, and the Timeboard runs Gametime, the in-game calendar that condition durations and timed quests use.
Code access. Most types live in the InfinityPBR.Modules namespace. Property Code generates typed accessors such as Properties.Stats.Attributes.Health, so you don’t hand-type names or IDs, and GameModuleRepository.Instance.Get<T>() finds any object by uid or name at runtime. The Game Modules Viewer component shows an object’s live stats, items and quests in the Inspector, and lets you edit them at edit time or runtime.
Other modules cover Voices (character audio lines by voice, line and emotion), Lookup Tables for non-linear formulas, and a configurable First Person Movement controller.
Working with an AI assistant
Game Modules 4 ships with skills that teach AI assistants such as Claude Code, Codex or Cowork how the framework fits together. For Claude Code and Cowork, install them from your Unity project folder:
bash "Assets/Magic Pig Games (Infinity PBR)/Game Modules 4/Claude Skill/install.sh"
For Codex, copy the game-modules-4 folder from that Claude Skill folder into .agents/skills in your project.
Ask “What can you do with Game Modules 4?” to confirm the install worked, then describe what you want in plain English. With Unity’s MCP bridge running, the assistant creates and edits the assets in the open Editor, registers them and regenerates the Properties code. Without the bridge, it writes a small editor script that you run from a menu. It also suggests companions like a Max Health stat to cap Health, and helps write the C# that uses your data.
Extending it with your own code
- Almost every
GameModulesActor method is virtual: override what you need instead of rewriting it.
- Subclass shipped scripts such as
GameLootBox instead of editing them, so updates don’t overwrite your work.
- Your own
QuestCondition and QuestReward classes are discovered automatically, whichever assembly they live in.
- Implement
IHandleLootBoxes to tie drops to game state, such as a luck stat.
The scripting documentation goes into each module in detail. For a complete example, see the Party Based RPG Demo Game on the Asset Store: a first-person party game with character creation, quests, loot and enemies.