Jump to content

DSTConfig - modoverrides.lua generation tool for servers


Recommended Posts

On 2/22/2016 at 7:14 AM, Muche said:

When a mod is disabled in modoverrides.lua, the updated modoverrides.lua will have it enabled.

Regarding indentation, this looks like a simple solution: http://pastebin.com/CJcm95tb.

@JoeW, for some reason, the patch triggered forum security solution (CloudFlare Ray ID: 278a9346e0bd0589), even though it was in the code block.

Right, it currently assumes enabled. I'll have to fix that.

If you know how to use git you can pull request that diff straight to the repo. Otherwise I'll get it merged in before I update again.

On to my other project... I've been plugging away at my server manager. I'm just working on backend stuff right now. All of the ini configuration stuff that Klei uses has been converted to a single lua file. All of the generic files you need to put in specific places is done for you and is all stored under a single directory for ease of backups and portability.

I've also got a plugin system for the manager so you can run lua files and do things before, during, or after startup. Plugins currently look like this:

context:ListenForEvent("preinit", function(evt) 
    -- Stuff here happens before the server starts.
end)

context:ListenForEvent("init", function(evt)
    -- Stuff here happens as the server is starting up.
end)

context:ListenForEvent("postinit", function(evt)
    -- Stuff here happens after the server is started
end)

context:ListenForEvent("shutdown", function(evt) 
    -- Stuff here happens if the user tells the program to close.
end)

(The actual logic that installs, configures, and runs the server is coded as an internal lua plugin)

A bunch of utility functions are exposed as globals and I've done my own implementation of Klei functions like DoTaskInTime and DoPeriodicTask for those accustom to DST modding.

Link to comment
Share on other sites

DSTConfig 1.6 released.

Changelog:

  • Formatting fixes by Muche.
  • Enable flag is preserved on multiple runs like config options.
  • Add global for changing the working directory.

Also my DSTDedi project is now public on Github. No release yet, but it is functional enough to run a server with caves and manage your ini settings and mods. (Also DSTConfig is integrated. It always runs the latest code from GitHub automatically.)

If you know how to use maven just run package on the project to build it. Keep in mind it only works on Windows currently because launching and managing processes via Java is a bit cumbersome. Working on Linux and OSX support.

Link to comment
Share on other sites

48 minutes ago, Snowhusky5 said:

Is there any output besides the modoverrides.lua, like a log file?

It prints some messages into standard output/error, so if you want to save them into file, you could use for example

java -jar DSTConfig.jar >log.txt 2>log-err.txt

 

Link to comment
Share on other sites

1 hour ago, Muche said:

It prints some messages into standard output/error, so if you want to save them into file, you could use for example


java -jar DSTConfig.jar >log.txt 2>log-err.txt

 

ah ok, for whatever reason when I launched the jar by double-clicking, it didn't have an output file by default, so when I did this it output the modoverrides data to log.txt

Link to comment
Share on other sites

2 hours ago, Snowhusky5 said:

ah ok, for whatever reason when I launched the jar by double-clicking, it didn't have an output file by default, so when I did this it output the modoverrides data to log.txt

1.6 has a bug where it outputs the file to the wrong directory. It will be fixed shortly.

 

edit: 1.7 is out with this issue fixed.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

×
  • Create New...