• If you have a mod, tool or prefab, please use the Resources section. Click Mods at the top of the forums.

Getting Started Prefabbing - Complete (POI Creation)

Jackelmyer

New member
So... for those who are just starting out with Prefab Building and Mesh Making... Here's my recommendation, A16 specific, on how to get started... If this looks imposing... deep breath. Follow the steps (help me fix messed up ones) and you should be fully up and going in an hour roughly.

Disclaimer: There seems to be a ton of ways to create a Prefab. This is just what actually ended up being the simplest for me. Feel free to poke around for alternatives as I'm sure they exist. :)

Some Key Points:

prefab.xml -

* Holds sleeper volume (how much of what kind of zombies and where zombies spawn). Zombie blocks for specific spawn locations must be inside a sleeper volume.

* Holds a Y axis offset placement for your prefab. So you can sink underground portions of your prefab into the ground.

* Holds acceptable zones, biomes, etc, where your prefab can be stored.

prefab.tts -

* Holds the blocks placed in your prefab. Including air blocks, all structural blocks, loot containers, sleeper zombie placement, their painting, rotation, the works (i believe all that).

prefab.mesh -

* Far as I can tell this is purely the graphical display of your prefab at a distance. Used with Distant Terrain. Without it, you won't see your prefab from afar and it will render right in front of you when you're about 50ish blocks away from it. Otherwise the space that your prefab sits on will look empty from a distance.

bc-import/bc-export -

* You'll see me mention these commands throughout this post. These commands come from a mod, Bad Company Manager (see links below in preparation) and only works on Dedicated Servers. Sorry, the mod doesn't work on Local Games (single player etc).

PREPARATION WARNING

  • The preparation mentioned here may clear out any custom mods/prefabs/etc that you've already installed. Be sure to backup your 7D2D custom content before proceeding. Or at least know it may get wiped.


For a walk through of Preparation setup, here's a video tutorial.



That's about it... Probably more to note but having a post like this probably would have helped me A LOT.

Jeez... who to thank... the list is long.

Geez. Who to thank... The list is long: Guppycur, StompyNZ, HAL9000, and Pille.

Definitely had help from others like Laz Man, Kam, Ouch Quit It!, and others! Thanks for all the help everyone! Bit of a learning curve, hope this helps others. :)

 
Last edited by a moderator:
BIG TIP: It seems the generic prefab import and export features may cause Sleeper Zombie blocks to get lost if you're importing and exporting a lot after you've placed your Sleeper Zombies. Do yourself a favor and try to place your Sleeper Zombies as the very last thing you do before your final export. Once you've done your final Prefab export, if you need to change your Prefab, use an editor like Pille's. That way your Sleeper Zombie placement will be retained.

TIPS - Creating a Prefab

  1. CREATE A SEPARATE WORKING FOLDER! You'll want to create a folder (in Documents for example) where you store your latest and greatest prefab files. Reinstalling the game will delete all the prefabs you've exported and worked on in your 7Days\Data\Prefabs folder. So you could lose all your work if you only save and edit your prefab files within the Data\Prefabs folder.
  2. Don't use wooden signs (1x1, 1x3, etc) in your prefab. The text on them won't save with the prefab data and the ownership is lost. I.E. you cannot edit the sign after you reload the prefab or it spawns in a new world. Best thing you got (far as I know) for writing on your prefabs is the large letters.
  3. If you're looking for Sleeper zombie blocks to place, look in Creative and click on the Admin icon (admin blocks I think).
  4. Large open spaces are very hard to manage from a Sleeper Volume perspective. Even harder if your open space has windows to another open space. Zombies spawning right in front of you or blinking to existence is something you'll have to work on.
  5. Editor tools like Pilles editor and probably others, can manage block rotations, like the way a cabinet faces or a Sleeper Zombie is facing, but they're challenging to know what the rotation in the editor really looks like. Use these editors for main structure placements (like a concrete slab for your whole Prefab to sit on) and large time consuming block placements. Also use these tools for Volume placing. You can write the volume placement XML by hand... uh... but good luck.
  6. If you have a basement, parking garage, or something underground, make sure to set your "DistantPOIYOffset" and your "YOffset" values in the prefabs XML (open other prefab xml files to see their settings examples). If you don't set your offset, the floor of your underground garage or basement will become the actual floor of the Prefab itself. So... you're prefab will be balancing (crumbling) on your basement for example. Sink that sucker: YOffset.
  7. Load your Prefab in game and do painting, block rotations (cabinets) and IMO especially zombie placement. That way you can be sure you get the "feel" and effect you're looking for.
  8. Do yourself a favor. Use Pilles tool to create the following prefabs to help speed up prefab building.
    Prefab Name: 20x20air - create a prefab 20 wide, 20 long, 20 high of nothing but air. Helps clear areas for a lil tiny prefab.
    Prefab Name: 100x100air - create a prefab 100 wide, 100 long, 40 high of nothing but air. I use this at the start of ANY Prefab. One command and boom. big flat space.
    Prefab Name: 100x100concrete - create a prefab 100 wide, 100 long, but only 1 block high of concrete. If you want to build something with a concrete foundation, this is a great way to save time.
    NOW: When you're in game: "bc-import 100x100air", in the console, without quotes. It'll clear a 100x100 area around you as you're in game. Provided mods are installed and you have these prefabs in your Data\Prefabs folder.


TIPS - Sleeper Volumes

  1. Overlapping volumes can behave funny. But they sometimes are the only way to make your Prefab spawn zombies in a way that makes sense considering a player can come from any direction. I personally found it beneficial to place zombies in key areas that I knew i wouldn't overlap with multiple Sleeper Volumes. Then I had Sleeper Volumes placed overlapping to ensure zombies spawn when a player enters a certain area and they don't get the zombie flashing up in front of them. Not an easy task.
  2. Keep in mind that when you enter a Sleeper Volume, there can be as much as an 8 second delay it seems (may vary even more) on when zombies spawn. So be cautious with how tight your Sleeper Volumes are. You may expect a player to have to break down a door to get into a sleeper volume... But what about after they broke down the door and come back to the Prefab a few game weeks later? No door, and they walk right into the room. Delay... zombies pop right in front of the player... ew.
  3. Definitely import your Prefab after you've setup your Sleeper Volumes and give it a test run. Things may not behave exactly as you expect it. And they won't behave exactly as you want them. So test it out, tweak it some, but don't go crazy (i did. marginally helped... eh.)
  4. IMO less is actually more when placing Sleeper Zombies in regards to how you want a Sleeper Volume to perform. You want to balance how many places you've put zombies, the size of the area that a Sleeper Volume is going to cover, and the Group you're using to spawn the zombies. The Groups are more important than placing a bunch of zombie positions. Out of the standard groups you get to use, note that the Default group types have a *chance* to spawn zombies, as to most all the other groups. Where as the Loot group types are guaranteed to spawn zombies. Play testing is a must! :)


TIPS - Meshes

  1. Meshes do not import with commands like BC-Import. So you can't test your mesh this way. You have to get your POI to spawn naturally and Random Gen is how that's done as far as I know. It may help to edit your rwgmixer.xml file (see above) to cut out some of the prefabs that load that aren't yours. Seemed to help.
  2. Many ground cover items won't show on your mesh. So for example, a parking lot made of dirt won't exactly show. Nor will the cars you place. Specifically, won't show up from a distance due to what's actually included when a Mesh is Simplified (i think). If you want the ground around your Prefab to show up on a mesh, you may want to try using concrete blocks for a parking lot, for example, and then paint them to look like Asphalt or something... Dunno, haven't tried, but that's all I got.

 
Last edited by a moderator:
Condensed Steps:

1. Load all the requirements mentioned in the long version.

2. Start a Navezgane map in Creative mode on the Dedicated Server.

3. Build out your Prefab just like you would build a base while playing.

4. Add Sleeper Zombies in key points you want them to have a chance to spawn in.

5. bc-export your prefab.

6. Use Pilles Editor to add sleeper volumes and clean up blocks of your Prefab you don't want (excess dirt, etc).

7. bc-import your prefab to play test it.

8. Use Hal's method to create a Mesh. Warning: Be sure to backup all files before doing this. Only include the Mesh file with the files you backed up and know are in good condition. Don't use any updated TTS or XML files when creating the mesh.

9. Prefab... Done.

Optional:

After Step 1, use Pilles Editor to start your prefab from a structural perspective. Foundation (if needed). Walls. Rooms. floors. etc. Can really speed up your build.

Note: Currently multiple methods of loading your prefab don't allow Sleeper Zombie blocks to be imported. This can be a challenge as we tend to want to be done with a prefab, load sleepers, and suddenly need to tweak something on our prefab. Just be prepared to reload your sleepers if you've imported your prefab for further edits. Best thing to do is once your sleepers are in place, either edit the prefab in your build world without importing it (whatever you were last working on with sleepers) or be prepared to set your sleeper blocks out again.

 
Last edited by a moderator:
Meta Values and Rotation Values in Editors (like Pille's editor for example).

I'm trying to build a list somewhere that I'll remember. You'll find in Pille's editor that when you place a block, you have some interesting fields to use. Two more challenging ones are "Meta" and "Rotation". Meta defines things like doors being Open, Closed, or Closed and Locked. Rotation defines things like which way a cabinet is facing or a zombie is facing, from facing North/South/East/West to facing Up/Down and mixes of N/S/E/W. I'll try to get some of these values stored below so we all can have a quicker reference and simply set and edit some of these blocks that we typically have to set in game in order to know which way things are facing.

Doors and Meta Values: Following values in the Meta field of your editor have the following meaning.

0 = Unlocked Closed Door

1 = Open Door

4 = Locked Closed Door

Rotation Values Zombies: TBD

Other Tools and Tricks:

If you want to get more into how Prefab's are done from more of a "How does TFP" do it perspective, try this link. I've only hopped in this functionality for a moment, so... I'm kinda useless with it.

https://7daystodie.com/forums/showthread.php?47459-Unlocking-In-Game-Prefab-Editor-(Terrain-Tools)-dll-mod

 
Last edited by a moderator:
Very nice tutorial! I am going to add a link to this thread to the opening post of the editor thread.

 
Very nice tutorial! I am going to add a link to this thread to the opening post of the editor thread.
Thanks Pille! I hope this gets made a Sticky Post and can be updated/mended by me and admins as a ongoing guide to getting going with Prefabbing.

 
Thanks Pille! I hope this gets made a Sticky Post and can be updated/mended by me and admins as a ongoing guide to getting going with Prefabbing.
I haven't seen a similar thread yet. So this would make sense.

 
Thanks jack for the tutorial. It will undoubtedly help folks interested in prefab creation.

One pro tip id like to add is the ability to load/edit/save prefabs from hals empty world. This allows you to skip having to specify coords when saving. You just have to remember to disable physics when building in hals empty world. :)

 
Thanks jack for the tutorial. It will undoubtedly help folks interested in prefab creation.
One pro tip id like to add is the ability to load/edit/save prefabs from hals empty world. This allows you to skip having to specify coords when saving. You just have to remember to disable physics when building in hals empty world. :)
We need to get on discord. Because I've been wanting to do that and I've not fully figured it out. I've only used the empty world so far as to create Meshes. But I think this method you're mentioning may be a much more "ideal" way. Bare minimum, being able to create a prefab without having to do block cleanup of dirt and air would be fantastic. I think Hal's empty world is something that TFP uses for prefab creation.

And thank you! :D

 
Last edited by a moderator:
We need to get on discord. Because I've been wanting to do that and I've not fully figured it out. I've only used the empty world so far as to create Meshes. But I think this method you're mentioning may be a much more "ideal" way. Bare minimum, being able to create a prefab without having to do block cleanup of dirt and air would be fantastic. I think Hal's empty world is something that TFP uses for prefab creation.
And thank you! :D
This video from slaan should answer all your questions :)

 
I've used the Empty world for creating Meshes. Hal mentioned in a video that the empty world is the world TFP created. After going to the post below, it looks like Hal modded the prefab building dll that TFP uses. Also available in the link below.

I'm finding that it may be easier to build prefabs, when not wanting to use a dedicated server, by using the Prefab DLL and Pille's editor. Been slowly investigating simpler ways to get up and start prefabbing. May convert this thread to setting up a dedicated prefab server.

https://7daystodie.com/forums/showthread.php?47459-Unlocking-In-Game-Prefab-Editor-(Terrain-Tools)-dll-mod

 
This video from slaan should answer all your questions :)
Imho it's a nice video about sleeper volumes but it doesn't explain how to efficiently use Hal's empty world...

Edit:

Just found out that the explanation for empty world usage is 'hidden' in Hal's Distant POI Mesh Generation video.^^

 
Last edited by a moderator:
Imho it's a nice video about sleeper volumes but it doesn't explain how to efficiently use Hal's empty world...
I apologize for the lack of explanation. Hopefully the following helps. :)

Step 1) Install Hal's DLL file and Empty World

Step 2) Enable DM via the console.

Step 3) Enable flight so you character stops falling.

Step 4) Enable edit mode via "bbb ee" command.

Step 5) Load desired prefab for editing via consolte command "prefab load <prefabname>"

Step 6) Press ESC, and disable physics via the corresponding check box.

Step 7) Begin adding/removing blocks and/or painting.

Step 8) Save the changes to your prefab via the console command "prefab save <prefabname>"

By following these steps, I never have to specify the coordinates of the prefab for exporting which saves me time. I could then open the saved prefab within your editor make changes there, and then load it back into the same empty world without having to open/close the gameworld.

In general, I use your editor to do macro editing (multiple rows/columns/layers of blocks + sleeper volumes) and do micro editing and painting within Hal's empty world.

 
Thanks Laz Man. I hadn't watched Hal's mesh video (see edit above).^^

 
In general, I use your editor to do macro editing (multiple rows/columns/layers of blocks + sleeper volumes) and do micro editing and painting within Hal's empty world.
Are you using the unmoded paint tool? It's really slow, isn't it? I've created a custom brush with a bit help from Hal. This should save a lot of time:

<item id="1505" name="superBrush">

<property name="Meshfile" value="Items/Tools/PaintbrushPrefab"/>

<property name="CustomIcon" value="paintTool"/>

<property name="Material" value="wood"/>

<property name="RepairTools" value="wood"/>

<property name="HoldType" value="51"/>

<property name="DegradationBreaksAfter" value="true"/>

<property name="Degradation" value="99999" param1="true"/>

<property name="SoundJammed" value="ItemNeedsRepair"/>

<property name="SoundDestroy" value="wooddestroy1"/>

<property name="EconomicValue" value="20"/>

<property name="CrosshairUpAfterShot" value="false"/>

<property name="FuelValue" value="20"/>

<property class="Action0">

<property name="Class" value="TextureBlock"/>

<property name="Hitmask_override" value="Melee"/>

<property name="Sound_start" value="erase"/>

<property name="Infinite_ammo" value="true"/>

<property name="Magazine_items" value="paint"/>

<property name="Range" value="15"/>

<property name="Delay" value="0.1"/>

<property name="RemoveTexture" value="true"/>

<property name="DefaultTextureID" value="156"/>

</property>

<property class="Action1">

<property name="Class" value="TextureBlock"/>

<property name="Hitmask_override" value="Melee"/>

<property name="Sound_start" value="paint"/>

<property name="Magazine_items" value="paint"/>

<property name="Magazine_size" value="1"/>

<property name="Range" value="15"/>

<property name="Delay" value="0.1"/>

<property name="Particles_muzzle_fire" value="paint_splash2"/>

</property>

<property class="Attributes">

<property name="DegradationMax" value="1500,2000"/>

<property name="DegradationRate" value="0,0"/>

</property>

<property name="Group" value="Tools/Traps"/>

<property name="ActionSkillGroup" value="Construction Tools"/>

<property name="CraftingSkillGroup" value="craftSkillTools"/>

<property name="RepairExpMultiplier" value="5.5"/>

<property name="PickupJournalEntry" value="paintingTip"/>

</item>

It's just an indestructible fast brush.

 
Last edited by a moderator:
Damn you Pille. I'm on my Android. lol. :-p

Will probably use that in the near future.

For what it's worth, I painted 95-98% of the Pet Store prefab using your editor Pille. Was way way faster once I got used to Front/Back/Top/Bottom.

Was thinking of asking if you wanted to change that up to show the textures as East/West/North/South/Top/Bottom. Then maybe a compass overlay on the corner of the map editor that followed rotation.

I need to use Hal's mod some more. If it is the Prefab DLL he modified, then you can probably do all the prefab building techniques in game. Which make some of the tools not needed. The TFP prefab editor is a bit clunky (sorry guys! Mad love!). But like most clunky, if I get used to it, it's likely fine. So if Hal extended that... Oooo.... Hmm.

 
Was thinking of asking if you wanted to change that up to show the textures as East/West/North/South/Top/Bottom. Then maybe a compass overlay on the corner of the map editor that followed rotation.
Yeah maybe as an option. :)

 
(Ich habe nنmlich leider immer noch nicht ganz begriffen wie painting mit dem editor funzt)
Don't understand what you saying but I will do my best. :wink:

 
Last edited by a moderator:
Back
Top