Jump to content

Getting Started Prefabbing - Complete (POI Creation)


Jackelmyer

Recommended Posts

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.

 

PREPARATION FOR DEDICATED SERVER + TOOLS

  1. As you go through this preparation list, make sure all the mods and tools used here are built for the version of 7D2D that you're working on. As of this post, all references are compatible with 16.2. For example A16.3 just released and at this time, nothing is update (rightfully so being one day later. Patience!)
  2. Install a NON-Experimental version of Alpha 16.2 (or whatever version this ties to when you read this)
  3. Install a dedicated server on your computer. Easy enough by simply going to Tools in Steam and downloading the 7D2D dedicated server. Google up some help on Dedicated Server Setup after/before you install this. This video helped me
    .
  4. Install Bad Company Manager's Mod. BC commands are pretty simple. And it goes with suggestions I have for you further down. Must be installed on the Dedicated Server. Install video
    . Install files (click here). As of this post, I'm using release "A16.2 B7 Build #2" of Bad Company Manager.
  5. Install Hal's Mod -. This is the mod that gives the BBB commands you may have read about elsewhere. Needed for mesh creation. Note, you basically download his editor (regardless if it says not compatible with A16) and use the Update command in his Editor to install his mod. Also make sure to create the empty world. Look up Hal's Install video
    !. Install files (click here).
    WARNING: This will make your game truly Modded. Check with Hal's mod primary forum thread for details before proceeding. Hal has a very simple method for generating Mesh's (distant POI image thingy's). Takes like 1-2 minutes to create a mesh and by far one of the easier steps... With Hal's help. *thanks man!
  6. Special special note: I had Hal's mod update/mod my standard 7 Days To Die game that was installed AND the dedicated server install. You'll see why a bit later, but made mesh creation easier.
  7. Install Pilles Editor for some quick tricks going forward to help you prefab quicker. For some usage video's by Guppycur
    . Install files for Pille's Editor (click here). I recommend the 64bit version as it should be able to handle larger prefabs better than the 32bit version.

 

 

PREFAB BUILDING

  1. Load up a Navezgane map ON THE DEDICATED SERVER. It's just frankly a little flatter and loads quicker than a new Random Gen map. You do this on the Dedicated Server you installed and setup so that you can use the Bad Company Commands, like bc-import/bc-export.
  2. Start building... whatever. Suggest you keep your build size to a maximum 150x150 area. There are 200x200 Prefabs, but some of the tools bog down over 150x150 size areas (rough guess, 131x90ish absolutely was fine, but a 200x80 prefab had issues, solvable, but I'm a simple fella).
  3. Another note on prefab size. If you're going for a 40w x 40L x 10high prefab, when you're done editing the prefab, you should trim out all excess dirt, air, and anything that's not part of your actual prefab. So don't plan to make a 150 x 150 prefab with a little house on it barely using the area.
  4. I like using Bad Company Managers Prefab export tool. simply do the following:
     
    Go to a corner of your prefab to it's lowest point. If you have an underground garage, go a block or two beneath it. CORNER of the prefab. Very important.
    Open your Console (F1 for me) - Not your chat window.
    Type "loc" without the quotes.
    Go to the opposite corner of your prefab, go up till your feet are above the highest point of your prefab, then fly up a few more blocks.
    Open your Console (F1 for me)
    Type "bc-export mysteamname_myprefabname"
    You should now find your prefab exported out to your 7DayInstallFolder\Data\Prefabs folder.
    Check out this video by GuppyCur for a demonstration of these Export steps.

     
     
  5. Now copy those files out to a work area somewhere so we don't mess'em up. It should be an XML file and a TTS file that was created: mysteamname_myprefabname.xml and mysteamname_myprefabname.tts.
  6. Open up the Prefab in Pilles Editor (worth doing some YouTube searches on how to use this editor).
  7. Edit as needed. Suggest removing dirt below and around your Prefab that are not part of your prefab. And remove air above your prefab (with a couple blocks space of air just in case...).
  8. Use Pilles Editor to create Sleeper Volumes (areas where your sleeper zombie blocks that you've place will cause those zombies to spawn). Also use his editor to set your Prefab's XML (some of this is key).
  9. At sometime after using Pilles Editor (or whoevers) you'll want to import your Prefab and take a look, maybe touch up paint. Place annoying blocks, etc. use the Bad Company "bc-import prefabname" command to import your POI after you've edited it. Your updated POI must exist in the Data\Prefabs folder of your games installation for the bc-import command to work.
  10. Once you have your prefab tweaked how you like it, create a mesh. Hal's video
    on how to create a Mesh, his first recommended process is the easiest I've found by far.
  11. Once your prefab and mesh are all created, copy them into your games \Data\Prefabs folder.
  12. In Data\Config\rwgmixer.xml, find the City Groups, Rural Groups, whatever, and add your prefab name to the list just like the other prefabs are in that list.
  13. Start a new Random Gen game.
  14. Once in the new game, open your console and type "bc-lhcd partofmyprefabname" without the quotes. So to match the export example: "bc-lhcd mysteamname". This will show you a list and the coordinates of prefabs that match your bc-lhcd search criteria. Pop on over and you should be able to goof around in your brand new and completed prefab.

 

 

Video Tutorials:

 

 

 

 

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. :)

Edited by Jackelmyer
various updates (see edit history)
Link to comment
Share on other sites

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.

Edited by Jackelmyer (see edit history)
Link to comment
Share on other sites

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.

Edited by Jackelmyer (see edit history)
Link to comment
Share on other sites

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

Edited by Jackelmyer (see edit history)
Link to comment
Share on other sites

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. :)

Link to comment
Share on other sites

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

Edited by Jackelmyer (see edit history)
Link to comment
Share on other sites

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 :)

 

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.^^

Edited by Pille (see edit history)
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Edited by Pille (see edit history)
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

  • 3 weeks later...
How the hell do I connect to my own dedicated server? Is there an internal port number or something?

 

I didn't have to do any adjustments to ports or such really. Just give your server a recognizable name and it usually pops up first on either the normal or modded tab lists. Or even easier it should appear under the far right tab "servers on the local network". I sometimes have to go back to the main menu and then back to the servers list for it to properly refresh and show up.

Link to comment
Share on other sites

How the hell do I connect to my own dedicated server? Is there an internal port number or something?

 

Sorry, haven't been in here for a bit. You're dedicated server should be setup as a multiplayer server, typically password protected. Then you connect to it like any other server in the list of servers, in game.

 

One thing to note:. You can't be running a single player game (New Game) and the dedicated server. If you want to do that, you'll need to alter the port your dedicated server uses and that's something you'll want to Google up on how to do.

 

Best of luck.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...