Modding

Modding, or creating mods, is modifying the internal files of *ZERO Sievert* to change the behavior, appearance, or nature of the game's content for personal use or public release. While *ZERO Sievert* does not natively support modding beyond weapon name replacement, through use of the UndertaleModTool it is possible to decompile the game's internal assets, modify them, and recompile them back into a playable state.

While the UndertaleModTool gives modders an extreme amount of freedom, the modding community is still in its early stages and discovering the limits of what can currently be done. There is little documentation specifically for modding the game and most types of mods are still having their viability tested. Likewise, there is as of yet no form of community mod manager of any sort or any other tools specifically built to support *ZERO Sievert* modding beyond basic compatibility built into UndertaleModTool.

*Note:* All mods besides those simply replacing weapon names currently require replacement of the game's data.win file which stores all internal code and assets. If you wish to play or build mods, make sure you backup data.win!

## Documentation

### Code

You can start editing the code directly under Data -> Code -> any gml\_ file. The language used is GML (a lot like C++).

Here is an example of gml\_Script\_scr\_player\_movement edit with the following changes : While encumbered, nerfed walking speed by 40% of original speed and allow you to run at 40% efficiency :

```
var \_speed\_multiplier = argument0
var \_can\_move = argument1
var \_can\_run = argument2
dkey = keyboard\_check(global.kb\_now[(2 << 0)])
wkey = keyboard\_check(global.kb\_now[(0 << 0)])
skey = keyboard\_check(global.kb\_now[(1 << 0)])
akey = keyboard\_check(global.kb\_now[(3 << 0)])
shift\_key = keyboard\_check(global.kb\_now[(4 << 0)])
var camx = camera\_get\_view\_x(view\_camera[0])
var camy = camera\_get\_view\_y(view\_camera[0])
var action = 0
stamina\_run\_drain = lerp(stamina\_run\_drain\_min, stamina\_run\_drain\_max, (global.player\_weight / global.max\_weight))
stamina\_run\_drain \*= global.sk\_k[(4 << 0)]
var can\_run = 1
var can\_walk = 1
if (\_can\_run == 0)
 can\_run = 0
if (\_can\_move == 0)
 can\_walk = 0
var walk\_k = 1
var run\_k = 1
if (global.player\_weight > global.max\_weight)
{
 walk\_k = 0.3
 run\_k = 0.4
 if (room == r\_hub)
 {
 walk\_k = 1
 run\_k = 1
 }
}
if (global.player\_weight > (global.max\_weight + 5))
{
 can\_walk = 0
 walk\_k = 0
 can\_run = 0
 run\_k = 0
 if (room == r\_hub)
 {
 walk\_k = 1
 can\_walk = 1
 can\_run = 1
 run\_k = 1
 }
}
if (stamina <= 0)
 can\_run = 0
if mouse\_check\_button(mb\_right)
 can\_run = 0
if (can\_run\_after\_exit\_building == 0)
 can\_run = 0
spd\_walk = ((class\_speed[player\_class] \* ((100 + backpack\_movement\_speed[backpack\_now]) / 100)) \* \_speed\_multiplier)
spd\_run = ((class\_sprint[player\_class] \* ((100 + backpack\_movement\_speed[backpack\_now]) / 100)) \* \_speed\_multiplier)
if (room == r\_hub)
 spd\_run = (1.7 \* ((100 + backpack\_movement\_speed[backpack\_now]) / 100))
if shift\_key
{
 if (can\_run == 1)
 {
 {
 current\_spd = (((spd\_run \* global.sk\_k[(5 << 0)]) + (global.general\_debug \* 4)) \* run\_k)
 image\_speed\_move\_current = image\_speed\_run
 walk\_time++
 if (global.player\_weight < global.sk\_k[(2 << 0)])
 stamina += stamina\_run\_drain
 if (room == r\_hub)
 stamina += stamina\_run\_drain
 }
 }
 else
 shift\_key = 0
}
if (!shift\_key)
{
 if (can\_walk == 1)
 {
 current\_spd = (spd\_walk \* walk\_k)
 image\_speed\_move\_current = image\_speed\_walk
 }
 else
 current\_spd = 0
}
if ((!akey) && (!skey) && (!dkey) && (!wkey))
 current\_spd = 0
hspd = ((current\_spd \* (dkey - akey)) \* collision\_mutant)
vspd = ((current\_spd \* (skey - wkey)) \* collision\_mutant)
if (hspd != 0 && vspd != 0)
{
 hspd /= 1.4
 vspd /= 1.4
}
var can\_move = 1
if instance\_exists(obj\_consumable\_medication)
{
 can\_move = 0
 if mouse\_check\_button\_pressed(mb\_left)
 {
 with (obj\_consumable\_medication)
 instance\_destroy()
 }
}
if (can\_move == 0)
{
 hspd = 0
 vspd = 0
}
if mouse\_check\_button(mb\_right)
{
 hspd \*= 0.5
 vspd \*= 0.5
}
scr\_collision()
if shift\_key
{
 if (can\_run == 1)
 {
 {
 if (hspd != 0 || vspd != 0)
 stamina -= stamina\_run\_drain
 }
 }
}
if (hspd != 0 || vspd != 0)
{
 fatigue -= ((global.player\_weight \* fatigue\_k\_peso) \* global.sk\_k[(56 << 0)])
 if (room != r\_hub)
 scr\_level\_up\_skill((0 << 0), (global.rate\_cardio \* global.sk\_k[(55 << 0)]))
}
scr\_direzione\_sprite()
{
 recoil\_from\_movement += (item\_weight[arma\_now] / 5)
 walk\_time++
 if (walk\_time >= walk\_time\_max)
 {
 walk\_time = 0
 if (hspd == 0 && vspd == 0)
 {
 }
 else
 scr\_choose\_footstep\_sound((1 << 0))
 }
}

```

### Remarquable code

Most modding will have you make change in a file which names start with gml\_Script\_lista\_ (list for short).

Here we will present what each of those files does.

Has a general disclamer the value (0 << 0) means an empty value and will relates to nothing or a default value depending on the entity type.

#### NPC

File gml\_Script\_lista\_npc, line 112 onwards you will find the list of ALL npc in the game (including traders, monsters and others human).

For a more specific list of enemy check the file gml\_Script\_lista\_enemy. Those files are structured the same.

Look for the specific documentation here.

#### Item

File gml\_Script\_lista\_item refers all items (including loot, weapon, armor, key, etc), specific documentation here.

#### Trader

File gml\_Script\_lista\_trader refers all traders and what items they sell.

#### Chest

File gml\_Script\_lista\_chest refers all chest and what items they drop. (check NPC to know what chest enemies drop on death)

#### Base

File gml\_Script\_lista\_base refers your base slot and from line 69 onwards all modules (use base\_id with Modifiers to know what they do)

#### Skills

File gml\_Script\_lista\_skill\_2 refers to all in-game skills (use sk\_lvl[the\_id] with Modifiers to know what they do)

Beware gml\_Script\_lista\_skill and gml\_Script\_lista\_trait are unused as of now.

#### Modifiers

File gml\_Script\_lista\_skill\_factor are all in-game modifiers. sk\_na is there name and what they do and sk\_k is the coefficient used.

Line 144 onwards is related to skills (file gml\_Script\_lista\_skill\_2)

Line 237 onwards is related to modules / base (file gml\_Script\_lista\_base)

### Texture

You can export and import directly from Data -> Embedded textures -> any Texture file.

Beware to edit the exported file with any application that support transparency (by default Paint doesn't support it and you will have white texture everywhere). If you don't here is an example of what WILL happen :

#### Adding New Sounds

Go to Scripts > Resource Repackers > CopySoundInternal.csx

Enter a random sound name e.g. s\_vuoto

Rename s\_vuoto\_Copy to the desired name

Click the [...] button under Audio file

Import the desired audio track (WAV Audio)

### Compiling and Testing

Once done, don't forget to go under File -> Save and replace your data.win file (would be asked when closing UndetaleModTool).

To test your change simply launch ZERO Sievert as usual.

## State of Modding

Currently it's impossible to launch multiple mods at the same time. Only one can be launch at a time.

Any mod must be done from scratch at each change of version !

To share your mod, just upload your data.win file and share it with others. Install step is simple, just replace the data.win in the ZERO Sievert main folder (DISCLAIMER: making a backup of the data.win is recommended).

Source : https://docs.google.com/document/d/1QT0fBqYoNVgBMLtYCunFx2KlTehbyuoOMx1ct-9i5LM/edit