Skip to content

LiF-x/ClientAutoloader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ClientAutoloader

The LiFx ClientAutoloader is the client-side mod framework for Life is Feudal: Your Own. It is the counterpart of the ServerAutoloader: where the server framework loads gameplay mods, the ClientAutoloader loads client mods — custom GUIs, materials, datablocks, keybinds and quality-of-life features — automatically at game start.

Features

  • Automatic mod loading — drop a folder with a cmod.cs into mods/ (or ship it via YoLauncher, plain or zipped) and it loads when the client starts.
  • Hook system — callbacks around client initialization, materials loading and datablock loading, so mods extend the client without overwriting game scripts.
  • Zip mod support — mods can ship as zip archives in yolauncher/mods/ or yolauncher/modpack/.
  • Autojoin — executes yolauncher/autojoin.cs once the main menu is up, enabling launcher-driven direct connect.
  • In-game knowledge base — press F2 to open the LiFx knowledge base in the in-game browser; mods can open their own web windows.
  • Version overlay — shows the framework version on the main menu.
  • File verification — answers server-issued CRC/SHA-256 hash requests so servers can verify client modpack integrity.
  • Bundled JSON libraryJettison for config files and structured data.

Documentation

📚 Full documentation

Page What it covers
Getting Started Client mod requirements, load locations, full mod template
Hooks Reference Every client callback hook, with parameters and timing
API Reference All LiFx:: client functions and globals
Built-in Features Autojoin, F2 knowledge base, version overlay, file verification
Jettison JSON The bundled JSON library

Quick example

// mods/ExampleClientMod/cmod.cs
if (!isObject(ExampleClientMod))
{
    new ScriptObject(ExampleClientMod) {};
}

package ExampleClientMod
{
    function ExampleClientMod::setup(%this)
    {
        LiFx::registerCallback($LiFx::hooks::onInitClientDone, "onReady", ExampleClientMod);
    }

    function ExampleClientMod::onReady(%this)
    {
        echo("ExampleClientMod is ready!");
    }
};

activatePackage(ExampleClientMod);
LiFx::registerCallback($LiFx::hooks::mods, "setup", ExampleClientMod);

See Getting Started for the full walkthrough.

Repository layout

Path Purpose
client/init.cs The framework: mod loader, hook system, built-in features
client/jettison.cs JSON parser/serializer
client/sha256.cs.dso SHA-256 implementation (compiled) for file verification
client/lifx.png LiFx logo
scripts.bat Packs the release scripts.zip

Related projects

License

GNU General Public License v3. Publicly distributed mods built on this framework must comply with the license's source-sharing requirements.

About

No description, website, or topics provided.

Resources

License

Code of conduct

Contributing

Stars

0 stars

Watchers

1 watching

Forks

Sponsor this project

Packages

 
 
 

Contributors