Jump to content

How do you manually add prefabs?


abbystabby

Recommended Posts

I've seen guides of people using the world editor to edit prefabs. But i haven't seen anyone show you how to add prefabs to an existing map. Is this even possible? I've managed to get prefabs to appear in the world editor but i don't know how to save it so it carries over to my SP game. Hopefully this makes sense. I remember using Hals program to do something like this about 2 years ago. Any help would be appreciated. I'm just in the mood to make a village out of user made prefabs in the compopack :p

Link to comment
Share on other sites

I had a video around here somewhere...

 

Urgh can't find it.

 

Did find this though...

You have to do this on your own dedicated server and edit the files directly

I am actually doing this myself for my dedicated server.

 

Now there are 2 ways to handle this.

Best Method

I suggest doing this in Single Player first (Generate the Game world you would name in the server so it created the county it will be the same how the server does it.

 

Then once that is done use the World Editor place the prefabs where you want. on the County file there is a prefabs.xml that is created. looks like the one in Nevsgene. You can edit that Prefabs.xml yourself you will basically see where everything that was generated and added to that world is placed. Me personally I loaded the World editor and then seen a lot of the same POIs in one area and replaced it with another prefab.

 

This method keeps the POIs loaded where you placed or added them if you ever have to reset the region chink

You can go to the loaded POI on the map and get its location and then comment it out in Notepad++ (Which I recommend doing first) then saving it in Notepad++ then place your Prefab that you want there to take its place. or if you just want it removed then just comment it out.

 

Using the world editor and placing the prefabs where you want them. Now some prefabs will load above the area intended so you will have to adjust the Y in the prefabs.xml area. You will want to do the following in all cases:

 

Once you are happy with that location press ESC and save!, Exit the world editor. You will see the change in Notepad++ where the new prefab has been added. Now reload the world editor and you will see the new prefab placed in the world. If the prefab is loaded higher above ground, you will want to make the change in Notepad++ adjusting the Y part of the coordinates and lowering that numberm, save it once you have done the ESC, Save, Exit and then reload to see if the height is right.

 

Caution try not to place too many prefabs at once and then saving them unless you get really good at this. because one thing I have noticed is if you do not save an exit, you can have multiple entries for that same prefab. This can be tedious and time consuming but it's well worth it too. Thus giving you a visual of whats going on.

 

Things to consider with this method which is why I suggest doing this in the world editor first. Anything you add will go to the bottom of the list of the prefabs.xml. That being said, if you are simply adding a new prefab over an existing location without commenting it out, the newest addition to the list (the list) will be placed over the existing location which can cause the previous POI loaded to be clipped away. So you can either go to that POIs section in the prefabs.xml and comment that out or adjust the coordinates to not over lap each other. Me Personally I like to just comment it out.

 

 

Second Method

Second way would be using like Bad Companies and adding them using that. However this will not keep them in the game if you have to restore the game region files.

 

 

 

Examples of what I did, I wanted a real downtown looking area and real looking neighborhoods

 

city1.jpg

 

Another angle

 

city2.jpg

 

 

The possibilities are endless.

 

Now in order to get this in the Dedicated server once you are done.

1. Start the dedicated server and make sure you generate the world you want

2. Once its created that folder or before anyone logs into it. Kill the dedicated server

3. then go to the that created World in the Configs/Worlds and then the county created.

4. Open up the folder that was created on the single player and copy the contents over to the server dedicated county.

5. Delete the game name saved folder for the dedicated server.

6. Restart the dedicated server

7. Now the dedicated server should have the new prefab locations generated and able to play on the server.

 

NOTE: Before doing anything on the dedicated server this requires a new game so before doing so you may want to make sure you finish adding/editing what you want in your world PRIOR to starting the server before copying over everything. As once the game starts or someone enters it the Regions will start to generate and any new additions will not be loaded unless you stop the server and delete that region which will reset the region and load any prefabs there from the prefabs.xml

 

This is why its best to complete it first prior to importing

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...