Mod loader for Mega Man Battle Network Legacy Collection.

Related tags

GUI chaudloader
Overview

chaudloader

chaudloader is a mod loader for Mega Man Battle Network Legacy Collection.

For users

  1. Run install.exe. If you are on Steam Deck, you will need to run install instead.

  2. Start the game. Mods in the mods folder will be activated in alphabetical order.

For modders

Mods consists of the following files in a directory inside the mods folder:

  • info.toml: Metadata about your mod. It should look something like this:

    title = "my cool mod"
    version = "0.0.1"
    authors = ["my cool name"]
    unsafe = false  # set to true if you want to use scary unsafe functions
    requires_loader_version = "*"  # or any semver requirement string
  • init.lua: The Lua script to run on mod load.

Asset modding

In init.lua, you may use the following functions:

--
-- Execution environment
--

-- Game name ("Vol1" or "Vol2").
chaudloader.GAME_ENV.name: string

-- SHA256 of the EXE.
chaudloader.GAME_ENV.exe_sha256: string

-- Name of the current mod.
chaudloader.MOD_ENV.name: string

-- Path to the current mod.
chaudloader.MOD_ENV.path: string

--
-- exe/data .dat file functions
--

-- Opens an exe/data .dat file located in exe/data (e.g. `exe6.dat`).
function chaudloader.ExeDat(dat_filename: string): ExeDat

-- Reads the contents of a file out of the .dat file.
--
-- Previous calls to write_exe_dat_contents are visible to subsequent calls to read_exe_dat_contents.
function chaudloader.ExeDat:read_file(path: string): string

-- Writes the file data into the .dat file.
--
-- Note that this does not mutate the original .dat file on disk, but for all intents and purposes to both the game and the mod loader it does.
function chaudloader.ExeDat:write_file(path: string, contents: string): string

--
-- .map + .mpak file functions
--

-- Unmarshals an .map + .mpak file.
function chaudloader.Mpak(map_contents: string, mpak_contents: string): Mpak

-- Inserts an entry at the given ROM address into the mpak. Existing entries will be clobbered. If contents is nil, the entry will be deleted.
chaudloader.Mpak[rom_addr: integer] = string

-- Reads an entry at the given ROM address.
chaudloader.Mpak[rom_addr: integer]: string

-- Iterates through all entries of an mpak.
pairs(chaudloader.Mpak): (integer, string)

-- Marshals an mpak back into .map + .mpak format.
function chaudloader.Mpak:to_raw(): (string, string)

--
-- Mod file functions
--

-- Reads the contents of a file from the mod folder.
function chaudloader.read_mod_file(path: string): string

-- Lists the contents of a directory from the mod folder.
function chaudloader.list_mod_directory(path: string): string[]

-- Gets the metadata of a file from the mod folder.
function chaudloader.get_mod_file_metadata(path: string): { type = "dir" | "file", size = integer }

--
-- Unsafe functions (mod must have unsafe = true)
--

-- Writes directly into process memory.
function chaudloader.unsafe.write_process_memory(addr: integer, buf: string)

-- Reads directly from process memory.
function chaudloader.unsafe.read_process_memory(addr: integer, n: integer): string

--
-- Utility functions
--

-- Requires a module from the mods directory.
--
-- If unsafe = true, require may load Lua DLLs of the form <name>.dll from the mods directory.
--
--
-- If the name contains dots (`.`), they will be translated to slashes for paths (`/`). If the name is for a Lua DLL, they will be replaced with underscores (`_`) in the loader function. For example, for a library named `foo.bar`:
--
--  - Path: foo/bar.lua (or foo/bar.dll)
--  - DLL entry point: luaopen_foo_bar
--
-- For more information on writing Lua libraries, see https://www.lua.org/pil/26.2.html. If you don't particularly feel like using any Lua features, you may define your luaopen function like so:
--
--    int luaopen_mylibrary(void* unused) {
--        // Do all your logic here.
--        return 0;
--    }
function require(name: string): any

-- Prints a log line.
function print(...)

For instance, for a simple font mod, you can write the following script:

local exe6_dat = chaudloader.ExeDat("exe6.dat")
local exe6f_dat = chaudloader.ExeDat("exe6f.dat")

local font = chaudloader.read_mod_file("eng_mojiFont.fnt")

exe6_dat:write_file("exe6/data/font/eng_mojiFont.fnt", font)
exe6f_dat:write_file("exe6f/data/font/eng_mojiFont.fnt", font)

Mods are order dependent: the DAT contents written by a previous mod will be visible to a subsequent mod.

Deprecated API
-- Loads a library from the mod folder and call its chaudloader_init function.
--
--     chaudloader_init: unsafe extern "system" fn(userdata: *const u8, n: usize) -> bool
--
-- Deprecated: See |require|.
function chaudloader.unsafe.init_mod_dll(path: string, userdata: string)

-- Reads the contents of a file out of a .dat file located in exe/data (e.g. `exe6.dat`).
--
-- Previous calls to write_exe_dat_contents are visible to subsequent calls to read_exe_dat_contents.
--
-- Deprecated: See |chaudloader.ExeDat:read_file|.
function bnlc_mod_loader.read_exe_dat_contents(dat_filename: string, path: string): string

-- Writes the given data into a zip .dat file located in exe/data.
--
-- Note that this does not mutate the original .dat file on disk, but for all intents and purposes to both the game and the mod loader it does.
--
-- Deprecated: See |chaudloader.ExeDat:write_file|.
function bnlc_mod_loader.write_exe_dat_contents(dat_filename: string, path: string, contents: string)

-- Reads the contents of a file from the mod folder.
--
-- Deprecated: See |chaudloader.read_mod_file|.
function bnlc_mod_loader.read_mod_contents(path: string): string

For developers

Build the binary with cargo build --release. You will need nightly Rust.

You might also like...
A sci-fi battle simulation implemented in the bevy engine.
A sci-fi battle simulation implemented in the bevy engine.

Bevy Combat It's a bevy port of my ECS Combat Unity demo. Check out the web demo in your browser. You can use the - and = keys to speed up and slow do

A Rust implementation of the GMT game Battle Line.

rsbl A Rust implementation of the game Battle Line. Running Currently there is only the simplest prototype of the game: a text-based table with ⚑ char

A simulator for Street Fighter 6 battle data.

sf6_sim A simulator for Street Fighter 6 battle data. Very early in development. It can currently simulate boxes, cancel lists, and movement. Online v

A mansplainer for man commands, cheeky and rude, use at your own risk

mansplain mansplain is a Command-Line Interface (CLI) tool built in Rust that mansplains a command to you Prerequisites Rust and Cargo installed An Op

Pink is a command-line tool inspired by the Unix man command.

Pink is a command-line tool inspired by the Unix man command. It displays custom-formatted text pages in the terminal using a subset of HTML-like tags.

A more compact and intuitive ASCII table in your terminal: an alternative to
A more compact and intuitive ASCII table in your terminal: an alternative to "man 7 ascii" and "ascii"

asciit A more compact and intuitive ASCII table in your terminal: an alternative to man 7 ascii and ascii. Colored numbers and letters are much more e

Rust no-BS Dead Man's Switch TUI
Rust no-BS Dead Man's Switch TUI

Dead Man's Switch This is a simple implementation of a Dead Man's Switch. Use at your own risk. Check the f****(as in friendly) code. Dead man's switc

The Rust Compiler Collection is a collection of compilers for various languages, written with The Rust Programming Language.

rcc The Rust Compiler Collection is a collection of compilers for various languages, written with The Rust Programming Language. Compilers Language Co

Webpack loader for Rust files. DEPRECATED, use WasmPack instead

The project is in low maintance now Use WasmPack instead Webpack Rust loader Webpack loader for Rust Example add.rs #[no_mangle] pub fn add(a: i32, b:

An OpenGL function pointer loader for Rust

gl-rs Overview This repository contains the necessary building blocks for OpenGL wrapper libraries. For more information on each crate, see their resp

A rust layered configuration loader with zero-boilerplate configuration management.

salak A layered configuration loader with zero-boilerplate configuration management. About Features Placeholder Key Convension Cargo Features Default

Thread Safe Cache with async loader functions based on tokio-rs

cache-loader-async crates.io The goal of this crate is to provide a thread-safe and easy way to access any data structure which might is stored in a d

Bevy asset loader that transparently supports loading over http(s)

Bevy Web Asset This is a tiny crate that that wraps the standard bevy asset loader, and adds the ability to load assets from http and https urls. Supp

Webpack loader for Rust files.

Webpack loader for Rust files.

This is a webpack loader that loads Rust code as a WebAssembly module

rust-native-wasm-loader This is a webpack loader that loads Rust code as a WebAssembly module. It uses the native Rust support for compiling to wasm32

Boot tools: loader, image generator, etc as a library crate

ArcBoot v0 A uefi bootloader for riscv, arm and x86. Comes in the form of a single executable. the source code contains a single executable target and

Yet another youtube (and more) down loader

Yet another youtube (and more) down loader

Rusty Reflective DLL Injection - A small reflective loader in Rust 4KB in size
Rusty Reflective DLL Injection - A small reflective loader in Rust 4KB in size

Reflective Loader in Rust (4KB in size) A small reflective loader PoC in Rust. I remade this from my old project (https://github.com/memN0ps/arsenal-r

Coffee is a loader for ELF (Executable and Linkable Format) object files written in Rust
Coffee is a loader for ELF (Executable and Linkable Format) object files written in Rust

Coffee is a loader for ELF (Executable and Linkable Format) object files written in Rust. It provides a mechanism to load and parse ELF files similar to COFFLoader, but specifically designed for ELF files used in Unix-like systems.

Comments
  • dxgi.dll is causing the game to not start

    dxgi.dll is causing the game to not start

    dxgi.dll is causing the game to not start, and is giving errors like "The procedure entry point CreateDXGIFactory2 could not be located in the dynamic link library C\WINDOWS\SYSTEM32\d3d11.dll." or the location of the game.

    If you have a solution for this, I would love to hear it. Discord is Criminon#1834.

    opened by Criminon 8
  • MMBNLC Steam Edition Saves are Locked to Account

    MMBNLC Steam Edition Saves are Locked to Account

    MMBNLC Steam Edition Saves are Locked to Account Simply copying saves from one userdata folder to the other does not work. Would love to see if you guys could figure out how to get around that.

    https://www.pcgamingwiki.com/wiki/Mega_Man_Battle_Network_Legacy_Collection_Vol._1

    opened by simeononsecurity 2
  • Add linux cross compilation 🐧

    Add linux cross compilation 🐧

    Note:

    • It doesn't seem to preserve the executable permission, might be stripped from extraction.
    • The installer must be run in a terminal, it won't automatically open one as Windows does.

    Sample: Workflow Run Release

    opened by ArthurCose 1
Releases(v0.6.2)
Owner
The Rockman EXE Zone
Your primary source for all things Mega Man Battle Network and Mega Man Star Force.
The Rockman EXE Zone
A collection of components and widgets that are built for bevy_ui and the ECS pattern

Widgets for Bevy UI A collection of components and widgets that are built for bevy_ui and the ECS pattern. Current State This was started recently and

Gabriel Bourgeois 3 Sep 2, 2022
Mod for Mega Man Battle Network Legacy Collection to restore the WWW base music in the postgame.

MMBNLC Postgame WWW Base Music mod This is a mod for Mega Man Battle Network Legacy Collection Vol. 2 adjusts the field music played in the WWW base i

Prof. 9 3 May 7, 2023
rollback netplay for mega man battle network / ロックマンエグゼのロールバックネットプレイ

tango (logo courtesy of pnw_ssbmars / ロゴ提供:pnw_ssbmars) netplay for mega man battle network games in the style of https://github.com/ssbmars/BBN3-netc

murk.land 8 May 23, 2022
Rollback netcode for Mega Man Battle Network!

Tango Tango is rollback netplay for Mega Man Battle Network. Supported games MEGAMAN6_FXXBR6E: Mega Man Battle Network 6: Cybeast Falzar (US) MEGAMAN6

Tango 68 Dec 31, 2022
Easy c̵̰͠r̵̛̠ö̴̪s̶̩̒s̵̭̀-t̶̲͝h̶̯̚r̵̺͐e̷̖̽ḁ̴̍d̶̖̔ ȓ̵͙ė̶͎ḟ̴͙e̸̖͛r̶̖͗ë̶̱́ṉ̵̒ĉ̷̥e̷͚̍ s̷̹͌h̷̲̉a̵̭͋r̷̫̊ḭ̵̊n̷̬͂g̵̦̃ f̶̻̊ơ̵̜ṟ̸̈́ R̵̞̋ù̵̺s̷̖̅ţ̸͗!̸̼͋

Rust S̵̓i̸̓n̵̉ I̴n̴f̶e̸r̵n̷a̴l mutability! Howdy, friendly Rust developer! Ever had a value get m̵̯̅ð̶͊v̴̮̾ê̴̼͘d away right under your nose just when

null 294 Dec 23, 2022
A mod loader for Baldur's Gate 3

Yet-Another-BG3-Mod-Loader This is a native mod loader for Baldur's Gate 3 The main features of this mod loader are: It does not modify any original g

Cherry 3 Oct 17, 2023
Rust implementation of the legacy Master Server Query Protocol

msq-rs Rust library implementation of the legacy Master Server Query Protocol. Documentation crates.io Repository Release Notes Usage Add this to your

mtcw 6 Nov 20, 2022
A safe implementation of the secure remote password authentication and key-exchange protocol (SRP), SRP6a and legacy are as features available.

Secure Remote Password (SRP 6 / 6a) A safe implementation of the secure remote password authentication and key-exchange protocol (SRP version 6a). Ver

Sven Assmann 10 Nov 3, 2022
Pure-rust implementation of legacy H.263 video codec and associated color transforms

website | demo | nightly builds | wiki h263-rs h263-rs is a pure-Rust implementation of ITU-T Recommendation H.263 (2005/08), a video codec commonly u

Ruffle 7 Dec 18, 2022
Command-line program to manage PS battle logs. WIP.

psbattletools psbattletools is a command-line tool written in Rust for manipulating Pokémon Showdown battle logs. Installation psbattletools currently

Annika 2 Dec 27, 2022