HomShaBom Posted January 9, 2017 Share Posted January 9, 2017 Is there a guide or tutorial on this forum about how to make and use a configuration for a mod? I've looked but I can't seem to find anything on it. Link to comment Share on other sites More sharing options...
. . . Posted January 9, 2017 Share Posted January 9, 2017 I'd like to know too ! Link to comment Share on other sites More sharing options...
SinisterHumanoid Posted January 9, 2017 Share Posted January 9, 2017 (edited) Your config goes in modinfo.lua right under configuration_options = This is what I have in my Smooth Camera mod. Spoiler { { name = "ROTATION_SNAP", label = "Rotation Snap", options = { {description = "1°", data = 1}, {description = "3°", data = 3}, {description = "5°", data = 5}, {description = "15°", data = 15}, {description = "45°", data = 45}, {description = "90°", data = 90}, {description = "180°", data = 180}, }, default = 45, hover = "Default is 45°" }, } ROTATION_SNAP is the variable that it's editing local rotamount in my modmain. Spoiler function PlayerController:RotLeft() if not GLOBAL.TheCamera:CanControl() then return end local rotamount = GetModConfigData("ROTATION_SNAP") if not GLOBAL.IsPaused() then GLOBAL.TheCamera:SetHeadingTarget(GLOBAL.TheCamera:GetHeadingTarget() - rotamount) elseif self.inst.HUD ~= nil and self.inst.HUD:IsMapScreenOpen() then GLOBAL.TheCamera:SetHeadingTarget(GLOBAL.TheCamera:GetHeadingTarget() - rotamount) GLOBAL.TheCamera:Snap() end end GetModConfigData("ROTATION_SNAP") is the modinfo.lua name, and the "data" is the variable it changes to. Label is what you want the option of the config to be. ie. "Difficulty" and options would be "Easy, Medium, Hard" This is just how I have the config for my basic mod. But is the jist of what a config does and how it does it. Depending on what your mod does, or you want it to do, will effect what needs to be done in the config Edited January 9, 2017 by SinisterHumanoid Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now