简体中文(Simplified Chinese) 日本語(Japanese)
Those scripts let you extract lua data from DST Dedicated Server files or safe data and convert to JSON.
To run the scripts in this repository, use lua5.1
or luajit
.
extract-worldgen-vanilla
: Extract settings used during world generation from server source codeextract-mod-config
: Extract basic information and configuration items of a mod from modinfo.luaconvert-worldgen-override
: Extract world settings from worldgenoverride.lua or leveldataoverride.luaconvert-mod-override
: Extract mod settings from modoverrides.lua
-
extract-worldgen-mod
: Extract settings added during world generation by mods (such asIsland Adventures
andUncompromising Mode
)
unzip
command is required.- The default value for
output_dir_path
is./output/worldgen
. ${dst_version}
must be a number. For example593204
.- The version number is stored in
${path_to_dst_server_dir}/version.txt
.
- The version number is stored in
- Output JSON format
lua extract-worldgen-vanilla.lua ${path_to_dst_server_dir}
lua extract-worldgen-vanilla.lua ${path_to_dst_server_dir} ${output_dir_path}
lua extract-worldgen-vanilla.lua ${dst_version} ${path_to_unzipped_scripts_dir}
lua extract-worldgen-vanilla.lua ${dst_version} ${path_to_unzipped_scripts_dir} ${output_dir_path}
# if the path of scripts.zip is /root/server/data/databundles/scripts.zip
lua extract-worldgen-vanilla.lua /root/server
# output_dir_path/
# ├── ......
# ├── en.forest.master.json
# ├── en.cave.master.json
# ├── en.forest.json
# └── en.cave.json
- The default value for
output_dir_path
is./output/modconfig
. - The default value for
lang_code
isen
.- You can specify other language codes, but if the mod is not supported, the output will be english, maybe.
- Output JSON format
lua extract-mod-config.lua ${path_to_target_mod_dir}
lua extract-mod-config.lua ${path_to_target_mod_dir} ${output_dir_path}
lua extract-mod-config.lua ${path_to_target_mod_dir} ${output_dir_path} ${lang_code}
- The default value for
output_dir_path
is./output
. - Output JSON format
lua convert-worldgen-override.lua ${path_to_shard_dir}
lua convert-worldgen-override.lua ${path_to_shard_dir} ${output_dir_path}
- The default value for
output_dir_path
is./output
. - Output JSON format
lua convert-mod-override.lua ${path_to_shard_dir}
lua convert-mod-override.lua ${path_to_shard_dir} ${output_dir_path}