REPO Mod Library

版本 v1.0.66·更新於 2025-03-28

A mod library with developer friendly syntax with the goal of simplifying writing repetitive and ugly code.

模組介紹 作者原文

R.E.P.O Mod Library

Overview

The R.E.P.O Mod Library is a mod library for the game R.E.P.O, designed to provide a comprehensive set of utility functions and shared data management for modding the game. Created by Lillious &.Zer0, this library offers extensive control over player mechanics, game state tracking, and system interactions.

Compatibility

  • Supports the latest version of R.E.P.O
  • Compatible with MelonLoader v0.7.0 modding framework
  • Compatibility may vary with BepInEx modding framework using the BepInEx.MelonLoader.Loader plugin
  • Currently still in early development, so expect missing features and bugs

Key Features

The R.E.P.O Mod Library provides a comprehensive set of utilities that enable:

Scene Management

  • Multi-scene Architecture: Support for different game environments including main menu, lobby, shop, arena, and truck lobby with state tracking
  • Level Management: Tools for managing and accessing both gameplay and menu levels
  • Map Control: Direct access to map objects and their controllers for environmental manipulation

Player Systems

  • Movement Mechanics: Configurable movement speeds for walking, sprinting, and crouching
  • Energy System: Customizable energy mechanics with adjustable maximum capacity and sprint drain rates
  • Gravity Manipulation: Special movement abilities including anti-gravity effects and custom gravity settings

Enemy Control

  • Enemy Management: Functions to count, freeze, or disable enemies across the level
  • Controller Access: Ability to manipulate enemy controllers for gameplay adjustments

System Architecture

  • Manager Framework: Centralized access to critical game systems including:
  • Stats tracking
  • Run management
  • Graphics settings
  • Gameplay rules
  • Asset management
  • Audio control
  • Network functionality
  • Steam Integration: Support for Steam player identification

Game State Utilities

  • State Tracking: Comprehensive tracking of game state across different scenes and modes
  • Level Generation: Access to level generation systems for dynamic content creation

Player Data

  • Player Information Persistence: Mechanisms to maintain player data across different game states
  • Player Stats Customization: Tools for modifying player capabilities and performance

Installation

  • Install this nuget package to your project
  • import the library into your mod

Usage Example

using MelonLoader;

using Repo_ExampleMod;

using Repo_Library;

// MelonInfo attribute to define the mod information

[assembly: MelonInfo(typeof(Example), "R.E.P.O Example Mod", "1.0.0", "Example")]

// MelonGame attribute to specify the game the mod is for

[assembly: MelonGame("semiwork", "REPO")]

// Namespace for the mod

namespace Repo_ExampleMod

{

public class Example: MelonMod

{

private readonly Library Repo_Lib = new Library();

// Override the unity update method

public override void OnUpdate()

{

// Check if player is in game

if (!Repo_Lib.IsInGame()) return;

// Get the player controller

PlayerController playerController = Repo_Lib.GetPlayerController();

// Check if player is sprinting

if (Repo_Lib.IsSprinting(playerController))

{

// Set the sprint energy drain to 0

Repo_Lib.SetSprintEnergyDrain(playerController, 0f);

// Set the player's energy to the max energy

Repo_Lib.SetPlayerCurrentEnergy(playerController,

Repo_Lib.GetPlayerMaxEnergy(playerController));

}

}

}

}

Documentation

The following provides information about the utility functions available in the game system. These functions are categorized based on their purpose and functionality.

Action Events

| Function | Description |

|----------|-------------|

| OnEnemyDeath | Event triggered when an enemy dies | GameObject enemy |

public override void OnInitializeMelon()

{

Library.OnEnemyDeath += (enemy) =>

{

MelonLogger.Msg("Enemy Died: " + enemy.name);

};

}

| OnItemDestroyed | Event triggered when an item is destroyed | GameObject item |

public override void OnInitializeMelon()

{

Library.OnItemDestroyed += (item) =>

{

MelonL

安裝與使用 安裝:BepInEx 外掛

  1. 本站下載的壓縮包就是模組本體,通常是 BepInEx 外掛(解壓後得到 .dll 或外掛資料夾)。
  2. 建議流程:用社群模組管理器(如 r2modman)選中本遊戲後匯入該模組,管理器會自動裝好 BepInEx 前置並處理依賴。
  3. 手動流程:先在遊戲目錄裝好 BepInEx 載入器,再把解壓出的 .dll 或外掛資料夾放進 BepInEx/plugins/。
  4. 啟動遊戲,BepInEx 控制台會列印載入日誌;確認這個模組出現在日誌裡即為安裝成功。

帶「前置依賴」的模組需要一併安裝,否則不會載入。功能開關通常在遊戲內或外掛自帶的設定檔裡調整。

檔案與校驗

檔案名稱
REPO_Mod_Library-1.0.66.zip
檔案大小
181.7 KiB