FiberLib

v1.2.0·Updated 2024-05-28

FiberLib is a library mod for sending and receiving packets from a Bopl Battle Mod. It is currently in a bare bones state and only includes necessary tools, but will soon include more utilities for ma

Screenshots 1 screenshots

About this mod Author’s original text

.svg)

FiberLib

FiberLib is a library mod for sending and receiving packets from a Bopl Battle Mod. It is currently in a bare bones state and only includes necessary tools, but will soon include more utilities for making the developer experience simpler.

Documentation

(This project still under development, so API can change)

  • First make a global static variable for signature to send/recive packets

public static Signature signature;

  • Register a packet recive handler

public class MyMod: BaseUnityPlugin

{

private void ReciveHandler(Packet packet, Connection connection, NetIdentity identity)

{

byte data = packet.data;

Console.WriteLine($"recived {data.length} bytes");

}

private void Awake()

{

signature = PacketManager.RegisterPacketReciveHandler(ReciveHandler);

}

}

  • Send Packet

public class MyMod: BaseUnityPlugin

{

private void OnGUI()

{

if (GUI.Button(new Rect(0, 50, 170f, 30f), "Send Packet"))

{

Console.WriteLine("Sending packet!");

Packet packet = new Packet(signature, Encoding.UTF8.GetBytes("Hello, World!"))

PacketManager.SendPacket(packet);

}

}

}

Install & use Install: follow the bundled instructions

  1. Unzip the archive from playbuff and read the bundled readme / instructions first.
  2. Most mods rely on the game's mod loader — the usual route is a community mod manager (such as r2modman): pick this game, install, and it handles the loader and dependencies.
  3. For a manual install, put the mod files into the matching Mod / plugins folder inside the game directory.
  4. Launch the game to confirm it loaded; mods with listed dependencies need those installed as well.

Install locations vary a lot between mods — the bundled readme is the most reliable guide.

Dependencies

Install these first, or the mod will not work:

BepInEx-BepInExPack

File & checksum

Filename
FiberLib-1.2.0.zip
File size
13.1 KiB