-
Notifications
You must be signed in to change notification settings - Fork 0
Particles & Map Objects
The addon imports and exports two types of placement data from .materials.bin files:
- MapParticle placements — VFX particle emitters placed on the map
- GdsMapObject items — static prop placements (shopkeepers, structures, etc.)
Both are imported as Blender empties with transform data, and changes can be exported back.
MapPlaceableContainer entries in the materials file hold lists of MapParticle items. Each MapParticle defines:
- Position, rotation, scale (via transform matrix)
- VFX system link — which VfxSystemDefinitionData to play
- Container hash — which MPC owns this placement
Automatic (via Project Manager Load Map): When importing a map, particle placements are automatically extracted and created in the scene.
Manual:
- Utilities → Import Particles from Map
- Select the materials file
- Particle empties are created in collections
Each particle placement becomes a Blender empty:
- Name: Based on VFX definition name or hash
- Transform: Position/rotation/scale from the transform matrix
- Collection: Grouped by MapPlaceableContainer
-
Custom Properties:
-
vfx_link— linked VFX definition hash -
container_hash— owning MPC path hash -
item_key— stable identity key for round-trip matching
-
- Select a particle empty in the viewport.
- Move, rotate, or scale it using Blender's standard tools.
- The addon tracks transform changes for export.
Edit Specific Properties:
- Edit MapParticle — edit placement properties (link, flags)
- Edit VFX Definition — edit the VFX system parameters
Particle changes are written back to materials during export:
- Export Materials (merge mode) updates MPC entries with new transforms
-
Save All to .prey writes particles to the
.prey.particlescategory
Only modified particles are flagged for update. Unmodified placements are preserved exactly.
VfxSystemDefinitionData entries (type 0x45cd899f) define particle effects used by MapParticle placements. These are the actual effect definitions — particles, trails, beams, etc.
The addon imports these as reference data. They can be viewed and edited through the material editor or prey format.
GlobalDataStorage entries contain map object placements — static props like shopkeepers, turret models, nexus structures, etc. Each has:
- Position, rotation, scale
- Object type/class reference
- Stable item key for safe round-trip updates
Automatic (via Project Manager Load Map): GdsMapObject items are imported alongside particles when loading a map.
What Gets Created: Each map object becomes a Blender empty:
- Name: Based on object type or hash
- Transform: From stored transform matrix
- Collection: Grouped by container
-
Custom Properties:
-
gds_type— object type hash -
item_key— stable identity for matching during export -
container_hash— owning container path hash
-
- Select a map object empty.
- Move/rotate/scale using Blender tools.
-
Do not rename — the
item_keycustom property is used for matching.
Map object transforms are updated in the materials file during export:
- Matching uses the
item_keyproperty (not object name) - Only changed transforms are written
- New objects or deleted objects are reflected
After import, the scene hierarchy looks like:
Scene Collection/
├── MapGeometry/ ← Imported meshes
├── Particles/
│ ├── MPC_A1B2C3D4/ ← MapPlaceableContainer group
│ │ ├── Particle_001 ← MapParticle empty
│ │ ├── Particle_002
│ │ └── ...
│ └── MPC_E5F6G7H8/
│ └── ...
├── MapObjects/
│ ├── Container_001/
│ │ ├── Object_001 ← GdsMapObject empty
│ │ └── Object_002
│ └── ...
└── BucketGrids/ ← Spatial grids (if imported)
1. Load Map (imports mapgeo + materials + particles + objects)
2. Edit transforms in Blender
3. Export Materials (merge mode)
→ Particles and objects updated in .materials.bin
4. Export Mapgeo
→ Geometry written to .mapgeo
5. Test in game
1. Load Map
2. Convert to .prey (splits materials into categories)
3. Edit transforms in Blender
4. Save All to .prey
→ Particles written to .prey.particles
→ VFX defs written to .prey.vfx
→ Objects written to .prey.particles (MPC entries)
5. Rebuild .bin from .prey
6. Test in game
# MapPlaceableContainer (type 0xb25c0a3f) holds particle placements
mpc_entry = {
"path_hash": "0xa1b2c3d4",
"type_hash": "0xb25c0a3f",
"fields": [{
"name_hash": "0x...",
"type": 134, # map type
"pairs": [
{
"key": {"type": 18, "value": "0x11223344"},
"value": {
"class_hash": "0x24a31b3e", # MapParticle
"fields": [
{"name_hash": "0x...", "type": 22, "value": [
1.0, 0.0, 0.0, 100.0, # transform row 1
0.0, 1.0, 0.0, 200.0, # transform row 2
0.0, 0.0, 1.0, 50.0 # transform row 3
]},
{"name_hash": "0x...", "type": 17, "value": "0xvfx_link"}
]
}
}
]
}]
}from MapgeoAddon import particles_materials
# Find all particle empties
particle_objects = particles_materials.collect_particle_objects()
for obj in particle_objects:
print(f"{obj.name}: pos={obj.location}, vfx={obj.get('vfx_link', 'N/A')}")