How cognifydev/clashofgods works
ClashOfGods is an Among Us gameplay mod with custom roles, networked role RPCs, event-driven game integration, configurable UI, cosmetics, and an extensible plugin system—especially Python plugins. The main startup workflow loads the mod, registers listeners and roles, then reacts to game events to provide gameplay behavior. The graph emphasizes documented and indexed subsystem relationships; some plugin and UI integrations are represented without verified call edges because their source was not excerpted.
Main entry points: Main.cs Mod startup · CustomRole.cs Custom roles · SplashManagerPatch.cs Load sequence · ListenerManager.cs Listener dispatch
Components 16
Startup and Events
- Mod startup
COG/Main.cs - Load sequence
COG/UI/Load/SplashManagerPatch.cs - Listener dispatch
COG/Listener/ListenerManager.cs - Game event types
COG/Listener/Event/Event.cs - Configuration
COG/Config/ConfigBase.cs
Gameplay Systems
- Custom roles
COG/Role/CustomRole.cs - Role registry
COG/Role/CustomRoleManager.cs - Built-in roles
COG/Role/Impl/Unknown.cs - Role RPC dispatch
COG/Rpc/Role/RoleRpcManager.cs - Winner evaluation
COG/Game/CustomWinner/CustomWinnerManager.cs
Plugins and Cosmetics
- Plugin resources
COG/Plugin/ResourcesManager.cs - Python plugins
COG/Plugin/Python/PythonPluginManager.cs - Custom cosmetics
COG/Cosmetic/CosmeticsManager.cs
Player Options and UI
- Client options
COG/Listener/Impl/ClientOptionListener.cs - Custom buttons
COG/UI/Hud/CustomButton/CustomButton.cs
Other components
- Among Us player
Connections 16
- Among Us player → Mod startup: starts mod
- Mod startup → Load sequence: loads through
COG/UI/Load/SplashManagerPatch.cs - Load sequence → Listener dispatch: registers listeners
COG/UI/Load/SplashManagerPatch.cs - Load sequence → Built-in roles: registers roles
COG/UI/Load/SplashManagerPatch.cs - Listener dispatch → Game event types: dispatches events
COG/Listener/ListenerManager.cs - Listener dispatch → Role registry: dispatches role events
COG/Listener/ListenerManager.cs - Mod startup → Configuration: loads configuration
COG/Config/ConfigBase.cs - Role registry → Custom roles: stores roles
COG/Role/CustomRoleManager.cs - Custom roles → Custom buttons: registers buttons
COG/Role/CustomRole.cs - Custom roles → Role RPC dispatch: registers RPCs
COG/Role/CustomRole.cs - Role RPC dispatch → Role registry: resolves role IDs
COG/Rpc/Role/RoleRpcManager.cs - Custom roles → Winner evaluation: supplies win logic
COG/Role/CustomRole.cs - Mod startup → Plugin resources: unloads resources
COG/Main.cs - Plugin resources → Python plugins: loads plugins
- Plugin resources → Custom cosmetics: loads cosmetic resources
- Client options → Configuration: reads language settings
COG/Listener/Impl/ClientOptionListener.cs