Skip to content

Modules & Dependencies

RevFramework is modular by design: systems can be added, removed, and combined freely.

Where a dependency exists, it is intentional and explicitly defined.


Dependency Rules (The Contract)

Independent systems (swappable)

These systems can be used on their own or in any combination.

Removing one does not break the others:

  • Inventory
  • Pickups
  • Crafting
  • Health
  • Status Effects
  • Currency
  • Loot

What “independent” means here

Integration between systems is handled through optional integration layers, not hard compile-time coupling.

“Independent” here means compile-time independence — modules can be added or removed without breaking others.


One intentional dependency

  • Economy → requires Currency

Economy is a higher-level orchestration layer built on top of Currency (ledgers, policies, balances).

Economy requires Currency

If you remove Currency, Economy is not supported. Economy's bootstrap is compiled out without Currency, so there would be nothing left to start — the Economy assembly is therefore not built at all, and Economy types stop resolving.

You will see this rather than a compile error: Economy's components stop resolving, so anything in an Economy scene reports a missing script.

Remove the Economy folders when you no longer need them — Tools ▸ RevGaming ▸ RevFramework ▸ Tools ▸ Cleanup Orphaned Content… handles the folders left behind by removing Currency, but Economy itself is left for you to delete deliberately.

You may safely remove Economy at any time if you only need Currency.


Required vs Optional Modules

RevFramework separates required infrastructure from removable feature layers.

Required infrastructure (do not remove)

These provide the shared foundation used by all systems:

  • Core
  • Common
  • UnityIntegration
  • Editor define/guard utilities

Removing these will break compilation or disable core framework behaviour

These modules:

  • provide shared contracts and base behaviour
  • handle Unity-facing implementations (input, environment, etc.)
  • keep scripting defines and module guards in sync

Modular runtime systems (safe to remove)

Each system is a self-contained module:

  • Inventory
  • Pickups
  • Crafting
  • Health
  • Status Effects
  • Currency
  • Loot
  • Economy (with Currency dependency)

You can remove any system as long as you are not using it.


Optional support layers (safe to remove)

These exist for learning, testing, and tooling — not runtime behaviour:

  • Samples
  • Teaching
  • Tests
  • Most Editor tooling
  • Unused Integrations

These can be safely removed without affecting runtime systems.


Samples and Optional Integrations

Some sample scenes demonstrate cross-system behaviour (for example: Crafting + Currency, or Inventory-backed rewards).

These integrations are opt-in by design.

  • All sample scenes open cleanly with no missing scripts
  • Additional systems are not required to run a scene
  • Where integration is shown, scenes include notes explaining how to enable it

If you own additional systems:

  • You can enable integration by wiring the relevant services and adapters

If you do not:

  • The scene continues to function using standalone behaviour or demo adapters

RevFramework does not rely on “intentional missing scripts” to demonstrate modularity.


Common Mix & Match Setups

Currency only

Standalone value system for balances, transfers, policies, escrow, audit, and exchange.

Currency + Economy

Adds higher-level flows such as shops, crafting costs, rewards, and rollback-safe operations.

Health only

Damage/heal rules, shields, regen, combat state, and death pipelines.

Status Effects only

Buffs/debuffs, DOT/HOT, stacking, auras, immunity/cleanse/dispels — independent of Health.

Inventory only

Containers, equipment, filters, stacks, deltas, and snapshot tracking.

Pickups only

Interactables, pickup modes, decorators (VFX/SFX/etc.), cooldowns, and world logic.

Crafting only

Deterministic recipes, preflight checks, atomic crafting transactions, and refund safety.

Loot only

Weighted and independent-chance drop tables, nested tables, seeded rolls, and modifiers.

Rolling is a pure function — LootRoller.Roll(table, rng) takes data and returns data, touching no scene and no other system — so a table's odds are usable and testable with nothing else installed. Delivery is what needs company: handing awards to an inventory, a wallet, or the world is done by define-gated integrations for Inventory, Currency, Pickups and Health, and each simply sits out when its system is absent. An award nothing can deliver is reported as undelivered rather than dropped.


About Integrations

Cross-system behaviour is implemented through optional integrations located in:

Integrations/

These integrations:

  • are explicit and opt-in
  • are safe to remove
  • depend on the systems they connect
  • never introduce hidden coupling into runtime systems

Examples:

  • Inventory ↔ Currency
  • Pickups ↔ Health
  • Crafting ↔ Inventory

Practical Guidance

If you are trimming systems:

  1. Remove the system’s Runtime folder only if you are not using that system at all
  2. Optionally remove its Editor, Teaching, and Samples folders
  3. Remove any related integration folders under:
Integrations/<System>/

If something fails to compile after removal, it is usually because an integration referencing that system is still present.


Cleanup & Restore (Optional)

RevFramework includes tools to help manage module removal:

  • Orphan Cleanup — removes leftover references after deleting a system
  • Restore Tools — allows re-adding previously removed content

These are optional utilities designed to simplify cleanup — not required for normal use.


TL;DR

TL;DR

  • Systems are modular and mix-and-match
  • Integrations are optional and explicit
  • Core infrastructure must remain
  • Only one hard rule exists: Economy requires Currency