Avorion
28 个评价
Config Loader
   
奖励
收藏
已收藏
取消收藏
Mods: Mod
文件大小
发表于
更新日期
59.151 KB
2020 年 2 月 21 日 上午 10:39
2021 年 9 月 20 日 下午 11:22
13 项改动说明 ( 查看 )

订阅以下载
Config Loader

描述
Networking and saving of mod configs made easy.
--Graphics design is my passion.

Usage:

Create config/config.lua and have that file return a table with your values in it.

In your file loading the config do:
package.path = package.path .. ";data/scripts/lib/?.lua"
local Config = include("ConfigLoader")

Then you can index your values as if it was returning that table from config/config.lua ie:
Config.myvalue will return config.lua's myvalue property.


TLDR:

1. Create lua file in scripts/config/ that returns a table with your values in it
2. Include the configloader as a variable and index your values as if it were that table from the config folder


Additional Info:

It stores the config in moddata for modification by server admins, and that modified file is sent to players on connect syncing the files.
Due to some technical limitations the client's config will be delayed until the second reconnect.
23 条留言
Digan 2 月 15 日 上午 6:24 
Could use an update alright.
InsanityXL 2022 年 12 月 7 日 下午 12:59 
I am getting this on our Dedicated Server

2003555597 is problematic: Mod 'Config Loader' [2003555597]'s base game requirement (0.33.5 to 2.0.*) doesn't match version 2.3 of the game.

Any plans on updating this mod or any of your other mods?
Redrum Jackle 2022 年 8 月 4 日 下午 3:35 
It needs an update, but works so far.
CurtimusPrime92 2022 年 8 月 4 日 下午 1:13 
is this 2.2 compatible?
Bubbet!  [作者] 2021 年 5 月 12 日 下午 7:49 
Sounds like you've messed up one of your configs?
Mialu 2021 年 5 月 12 日 下午 1:43 

Error while adding file D:\Program Files (x86)\Steam\steamapps\workshop\content\445220\2003555597\data/scripts/lib/ConfigLoader.lua:
D:\Program Files (x86)\Steam\steamapps\workshop\content\445220\2003555597\data/scripts/lib/tabletofile.lua:103: attempt to get length of local 'tables' (a nil value)
VortexBox 2020 年 9 月 17 日 上午 7:15 
update please and thank you
Me_Who_Else 2020 年 6 月 29 日 下午 10:35 
Are you going to update this one?
MachoNatchoMan 2020 年 5 月 15 日 上午 12:15 
aah oki sorry for the disturbance, thank you for the answer :)
in the grand scheme of things it turned out your mod wasn't much of an issue at all
Bubbet!  [作者] 2020 年 5 月 12 日 下午 1:01 
Again, i've wrote code to reduce disk reads/writes down to one time on startup and none on clients which should be much faster. But im not allowed to use it because of server hard crashing bugs that the devs have to resolve before i can roll out the update again. I've already emailed koonschi but he's out of office currently.