Skip to content

ZenMapGroupPosSpawner

Zenarchist edited this page May 13, 2026 · 2 revisions

This mod allows you to scan the map for a specific object type (either an actual ClassName, or a p3d name for static vanilla game models).

It is NOT included in my modpacks and it is not published on the workshop because it's so niche - but you can get the source code here:

https://github.com/ZenarchistCode/ZenMapGroupPosSpawner

Or download the pbo file here to add to your server modpack or test/dev server modlist:

https://github.com/ZenarchistCode/ZenMapGroupPosSpawner/releases/tag/pbo

What Does This Do?

The main use-case for this is to add new loot spawns to static objects in the game - eg. on garbage bins, tables, or buildings in DayZ which do not currently spawn loot.

You can also use the DayZ Editor to mass-dump your entire map's mapgrouppos.xml file or any specific selected object - the main use-case for this mod I made is so that you can target specific objects/p3ds to dump locations of instead of the entire map.

You will typically need to use the DayZ Editor to place the loot spawns into your mapgroupproto.xml file before the mapgrouppos.xml entries will actually do anything: https://github.com/InclementDab/DayZ-Editor/wiki/

Config File

When you run your server with my exporter mod enabled it will generate a config file in profiles/Zenarchist/ZenMapGroupPosSpawnerConfig.json

If you enable SpawnMapGroupPosXML then after about ~1-2 minutes after your server boots up a .xml file will be generated in profiles/mapgrouppos_new_entries.xml and if any objects were detected, will look something like this:

<group name="MyGarbageBinXMLProtoEntryName" pos="6293.109863 192.855118 10199.775391" rpy="0.000000 0.000000 83.508751" a="6.49125"/>

You then need to copy & paste all these new xml entries into mpmissions/mapName/mapgrouppos.xml and remember that your group name must have a loot spawn config set up in mpmissions/mapName/mapgroupproto.xml which matches what you put in the group name=xxx parameter).

This mod has 2 features: it can either create a mapgroupos.xml file if SpawnMapGroupPosXML is enabled, or it can actually spawn the target object ontop of the target object (eg. that's how my firewood & chicken coops mods work) if SpawnObjects is enabled.

TargetObjectType can either be a defined & existing scripted classname (eg. Land_HouseW01) or an undefined static p3d object (eg. Garbage_Bin2.p3d)

SpawnObjectType will either literally spawn the object ontop of the target classname, or if SpawnMapGroupPosXML is enabled it becomes the name of the mapgrouppos entry.

MaxAngleThreshold is useful for ignoring any object which exceeds the angle off-center. For example, a value of 15 will ignore any object with a pitch or roll of 15+ degrees (useful for ignoring flipped-over clutter objects like tables or upside down objects etc).

Here's a config file explanation:

{
    "ConfigVersion": "1.29.2", // Don't touch
    "DumpAllObjects": 0, // Turn this on to scan entire map for Target Objects (re-enable it if you change TargetTypes)
    "SpawnMapGroupPosXML": 1, // Turn this on to auto-spawn mapgrouppos.xml file in profiles folder
    "SpawnObjects": 1, // Turn this on to actually spawn the SpawnObjectType in-game over the top of the target object
    "SpawnHooks": [
        {
            "TargetObjectType": "Garbage_Bin2.p3d", // The target classname or p3d model name to detect
            "SpawnObjectType": "MyGarbageBinXMLProtoEntryName", // The object to either spawn in-game, OR mapgrouppos name
            "SpawnObjectScale": 1.0, // Object scale if SpawnObjects: 1
            "OffsetPosition": [ // Object offset position if SpawnObjects: 1
                0.0,
                0.0,
                0.0
            ],
            "OffsetOrientation": [ // Object offset orientation if SpawnObjects: 1
                0.0,
                0.0,
                0.0
            ],
            "ChanceOfSpawn": 1.0 // Chance to spawn object if SpawnObjects: 1
        }
    ],
    "MaxAngleThreshold": 15.0 // The maximum angle an object can be off-centered (ie. to ignore flipped tables etc)
}

ZEN'S MOD WIKI

Setup Guide

General Information


Utilities

My utility style mods for debugging etc.

Game Mechanics

Mods which affect game mechanics:

Gear / Objects

Mods which add gear to the game:

Server-Side Mods

Mods which run purely server-side:

Mods Not In Modpack

My standalone mods

Clone this wiki locally