-
-
Notifications
You must be signed in to change notification settings - Fork 2
Mod Docker API
Hanaka edited this page Mar 20, 2022
·
1 revision
The Mod Docker API is a API designed for mods that can be used if the mod is being played under Mod Docker (like detect additional copies).
Make a new RPY file (or use a existing one) and add this code to the top of your script.
init 1 python:
try:
import ddmd_api
ddmdApi = ddmd_api.ModDocker_API()
except: pass
or
init 1 python:
persistent.api_present = False
try:
import ddmd_api
persistent.api_present = True
except: pass
if persistent.api_present:
ddmdApi = ddmd_api.ModDocker_API()
Function | Arguments | Example Syntax | Returns |
---|---|---|---|
get_current_container_path() |
None | ddmd_api.get_current_container_path() |
<path/to/base/folder> |
Function | Arguments | Example Syntax | Returns |
---|---|---|---|
get_current_container_game_folder() |
None | ddmd_api.get_current_container_game_folder() |
<path/to/game/folder> |
Function | Arguments | Example Syntax | Returns |
---|---|---|---|
get_current_container_name() |
None | ddmd_api.get_current_container_name() |
"<Mod Name>" |
Function | Arguments | Example Syntax | Returns |
---|---|---|---|
get_current_container_version() |
None | ddmd_api.get_current_container_version() |
"1.0.0" |
Function | Arguments | Example Syntax | Returns |
---|---|---|---|
get_current_container_build_name() |
None | ddmd_api.get_current_container_build_name() |
"<ModBuildName>" |
Function | Arguments | Example Syntax | Returns |
---|---|---|---|
get_current_container_save_folder() |
None | ddmd_api.get_current_container_save_folder() |
"<path/to/saves/folder>" |
Function | Arguments | Example Syntax | Returns |
---|---|---|---|
is_multiple_copies() |
None | ddmd_api.is_multiple_copies() |
True | False |
Function | Arguments | Example Syntax | Returns |
---|---|---|---|
set_multipersistent() |
persist_name: str |
ddmd_api.set_multipersistent("gov.sdc.weiss") |
None |
Function | Arguments | Example Syntax | Returns |
---|---|---|---|
get_multipersistent() |
None | ddmd_api.get_multipersistent() |
MultiPersistent() |