Skip to content
This repository has been archived by the owner on Aug 26, 2024. It is now read-only.
/ hookui Public archive

Some sort of UI framework/loader for Cities: Skylines 2

License

Notifications You must be signed in to change notification settings

Captain-Of-Coit/hookui

Repository files navigation

Warning

Deprecated library, probably doesn't work with the latest versions and isn't maintained anymore, please find an alternative, or find any update forks via this page: https://github.com/Captain-Of-Coit/hookui/network

HookUI

Library and framework for mod authors to easily add their own mod UI, well integrated into the existing Game UI.

Screenshot

HookUI is some sort of UI framework/loader for Cities: Skylines 2 (C:S2). It replaces the default UI with a UI that provides hooks for mod-authors to inject their own UI components, makes it fit in with the existing game UI easily.

Warning

This is a early version of the loader/framework, expect dragons

The framework/loadah gives you the ability to write small little pieces of UI that you can use just as UI mods, or integrate with your own mod so you don't have to focus too much on UI code.

It consists of a few parts:

  • C# / Game Engine
    • HookUI Mod (mod/)
      • Loads files from other mods and puts them in place
      • Binds currently available extensions to a value the Game UI can read
      • Harmony patches to load the UI system and rewrite which directory the game UI uses
    • HookUI Lib (lib/)
      • Serves as the API for mods to register themselves, so HookUI Mod can find all the extensions required to load
  • JavaScript / Game UI (ui_lib/)
    • API - Sets window properties for mods to register themselves in the UI
    • Loader - Loads the mod extensions into the correct place
    • Menu - A button in the top-left to enable/disable current panels

Put another way:

  • HookUIMod - C# mod that gets loaded in Cities: Skylines 2
  • HookUILib - C# Library that gets used by mod authors
  • HookUI Game UI - Elements for loading and enabling/disabling extensions inside the game
  • HookUIFramework - JavaScript library with some utilties functions for writing Game UIs for Cities: Skylines 2

Requirements

Manual Installation (For players)

Documentation for Mod Authors

Full Examples: