Wsiegel Posted May 13, 2014 Share Posted May 13, 2014 Prefabs can be a great part of the game giving the user more options to explore and loot. But how do you add one or move one that has been loaded into your map? It is really very easy and simple to do. Prefabs are created from the file Prefabs.xml. you can find this file located here.. C:\Program Files (x86)\Steam\SteamApps\common\7 Days To Die\Data\Worlds\Navezgane\prefabs.xml If you edit this file with a simple text editor you will see something that looks like this. [COLOR="#FFFF00"][/COLOR] [COLOR="#00FF00"][/COLOR] [COLOR="#FFFF00"] [/COLOR] Each line is a prefab being placed into the world when it is created in game. The syntax of the line must be the same for each prefab placed. Notice all prefabs entries ( green ) must be entered between the ( yellow ) and section The last prefab entry line, from the list above, the name="garageblue1" is the name of the prefab file in the prefabs folder located here. C:\Program Files (x86)\Steam\SteamApps\common\7 Days To Die\Data\Prefabs if you open that folder you will see a file called "garageblue1.tts" .tts is the file extension used for prefabs in the game This is where all the prefabs are stored. This is where you will copy the prefab .tts file to. The next set of data from the line above shows the in game location position="469, 61, 222" The data format used in game is "X location, Y Location ( height ) , and Z location" the prefabs bottom left ( or the most South West ) corner of the prefab will be placed here when facing North. rotation="0" tell the system how to rotate the prefab when placing it. the choices are 0,1,2,3. this will rotate the prefab around counterclockwise from 0-3. So .. To add a prefab you would 1. ) copy the prefab .tts file into the prefabs folder. 2. ) add the prefab line into the prefabs.xml file using a text editor or you can simple cut and paste it into the file. and save the file Note: The order of prefab placement is by the order listed. In the above file example garageblue1 would overwrite houseblue1 if they had the shared the same location. 3.) when the game runs and creates the prefabs it saves this data to your save game folder / region files. to see the new prefab in an existing save game you would located the region file the prefab maker mentioned and delete it from this folder. ( See region below ) Note: This will also delete anything you have created or stored in the same area. it will reset that area. or you can just start a new game. Move a prefab: To move a prefab is even simpler. when you are in game and know the location you want the prefab to be in. press the ~ key ( Shift + ~ ) to bring up the command console. type the command "lp" ( for locate player ). the system will return your current position in the same format it is listed in the prefabs.xml file You can ignore the extra decimal places. Write these numbers down and then edit the prefabs.xml file to change it to these new numbers. Remember the format is the same X ( West - East ) , Y ( up and Down ) , and Z ( north and south ) Again clear the region from your save folder or start an new game. Region file: Okay so which region file do I need to delete? simply take the x and Z number and divide it by 512 and round the result down. so 1015 in x would be 1015 / 512 = 1.98 rounded down = 1 in x this works the same for negative number -1015 / 512 = -1.98 rounded down ( negative ) = -2 In the garageblue1 example "469, 61, 222" X = 469/512 = .91 rounded down = 0 Z = 222/512 = .43 rounded down = 0 The region file you need to delete would be "r.0.0.7rg" There are many posts that can help you figure out where regions are along with some labeled maps to help you. Hope this help you begin to use and enjoy prefabs. Link to comment Share on other sites More sharing options...
AussieWombat Posted May 13, 2014 Share Posted May 13, 2014 Great work Wsiegel AussieWOmbat Link to comment Share on other sites More sharing options...
DarkNightsComing Posted May 13, 2014 Share Posted May 13, 2014 Very helpful post Wsiegel :0) +1 bro Link to comment Share on other sites More sharing options...
Ashby Posted May 14, 2014 Share Posted May 14, 2014 This is very helpful. Thank you :) Link to comment Share on other sites More sharing options...
BloodSlinger Posted May 14, 2014 Share Posted May 14, 2014 Well done! Link to comment Share on other sites More sharing options...
Mikeforall Posted July 6, 2014 Share Posted July 6, 2014 Great work wsiegel :congratulatory: Link to comment Share on other sites More sharing options...
Zodiac13 Posted July 10, 2014 Share Posted July 10, 2014 I am wanting to add prefabs to a multiplayer server. Can you give me a link or a short description of how I do this? Link to comment Share on other sites More sharing options...
Wsiegel Posted July 17, 2014 Author Share Posted July 17, 2014 [QUOTE=Zodiac13;103227]I am wanting to add prefabs to a multiplayer server. Can you give me a link or a short description of how I do this?[/QUOTE] You basically do the same steps except you have to shut down your server and re start it once you have cleared the save game regions. Link to comment Share on other sites More sharing options...
DW420 Posted September 11, 2014 Share Posted September 11, 2014 --edit-- Note to self: go see an eye doctor Link to comment Share on other sites More sharing options...
TehAgent Posted January 6, 2015 Share Posted January 6, 2015 So can I make it so my own buildings populate the world along with TFP's constructs? Link to comment Share on other sites More sharing options...
hillbilly Posted February 28, 2015 Share Posted February 28, 2015 I'm just wondering if this information is still current, because I have followed the steps and my prefab is not loading. I have wiped the region and edited the prefabs.xml, as well as uploaded build.tts and it's xml (generated by HALs editor) on a random gen map and it is not loading. :( Am I missing something or is there no way to set coords for a build in random gen? Link to comment Share on other sites More sharing options...
hillbilly Posted February 28, 2015 Share Posted February 28, 2015 Since I can't edit my previous post, I have found the solution I was looking for, in case anyone else is looking here ya go, [url]https://7daystodie.com/forums/showthread.php?23596-Prefab-added-to-random-gen-to-x-y-z[/url] Hal comes through again. ;) Great game great community. Maybe some threads need to be merged. Link to comment Share on other sites More sharing options...
Deejay-Mickey Posted April 12, 2015 Share Posted April 12, 2015 [I]Sorry, but only in german, my english is so bad that nobody can understand that tutorial in english (erhaps anybody translate it)[/I] [B]Tutorial: How to insert Prefabs from 10.0 - 11.1 to alpha 11.2:[/B] [U]7 Day to die alpha 11.2 Prefabs aus eigenen Gebنuden zu erstellen oder custom-Prefabs in die map integrieren:[/U] Zuerst Hal9000 7dtdeditor herunterladen. Im entzippten Folder ist eine "Assembly-CSharp Dedicated.dll" enthalten. Diese Datei in den Folder (7DaysToDie_Data/managed)des lokal istallierten Dedicadet-7DtD-Server kopieren und in Assembly-CSharp.dll umbenennen.Die neue bereits vorhandene alpha 11.2 Assembly-CSharp.dll-Datei aber zuerst sichern bzw umbenennen. Dann in Steam unter Eigenschaften vom Spiel 7DtD im Reiter update auf die version 11.1 downgraden und das "upload" zu dieser Version durchführen, aber nur das Spiel und nicht den Dedicadet-Server. Durch das Kopieren und Umbenennen der von Hal9000-7DtD-Editor enthaltenen Datei: Assembly-CSharp Dedicated.dll wird aus der alpha 11.2 eine alpha11.1 (warum auch immer?) Dann den lokalen Dedicated Server starten. Dannach den 7DtD-Editor starten. dort die einstellungen zum Folder vom Dedicated Server eintragen. Den Spielername, mit dem ihr die perfabs sichern oder einfügen wollt, muss unter dem Menü-Punkt Backup-manager als Admin angekreuzt werden. Dann das Spiel starten. Jetzt das selbst erschaffene Bauwerk aufsuchen, in die Mitte stellen. debug mode on und dannim chat eingeben: bbb claim IRGENDEINNAME. Es kommt dann die Bestنtigung im chat. Etwaswarten und dann erneut im chat eingeben: bbb ex IRGENDEINNAME Erneut warten und das war es schon. Im world-Verzeichnis (Dokumente/7 Days to die/Saves/Random Gen/EUREWELTNAME/ ist jetzt eine Folder "Blockbackup". Dann den Prefab-Editor von Hal9000 ِffnen (den 2. Menüpunkt von oben). Da dann unter File/Load exported area/ den Pfad mit dem "BlockBackup" auswنhlen und die Datei IRGENDEINNAME auswنhlen. So und jetzt kِnnt ihr euer Haus dort bearbeiten und dann abspeichern. Danach benutzt ihr den PrefabConverterA11 um euer prefab in die neue Version 11.2 umzuنndern. Fertig! Wenn Ihr irgendein Prefab einfügen wollt oder euer eigenes Werk irgendwo auf der Map, dann genau so vorgehen. Statt "bbb claim IRGENDEINNAME" einzugeben müsst ihr "bbb InsertPrefab IRGENDEINNAME -3316 66 -5650 eingeben. Die Coordinaten müsst ihr selbst rausfinden. Dazu in der Map rumlaufen, den richtigen Ort suchen. Die Position in der Console mit z.B listplayers anzeigen lassen. Dann wird auch eure derzeitige Position im richtigen Format angezeigt. Nach der Eingabe des commands: "bbb InsertPrefab IRGENDEINNAME x y z" müsst ihr kurz weg von dem Ort. Teleporten. Dann wenn ihr zurück geht ist das eingefügte Prefabs auch zu sehen! Nicht vergessen den Namen eures prefabs in die xml einzufügen (/7 Days to die Dedicated Server/Data/Worlds/Random Gen/prefabs.xml) und auch euren mit dem Editor erstellten prefabs samt der dazugehِrigen xml-Datei in den Ordner (/7 Days to die Dedicated Server/Data/Prefabs) zu kopieren. Bitte vorher immer auf einer gesicherten Welt/Map ausprobieren. Einfach den Folder mit der Welt samt Map etc. unter neuen Namen in einen anderen Folder kopieren, den dedicated-Server zu dieser Welt im serverconfig.xml umstellen und in Ruhe ausprobieren. Am Ende einfach wieder die umbenannte Assembly-CSharp Dedicated.dll aus dem /Managed/ folder des Servers lِschen, die neue von alpha 11.2 rein. Das Steam-Spiel wieder auf alpha 11.2 upgraden und fertig ist die Laube! Viel Spass :highly_amused: Link to comment Share on other sites More sharing options...
rsjabba Posted April 22, 2015 Share Posted April 22, 2015 awesome... now all i need to learn is german... Link to comment Share on other sites More sharing options...
Hotdog Daddy Posted April 22, 2015 Share Posted April 22, 2015 [QUOTE=Deejay-Mickey;239698][I]Sorry, but only in german, my english is so bad that nobody can understand that tutorial in english (erhaps anybody translate it)[/I] [B]Tutorial: How to insert Prefabs from 10.0 - 11.1 to alpha 11.2:[/B] [U]7 Day to die alpha 11.2 Prefabs aus eigenen Gebنuden zu erstellen oder custom-Prefabs in die map integrieren:[/U] Zuerst Hal9000 7dtdeditor herunterladen. Im entzippten Folder ist eine "Assembly-CSharp Dedicated.dll" enthalten. Diese Datei in den Folder (7DaysToDie_Data/managed)des lokal istallierten Dedicadet-7DtD-Server kopieren und in Assembly-CSharp.dll umbenennen.Die neue bereits vorhandene alpha 11.2 Assembly-CSharp.dll-Datei aber zuerst sichern bzw umbenennen. Dann in Steam unter Eigenschaften vom Spiel 7DtD im Reiter update auf die version 11.1 downgraden und das "upload" zu dieser Version durchführen, aber nur das Spiel und nicht den Dedicadet-Server. Durch das Kopieren und Umbenennen der von Hal9000-7DtD-Editor enthaltenen Datei: Assembly-CSharp Dedicated.dll wird aus der alpha 11.2 eine alpha11.1 (warum auch immer?) Dann den lokalen Dedicated Server starten. Dannach den 7DtD-Editor starten. dort die einstellungen zum Folder vom Dedicated Server eintragen. Den Spielername, mit dem ihr die perfabs sichern oder einfügen wollt, muss unter dem Menü-Punkt Backup-manager als Admin angekreuzt werden. Dann das Spiel starten. Jetzt das selbst erschaffene Bauwerk aufsuchen, in die Mitte stellen. debug mode on und dannim chat eingeben: bbb claim IRGENDEINNAME. Es kommt dann die Bestنtigung im chat. Etwaswarten und dann erneut im chat eingeben: bbb ex IRGENDEINNAME Erneut warten und das war es schon. Im world-Verzeichnis (Dokumente/7 Days to die/Saves/Random Gen/EUREWELTNAME/ ist jetzt eine Folder "Blockbackup". Dann den Prefab-Editor von Hal9000 ِffnen (den 2. Menüpunkt von oben). Da dann unter File/Load exported area/ den Pfad mit dem "BlockBackup" auswنhlen und die Datei IRGENDEINNAME auswنhlen. So und jetzt kِnnt ihr euer Haus dort bearbeiten und dann abspeichern. Danach benutzt ihr den PrefabConverterA11 um euer prefab in die neue Version 11.2 umzuنndern. Fertig! Wenn Ihr irgendein Prefab einfügen wollt oder euer eigenes Werk irgendwo auf der Map, dann genau so vorgehen. Statt "bbb claim IRGENDEINNAME" einzugeben müsst ihr "bbb InsertPrefab IRGENDEINNAME -3316 66 -5650 eingeben. Die Coordinaten müsst ihr selbst rausfinden. Dazu in der Map rumlaufen, den richtigen Ort suchen. Die Position in der Console mit z.B listplayers anzeigen lassen. Dann wird auch eure derzeitige Position im richtigen Format angezeigt. Nach der Eingabe des commands: "bbb InsertPrefab IRGENDEINNAME x y z" müsst ihr kurz weg von dem Ort. Teleporten. Dann wenn ihr zurück geht ist das eingefügte Prefabs auch zu sehen! Nicht vergessen den Namen eures prefabs in die xml einzufügen (/7 Days to die Dedicated Server/Data/Worlds/Random Gen/prefabs.xml) und auch euren mit dem Editor erstellten prefabs samt der dazugehِrigen xml-Datei in den Ordner (/7 Days to die Dedicated Server/Data/Prefabs) zu kopieren. Bitte vorher immer auf einer gesicherten Welt/Map ausprobieren. Einfach den Folder mit der Welt samt Map etc. unter neuen Namen in einen anderen Folder kopieren, den dedicated-Server zu dieser Welt im serverconfig.xml umstellen und in Ruhe ausprobieren. Am Ende einfach wieder die umbenannte Assembly-CSharp Dedicated.dll aus dem /Managed/ folder des Servers lِschen, die neue von alpha 11.2 rein. Das Steam-Spiel wieder auf alpha 11.2 upgraden und fertig ist die Laube! Viel Spass :highly_amused:[/QUOTE] Hope this helps just put Deejay-Mickey post into google translate and this is what I got. Download First Hal9000 7dtdeditor . In the unzipped folder an " assembly CSharp Dedicated.dll " is included . Copy this file to the folder ( 7DaysToDie_Data / managed ) the locally istallierten Dedicadet - 7DtD server but first and secure new existing alpha 11.2 Assembly CSharp.dll file in assembly CSharp.dll rename.Die or rename. Then downgrade in Steam Properties from the game 7DtD in the update tab on the version 11.1 and the "upload" to perform this version, but only the game and not the Dedicadet server.By copying and renaming the file contained by Hal9000-7DtD Editor : Assembly CSharp Dedicated.dll is from the alpha 11.2, a alpha11.1 (for whatever reason ? ) Then restart the local Dedicated Server . After this start the 7DtD editor. there enter the settings for the folder from the Dedicated Server . The player name with which you want to save or insert the perfabs must be checked under the menu point backup manager as the admin . Then start the game. Now go to the self -created structure , stand in the middle . debug mode on and chat dannim name: bbb claimsoft ANY NAME . It then comes the confirmation in the chat . And then enter again about waiting in the chat : ex bbb ANY NAME Again, wait and that's it . In the world directory ( Documents / 7 Days to the / Saves / Random gene / YOUR NAME WORLD / Folder is now a " block Backup" . Then the prefabs editor of Hal9000 open ( the 2nd menu item from the top ) . Since then select File / Load exported area / the path with the "Block Backup" and select ANY NAME file. And now you can decorate your house edit it and then save it . Then you use the PrefabConverterA11 to your prefab be read as the new version 11.2. Finished! If you want to insert some prefab or your own work anywhere on the map, then just proceed . Instead of " bbb claimsoft ANY NAME" you have to enter " bbb InsertPrefab ANY NAME -3316 -5650 66 to enter . The coordinates you have to find out yourself. To this end run around on the map, looking for the right place . Display the position in the console with eg listplayers . Then your current position in the correct format is displayed. After entering the commands : " bbb InsertPrefab ANY NAME xyz" you have just away from the place . Teleportation . Then when you go back is to see the inserted Prefabs ! Do not forget to insert the name of your prefabs in the xml ( / 7 Days to the Dedicated Server / Data / Worlds / Random gene / prefabs.xml ) and also with your editor created prefabs , including the corresponding xml file in the folder ( / 7 Days to the Dedicated Server / Data / prefabs ) copy. Please try previously on a secure world / map. Simply the folder with the world , including Map , etc. Copying new name to a different folder, the dedicated server to change the world in serverconfig.xml and try it alone. In the end, simply delete the renamed again assembly CSharp Dedicated.dll from / Managed / folder of the server , the new alpha of 11.2 pure. The Steam game again to upgrade to 11.2 alpha and finished the arbor ! Have Fun Link to comment Share on other sites More sharing options...
randomusername777 Posted May 7, 2015 Share Posted May 7, 2015 so if I were trying to move my base I made onto a fresh seed so I could have some changes take affect that I made to some xml files could I make that happen? if so can someone help me do it? Link to comment Share on other sites More sharing options...
h0tr0d Posted May 25, 2015 Share Posted May 25, 2015 [QUOTE=randomusername777;253458]so if I were trying to move my base I made onto a fresh seed so I could have some changes take affect that I made to some xml files could I make that happen? if so can someone help me do it?[/QUOTE] I think you would have to follow some of the steps from the tutorial Ekko did in the first sticky in this forum section mate. Link to comment Share on other sites More sharing options...
Zartuim Posted July 6, 2015 Share Posted July 6, 2015 When referencing the position of the prefab. Is that centered or top left corner or... ??? Link to comment Share on other sites More sharing options...
Akari_Tsukino Posted August 27, 2015 Share Posted August 27, 2015 ok... how do I add prefabs to random gen? I don't want to play on Navezgene. Link to comment Share on other sites More sharing options...
h0tr0d Posted August 27, 2015 Share Posted August 27, 2015 [QUOTE=Akari_Tsukino;311593]ok... how do I add prefabs to random gen? I don't want to play on Navezgene.[/QUOTE] sp or mp, pc or hosted? [URL="https://www.youtube.com/watch?v=o1pjeQaJk8s&list=PL-RP8nWsw9YE9W9fvARSAWySPkxYTsDaC&index=1"]This[/URL] may help? Link to comment Share on other sites More sharing options...
Akari_Tsukino Posted August 27, 2015 Share Posted August 27, 2015 [QUOTE=h0tr0d;311600]sp or mp, pc or hosted? [URL="https://www.youtube.com/watch?v=o1pjeQaJk8s&list=PL-RP8nWsw9YE9W9fvARSAWySPkxYTsDaC&index=1"]This[/URL] may help?[/QUOTE] does that video explain how to add a prefab to the random gen, world gen stuff? like making it so the prefab will show up randomly in random gen with the other vanilla prefabs. I want to make a random location library, but don't know how i'd add it to that part. Link to comment Share on other sites More sharing options...
stallionsden Posted August 28, 2015 Share Posted August 28, 2015 [QUOTE=Akari_Tsukino;311621]does that video explain how to add a prefab to the random gen, world gen stuff? like making it so the prefab will show up randomly in random gen with the other vanilla prefabs. I want to make a random location library, but don't know how i'd add it to that part.[/QUOTE] hi Akari_Tsukino open up your config file (This can be found where you have installed 7days to die. for me it is D:\games\steam\steamapps\common\7daystodie) then go to data. then open config. Find rwgmixer open in notepad (I find notepad++ to be the easiest and neatest) then find the areas you would like your prefab to spawn in. copy the line and paste under it. Now find your prefab and copy the exact name (Including any capitals) in place of the prefab name that you copied. save and it should spawn. if it doesnt check your prefab for any errors. Link to comment Share on other sites More sharing options...
_KillerKitty_ Posted October 4, 2015 Share Posted October 4, 2015 Hello, it would be nice if someone could help me, please. I followed the Steps above but the prefab doesnt show.? What did i do wrong? Thanks for the help. Link to comment Share on other sites More sharing options...
stallionsden Posted October 4, 2015 Share Posted October 4, 2015 [QUOTE=_KillerKitty_;322247]Hello, it would be nice if someone could help me, please. I followed the Steps above but the prefab doesnt show.? What did i do wrong? Thanks for the help.[/QUOTE] what exactly seems to be the problem your having. Link to comment Share on other sites More sharing options...
_KillerKitty_ Posted October 6, 2015 Share Posted October 6, 2015 [QUOTE=stallionsden;322379]what exactly seems to be the problem your having.[/QUOTE] I tried to add the Prefab TWDprison and Zombiezoo. but when i join my game (tested on Navezgane) it won't spawn on the direction i wanted it to be. I searched a place, changed the coordinates and deleted the region file. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.