Scripting Environment for DayZ using Workbench and Script Editor
- Reasons to Use
- Install Essentials
- Setup P:/ Drive
- Setup BoutDangTime Tools
- Understanding BoutDangTime Tools
- How to Use
- Gotchas
- Single directory for Client, Server, and Mods at P:/MultiplayerGame/
- Copy or update server and client game files in a single click. (.bat)
- Define -mod in one line for Client, Server, and Workbench to be setup automatically.
- Auto-generate dayz.gproj, dayz.ssln, and mods.sproj when starting workbench (.bat file).
- No symlinks!
- Made for unpacked mod scripting.
- Script Editor features:
- New mods folder to easily modify your code in one spot.
- Add breakpoints directly from new mods directory files (red dots are bugged, but it works!).
- Fixed Keyboard Shortcuts for Workbench and Script Editor windows:
- Restart Client and Server (Ctrl+1)
- Kill Client and Server (Ctrl+2)
- Restart Client Only (Ctrl+3)
- Restart Server Only (Ctrl+4)
- Copy Game Files (Ctrl+9)
- Restart Workbench (Ctrl+0)
- Install DayZ Game from Steam
- Install DayZ Server from Steam Tools
- Install DayZ Tools from Steam Tools
- Download this repository as a .zip (will be extracted to P:/)
- Open DayZ Tools
- Click "Settings" in DayZ Tools application
- In explorer create a folder anywhere on your computer.
- In "Path to the Project Drive", uncheck "Default", and choose the folder path you selected.
- Choose Drive Letter P:\
- Choose "Startup of the Tools"
- Click Apply
- Click "Tools -> Mount Drive P"
- Click Extract Game Data
- Note: Unpacks all the game files of about 14 GB.
- Extract PDrive folder from *.zip file of this repository to P:/
- The .bat files must be in P:/ for Script Editor to call.
- Edit 'UserSettings_EDIT_ME.bat'
- Right-click file and choose "Edit". View below for example
- Edit the "MODS" value. It is identical to the -mod format.
- Separate each mod with semi-colon.
- Note: Only packed / built mods should be named with @ in front.
- Edit the paths for Workbench, DayZ Server, and DayZ Client folders.
- Workbench folder is in DayZ Tools installation directory, in Bin folder
REM "==================================================="
REM "DayZ Mods to auto-load in Client, Server, and Workbench"
REM "Use REM to comment and save different setups"
REM "==================================================="
REM SET "MODS=@CF;@VanillaPPMap;TestMod"
SET "MODS=TestMod"
REM "==================================================="
REM "DayZ Development Environment Directories"
REM "==================================================="
SET "PathWorkbench=D:/Program Files (x86)/Steam/SteamApps/common/DayZ Tools/Bin/Workbench"
SET "PathDayZServer=D:/Program Files (x86)/Steam/SteamApps/common/DayZServer"
SET "PathDayZClient=D:/Program Files (x86)/Steam/SteamApps/common/DayZ"
Simply double click any of these files to run them. A shortcut for StartWorkbench.bat is also available to use. These tools are also runnable from the Workbench or Script Editor.
Define the mods to load and the DayZ Game, Server, and Tools (Workbench) directories. To comment, use REM at the start of the line.
This tool performs several actions:
- Kill any open Workbench application.
- Generate mods.sproj with all the *.c files from our P:/MultiplayerGame
- Generate dayz.ssln which references mods.sproj. Built using dayz.ssln.template file.
- Generate dayz.gproj which references unpacked mod files and our game directory. Built using dayz.gproj.template file.
- This file is copied to Workbench (PathWorkbench) folder and Game folder (P:/MultiplayerGame)
- Opens Workbench with -mod pointing to each mod's full path.
Warning: Duplicates DayZ game files for sandbox environment (approx 14 GB) Note: Only copies missing or modified files, so subsequent runs will be much faster. It's important to sandbox your DayZ game directory, so your normal play is not affected. This will move all the required files to the P:/MultiplayerGame directory. If there is an update to DayZ Client or Server, run this tool to copy only the modified files.
These files will start and stop the DayZ game and server. Running the Start scripts again will kill the existing game or server and start them again. These are used in the Script Editor as keyboard shortcuts.
Defines the keyboard shortcuts for Script Editor to quickly manage starting and stopping the DayZ game and server. As well restarting workbench.
- Copy all your mod folders, packed and unpacked, to P:/MultiplayerGame/
- Edit UserSettings_EDIT_ME.bat in text editor.
- Modify MODS variable to add your mod name, for example:
SET "MODS=TestMod"
- Note: Do not use @ for your unpacked mod folder name. Only use @ in name for packed mods.
- Modify MODS variable to add your mod name, for example:
- Open Workbench using StartWorkbench.bat that should be at P:/StartWorkbench.bat
- This will automatically load *.c, *.layout, *.styles files, and filesystem properly for game, server and workbench.
- Open Script Editor from top menu Editors -> Script Editor.
- In Projects panel, scroll down to "mods" top level folder.
- All *.c files in your P:/MultiplayerGame/ directory will be listed here.
- Open file of your choice.
- Add a breakpoint to a line in your code.
- Red dot will not appear (editor bug), please view Breakpoints panel to ensure breakpoint exists.
- Start the DayZ server and client by pressing Ctrl+1 from Workbench or Script Editor windows.
- Script Editor will automatically connect to the Server or Client once they are started. You can change which in "Debug" in top menu.
- Make code changes and Recompile File on Host (Ctrl+F7). 10 Or, restart client or server using Run shortcuts under "Plugins" in top menu.
- If Workbench is already open, adding new files/folders will require restarting workbench (Ctrl+0).
- Adding breakpoints in opened files under "mods" folder will not show the red dot next to line number. However, Breakpoints panel will show that the breakpoint exists. Opening the file through the traditional modules, i.e. Core, Gamelib, Game, World, and Mission will show the red dot properly.
- MapWidget and similar items with assets in DayZ Addon folder will crash with unpacked mods. A trick around this is to pack only the config.cpp and add it to your unpacked mod's addon folder.
Example:
TestMod/Addons/testmod.bin <--- packed config.cpp
TestMod/scripts/ <-- unpacked files here