-
Notifications
You must be signed in to change notification settings - Fork 6
ZenMapGroupPosSpawner
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
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/
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 SpawnObjectType 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": 0, // 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)
}All my mods are open-source and published under the Mozilla Public License Version 2.0. Any mods based on my code must be open-source - no obfuscation!
You can modify/reupload/repack my mods if you like, but please credit any original authors/3D model/3rd-party asset creators, and keep in mind any future updates I make will not be automatically applied to repacked mods so make sure to check back from time to time for bugfixes and improvements.
If you find my mods useful, please consider buying me a coffee - it's not expected but very much appreciated: https://buymeacoffee.com/zenarchist
- General Setup Guide
- Core Mod Setup Guide
- ZenModPack Master Config
- Various Info
- Known Bugs & Issues
- Report Bug
My utility style mods for debugging etc.
Mods which affect game mechanics:
- ZenAlcohol
- ZenAllowMapBagSlot
- ZenAntiCombatLogout
- ZenAutoConvertStash
- ZenAutoStackItems
- ZenAutoWinterDetect
- ZenAutoRun
- ZenBasebuildingConfig
- ZenBatteryPASPersistence
- ZenBetterChatFont
- ZenBrokenGlasses
- ZenBuildingDescription
- ZenCarAttachments
- ZenCarBatteryIcon
- ZenCarCompass
- ZenCarGlovebox
- ZenCarsCutDownTrees
- ZenCanteenTablets
- ZenCatchRain
- ZenCauseOfDeath
- ZenChickenCoops
- ZenCraftingSounds
- ZenCraftRagHands
- ZenComboLocks
- ZenCombineJSON
- ZenDropRuinedClothing
- ZenDynamicZoneLoot
- ZenEarPlugs
- ZenFireFuel
- ZenFireWood
- ZenFireplaceStick
- ZenFishingConfig
- ZenFixCarAttachmentGUI
- ZenGraves
- ZenGroundCleaning
- ZenHideGearInCars
- ZenHints
- ZenHologram
- ZenHologramControls
- ZenImmersiveChatHUD
- ZenImmersiveLogin
- ZenInformWeaponStateBug
- ZenInventoryAnimation
- ZenKnifeGardens
- ZenLeftovers
- ZenLogPiles
- ZenMagObfuscation
- ZenMap
- ZenMicCheck
- ZenNotifications
- ZenOpenCansRock
- ZenPainting
- ZenPimpMyRide
- ZenRadioPlugin
- ZenRebuildableWells
- ZenRepairJSON
- ZenRepairPumps
- ZenRepairWells
- ZenServerGUI
- ZenShove
- ZenSplitUI
- ZenSleep
- ZenStaminaSlope
- ZenTerritories
- ZenWeaponEngrave
- ZenWoodHealth
- ZenZombieDoors
Mods which add gear to the game:
- ZenArtillery
- ZenBackwardsCaps
- ZenBookshelf
- ZenBunnyMasks
- ZenCamoCamp
- ZenCarWorkbench
- ZenChess
- ZenChristmasTreeCraft
- ZenConcussionGrenade
- ZenDoubleArmbands
- ZenFlask
- ZenFlint
- ZenGhillie
- ZenJameson
- ZenLadders
- ZenMusic
- ZenNotes
- ZenRaidAlarm
- ZenRaybans
- ZenRunes
- ZenStaticObjects
- ZenSwissKnife
- ZenTimeBomb
- ZenTireRack
- ZenTreasure
- ZenTreehouse
- ZenVikingAxe
- ZenZippoLighter
Mods which run purely server-side:
- ZenBloodDrips
- ZenCampSites
- ZenDynamicZoneLoot
- ZenLootCyclingDetection
- ZenNightConfig
- ZenPersistentTrees
- ZenShelterCargo
- ZenTreesplosions
- ZenZombieController
- ZenZombieConfig
- ZenJameson
My standalone mods