PDA

View Full Version : Getting Started Prefabbing - Complete (POI Creation)



Jackelmyer
08-28-2017, 05:26 PM
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.
7 Days To Die (A16.2) - Setting Up A Prefab Build Environment (https://youtu.be/CfKx1h5F6ho)

PREPARATION FOR DEDICATED SERVER + TOOLS

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!)
Install a NON-Experimental version of Alpha 16.2 (or whatever version this ties to when you read this)
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 (click here) (https://youtu.be/N32arEjXX8c).
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 (click here) (https://youtu.be/AdKvKEeo8mY). Install files (click here) (https://7daystodie.com/forums/showthread.php?57569-Bad-Company-Manager-(ApiMod-for-Servers)). As of this post, I'm using release "A16.2 B7 Build #2" of Bad Company Manager.
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 (click here) (https://youtu.be/ltoCV8bHnHs)!. Install files (click here) (https://7daystodie.com/forums/showthread.php?7564-Hal-s-Prefab-Editor).
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!
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.
Install Pilles Editor for some quick tricks going forward to help you prefab quicker. For some usage video's by Guppycur (click here) (https://www.youtube.com/playlist?list=PLskpLrVBPtTPedD8LCVDcndLtO8Yn7hZ-). Install files for Pille's Editor (click here) (https://7daystodie.com/forums/showthread.php?62501-Prefab-Editor-(Alpha)). I recommend the 64bit version as it should be able to handle larger prefabs better than the 32bit version.



PREFAB BUILDING

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.
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).
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.
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. (click here) (https://youtu.be/u22WpyOTH3A)


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.
Open up the Prefab in Pilles Editor (worth doing some YouTube searches on how to use this editor).
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...).
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).
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.
Once you have your prefab tweaked how you like it, create a mesh. Hal's video (click here) (https://youtu.be/bcVdxilSpco) on how to create a Mesh, his first recommended process is the easiest I've found by far.
Once your prefab and mesh are all created, copy them into your games \Data\Prefabs folder.
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.
Start a new Random Gen game.
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:

7 Days To Die- Pille's Prefab Editor (Alpha 16.2) - Basic Usage (https://www.youtube.com/watch?v=2AIJz0kP5KQ)



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 (https://7daystodie.com/forums/member.php?41239-Guppycur), StompyNZ (https://7daystodie.com/forums/member.php?106874-StompyNZ), HAL9000 (https://7daystodie.com/forums/member.php?13721-HAL9000), and Pille (https://7daystodie.com/forums/member.php?107475-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. :)

Jackelmyer
08-28-2017, 05:45 PM
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

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.
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.
If you're looking for Sleeper zombie blocks to place, look in Creative and click on the Admin icon (admin blocks I think).
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.
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.
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.
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.
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

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

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

Jackelmyer
08-28-2017, 07:51 PM
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.

Jackelmyer
08-30-2017, 07:10 PM
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

Pille
08-30-2017, 08:54 PM
Very nice tutorial! I am going to add a link to this thread to the opening post of the editor thread.

Jackelmyer
08-30-2017, 09:09 PM
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.

Pille
08-30-2017, 11:54 PM
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.

Jackelmyer
09-02-2017, 02:26 AM
OP updated with some clarifications, additional tutorials, and such.

Laz Man
09-02-2017, 02:53 AM
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. :)

Jackelmyer
09-02-2017, 02:58 AM
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

Laz Man
09-03-2017, 02:54 AM
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 :)

https://youtu.be/E3v0HW-pjA0

Jackelmyer
09-03-2017, 03:23 AM
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

Pille
09-03-2017, 03:27 AM
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.^^

Laz Man
09-03-2017, 03:55 AM
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.

Pille
09-03-2017, 04:00 AM
Thanks Laz Man. I hadn't watched Hal's mesh video (see edit above).^^

Pille
09-03-2017, 04:07 AM
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.

Jackelmyer
09-03-2017, 04:23 AM
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.

Pille
09-03-2017, 04:28 AM
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. :)

Magoli
09-03-2017, 12:43 PM
Yeah maybe as an option. :)

Yesss - please
that would be very helpful
(Ich habe nämlich leider immer noch nicht ganz begriffen wie painting mit dem editor funzt)

Pille
09-03-2017, 01:11 PM
(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:

Roland
09-05-2017, 07:53 PM
Sticking this

Jackelmyer
09-05-2017, 08:08 PM
Thanks Roland!

Dieselpunk
09-23-2017, 07:48 AM
How the hell do I connect to my own dedicated server? Is there an internal port number or something?

Kam R.
09-23-2017, 03:35 PM
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.

Jackelmyer
09-26-2017, 03:54 AM
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.

Dieselpunk
09-29-2017, 09:40 PM
Thanks guys!

dcsobral
01-10-2018, 10:57 PM
Two tips that have been useful to me.

First, Pilles Editor has a "Rotation to Face North" attribute under Xml. Use this to indicate which side the entrance to your building is facing, so that it will connect properly to roads and paths. It should be a number from 0 to 3, indicating how many 90 degrees turns clockwise is required to make your POI face north. Otherwise, you can also use this simple table:

0 - POI is facing North
1 - POI is facing West
2 - POI is facing South
3 - POI is facing East

You can figure the rotation of blocks similarly:

0 - Block is facing North
1 - Block is facing East
2 - Block is facing South
3 - Block is facing West

Note that numbers 1 and 3 for block rotation are the opposite direction of the previous attribute, because that attribute does not indicate which direction the POI is facing, but how many times to turn it to get it to face North.

Vomkat
11-08-2018, 12:37 AM
Once you build a prefab, how do you get it to align properly with roads? What should you do while building the prefab to ensure it works with the roads? I read the preceding post, but its not clear - I'm not asking whether the building is facing north or west, how do you get it to face the road? How far away is the road going to be? Can you make a road or driveway that will intersect with a generated road?

Kam R.
11-08-2018, 12:25 PM
Once you build a prefab, how do you get it to align properly with roads? What should you do while building the prefab to ensure it works with the roads? I read the preceding post, but its not clear - I'm not asking whether the building is facing north or west, how do you get it to face the road? How far away is the road going to be? Can you make a road or driveway that will intersect with a generated road?


If the prefab is for a town: The northern border of your prefab's area will seamlessly align with a road by default, so build the front of your prefab facing north and if you want a driveway or road connection, build the road all the way to the northern border and it will flow right into the city grid. :]

For towns it's easy, for wilderness POI – idk, don't think it's possible to connect them with those gravel paths or even any of the country roads, but maybe the modding gurus have some input on that (I'm curious about that too :D).

Magoli
11-08-2018, 11:17 PM
It sounds crazy and it doesn't look that way, BUT...

- mathematically all the wilderness-prefabs ARE connected to their paths.
There is no single wilderness-POI without a path connected to them.

- esthetically sometimes (always) it looks they arent connected well to their paths - this has 3 Reasons:

1.
The booked place (socket) for a wilderness-POI is always a perfect Square (e.g. 30by30 or 47by47)
In this Square the engine builds a circle for placing the prefab into the world.
U all have seen the big cliffy half earthgaps around some wilderness-POI's (big holecutter-principe)
Also if the land is to low the engine will generate halfround humps to make the surface flat and even.
In this flattened out circular area the engine will place the prefab.
Here the displacement from prefab and path begins.
Another point:
Most of the prefab's entrances are about in the middle of the building. But the connection-point for a prefab to the path is the prefab's N/W corner.
Here the displacement from prefab and path continues.
But lets go further:

2.
Prefabs in the middle of a path:
The connection-point from prefab to path is IMO the most northernwest corner of the prefab.
So if the path follows south/east-direction the prefab will cross/block the path.
The path-gen-algorythm doesn't care if the prefab is straight above it. This is not smart IMO
Not to mention all the unwalkable pathareas like path is going through water or over that big gasps and humps on POI's i mentioned in 1.

3.
IMO there is no way in A16 to let the prefab's entrace pointing to the path.
'RotationToFaceNorth'-command doesnt work anymore in wilderness IMO.
All the wilderness-POI's are spawning in their default rotation (how they were created).


fazit:
most times the connection from prefab to path will look uncanny, unnatural and will be a pain for the eyes.
adding point 1,2 and 3 together it becomes very clear again:

the A16-rwg-world-generating-engine is grab

sad but true - because we dont have another

Penzed
02-15-2019, 07:46 PM
Dont wanna start a new thread, but i think my question fits in well here.
There are many things missing in the editormenu, like bladetraps and switches. I knew u cant do whole electricity builds, but not beeing able to use it for deco is stupid. I tried to givemyself xp via console to craft and place it, but that didnt work( cant get beyond lvl 4).
So my questions, is there a simple way to use blocks/deco wich are not avaible in the poi editor?
( Complex: export poi to singlepayer game, edit it, save it, reexport to editor. Is that even posibble? )

Pille
02-15-2019, 09:52 PM
I guess you missed the dev block switch in the creative menu (see red arrow):

https://i.imgur.com/5gUK4Z8.jpg

Penzed
02-15-2019, 10:16 PM
oha, thx will try it tomorrow.

Penzed
02-17-2019, 04:24 PM
I want to make a prefab to a quest location. Do i just need to change the xml from that prefab? F.e. the difficulty tier, if i want it at another tier then the standart "1". How to make it a killing, a gather quest?
And what means "sleeperislootvolume"?

Pille
02-18-2019, 01:35 AM
Yes you have to set a quest tag in the xml file:

<property name="QuestTags" value="fetch"/>

Possible values:
quest, trader, clear, fetch, hidden_cache

I don't know if all tags are valid but 'clear' (killing quest) and 'fetch' (gather quest) should work. Afaik you have to place a questRallyMarker block (id 1947) to enable the players to start the quest. Fetch quests need a questsatchel block (id 1777) somewhere in the POI. sleeperislootvolume or the alternative term 'priority volume' means that you can place a sleeper volume inside another sleeper volume and the sleepers located in the inner volume will not be spawned if players enter the outer volume (which is quite useful).

Penzed
02-18-2019, 08:54 AM
Thanks again. I will play around with the new infos.

Update: fetch and clear works fine. But imo the poi looks a bit empty, maybe i can improve it/ got new ideas.
Release soon.

Pille
02-19-2019, 06:05 PM
Maybe you can take some ideas from other prefabs ... Good luck!

Penzed
02-20-2019, 04:50 PM
And another questions. How to add a sleeper"area" to a new prefab. i always copy an old one to a new prefab. But there must be a way to add a new one to a new prefab, or iamwrong?! ( i dont mean the xml file, i mean in editor ) But i still cant figure it out.

Pille
02-20-2019, 05:25 PM
Press F6, look at the ground and click on the 'sleeper volume' button:

https://i.imgur.com/Ciwlj5e.jpg

Penzed
02-20-2019, 05:33 PM
u again, thx will test it...
...
..
.
wow .great..works :D

Mr.Kinder
05-19-2019, 10:59 AM
I loved this Thread

Now i am going to ask a question that is bothering me and i did not see it in the previous pages.
1º I have signs I have put up in my prefab. Is there any way to save the writing on them ?
2º how do I keep my none POI things connected to power after save. IE, auto turrets, blades etc?

Pille
05-19-2019, 04:17 PM
I loved this Thread

Now i am going to ask a question that is bothering me and i did not see it in the previous pages.
1º I have signs I have put up in my prefab. Is there any way to save the writing on them ?
2º how do I keep my none POI things connected to power after save. IE, auto turrets, blades etc?

1. Yes, just write some text on the signs and save the prefab.
2. Unfortunately, that's not possible at the moment. Maybe, in A18 or A19.

Madman.XXX
05-23-2019, 04:29 PM
I've seen many posts regarding creating and exporting distant POI meshes. I know how to do that now. What I can't seem to find is a way to remove OLD distant POI meshes.

Let me explain. I run a dedicated server and I have cleared a good portion of POIs from a particular region. I did this in world editor, deleting the desired POIs leaving nothing but bare land. I then ran a single player game to to get that region file to generate. I then copied and replaced that same region file into my server of the same seed. It worked great! Those areas are free of my removed POIs. Unfortunately, the distant POI meshes are still there. So from a distance, it looks like those old POIs are still there but disappear when you get close.

Is there any way to remove those meshes from my server? Thanks in advance for any advice you can offer. :smile-new:

bdubyah
05-23-2019, 05:14 PM
That's the distant terrain. I believe it's generated when the map is, and currently never updates. The devs are looking into trying to have it update during gameplay, but they haven't said much about it.

So I don't think there is much you can do with it at the moment.

Genosis
05-29-2019, 05:28 PM
I've seen many posts regarding creating and exporting distant POI meshes. I know how to do that now. What I can't seem to find is a way to remove OLD distant POI meshes.

Let me explain. I run a dedicated server and I have cleared a good portion of POIs from a particular region. I did this in world editor, deleting the desired POIs leaving nothing but bare land. I then ran a single player game to to get that region file to generate. I then copied and replaced that same region file into my server of the same seed. It worked great! Those areas are free of my removed POIs. Unfortunately, the distant POI meshes are still there. So from a distance, it looks like those old POIs are still there but disappear when you get close.

Is there any way to remove those meshes from my server? Thanks in advance for any advice you can offer. :smile-new:

Did you just clear the blocks/terrain, or did you delete the prefab designated bounds as well?

That is, in the world editor, look at the map, do you still see green squares where those POI's used to be? If so, make sure you are showing bounds in your settings, select it, hit K to open up properties, and select "Delete prefab". That should unregister the prefab from that area, and will no longer render the mesh in that location.

That's a guess, I haven't tried but in theory that should work from what I understand of the prefab system.

Madman.XXX
06-12-2019, 03:05 PM
Did you just clear the blocks/terrain, or did you delete the prefab designated bounds as well?

That is, in the world editor, look at the map, do you still see green squares where those POI's used to be? If so, make sure you are showing bounds in your settings, select it, hit K to open up properties, and select "Delete prefab". That should unregister the prefab from that area, and will no longer render the mesh in that location.

That's a guess, I haven't tried but in theory that should work from what I understand of the prefab system.


That's exactly what I did. It doesn't work. I'm certain it works if I was running the game directly from my same client PC. But once transferred to the dedicated server, those deletions are ignored as far as distant POI mesh. The prefabs are gone, but not the mesh.

Guppycur
06-13-2019, 06:46 PM
Meshes are loaded into the chunk. Delete the region files AFTER removing the pois from spawning should work.