Ad-Man-Gamer Posted December 2, 2024 Posted December 2, 2024 (edited) It would be fitting to have some kind of community plugin system (HexMods). What is a HexMod? A HexMod is simply a scripting system for creating a pseudo application for HexOS. A HexMod is simply a config file for a non native HexOS application, that points to all the relevant binarys, and their various configuration files on the server, and allows you to script out their configurations into categories, and fields available for input or option selection. Let's look at how a hex mod would work in practice. There's a game server that you want to run. However, it does not have a HexOS Application, Nor would the developer seem at all interested To do so any time soon. The game is popular and a community member decides to make a HexMod script to plumb the software into HexOS UI, Allowing for simple configuration and sensible defaults. The hex mods script First outlines what the software is, and where the dependencies can be downloaded and installed. If it's available as apt Package that is easy enough. [HexMod] version = "1.0" Title = "Game X Server" [Package] Type = "apt" Name = "gameXServer" Now you need to let HexMod know where the relevant config files are. [CFGs] Dir = "/etc/gameXServer" File = "config.cfg" Encodeing = "UTF8" This is what the contents of the file is. config.cfg ## Game X Server CFG ip= port= host= godmode= difficulty= Now you need to let it know how to read the file. [Tokens] Comments = "##" EQL = "=" Spaces = FALSE Next = "/n" Structure = [ ~NAME, ~EQL, ~INPUT ] ## Or just load a recognised default. Type = cfg Now you layout each variable, what it is, and what are it's accepted inputs. [Types] ip = ~Network(IP4) port = ~Network(PortTCP) host = ~Network(HostName) godmode = ~Bool["true","false"] difficulty = ~Option["easy","medium","hard"] Now all you do is let HexMod know how to lay out the GUI in the Control Panel, And what switch belongs to what variable. [GUI] Network = { ip = { Title = "IP Address", Type = "Network.IP4", Dis = "Server ip address"} port = { Title = "Port", Type = "Network.Port", Dis = "Listening port for the server." } host = { Title = "Host Name", Type = "Network.Hostname", Dis = "Host name for the server." } } Gameplay = { godmode = { Title = "God Mode", Type = "Bool", Dis = "God mode makes all players invincible and able to fly" } difficulty= { Title = "Game Difficulty", Type = "Option.Dropdown", Dis = "Set the difficulty of the game", Option.1.Lab = "Easy", Option.1.Dis = "All playsers cant die.", Option.2.Lab = "Medium", Option.2.Dis = "Players can die.", Option.2.Lab = "Hard", Option.3.Dis = "Players can die enemies hit harder." } } This will then create an application icon named "Game X Server" in the UI. When you click it It takes you to the configuration page. You get two expandable categories in the UI, Networking and gameplay, With each field having their respective restrictions for what type they are expecting. The HexMod then enters those values into the .cfg for that application and saves the file. HexMod also notices some flags are part of its capability to handle some auto magic on the back end. Such as the Network Types. It binds the application to the IP stated, and also sets a firewall rule accordingly for the port used. You can even have more advanced stuff like pointing to the server binary to also allow for restarting of the service, as well as scripts... The basic idea is the community can make these things pretty easily with scripting if they know how, and every day users who aren't into the technical can just take an off the shelf HexMod a community member has made. HexOs then does all the auto magic in the background. Edited December 2, 2024 by Ad-Man-Gamer Typo Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.