Starbound

Starbound

Mech Overhaul
Possible improvement
It's possible to add a modded fuel by patching the \interface\mechfuel\mechfuel.config file, but the fuel gauge that displays above the mech while inside it is hard-coded in the \scripts\deployment\playermechdeployment.lua file (specifically in the drawEnergyBar function) via a chain of if ifelse checks

I propose to add a config file (probably called "mechfuelbar.config" or something in the same folder) that contains an array of types with each element of the array having a type, frame, and bar, then have the lua check via a loop (while, return until, or for loop) that once it finds a match, it assigns the frame and bar to the respective strings in the config file, then use a break to break out of the loop, so you don't have to check the rest. The default "/null.png" would be assigned before the loop, and simply overwritten if found (if not it stays the same.

I would do it myself, but this is your mod, and I don't have much experience in writing in Lua.
Last edited by Material Defender; Sep 20, 2024 @ 11:30am
< >
Showing 1-2 of 2 comments
Material Defender Sep 29, 2024 @ 3:53pm 
Alternatively, have the playermechdeployment.lua file, in the drawEnergyBar function, have the default not be a null, but either one of the existing fuel bars or a new one so any that are added to the mechfuel.config file via a patch would end up with a visible fuel bar when deployed.
You should make a patch for open starbound that adds the mech refuel menu to the quick bar.

Also it would be cool if mechs were more op and permanent.
For example mechs could be immune to most damage, and be left on planets like other vechicles, but if you're mech gets destroyed you have to build another one and it doesn't just magicly respawn.

Maybe our space ships could have a mech bay added to them, where we could fly out of our ship and fall down to the planet of something.
< >
Showing 1-2 of 2 comments
Per page: 1530 50