Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add some more basics #16

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,11 @@ If your doing custom icons, textures, maps or 3d models you'll need one of these
#### Custom Mapping:
**_TODO: list tools used in mapping._**

#### Debug Mode
The game comes with a variety of tools to assist in mod development. You can enable these by adding the `-debug` command line option on startup.

In Steam, you can add this under Properties / General / Launch Options.

----------------------------------------------------------------------------------

## Topics
Expand Down
12 changes: 12 additions & 0 deletions api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,18 @@ _**Note:**_ *many interface elements such as the mechanics window are listed in

`server/Vehicles/Vehicles.lua` contains callback functions in response to various vehicle events such as creation or update, mechanics callbacks on part installation or removal, and utility functions. Part condition on vehicle spawn, loss of condition while driving, fuel consumption and battery usage are a example of what can be modified here.

#### Console Log
Your mod can use the Lua `print` function to send messages to the console to help with debugging. For example, `print("hello world")` will generate a Console message that looks like:

```
LOG : General , 1696637683068> hello world
```

The console log is also available as a text file, outside the game, at a path like: `C:\Users\USERNAME\Zomboid\console.txt`

#### Reload Modified Files

You can reload modified files to reflect latest chanes within a live game session, without either restarting or reloading the world. In a debug-enabled game, press F11 and then use the bottom-right "Lua Files" window to find your modified script. Click "RELOAD" which appears when hovening over the script's name.

----------------------------------------
### Zomboid's API
Expand Down
3 changes: 3 additions & 0 deletions structure/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
* [media/lua/shared/](#medialuashared)
* [media/lua/client/](#medialuaclient)
* [media/lua/server/](#medialuaserver)
* [Finding Mods on Disk](#finding-mods-on-disk)

----------------------------------------
## Overview
Expand Down Expand Up @@ -54,3 +55,5 @@ Used for client-side scripts. UI elements, context menus timed actions and the l
##### ```media/lua/server/```
Used for server-side scripts. Item spawning, core farming, weather and other server-side events. These only get loaded when the game is actually started (loading a save, starting a server, etc).

## Finding Mods on Disk
Mods are stored separate from the game, under the Steam workshop folder. On Windows, this looks like `C:\Program Files (x86)\Steam\workshop\content\108600`. Under this directory you'll find several numbered sud-directories, corresponding to the Steam Workshop IDs for each mod.