How callofcreator/newmod works
1. Project shape and runtime
- NewMod is a single C# class library (NewMod.csproj in NewMod.sln) that is loaded into Among Us as a mod.
- The repo is organized around game-client extension points rather than a standalone app: most code either patches game methods, defines role logic, or adds UI/gameplay artifacts.
- The presence of newmod-win.bundle and newmod-android.bundle indicates platform-specific asset packaging for Windows and Android support.
2. Mod entry and global coordination
- NewMod.cs is the likely root bootstrap for the mod.
- Shared cross-cutting services live in files like NewModEventHandler.cs, PendingEffectManager.cs, DiscordStatus.cs, ModCompatibility.cs, and DebugWindow.cs.
- These pieces coordinate lifecycle, status reporting, deferred effects, compatibility checks, and developer-facing diagnostics.
3. Role system is the main gameplay subsystem
- The repo is built around custom roles grouped by faction: CrewmateRoles, ImpostorRoles, and NeutralRoles.
- Each role has a dedicated class under NewMod/Roles, with companion configuration in NewMod/Options/Roles.
- INewModRole.cs suggests a common interface or contract that role implementations follow, making roles a pluggable domain layer.
4. Ability/action layer is separated from role definitions
- Under NewMod/Buttons, each role’s active abilities are implemented as button/action classes such as AegisButton, DrainButton, StrikeButton, ReviveButton, FeignDeathButton, and CaptureButton.
- This separation implies roles describe identity and rules, while buttons encapsulate in-game interaction, cooldowns, and triggers.
- Several roles have multi-step abilities, e.g. OverloadButton plus FinalButton, or Revenant with both feign and awakening actions.
5. UI and world-space gameplay components
- NewMod/Components contains reusable in-game objects that appear in the world or UI layer: zones, traps, domes, shields, trays, NPCs, and toast notifications.
- Examples include ShadowZone, ShieldArea, SupressionDomeArea, WitnessTrapArea, and WraithCallerNpc.
- These components act as interaction surfaces and visual feedback for role mechanics, rather than being tied to one specific role class.
6. Patch layer hooks into Among Us behavior
- NewMod/Patches is the integration boundary with the base game.
- Patches are organized by game area: chat, clipboard, main menu, quitting, stats popup, end game, role display, meeting HUD, cosmetics, and specific role behaviors.
- This is the core adapter layer that modifies vanilla Among Us flow to support custom roles, UI changes, and new game states.
7. Networking and RPC are used for synchronized effects
- NewMod/Networking/BeaconPulseRpc.cs and CustomRPC.cs indicate explicit network messages for mod-specific state changes.
- The architecture likely uses RPCs to replicate role actions, map pulses, and other transient effects across clients.
- This is an important boundary: local player input in buttons/components is translated into networked events so other players see the same outcome.
8. Modifiers add orthogonal status effects
- NewMod/Modifiers defines temporary or persistent gameplay states such as Adrenaline, Drowsy, Explosive, FalseForm, and Sticky.
- These appear to be independent from roles, meaning they can layer onto players regardless of faction.
- NewMod/Options/Modifiers mirrors that subsystem with tunable settings, so modifiers are configurable gameplay primitives rather than hardcoded one-offs.
9. Custom game mode support
- NewMod/CustomGameModes/RevivalRoyale.cs suggests at least one alternate game mode beyond role additions.
- Game modes are likely top-level rule-set changes that alter how roles, death, revival, or win conditions work.
- Related types like NewModEndReasons.cs, NewModFaction.cs, and MissionType.cs support higher-level match state and outcome classification.
10. Configuration is split by feature area
- NewMod/Options is a large settings subsystem, with general options, compatibility toggles, NPC options, role options, and modifier options.
- This makes the mod highly data-driven: most gameplay features can be tuned without changing core logic.
- LocalSettings/NewModLocalSettings.cs indicates some settings are client-specific rather than host/game-wide.
11. Compatibility is an explicit concern
- ModCompatibility.cs and Options/CompatibilityOptions.cs show the mod checks for and adapts to other mods.
- The README lists support for several external mods, so interoperability is part of the architecture rather than an afterthought.
- Patches/Compatibility contains targeted patches for startup/game launch integration with specific mod loaders or frameworks.
12. Assets are bundled with feature-specific resources
- Resources contains role icons, notification icons, sounds, and platform bundles.
- The sound assets map directly to role actions and effects, reinforcing that the visual/audio layer is tightly coupled to gameplay feedback.
- NewModAsset.cs likely centralizes asset lookup or registration for these packaged resources.
13. Specialized screen effects and presentation
- Components/ScreenEffects contains visual overlays such as glitch, distortion, earthquake, shadow flux, and pulse hue effects.
- These effects are probably triggered by roles, modifiers, or game events to provide immediate sensory feedback.
- Together with toast components and debug UI, the mod includes a strong presentation layer on top of raw role logic.
14. Build and release tooling
- The repo includes GitHub Actions CI (.github/workflows/ci.yml) and nuget.config, so build/release is automated and package restore is customized.
- The repository is packaged for public distribution, with documented release artifacts and versioned downloads in the README.
- From an architecture perspective, this means the mod is treated as a distributable binary with reproducible builds rather than a hand-built local patch.
15. High-level data flow
- Player input starts in role buttons or patched UI.
- Button logic validates conditions, updates local state, and emits RPCs when the effect must be synchronized.
- Patches and components translate those state changes into game behavior, visuals, and sounds.
- Options and compatibility layers gate which roles/effects are active, while event handlers and pending-effect management coordinate timing across the match.
Main entry points: RevivedKillButton.cs Action buttons · RolePatch.cs Patches · Toast.cs Components · NewModEventHandler.cs Event handler
Components 23
Core mod
Entry point and cross-cutting coordination for the mod runtime.
- Mod entry · Root mod initializer and startup coordination.
NewMod/NewMod.cs - Event handler · Central event wiring and match lifecycle reactions.
NewMod/NewModEventHandler.cs - Pending effects · Queues and resolves delayed gameplay effects.
NewMod/PendingEffectManager.cs - Discord status · Updates external presence or status reporting.
NewMod/DiscordStatus.cs - General options · Shared gameplay and feature configuration.
NewMod/Options/GeneralOption.cs
Roles
Faction-based role definitions and their configuration.
- Role options · Per-role tunables and activation settings.
NewMod/Options/Roles/AegisOptions.cs - Faction roles · Crewmate, impostor, and neutral role implementations.
NewMod/Roles/INewModRole.cs - Crewmate · Crewmate-aligned custom roles.
NewMod/Roles/CrewmateRoles/Aegis.cs - Impostor · Impostor-aligned custom roles.
NewMod/Roles/ImpostorRoles/Edgeveil.cs - Neutral · Neutral-aligned custom roles.
NewMod/Roles/NeutralRoles/Egoist.cs
Gameplay systems
Buttons, components, modifiers, and custom game modes that implement behavior.
- Action buttons · Player-triggered abilities and multi-step role actions.
NewMod/Buttons/RevivedKillButton.cs - Components · Reusable world-space objects, UI feedback, and screen effects.
NewMod/Components/Toast.cs - Modifiers · Orthogonal gameplay states that can layer onto players.
NewMod/Modifiers/StickyModifier.cs - Game modes · Alternate match rule sets and outcome classification.
NewMod/CustomGameModes/RevivalRoyale.cs - Modifier options · Configuration for modifier behaviors and balance.
NewMod/Options/ModifiersOptions.cs
Game integration
Patches, networking, and compatibility boundaries into Among Us.
- Compat layer · Checks and adapts behavior for other mods or loaders.
NewMod/ModCompatibility.cs - RPCs · Custom synchronized messages for mod-specific state.
NewMod/CustomRPC.cs - Beacon RPC · Network message for beacon or pulse-related effects.
NewMod/Networking/BeaconPulseRpc.cs - Patches · Core Harmony-style integration layer for vanilla game behavior.
NewMod/Patches/RolePatch.cs - Chat patch · Chat and messaging integration points.
NewMod/Patches/ChatPatch.cs - Role patch · Hooks that alter role display and role-driven flow.
NewMod/Patches/RolePatch.cs - Meeting HUD · Meeting and vote-time HUD changes.
NewMod/Patches/Roles/MeetingHudPatch.cs
Assets
Packaged resources and platform-specific bundles.
- Assets · Icons, sounds, and platform bundles used by gameplay feedback.
NewMod/Resources/newmod-win.bundle
Connections 28
- Mod entry → Event handler: initializes · Bootstraps lifecycle coordination.
- Mod entry → Compat layer: checks · Adapts startup behavior for other mods.
- Mod entry → General options: loads · Reads feature settings early.
- Event handler → Pending effects: queues · Defers and applies timed effects.
- Event handler → Discord status: updates · Keeps external presence in sync.
- Patches → Action buttons: enables · UI/game hooks expose role actions.
- Patches → Components: renders · Patches drive world and HUD feedback.
- Patches → Role patch: contains · Role-related integration hooks.
- Patches → Meeting HUD: contains · Meeting-time UI changes.
- Patches → Chat patch: contains · Chat and messaging hooks.
- Faction roles → Crewmate: groups · Crewmate role implementations.
- Faction roles → Impostor: groups · Impostor role implementations.
- Faction roles → Neutral: groups · Neutral role implementations.
- Crewmate → Role options: configured by · Each role has tunable settings.
- Impostor → Role options: configured by · Each role has tunable settings.
- Neutral → Role options: configured by · Each role has tunable settings.
- Crewmate → Action buttons: uses · Role abilities are exposed through buttons.
- Impostor → Action buttons: uses · Role abilities are exposed through buttons.
- Neutral → Action buttons: uses · Role abilities are exposed through buttons.
- Action buttons → RPCs: syncs · Action outcomes are replicated across clients.
- Action buttons → Beacon RPC: syncs · Beacon-related effects are networked.
- Action buttons → Components: spawns · Abilities create zones, NPCs, and effects.
- Components → Assets: uses · Visual/audio feedback relies on packaged resources.
- Modifiers → Modifier options: configured by · Modifier tuning lives in options.
- Modifiers → Components: manifest as · Statuses show up through effects and overlays.
- Game modes → Event handler: orchestrates · Alternate rules interact with lifecycle events.
- Compat layer → Patches: selects · Compatibility-specific hooks alter startup and gameplay behavior.
- Assets → Components: drives · Icons, sounds, and bundles support presentation.