Build a house¶
The whole environment is built on a 300 uu grid. A house is modules stacked at multiples of 300, with one vision volume around the result. Its camera-side walls and upper floors hide as the survivor walks in, its doors and windows lock and break, and its furniture can be searched, picked up or dismantled.
Stamp a prefab¶
Nine buildings ship as prefab Data Assets in Content/ZombieSurvival/DataAssets/Prefabs/Childs/.
| Prefab | What it is |
|---|---|
DA_Prefab_Room |
One room of 2 × 2 cells, with a door and a window |
DA_Prefab_Garage |
2 × 3 cells, open front, workbench, tool chest and shelf |
DA_Prefab_SmallHouse, _House_Kitchen, _House_Bedroom, _House_TwoStorey |
The four house plans of Pine Hollow, closed and furnished, with their rooms |
DA_Prefab_Shop_Grocery, _Shop_Hardware, _GasStation |
The three shops of Pine Hollow, with their shop fronts and signs |
- Drop any actor where the building goes, a Target Point for example. Its position is snapped to the 300 uu grid and its yaw to a quarter turn. It becomes the building's corner of lowest X and Y.
- Right-click it, Scripted Actor Actions > Stamp Prefab, pick the prefab, OK.
- On a large map whose containers are filled from loot tables, run
Scripted Actor Actions > Storage Containers on the whole map or on a selection. Every
cupboard, fridge, shelf or crate whose furniture definition has a container kind becomes a
BP_Containerdressed as that furniture, with Net Load on Client ticked. The report names any container left unticked because something was already put in it by hand. - Select everything, Scripted Actor Actions > Assign Save Ids, then Validate Save Ids, and save the map.
The stamped actors are ordinary actors in an outliner folder Prefabs/<prefab name>: walls, roof,
doors, windows, furniture, room volumes and one vision volume per storey. Move, swap or delete them
freely.
You set nothing else. The vision volume collects the walls tagged VisionOccluder, and the roof
pieces tagged PrefabFloorAbove, or PrefabFloorAbove_<n> with the rank of their volume, are its
floor above. Doors and windows roll their lock chance like those of the map, and the furniture
keeps its storage. To lock and alarm the building on a large map, put a BP_HouseController around
it.
Your own prefab¶
- Build the house, as described below.
- Select all its actors, its vision volume included.
- Run Scripted Actor Actions > Capture Prefab and pick an empty prefab Data Asset, created from
DataAssets/Prefabs/PDA_PrefabDef.
The capture keeps each actor's class, mesh, tags and transform from the 300 uu corner, the furniture
definitions and the vision volume's size. The volume's wall and roof lists become the two tags above.
Stamp and capture belong to Blueprints/Editor/EUB_PrefabTool, an editor tool that is never cooked.
The modules¶
The modules are in Meshes/Environments/Buildings/. A wall module is 300 uu wide. _Half is a half
module (150) that closes a run which does not land on the grid, and _Wide a double module (600) for
long façades with fewer draw calls. There are 63 modules, the curtains and the broken glass of
BP_Window aside.
| Family | Meshes |
|---|---|
| Exterior walls, concrete | SM_Wall_Plain, SM_Wall_Doorway, SM_Wall_Window, SM_Wall_CornerPost, SM_Wall_Low, SM_Wall_Gable |
| Exterior walls, brick | SM_Wall_Brick_Plain, SM_Wall_Brick_Doorway, SM_Wall_Brick_Window, SM_Wall_Brick_Half, SM_Wall_Brick_Wide |
| Exterior walls, siding | SM_Wall_Siding_Plain, SM_Wall_Siding_Doorway, SM_Wall_Siding_Window, SM_Wall_Siding_Half, SM_Wall_Siding_Wide, SM_Wall_Siding_Gable |
| Exterior walls, plank | SM_Wall_Plank_Plain, SM_Wall_Plank_Doorway, SM_Wall_Plank_Window, SM_Wall_Plank_Half, SM_Wall_Plank_Wide, SM_Wall_Plank_Gable |
| Exterior walls, metal | SM_Wall_Metal_Plain, SM_Wall_Metal_Doorway, SM_Wall_Metal_Window, SM_Wall_Metal_Wide, SM_Wall_Metal_Gable |
| Wall frame | SM_Wall_Frame (the built wall frame) |
| Interior partitions | SM_Wall_Interior_Plain, SM_Wall_Interior_Doorway |
| Openings | SM_Door_Wood, SM_Door_Interior, SM_Door_Garage, SM_Window_Frame, SM_Window_Shutter |
| Floors | SM_Floor_Tile, SM_Floor_Wood, SM_Floor_Concrete, SM_Floor_Half, SM_Floor_Opening (the hole a staircase comes up through) |
| Roofs | SM_Roof_Flat, SM_Roof_Parapet, SM_Roof_Slope, SM_Roof_Ridge, SM_Roof_Hip, SM_Roof_Rake, SM_Roof_Valley, SM_Roof_Metal_Slope |
| Stairs | SM_Stairs_Straight, SM_Stairs_Half, SM_Stairs_Landing, SM_Stairs_Wood |
| Porch | SM_Porch_Deck, SM_Porch_Railing, SM_Porch_Steps, SM_Beam_Porch, SM_Column_Porch |
| Shop fronts | SM_Wall_Storefront_Window, SM_Wall_Storefront_Door, SM_Door_Storefront (the glazed door of BP_Door_Storefront), SM_Awning_Shop, SM_Sign_ShopBoard (the board of BP_ShopSign, which writes the shop's name from the room behind it) |
Pine Hollow uses concrete, brick and siding. The plank and metal families, which give the run-down look, are not used there.
Stairs¶
For a storey laid out by hand, use SM_Stairs_Wood. The wooden staircase climbs the full 300 uu of
one level, and the upper floor of the two-storey house plan (DA_Prefab_House_TwoStorey) is reached
by one. Its length does not land on the 300 uu grid.
The build system uses SM_Stairs_Straight, the mesh behind
DA_Buildable_Stairs. Two cells long, it reaches 300 uu at its far end, so a floor built at 300 next
to its top rests on it. SM_Stairs_Half and SM_Stairs_Landing are kit pieces for dressing. If you
lay out your own upper floors, cut a staircase to your storey height rather than stretching one of
those.
Sight and the camera¶
A wall with a window lets sight through but not movement.
The camera is fixed at 45° yaw, so the same two faces of every building, -X and -Y, always stand between the camera and the room. Those are the walls a vision zone hides.
Furniture¶
Thirty-nine pieces of furniture in Meshes/Environments/Furniture/ dress the inside. A piece whose
furniture definition has a container kind can also be a lootable container, as
the cupboards, fridges and shelves of Pine Hollow are.
On Pine Hollow the pieces are BP_Furniture actors, the dumpsters, barrels, crates and pallets of
the street among them, and can be picked up or dismantled as their
definition allows. The bathtub, the toilet, the pedestal sink, the mirror cabinet and the cardboard
boxes stay plain decor.
Each house of Pine Hollow has seven to twelve pieces more than its plan, placed by hand and converted
as described below. The plans (DA_Prefab_*) do not carry those pieces, so a house you stamp has the
furniture of its plan only.
Furniture in your own map¶
A static mesh actor is decor until you convert it.
- Right-click any actor of the open map, Scripted Actor Actions > Convert Level (the whole map) or Convert Selected (the selection only).
- Every
StaticMeshActorwhose mesh is inByMeshofDA_FurnitureRegistrybecomes aBP_Furnitureat the same place, with the same label and in the same outliner folder, itsPlacedDefset to that furniture. An actor whose mesh is not in the registry is left as it is, and the result names it ("Kept as decor (mesh not in the furniture registry): ..."). - Run Scripted Actor Actions > Assign Save Ids, then Validate Save Ids, and save the map.
The two actions belong to Blueprints/Editor/EUB_FurnitureTool, an editor tool that is never cooked
either. A mesh of your own becomes convertible once a furniture definition uses
it and ByMesh lists it. A container of the spawn plan needs no conversion: it receives its furniture
through its mesh when it is created.
The rest of the kit¶
Pine Hollow does not use everything in Meshes/. All of it is on the same 300 uu grid, with
UBX_/UCX_ collision.
| Folder | What is in it |
|---|---|
Environments/Furniture/ |
39 SM_Furn_ meshes: beds (single, double, plank), sofa, armchair, three chairs (wooden, padded, office), coffee table, dining table, desk, dresser, wardrobe, bookshelf, plank shelf, nightstand, TV stand, CRT television, floor lamp, fridge, stove, microwave, kitchen base and upper units, kitchen sink, pedestal sink, bathtub, toilet, mirror cabinet, two washing machines (front and top loading), filing cabinet, locker, tool chest, store shelf, checkout counter, workbench, water collector, sign |
Environments/Props/ |
SM_Prop_Barrel, _Cabinet, _Campfire, _CardboardBox, _Crate, _DebrisPile, _Grill, _LogBench, _LogPile, _Pallet, _PicnicTable, _Plank, _RainBarrel, _Rock, _ShoppingCart, _StoneOven, _Tent, _VendingMachine, _WheelieBin, plus SM_CarWreck, SM_Dumpster, SM_TrashBag, the two metal barricades (SM_Barricade_MetalSheet, _MetalBars), two more wrecks (SM_CarWreck_Coupe, _Pickup), SM_Prop_FuelPump, SM_Prop_Generator, SM_Prop_CeilingLight and SM_Prop_LightSwitch |
Environments/Street/ |
Roads (SM_Road_Straight, _Corner, _Cross, _TJunction), pavements (SM_Sidewalk_Straight, _Corner), fences (SM_Fence_Wood, _Picket, _Chainlink, _Wire, _Gate), gates and their posts (SM_Fence_Wood_Gate, _Wood_GatePost, _Picket_Gate, _Picket_GatePost), SM_LampPost, SM_Prop_Mailbox, SM_Prop_FireHydrant, SM_Prop_JerseyBarrier, SM_Prop_ParkBench, SM_Prop_StopSign, SM_Prop_UtilityPole, SM_Fence_Bars |
Environments/Terrain/ |
11 tiles: SM_Terrain_Grass, _Dirt, _Gravel, the grass and dirt transition tiles (_Grass_Dirt_Straight, _Grass_Dirt_Corner), the path tiles (_Path_Straight, _Path_Corner, _Path_End) and the slopes (_Slope, _Slope_CornerInner, _Slope_CornerOuter) |
Environments/Vegetation/ |
11 meshes: four trees (SM_Veg_Tree_Birch, _Maple, _Pine, _Young), SM_Veg_DeadTree, SM_Veg_TreeStump, two bushes, a low shrub, a hedge and a weed patch |
Items/ |
The ground meshes of the items, one shared by the 75 skill books and one by the magazines, plus SM_Item_Generic, which is not an item mesh but the quad BP_BloodSplat draws on |
Weapons/ |
One static mesh per weapon, held by the survivor and dropped on the ground. The pistol and the shotgun also have a skeletal version (SK_Weapon_Pistol, SK_Weapon_Shotgun, with their skeletons), which the four clips of Animations/Weapons/ animate (a reload and a rack each) |
The kit folders also hold a few meshes not listed in these tables.
Icons¶
Every item has a ground mesh and an icon in Textures/Icons/, rendered from that mesh. A
new item needs both. A carried piece of furniture lies on the floor as its
furniture.
The folder holds the item icons (T_Icon_Item_*, with the fallback T_Icon_Item_Generic), 12 for
food and its states (T_Icon_Food_*), 19 for the buildable pieces (T_Icon_Build_*), those of the
skill books, the magazines and the carried furniture, and 25 T_Icon_Src_* pictures of furniture.
Of those, 23 are the rows of DA_UIStyle.ContainerKinds, the pictures of the loot source column, and
two are carried-furniture icons.
A picture and a name for a new piece of furniture¶
A new piece of furniture gets its own picture and name in the loot window from a row of
ContainerKinds. Render its mesh and frame the picture like the shipped ones:
- Make a 256 × 256 PNG on a transparent background.
- Centre the furniture, its longest side filling 96 % of the square (a 2 % margin on each side).
- Carry the colour of its edges into the transparent pixels, so that the smaller mip maps do not darken its outline.
- Keep it bright enough to read on both tile backgrounds: an average relative luminance of at least 0.112 over its opaque pixels, which gives 3:1 on the black selected tile and on the dark resting tile.
- Import it next to the others with the settings of the shipped
T_Icon_Src_*: texture group UI,Mip Gen SettingsonSharpen4. Without mip maps the picture looks jagged at tile size. - Add one row to
ContainerKindswith the mesh, the name and that texture, as Restyle the interface shows.
A container without a row still works: it shows the generic picture and its own DisplayName. To
change a shipped picture, reimport it in place rather than deleting it, so that DA_UIStyle keeps
pointing at it. Check afterwards that it kept those two settings.
The vision volume¶
A vision volume is a Blueprints/World/BP_VisionZone. Put one per building,
and one per storey for a house with an upper floor.
| Setting | What it does |
|---|---|
HalfExtent |
Half the size of the box the survivor has to stand in. Cover the building's footprint. |
Occluders |
The camera-side walls of this storey (the -X and -Y faces), with the doors, windows and anything else hung on them. Hidden whole while the player is inside this zone. |
FloorAbove |
The roof, its parapets and everything belonging to the storey above. Hidden whole while the player is inside this zone or inside its LowerZone. |
LowerZone |
For an upper-floor zone, the zone underneath it, so the two hand over cleanly. |
StoreyContentClasses |
On an upper-floor zone, the classes of actors, placed or spawned during play, that belong to its storey: BP_Container and BP_ItemPickup by default. Any of them inside this zone's footprint, with the bottom of its mesh above the top of LowerZone, is hidden with the storey while the player is inside LowerZone. Never add BP_Built or a character. |
StoreyFloorTolerance |
How far below the top of LowerZone the bottom of such a mesh may sit and still count as upstairs: 25 uu by default. It covers meshes whose pivot is at their centre. |
KeepVisibleClasses |
Classes this zone never hides, even when listed in Occluders. The default is BP_Door: the entrance door stays visible and clickable from inside. Remove BP_Door to hide doors with their wall again. |
bAutoCollectOccluders |
True by default. Gathers the actors that carry OccluderTag inside the box, keeps only those on the camera side (the -X and -Y faces, whatever the orientation of a stamped plan), and gathers them again when the player walks in. |
OccluderTag |
The actor tag it looks for: VisionOccluder by default. |
- Place a
BP_VisionZoneand setHalfExtentto cover the building's footprint. - Leave
Occludersempty. Tag the camera-side walls, and everything set in or hung on them, withVisionOccluder: the zone collects them itself at BeginPlay. You may tag the whole outline of a building, as the house plans of Pine Hollow do, because the zone keeps only the camera side. - Put the roof and the storey above in
FloorAbove. - For a two-storey house, make one zone for the ground floor with the upper storey's meshes in
FloorAbove, and one zone for the upper floor with the lower zone referenced inLowerZone. - End the lower zone's box at the upper floor's walking surface. On Pine Hollow, the ground-floor zone of a two-storey house reaches z 301, exactly where the upper floor starts.
Standing downstairs removes the floor above completely: its floor, its walls, its roof. Walking up the stairs brings it back and hides what is above that. From outside, no zone hides anything.
Rules for the lists¶
Occluders and FloorAbove both work on any material: the zone takes those actors out of the frame
and never touches their shading.
If Occluders is already filled by hand, the zone collects nothing by itself. Fill it only when you
want an explicit list, and list only camera-side walls.
Anything hung on a wall you list (a window, a door, a mirror, a picture frame) goes in the same list
as its wall, in every zone that hides that wall. A door listed there still stays visible while its
class is in KeepVisibleClasses. Furniture standing on the floor against those walls stays visible,
as it does downstairs.
Storey content spawned during play¶
Containers the spawn plan creates upstairs, and items dropped there, cannot be listed in
FloorAbove. The upper-floor zone hides them by class, through StoreyContentClasses. This relies
on the lower zone's box ending at the upper floor's walking surface (step 5).
If a Blueprint of yours spawns storey content while the player may already be downstairs, call
RequestBuildingVisibilityRefresh on the player's AC_VisionSource right after the spawn.
AC_Inventory.DropStack and BP_Spawner already do.
The dithered cutaway outside¶
M_Building carries a dithered cutaway, Materials/Shared/MF_WallCutaway. A mesh whose material
instance has CutawayEnabled at 1 opens a disc around the survivor wherever it stands between the
survivor and the camera, the ground spared. CutawayRadius (320) and CutawayDepth (60) on
MPC_Vision size the disc.
It is on for the instances of the walls, the roofs, the vegetation, the car paint, the signs and the
awnings, such as MI_Brick, MI_Siding, MI_Roof, MI_Leaves and MI_CarPaint, and off for the
ground, the items, the lights and the survivor. Set it to 0 on an instance to keep that surface
solid, and to 1 on yours to let the survivor show through it.
Grass, trees and hedges¶
These foliage types ship, all with a shadow.
| Foliage type | On Pine Hollow |
|---|---|
Foliage/Trees/FOL_Tree_Maple, _Birch, _Young, _Pine |
the forest, the streets, groves in the fields |
Foliage/Grass/FOL_ShrubLow, FOL_Bush, FOL_BushLeafy |
yes |
Foliage/Hedges/FOL_Hedge |
the sides and back of every built lot |
The trees block by their trunk only: a capsule of object type WorldDynamic, which the vision passes and the navmesh goes round. Grass, bushes and hedges have no collision, so they never block a player, a zombie or the navigation. Paint them with the editor's Foliage mode: drag them into the palette, then brush. It works on a World Partition map as on a small one.
The ground is MI_Grass, an instance of Materials/Environments/M_Grass. Its Grass group mixes
three tones over 12 to 15 m in world space: green (Tint), dry (DryColor) and bare earth
(DirtColor), with PatchDark, PatchLight, DryAmount and DirtAmount. It also draws short
blades from Textures/Vegetation/T_Grass_Detail (GrassDetail, strength BladeStrength). Lay it on
a flat mesh: Pine Hollow's ground is 64 SM_Floor_Tile, each scaled to 64 m. SM_Terrain_Grass has
small tufts modelled on its 3 m tile and must stay at scale 1.
Fences, lamp posts and other thin props¶
A fence is a BP_Fence, never a bare fence mesh. Its FenceMesh decides
what it is. On Pine Hollow each garden has a white picket fence
(SM_Fence_Picket) along the whole front, with a gate gap on the walk to the door, and hedges on the
sides and the back. The fence segments are scaled along their length so that each run ends exactly at
a corner. Place the nav links over the low fences afterwards.
A thin prop takes the collision object type WorldDynamic: lamp posts, utility poles, mailboxes,
hydrants, signs. It still blocks characters, vehicles and shots. As WorldStatic, it would stop the
survivor's vision fan (AC_VisionSource.OccluderObjectTypes), and a dark wedge would open across the
street behind it.
Pitched roofs on Pine Hollow¶
The four house plans stamp a flat roof with parapets, and a house you stamp gets that roof. On Pine
Hollow, each house has a pitched roof laid over it: slopes (SM_Roof_Slope), a ridge, rakes and half
gables in siding or brick, with the parapets removed and the flat slabs kept underneath as a ceiling.
The new pieces are listed in the FloorAbove of the house's vision zones, so they disappear when you
walk in. They carry the tag PrefabFloorAbove_<n> of their zone, plus PitchedRoof.
Every roof piece of Pine Hollow has Can Ever Affect Navigation off. Do the same on the roofs of your own buildings: otherwise the navmesh covers the flat roofs and the slopes, and the population of a district can be sown up there.
Test it¶
- Open
Content/ZombieSurvival/Maps/L_World, or your map, and stampDA_Prefab_Roomon an empty spot of the North quarter, which the editor loads by default. - Run Assign Save Ids and Validate Save Ids, then save the map.
- Press Play and walk in through the door. The camera-side walls and the roof disappear while you are inside, and come back when you leave.
- Right-click the door and the window: they open, close and take barricades like the map's own.
If it does not work¶
- The walls stay when you walk into a building of yours: it has no
BP_VisionZone, its walls are not taggedVisionOccluder, orOccluderswas filled by hand and does not list them. - The room opens onto the lawn: a back wall is in
Occluders. - A window or a picture floats where a wall was: it is not in the same list as its wall.