Skip to main content

dzStudio projects

A mod can be a dzStudio project instead of a set of files. You choose this when you create the mod (Kind โ†’ dzStudio project); it cannot be changed later.

Project mods carry a dzStudio project tag in your mod list, in the server's mod lists and on the marketplace; the Kind filter lists only them.

A project holds building blocks and changes, not files: an own event with its spawn positions, a group of objects, a changed loot value, a changed setting in cfggameplay.json. Each change names the entry it changes โ€” for example the event VehicleCivilianSedan and its nominal โ€” so dzbot finds it in every server's files, also when the owner or another mod changed them. That is why one project works on every server of its map.

The project viewโ€‹

A project mod opens in the workbench on its project view instead of files: the left column lists its sections (Changes, Own blocks, Map), the middle shows them, and Save stores everything at once. A project mod is one file, the dzStudio project file โ€” its blocks, its changes and the rules below all live in it โ€” and the file itself is never shown.

  • Changes โ€” one row per change: the kind and the entry (for example Event ยท VehicleCivilianSedan ยท nominal), Bohemia's value for the map struck through, and the new value as a field you can edit. Values are checked as you type: a whole number where the file needs one, 0/1, a choice, or a list of names separated by commas. A value that does not fit is marked and the project cannot be saved until it is fixed. The bin removes a change together with its condition and formula.
  • + Change opens the entries of the map's vanilla files: events and their vehicles or animals, spawn zones, items (types.xml), building loot, the weather, the settings of cfggameplay.json, the effect areas, the globals (globals.xml), server messages, the economy switches (economy.xml), spawnable types with their attachment and cargo blocks (cfgspawnabletypes.xml), the random presets, the player spawn settings and spawn groups (cfgplayerspawnpoints.xml), the CE defaults and root classes (cfgeconomycore.xml) and the ignore list. Items with a chance (in attachment, cargo and preset blocks) are edited as a list of {"name", "chance"}; an item can also carry what spawns with it โ€” "damage": {"min", "max"} (a ruined grenade: 1) and its own "attachments" and "cargo" blocks โ€” and a quantity ("quantmin", "quantmax"), which the form keeps as it is. A cargo or attachment block holds a preset, or items with or without a chance. Economy switches and player spawn settings can only be changed, not removed. Search, pick an entry, then a field โ€” its current value is shown and taken as the starting point โ€” and enter the new value. Remove this entry adds a change that deletes the whole entry from the server's file.
  • Own blocks โ€” what the project creates. Blocks without a position are added and edited right here (see below); spawn positions, zones, effect areas and other positions on the map; groups of objects and loot positions in dzStudio. Every block gets its condition, Target required and its other rules here; a block's children are listed indented below it.

The crosshair on a change (Change target or field) aims it at another entry or another field of the same entry; its new value, condition and formula go with it.

While a dzStudio collaboration session holds the mod, the project view is read only. When dzStudio (or a second browser tab) saves the project while you have unsaved edits, the view offers to take their version, compare both or keep yours, as for any mod file.

Export downloads the project file as it is, rules and settings included; dzStudio opens it as a local project. Import replaces the project โ€” rules and settings included โ€” with a dzStudio project file, after a confirmation, and saves it like any other edit. A file without settings keeps the mod's settings as they are.

A project file can carry data of other programs (extensions, see the format spec). dzbot keeps them as they are. When one of them is marked as required and dzbot does not know it, the project is not applied on any server: the project view and the preview say so, and the mod's log on the server shows Project not applied: it needs an extension dzbot does not support.

Own blocks in the webโ€‹

+ Block adds an own block without a position: an event (with its children โ€” the vehicles, wrecks or items it spawns), a spawn zone, an event group, an item (types.xml), building loot with its containers, a global, a server message, a spawnable type with its attachment and cargo sets, a random preset, a player spawn group, a CE default or root class, an ignored item, or a spawn gear preset. Pick the kind, fill in the form โ€” every field the game needs is marked as required and pre-filled with a usual value โ€” and add it. Item class names are suggested from dzbot's item list as you type; any class name is accepted. Events need a name starting with Vehicle, Static, Item, Infected, Animal, Ambient or Trajectory.

  • The id is made from the block's name and can be changed only while the block is new โ€” its rules and copies are named by it.
  • A child block (an event child, a loot container, an attachment or cargo set) goes into an own block โ€” use + on the parent's row โ€” or into an existing entry of the server's files, named by its key (for example the event VehicleCivilianSedan).
  • The pencil opens a block's form again; the bin removes it with its child blocks (after a question when it has any).
  • A spawn gear preset becomes a file of its own on the server; a project without a folder name gets one when you add it.

Blocks with a position are placed on the map (below) or built in dzStudio; their pencil opens only their rules. The project view keeps what dzStudio stores about its own editor untouched.

The mapโ€‹

Map shows the project on the map of its mission: own spawn positions and the changed or removed spawn positions of the map's events, the objects of its object groups (in their group's colour from dzStudio), event group objects around the spawn positions that name their group, territory zones and effect areas as circles, player spawn points, loot positions, restricted areas with their boxes, polygons and safe positions, and the safe positions of the effect areas. Where a block's rules take a position from a coordinate setting, the setting's default is shown as a hint. The chips switch kinds on and off; on a phone the panel is a sheet below the map.

  • Click a marker to open it in the panel: its coordinates, radius, name and the block or change it belongs to (Block opens the block's rules, Changes the list).
  • Drag a marker to move it, the edge of a selected circle to resize it, or type the coordinates. Moving a position of the map's files adds or updates the change of its x and z; Undo change removes those changes again.
  • Add places a new spawn position, territory zone, effect area, player spawn point, safe position or restricted area where you click. A spawn position, zone or player spawn point goes into an own block of its parent kind or into an entry of the map's files named by its key. A restricted area needs a box and at least one safe position; its panel adds more of both.
  • A height is never typed. Where the file holds one (restricted area boxes and safe positions, spawn positions that have a height), it comes from dzbot's height map when the position is placed; a moved position keeps its height above the ground.
  • Effect areas stand above the ground: an effect area added or moved here gets Above ground (m) instead of a fixed height. Its height is looked up when the project is applied โ€” on each server from the height map of its map (the preview shows the result), in dzStudio from the game's terrain.
  • Effect areas need only what Bohemia's own have: name, type, trigger, position, radius and the two heights. The ring and particle fields, the eruption timing and the player effects may be left out, as in the oil pits of Badlands โ€” they are then left out of the server's file too, and the game uses its own values.
  • Object groups, event group objects and loot positions are only shown: they need an exact height and rotation, so they are edited in dzStudio. Maps dzbot has no tiles of show a note instead.

Rules in dzStudioโ€‹

The rules below can also be edited in dzStudio while a project mod is open there: Project โ€บ dzbot rules โ€ฆ lists the project's own blocks and changes with a summary of their rules. Right-click a group in the project bar and choose dzbot rules of the group โ€ฆ to start with that group; groups with rules show dzbot rules in the project bar.

A block or change opens its rules: Takes part when (a setting picked from the mod's settings, an operator and a value; several comparisons joined by all apply or at least one applies โ€” nested groups and not are shown read-only and edited in the project view), the formula, Target required, and for blocks Repeat, Values from settings and formulas (the positions of the objects you selected are offered first) and rules for single elements. Apply keeps the rules in the project; they are stored with its next save. Local projects and other storage have no rules.

Blocks and changes dzStudio has no editor for โ€” events without positions, items, globals, server messages, presets, spawn gear, restricted areas and the like, made in the project view or by the AI โ€” stay in the project exactly as they are when dzStudio saves it. dzStudio lists them with their rules and edit in dzbot; their rules are changed in the project view, and a setting one of them reads is renamed there too.

Spawn positions, effect areas and territory zones you add or move on the project view's map show up in dzStudio's Spawns, Effects and Territories layers and can be edited there like dzStudio's own. dzStudio always opens them as the project file has them, so a change made in the project view since the last save in dzStudio is what you see, and what dzStudio saves. What a layer cannot edit โ€” an effect area of a type dzStudio has no preset for, a spawn position or effect area of the map's files moved in the project view, an own event with its positions โ€” is shown in the layer marked Made outside dzStudio and cannot be moved or removed there.

Every change of a rule or a setting is a step of dzStudio's history: Undo takes it back. Renaming a setting renames it in every rule in the same step, so undoing it restores the old name in the settings and in the rules together. A rule dialog stays with its block, change or object: if that is deleted while the dialog is open โ€” by you, by undo or by someone else in a live session โ€” the dialog closes with This element was deleted and nothing is written. Objects you duplicate or copy and paste within the project keep their rules; pasted into another project they arrive without them, because rules name the settings of their own project.

Settings, conditions and formulasโ€‹

What a project does on a server can depend on the settings the admin fills in when installing it. Settings are the mod's config fields, and a project mod keeps them in its project file. You edit them in the workbench's config panel as for any mod, or in dzStudio (Project โ€บ dzbot rules โ€ฆ, Settings of the mod); both write the same list, and every save of the project โ€” from dzStudio, the workbench, an import or the AI โ€” updates the mod's config fields to match. Since a setting changed in the config panel rewrites the project file, the workbench saves your unsaved project edits first. A setting renamed in dzStudio in its place keeps the values installations already have. A list dzbot cannot use โ€” two settings with the same identifier, an identifier with spaces, a condition on a setting further down โ€” is refused with the reason, and nothing is saved.

Every row of the project view has them:

  • Takes part when โ€” a condition on the settings: the block or change only takes part while it holds, for example with_weapons = true. Rules can be combined in groups (all of these apply, at least one applies, negated with not). A block that is left out takes its child blocks with it.
  • Formula โ€” for a change that sets a value: the value is computed on each server. Names are your settings plus base (the value on that server before the change) and vanilla (Bohemia's value for the map). Allowed are numbers, + - * /, parentheses and min, max, round, floor, ceil, abs, clamp. Example: round(vanilla * boost).
  • Text โ€” instead of a formula, a change can build its value as text from settings and server values (see Texts from settings), for example the hit indicator colour 0xff{lower(custom_color)}.
  • A list of numbers โ€” a formula on a change that sets a list (the twelve monthly temperatures environmentMinTemps, for example) computes every number of it; index is the number's place (0 for January), base and vanilla the number at that place.
  • Target from a setting โ€” a change can take its target from a setting: "key": {"name": {"setting": "item1"}} in its rule removes or changes the item the admin names. Give it a condition item1 is not empty, so an empty setting leaves the change out instead of failing.
  • Target required โ€” for a change, and for an own block that goes into an existing entry (a spawn position in a vanilla event, for example). Normally a target that is not found on a server โ€” or matches more than one entry โ€” is skipped with a warning and the rest applies. With the switch on, the whole project is not applied on that server: none of its files are written, the mod's log shows an error naming the missing target, and the preview says Not applied on this target. A row its condition leaves out never blocks.

Renaming a setting takes the rules along: the switch Also rename โ€ฆ in the conditions and formulas (on by default) rewrites every condition and formula that reads it. base, vanilla and the function names are never renamed.

Texts from settingsโ€‹

A value that is text โ€” a server message, the name of a restricted area, a colour โ€” can be built on each server from the mod's settings and from what dzbot knows about the server. Write the text with the names in braces:

  • Connect your account now: {manager_url} โ€” the address of the server's dzbot site.
  • Teleport-{default(identifier, installation_id)} โ€” the setting identifier, or the number of the installation when the admin left it empty.
  • 0xff{lower(replace(custom_color, "#", ""))} โ€” a colour typed as #00FF00 becomes 0xff00ff00.

Names are your settings (with parts: source.x), in repeated blocks index and item, and the server values manager_url, mission (the server's mission folder) and installation_id. Functions: lower, upper, trim, replace(x, "from", "to") and default(x, y, โ€ฆ), which takes the first value that is not empty. A name without a value gives empty text; {{ and }} write a brace. Server values can also be read in conditions and formulas, for example a block only for mission = dayzOffline.sakhal. In the workbench a value of a block offers Text beside Setting and Formula.

Rules on own blocks: positions, optional objects, repetitionโ€‹

Own blocks can do more than take part or not โ€” what file mods did with {if}, {for} and coordinate settings in their templates:

  • Values from settings and formulas (fields) โ€” a value of the block is taken from a setting, computed by a formula or built as a text on each server. A coordinate setting gives a whole position [x, y, z]; when the admin picks no height, dzbot takes the ground height of the map at that spot. A formula can read the parts of a coordinate (source.x, source.z) and base, the value the block has in the project.
  • Optional objects โ€” a single object of a group, a single child of an event or a single spawn position takes part only when its condition holds, for example the marker of a teleporter only with reverse = true.
  • Repetition โ€” a whole block is repeated a number of times (count, a formula like canisters) or once for every row of a list setting (over); its child blocks are repeated with it. A single object inside a block can be repeated the same way, for example one canister object as often as the admin wants. In the copies, formulas read index (0, 1, 2 โ€ฆ) and, when repeated over a list, item and its properties (item.class, item.where.x). A repetition can skip rows (where, a condition on item, for example item.item is not empty), and it can repeat over a text setting cut into a list (split): [",", ":"] makes KitchenKnife:1,BandageDressing two copies with the parts item.0 (the class) and item.1 (the quickbar slot); "\n" makes one copy per line, and trim removes the spaces around each entry (so blank lines can be skipped with item is not empty).

A repeated event, spawn zone, event group, item, building loot type, spawnable type, random preset, global, server message, player spawn group, CE default or root class or ignored item has a name the game knows it by, so every copy gets a name of its own: StaticHeliCrash_1, StaticHeliCrash_2 โ€ฆ by default. Names of the copies under Repeat takes a pattern instead โ€” {name} is the block's name, {n} the copy's number from 1, {index} from 0, so {name}{index} gives StaticHeliCrash0, StaticHeliCrash1 โ€ฆ โ€” and shows the first names it makes. The pattern needs {n} or {index} and adds only letters, digits and _ (the game allows no other characters in these names), and an event's name still has to start with its prefix. When a value from a setting or formula sets the name (for example item.name over a list), the copies keep that name. The block's vehicles, wrecks and spawn positions go with each copy โ€” also those that name the event as their parent instead of being added inside it.

The pencil of a block opens these rules below its data: Repeat (once, a count, or once per row of a list setting), Values from settings and formulas (pick a place of the block's data โ€” positions offer the coordinate settings โ€” and a setting or a formula), and Single elements โ€” every object or item in a list of the block, each with its own condition, repetition and values. A value of an object โ€” its position, its name โ€” is set in that object's own rule, never in the block's: the rule stays with the object when another one is deleted. The block's row then shows what the preview computed for the chosen test values: the copies, left-out elements, and every computed value.

In the project file each rule sits next to what it belongs to, in its extensions under the URL of dzbot's rules extension (https://developers.dzbot.de/specs/dzbot/rules/1.json): a block's rule on the block, a change's rule on the change, an element's rule on the element:

{
"id": "teleporter", "kind": "spawnerGroup",
"data": { "objects": [
{ "name": "Land_Teleporter", "pos": [0, 0, 0],
"extensions": { "https://developers.dzbot.de/specs/dzbot/rules/1.json": {
"fields": { "pos": { "setting": "source" } } } } },
{ "name": "Sign_Back", "pos": [2, 0, 0],
"extensions": { "https://developers.dzbot.de/specs/dzbot/rules/1.json": {
"if": { "field": "reverse", "op": "eq", "value": true } } } }
] }
}

The teleporter puts its first object at the coordinate the admin picks in source and shows the second one only with reverse.

  • A path names a value inside the block as dzStudio stores it: names joined with dots โ€” nominal, flags.deletable. In the rule of a single element, paths start at the element (pos, name). A number in brackets picks a part of a value, like the height of a position (pos[1]), or a place in a list of lists of a fixed shape โ€” a restricted area's box is [size, rotation, centre], so PRABoxes[0][2] is the centre of its first box and safePositions3D[0] its first safe position; a path never reaches into an object of a list by its number (objects[2].pos), because deleting an object before it would make it mean another one. Such a path is not applied: the checks name the object whose own rule takes the value, and on a server the block is left out with the reason in the mod's log.
  • {"setting": "โ€ฆ"} copies a setting (or item, item.<property>) as it is: a coordinate as a position, a number, a text, a yes/no. {"template": "โ€ฆ"} builds a text. Settings and texts are applied before formulas, so a formula can still move one part of a position. A value with its own "if" is only set while that condition holds; otherwise the block keeps the value it has in the project.
  • Copies of a repeated block are named after it with a number from 1: car-event-1, car-event-2 โ€ฆ; a child block of a repeated block gets the same number. The name the game sees (an event's name, an item's class โ€ฆ) gets its own number or pattern, see above.
  • Formulas compute numbers only. A count above 500 is refused.
  • A block whose value cannot be computed (a setting without a value, a formula that fails) is left out on that server, with its child blocks, and the mod's log and the preview say why. The preview also lists the copies, the left-out objects and every computed value.
  • The checks under Problems name rules that point at no place in the block or into a list element by its number, settings that do not exist, index or item outside a repetition, and a repetition over a setting that is no list. Renaming a setting reaches these rules too.

With the AIโ€‹

The AI Companion and connected AI apps can create a project mod and build or change it โ€” the same way for the build of a placement. They read the project (blocks, changes, rules and settings), look up the map's vanilla entries with Bohemia's values, and change it with a list of steps: add, change or remove a change or a block, set or clear the rule of a block, a change or a single object, and add, change, rename or remove a setting (a rename reaches every rule that reads it). Every step is checked against what the game accepts, and if one does not fit, none is applied. Before you approve, the card shows the steps, what they change on the map's vanilla mission โ€” which files, which entries, new warnings such as a nominal above its max โ€” and the change to the project file. The AI never edits the project file as text; everything it does not touch stays exactly as it was, dzStudio's part included.

Preview: what changes on the serverโ€‹

The Preview tab in the bottom panel lists every block and change with what it did against the vanilla mission or a test server โ€” applied, already so, not found, replaced (the server had another value than the project expected), invalid โ€” with the value each formula computed, and below it the change to each file. Problems show under Problems and in the mod's logs on the servers.

On the serverโ€‹

dzbot applies the project when it transfers mods, in the mod order, to the server's files as they are at that point โ€” the originals plus what earlier mods wrote. Removing the mod returns the files to their originals, as with every mod.

A project mod can be installed several times on one server, like a file mod, once you switch on Can be installed more than once in its store entry: each instance has its own settings, switch and expiry. Each instance applies the whole project with its own settings. The second instance writes its own files as custom/dzstudio-mod-<id>-2.<block id>.json, the third as โ€ฆ-3โ€ฆ, and the first keeps the plain name. Names that must differ between instances, like a restricted area's name or an event's name, can include installation_id in a template, for example Teleport-{default(identifier, installation_id)}.

A project with very many repetitions (more than 10,000 copies of blocks and list elements in total) is refused when saving and not applied.