Difference between revisions of "User:Infinithil"

From Sim Settlements
Jump to: navigation, search
m
m
 
(41 intermediate revisions by the same user not shown)
Line 7: Line 7:
 
Have a nice day!
 
Have a nice day!
  
Finished additions:
+
Last finished: [[Toolkit Extra - Advanced Possibilities]]
[[Toolkit_Chapter_05_Randomized_Clutter]]
 
 
 
 
 
 
----
 
----
 
Workshop area
 
Workshop area
 
----
 
----
[[Toolkit_Chapter_05.5_Helping_the_Player]]
+
[[Toolkit Extra - Custom Flag Tutorial]]
 
----
 
----
''This tutorial assumes you know basic navigation and keyboard shortcuts to navigate the Creation Kit. If not, [[Toolkit_Chapter_00_Creation_Kit_101|please go back]] and check out the <span style="color:#006400">'''Creation Kit 101'''</span> primer.
 
  
 
All of my guides will highlight things that are specific to your experience level: <span style="color:#006400">'''Green for beginners'''</span>, and <span style="color:#FF0000">'''Red for seasoned modders'''</span>. So if you’re new, you aren’t meant to understand the red messages, and if you’re a vet - you can probably skip the green.''
 
All of my guides will highlight things that are specific to your experience level: <span style="color:#006400">'''Green for beginners'''</span>, and <span style="color:#FF0000">'''Red for seasoned modders'''</span>. So if you’re new, you aren’t meant to understand the red messages, and if you’re a vet - you can probably skip the green.''
  
 +
''If you’ve never built a mod or used the Creation Kit before, it’s recommended that you go through the Sim Settlements Builder’s Toolkit. Even if you aren’t interested in creating buildings for Sim Settlements, it teaches you the basics of the Creation Kit and shows you how to package and upload a mod.''
  
  
==Preamble==
+
This tutorial will go over adding custom flags to the Sim Settlements system. It does not cover photo-editing techniques, only the steps needed to convert an image into a custom flag for use with Sim Settlements.
  
This guide is for things that I’ve started doing since the mod’s release that didn’t fit easily into any of the other tutorials, but are important enough to justify their own guide.
+
<span style="color:#000080">If you already have a mod with custom flags, and you’d like to integrate them without making Sim Settlements a dependent mod, please contact me and I’d be happy to show you the steps required.</span>
  
These are steps that will bring your buildings even closer to perfection in the eyes of the player.
 
  
Just like the Advanced Possibilities guide, this tutorial will grow over time.
+
==Programs Needed==
  
==Menu Selectable Building Plan==
+
'''[http://www.gimp.org/downloads/ Gimp] or Photoshop'''
  
As of patch 2.0.0, players can now directly select the building model for a plot. To facilitate this, the ExtraPlaqueInfo property of the building plan is used (found by expanding the Advanced section of your building plan). To set this up so that the player can select your building and get the appropriate prompt, follow these steps.
+
'''[http://registry.gimp.org/node/70 Gimp DDS Plugin] or [https://software.intel.com/en-us/articles/intel-texture-works-plugin Intel TextureWorks Plugin]'''
  
# In the Object Window, expand Miscellaneous and click on Messages, then filter for kgSIM_BuildingInfo_Template
+
'''[http://www.nexusmods.com/fallout4/mods/3635/ Material Editor]''' by Ousnius
# Duplicate the kgSIM_BuildingInfo_Template form (right click it and choose Duplicate).
 
# Open the duplicated form and change the data to match your building plan (check out some of the other kgSIM_BuildingInfo messages for ideas about what kind of information you might include). After these steps is an image of the template and below that is a list of the fields along with a basic explanation of each.
 
# Once your message is configured, open your building plan, expand the Advanced section and point the ExtraPlaqueInfo property to your new message.
 
 
[[File:Toolkit_Chapter_05.5_Helping_the_Player_image1.jpg]]
 
  
'''ID''': Change the ID to something to help you pair it with your building plan.<br/>
+
'''Creation Kit''' (or XEdit, though this tutorial will only show the steps in the Creation Kit)
'''Title''': The title will show up on the plot Plaque below your building plan name. This should be any basic information the player might need and show be relatively short.<br/>
 
'''Message Text''': This is the information that will be displayed to the player when they select your plan from the build menu. It is broken down into 4 sections.<br/>
 
'''Heading''': The first line tells the player the building name, author name, and which add-on pack it’s coming from. Replace '''Building Name''' with what you named your building, replace '''Author Name''' with your name, and replace '''Addon Pack Name''' with whatever you are going to call your Addon. If you are uncertain still, just make something as a placeholder and you can come back and change it again later.<br/>
 
'''Detailed Information''': This is a more detailed version of what you included in the Title field. You can make this section as long as you like.<br/>
 
'''Benefits''': This is where you would describe any modifiers your building plan would apply that are beneficial to the settlement. If you aren’t adding any special modifiers, this section can be removed.<br/>
 
'''Costs''': This is where you describe any negative modifiers that would impact the settlement. If you aren’t adding any negative modifiers, this section can be removed.
 
  
 +
'''Sim Settlements 2.0.8 +''' (make sure you have the mod installed as it includes scripts you’ll need)
  
  
==Scrappable Buildings==
+
Used in this tutorial are several files:
  
Many of you will have noticed I released a new mod file called Sim Settlements Helper. This file was to make it possible for players to scrap everything in the mod.
+
Flag_Material_Template.BGSM - which tells the game which texture files to use.<br/>Flag_Diffuse_Template_d.dds - which is the art texture file.
  
On Xbox and some slower computers, conditions can arise where objects from Sim Settlements get left behind. I’m not even talking about uninstallation, I’m talking about the scripts getting backed up and things being created at unexpected times so that Sim Settlements misses them in cleanup stages. So rather than forcing the player to use console commands, allowing them to scrap the objects in workshop mode is clean easy solution already available in the game.
+
And two optional files, that you most likely won’t need unless you’re a 3d artist. Most people will just want to use the game’s default files for these.<br/>
 +
Flag_Diffuse_Template_n.dds - which is the normal map <br/>Flag_Diffuse_Template_s.dds - which is the specular map
  
You can easily add this to your own stuff, here’s what you do.
+
Download the [https://www.nexusmods.com/fallout4/mods/22808 full Builder's Toolkit] to get the files.
  
#Start by creating a new FormList, go to the Object Window, expand Miscellanous, click on FormList and right-click in the right half of the window and click new.
 
#Give your formlist a unique ID, I tend to include the word Scrap in it. Leave your FormList open and drag the window to the side so we can add things to it.
 
#Now expand World Objects and click on one of the highest level categories (activator, container, door, etc), in the filter type in your prefix.
 
#Click on the first thing on the right (if nothing shows up, skip to the next category), then hold shift and scroll down to click on the last thing in the list, this should highlight them all. Now drag all of these into your FormList.
 
#*Repeat this process for all 11 of the WorldObject major categories.
 
#Now click OK to save your FormList.
 
#Next, go to the Object Window, expand Items and click on Constructible Object.
 
#Right-click on the right hand side and choose New. This will bring up the constructible object form.
 
##Enter a unique ID.
 
##Right-click in the box under Recipe Filters and select Add, find: “WorkshopRecipeFilterScrap” and add it.
 
##In the Created Object dropdown, find your FormList (you can use the filter just above it to narrow down this list.
 
##Then press OK to save the Constructible Object.
 
#You’re done!
 
  
So long as you followed the advice to create custom named duplicates of items you are spawning in your StageItemSpawns array (as tutorial 4 taught you), everything your building plans create will be scrappable.
+
==Setting Up Your Files/Directories==
  
They will also return any items to discourage anyone from using this as a cheat to generate unlimited resources.
+
# Go into your Fallout 4/Data folder, this is usually found under C:/Program Files(x86)/Steam/steamapps/common. This is where your game files exist.
+
# If you don’t have a folder called Textures, create it. Then inside of that, create a new folder for your mod. Copy Flag_Diffuse_Template_d.dds to this folder, now rename it something for the first flag you want to create, for consistency sake, make sure it ends in “_d” like the current name.<br/>So if you decide to name it MyFlag, name it MyFlag_d instead. The d stands for diffuse, and represents what most people would consider the texture.
==Performance Settings Support - new in 1.1.9==
+
# If you don’t have a folder called Materials, create it. Then inside of that, create a new folder for your mod. Copy Flag_Material_Template.BGSM to this folder, now rename it something similar to the texture name you used above for the first flag you want to create.
 +
# Open the .BGSM file you just renamed in the [http://www.nexusmods.com/fallout4/mods/3635/ Material Editor] program.<br/>[[File:Toolkit Extra Custom Flag Tutorial image01.jpg]]
 +
# Go to the Material tab, then click on the grey box to the far right next to the Diffuse Texture row, and navigate to the DDS file you copied in step 2. Now save the material and exit this program.
  
In the City Manager Holotape is a section called Performance Settings. This allows players to turn off certain objects in our building plans to help with performance issues.
+
<span style="color:#FF0000">If you are going to be creating custom normal and specular maps, you would link those files here.</span>
  
There are two ways you can take advantage of these.
 
  
'''The Removal Method''': For objects that need the same classification throughout all of your building plans or that are only used in one building plan, you can simply add the ActorValue kgSIM_PlotSpawn_PerformanceClass set to one of the following numbers:
 
  
1 = Detailed model - a very complex model that could cause fps issues due to large textures or high polygon counts<br/>
+
==Making Your Custom Flag Art==
2 = Detailed light - small lights that could be removed without making the building completely dark 3 = Animated Object - objects that loop through an animation like flags or machines<br/>
 
4 = Special Effect - smoke, fire, water, etc <br/>
 
5 = Radio<br/>
 
6 = Sound Emitter<br/>
 
7 = Actor type - NPCs, pets, etc.<br/>
 
8 = Container - Container type object holding lootable items (not currently in use)
 
9 = Clutter<br/>
 
10 = Water Plane - Water planes cause everything beneath them to be water as well, so players building plots up in the air may want to be able to turn them off.<br/>
 
  
Couple of important rules with this method:
+
Open the DDS file you copied into your directory in Gimp or Photoshop.<br/>[[File:Toolkit Extra Custom Flag Tutorial image02.jpg]]<br/>The flag art is made up of two images that look mostly identical, and for the most part you would fine using the same image on top and bottom. Though they are used slightly differently.
  
#Never apply or alter this AV on the kgSIM forms that are part of Sim Settlements, or you’ll flag them for every building plan instead of just your own.
+
When the Martial Plot is manned, and flag is up in the air, only the top half of the texture is used on both sides of the flag. When the Martial Plot is not manned, and the flag is down, it uses both halves of the texture.
#Don’t apply the AV if you want your object to appear no matter what. So if you have an activator running a script, you definitely don’t want it being skipped or removed.<br/>
 
  
If you want to apply the classification to an object, but only on certain building plans, you have two options:
+
You’ll be fine copy pasting the top half to the bottom as it’s hard to tell the difference when the flag is down anyway. If you’re a perfectionist, you have the option to do each side separately.<br/>[[File:Toolkit Extra Custom Flag Tutorial image03.jpg|left|Bottom half of the texture]][[File:Toolkit Extra Custom Flag Tutorial image04.jpg|right|Top half of the texture]]<br/>
 +
The erased parts of the texture file are what will show up as holes in the flag.<br/>
 +
# Once you have your flag designed the way you want, do the following to save the file correctly:
 +
## Gimp: Choose File -> Export As, in the window that pops up, select the file you are editing, then press Export. A second window will come up with DDS settings.
 +
### Set Compression to BC3 /DXT5
 +
### Change Mipmaps to Generate mimmaps
 +
### Press OK.
 +
## Photoshop: Choose File -> Save As, in the Save As Type dropdown, select Intel Textureworks, click Save. A second window with come up with DDS settings.
 +
### Change Texture Type to Color + Alpha
 +
### Set Compression to BC3 8bpp (Linear)
 +
### Set Mip Maps to Auto Generate.
 +
### Press OK.
  
#Create a copy of your object with the appropriate AV value from the list above, then change out the version in your building plan StageItemSpawn records with your new copy.
+
==Configuring Your Flag==
#Use the iType field in your StageItemSpawn record as described in the downgrade method below.<br/>
 
  
'''The Downgrade Method''': Use this method if you’d like to replace your object with a less intense version, for example: replace a high-poly model with a low-poly version, or a shadow light with a non-shadow light. To do this, instead of applying the ActorValue to your object, you instead use that same number in the new StageItemSpawn field called iType.
+
This portion uses the Creation Kit, it will be written as if you’ve never used it before, but you may want to go through a basics tutorial, such as the one included in the Sim Settlement’s [[Toolkit|Builder’s Toolkit]].
  
Then add your downgraded model as a new entry immediately following that one. Your downgraded model should have nothing entered in the iType field, and should have the EXACT same sSpawnName value.
+
# Open the Creation Kit.
 +
# Click on File->Data and check in SimSettlements.ESM, then press OK.
 +
# Once the files are loaded, select the Object Window, and type '''kgsim*flag''' in the Filter box. This will show all of the different Sim Settlements objects related to flags.
 +
# Find the object with the name '''kgSIM_FlagDown_USA''', right-click it and choose '''Duplicate and Rename''', in the pop-up, type in kgSIM_ in the Search box, and enter your own prefix in the Replace box - it can be whatever you want. You’ll use this prefix to identify all of your custom objects.<br/>[[File:Toolkit Extra Custom Flag Tutorial image05.jpg]]
 +
# Press OK.
 +
# Now repeat step 4 for '''kgSIM_FlagWavingUSA01''', '''kgSIM_FlagWallUSA''', and '''kgSIM_DynamicFlag_Template'''.
 +
# In the Object Window, replace the Filter field with the prefix you used for your three objects.
 +
# Double-click '''yourPrefix_FlagDown_USA'''.
 +
## In the ID field, erase '''USA''' and give the flag a name.
 +
## Click on the Edit button near the center of the window. This will bring up the model selection screen.
 +
## Use the Material Swap dropdown menu to select '''Custom Material Swap'''.
 +
## In the large white section with the headings “Original Material”, “Replacement Material”, and “Remap Index”, double-click the white area under Replacement Material next to “clothflag01alpha.bgsm”.
 +
## Navigate to materials folder you created at the beginning of this guide and select your .BGSM file, and press OK.
 +
## Press OK again, and when prompted to Create a New form select No. You’ll then be prompted to Rename, answer Yes.
 +
# Repeat step 8 for '''yourPrefix_FlagWavingUSA01''' and '''yourPrefix_FlagWallUSA'''. The Wall version will be the exact same steps, and the only difference for the Waving version is that screen will look slightly different, so the Edit button won’t be in the exact same position.
 +
# Double-click '''yourPrefix_DynamicFlag_Template'''. This is going be your '''Dynamic Flag Record'''.<br/>[[File:Toolkit Extra Custom Flag Tutorial image06.jpg]]
 +
## In the ID field, erase '''Template''' and replace it with your flag name.
 +
## In the Name field, erase '''Dynamic Flag''' and replace it with what you want the player to see when choosing your flag from the list.
 +
## Select the '''SimSettlements:DynamicFlag''' script and click the Properties button.
 +
## Double-click FlagDown.
 +
### Select '''Static''' from the Form Type dropdown (there may be a slight delay before the Creation Kit response).
 +
### Check in the Filter box and type in your prefix.
 +
### Select your flag down model from the Pick Object dropdown.
 +
## Double-click FlagWall.
 +
### Select '''Static''' from the Form Type dropdown (there may be a slight delay before the Creation Kit response).
 +
### Check in the Filter box and type in your prefix.
 +
### Select your flag wall model from the Pick Object dropdown.
 +
## Double-click FlagUp.
 +
### Select MoveableStatic from the Form Type dropdown.
 +
### Check in the Filter box, your prefix should be there already (type it in if not).
 +
### Select your flag model from the Pick Object dropdown.
 +
## Press OK to exit the properties screen.
 +
## Press OK to exit the MiscItem screen, when prompted to Create a new form, select No. Then press Yes when asked to rename.
 +
 +
==Adding Your Flag to Sim Settlements==
  
If the player has that type disabled, your downgraded one will be displayed instead.
+
<span style="color:#FF0000">If you already have an add-on pack, you can use your existing Quest during this setup.</span>
  
[[Category:Toolkit]]
+
Now that you have a flag configured, you’re going to tell Sim Settlements about it.
  
----
+
'''You’re only going to do this section once, after which, you’ll only need to add additional flags to the form list you’ll configure in this section.'''
[[Toolkit_Chapter_06_Settler_Navigation]]
 
----
 
''This tutorial assumes you know basic navigation and keyboard shortcuts to navigate the Creation Kit. If not, [[Toolkit_Chapter_00_Creation_Kit_101|please go back]] and check out the <span style="color:#006400">'''Creation Kit 101'''</span> primer.
 
  
All of my guides will highlight things that are specific to your experience level: <span style="color:#006400">'''Green for beginners'''</span>, and <span style="color:#FF0000">'''Red for seasoned modders'''</span>. So if you’re new, you aren’t meant to understand the red messages, and if you’re a vet - you can probably skip the green.''
+
In the Object Window, expand the Character category, then select Quest. Set the Filter to “kgsim_addon”. You’re looking for a quest called kgSIM_AddonTemplate - right-click this and choose Duplicate. Now open the newly created kgSIM_AddonTemplateCOPY0000.
  
 +
# On the Quest Data tab, change the ID to something unique <span style="color:#006400">(as always, remember to start with your prefix!)</span>.
 +
# Press OK. If it asks you to Create a new form, answer No, then answer Yes to renaming.
 +
# Next we’re going to prepare a FormList for holding your Flag(s).
 +
## In the Object Window, expand the Miscellaneous category and click FormList. Then in the right-side of the Object Window, right-click and select New.
 +
## Enter a unique id <span style="color:#006400">(remember to start with your prefix)</span>, for example: '''yourPrefix_FlagList'''
 +
## Press OK.
 +
# While you’re still in the FormLists category, change the Filter in the Object Window to your prefix and double-click the FormList you just created and drag it off to the side.
 +
# In the Object Window, expand the Items category, select MiscItem.
 +
# Drag your Dynamic Flag Record into the main part of the formlist. It should look like this:<br/>[[File:Toolkit Extra Custom Flag Tutorial image07.jpg]]
 +
# Press OK.
 +
# Next, in the Object Window, expand the Characters category, then click on Quest, and filter for your prefix to find the quest you made. Double-click it to open it up.
 +
# On the scripts tab, select SimSettlements:AddOnScript and click Properties.
 +
# Double-click on '''SIMParent''' and select kgSIM_SIMSettlementParent from the drop down menu.
 +
# Double-click the MyClutter section, it will be in blue and have a horizontal line next to it. This will expand the MyClutter properties.
 +
# Double-click MyMartialFlags.
 +
# Check in filter and enter your prefix.
 +
# Select your flag list from the Pick Object drop down.
 +
# Press OK to close the properties window.
 +
# Press OK again to close the quest.
 +
# Now click File->Save to save your plugin. Name it anything you like.
  
==Preamble==
 
  
Alright, you’re on the home stretch to having a feature complete building! Compared to the time involved in the previous tutorials, this one will be a breeze.
+
==You’re done!==
  
We’re going to do two things, Navmesh your 3 building models <span style="color:#006400">(Navmeshing is a process to teach AI how to walk through a space)</span>, and add a special type of collision called Obstacle Navcutting. <span style="color:#FF0000">Obstacle Navcutting is not an official term, it’s what I call it because of the pieces involved. We’re making use of an old trick Bethesda used in Hearthfire to dynamically manipulate the Navmesh at runtime.</span>
+
Your flag will now be selectable from the flag menu on the City Planner’s Desk!
  
 +
To add additional flags, just repeat the Configuring Your Flag section and add your additional Dynamic Flag Records to your flag formlist you created. No need to do configure additional quests.
  
==Adding Obstacle Navcutting To Your First Building==
+
If this is your first Addon for Sim Settlements, know that there can be a short delay after starting up your game before it registers completely with Sim Settlements, so don’t be alarmed if your flag isn’t there in the first 10 seconds.
  
Obstacle Navcutting is something special you need to do to Sim Settlements buildings. If you are used to building workshop creatable buildings, <span style="color:#006400">or want to go on to doing so with the skills you’ve learned here</span>, you won’t need to do this step.
+
[[Category:Toolkit]]
  
When objects are spawned by code the way they are in Sim Settlements, their navmesh <span style="color:#006400">(the other part we’ll be doing to the building in the next section)</span> is not immediately recognized by the game. The player has to first exit the game and come back in for it to work.
+
----
 +
[[Toolkit Extra - FO4Edit - Working Faster]]
 +
----
  
So we’re going to add some rudimentary boxes to show the NPC how to get around!
+
''This tutorial assumes you know basic navigation and keyboard shortcuts to navigate the Creation Kit. If not, [[Toolkit_Chapter_00_Creation_Kit_101|please go back]] and check out the <span style="color:#006400">'''Creation Kit 101'''</span> primer.
  
#Go to the Cell View, make sure World Space is set to Interiors and open the cell kgSIMObstacleNavCutDisplays.
+
All of my guides will highlight things that are specific to your experience level: <span style="color:#006400">'''Green for beginners'''</span>, and <span style="color:#FF0000">'''Red for seasoned modders'''</span>. So if you’re new, you aren’t meant to understand the red messages, and if you’re a vet - you can probably skip the green.''
#*This is a cell with pre-created boxes (those bright-pink eye sores) laid out along with the approximate sized items they will work for. [[File:Toolkit Chapter 06 Settler Navigation image01.jpg]]
 
#Now find the SCOL for your first building level, and float it somewhere above the cement pad (catch those falling models!).
 
#Next, fragment the collection with '''Alt+U'''.
 
#Your goal here is to add those pink boxes to your walls, and any large object that is between the doorway and any furniture the settler needs to get to activate such as a bed, or a shopkeeper marker.
 
##They don’t need to cover vertically, in fact they should be sunk below the floor by a about 20% of their height.
 
##Remember in the first tutorial, I suggested you bake your major pieces of furniture into the model? This is one of the reasons. It’s very easy to simply pick a box that matches the furniture approximately.
 
##Leave plenty of space. The doorway size you’ve seen in the game is about as narrow a gap as you should leave between any two of these boxes if you want the NPC to be able to walk between them.
 
##Overlapping corners is NOT necessary, if the space between two of these is less than half a doorway width, the NPCs generally won’t even attempt to walk between them.
 
##Don’t worry about furniture up against walls if it will not block a path to things the settler will not activate <span style="color:#006400">(Settlers will only activate objects of the Furniture type that you placed)</span>.
 
##If your building has two or more stories, do not worry about the upper floors, those will be handled by our NavMesh in the next section.
 
##Note: These boxes are markers, so they will not show up in the game![[File:Toolkit Chapter 06 Settler Navigation image02.jpg]]<small>Obstacle navcut as viewed from underneath of the SecuriStop Armor Store. Your box layout should look similar from the bottom. Notice the large gap near the doorway, and the very small box used for the counter. Better to go too small, than too big.</small>
 
#Once you’ve set up the boxes, you’re going to follow the normal steps to create the SCOL/Nif/Static - with a few differences:
 
##When naming your SCOL, add _Obstacle to the end of the name.
 
##When you’re in Nifskope, do '''NOT''' press Save right away like we normally do, first you’re going to do a few additional steps:
 
###<span style="color:#006400">Throughout this section I will refer to “Blocks” some people refer to them as “Nodes”, which is essentially any one of these entry lines inside of Nifskope - it’s a little more complex than that - but for our purposes, that will work!</span>
 
###Click the > next to 0 BSFadeNode to expand it.
 
###Look at the revealed Blocks and expand them one at a time until you find one with a bunch of things under it with kgSIM_Obstacle in the name.
 
###Click on the NiNode that has all of the kgSIM_Obstacles under it, count the number of entries that do '''NOT''' have kgSIM_Obstacle in them.[[File:Toolkit Chapter 06 Settler Navigation image03.jpg]]
 
###Go down to Block Details, and change the Num Children field to be the number of '''Non-'''kgSIM_Obstacles <span style="color:#006400">(You can edit that number by double-clicking it.)</span>.
 
###Double-click the refresh icon, and expand the Children list below. You should notice now that things have changed in the list of Blocks above. The one you have selected now only has some of them left under it equal to the Num Children you just entered. The rest are now down at the bottom of the file. This is normal.
 
###In the Children section, you’re going to make sure the entries left are all pointing to the NiNodes that are not kgSIM_Obstacles, to do so, double-click on one of the Children entries (aim for the number) and type in the ID of one of the ones you need to point at that was moved to the bottom of the blocklist. See below for a image example:[[File:Toolkit Chapter 06 Settler Navigation image04.jpg]]<br/><small>''In this we would click on 63 at the bottom of the file, and type in 84, so that the BaseFenceChainLinkHalfNoPost01 is moved back here. We’d then replace the 66 in the bottom window with 87, and so on.''</small><br/>All that should be left at the bottom of your file, offset slightly to the left, are the kgSIM_Obstacles.
 
###Click on 0 BSFadeNode in the Block List, then edit the Num Children entry in the Block Details. You’re going to take the number there and increase it by the number of kgSIM_Obstacle objects. So if the number is 2, and there were 6 obstacle objects, you’ll change that number to 8.
 
###Now, doubleclick the refresh symbol just below that number you edited and expand Children.
 
###For each of the None entries, enter the ID for one of the kgSIM_Obstacles.<br/> See image below for an example of a what a correct node layout should look like once you’re finished with these steps.[[File:Toolkit Chapter 06 Settler Navigation image05.jpg]]<small>''Your finished nif should look something like this. If you click on the down arrow next to 0 BSFadeNode, everything else should be hidden. If not, you did something wrong.''</small><br/>
 
###Now before you save this, you should make a backup of the nif file you already created for this model, before you added the Obstacle pieces. Once you’ve made a backup copy, save over the original file - which will automatically update your Static form in the Creation Kit.
 
#Last step. Open the Static form (not the SCOL) of the building model you just edited, and check in Obstacle. This tells the game to look for the pink boxes when deciding how the NPCs should move around.
 
#Head into the game and give it a test! You should be able to command an NPC to walk into your building without it running into a ton of stuff! If it doesn’t appear to work at all (they run directly into the side of the building), you may have missed a step - or you may have left large gaps where you shouldn’t have.
 
#*If you continue to struggle to get this to work, you can test changes to the model before you do all of the Node manipulation, though sometimes it will cause the game to crash to desktop - so be aware!
 
  
  
==Creating Your First Navmesh==
 
  
Some experienced modders will tell you that Navmeshing is a giant pain in the arse, and when doing it on a large scale- it can be. Doing so for three small models is nice and quick.
+
==Preamble==
  
This may be difficult to explain in text/images, and I will try to get up a Youtube video explaining it as soon as possible. In the meantime, there are lots of video tutorials on Youtube for Skyrim Navmeshing, and the exact same method applies - I particularly like the tutorials by darkfox127
+
This guide assumes you’ve been through the numbered tutorials and understand how Building Plans work. It may use some shorthand that you’d only be familiar with if you’ve successfully created a building for Sim Settlements.
  
#Find your Static model (not the SCOL) for your level 1 building in the Object Window (I think you know enough now to find them… ok fine, WorldObjects->Static).
+
Always be sure that you backup your esp file before applying a script in XEdit. While the software will offer to backup your mod file before committing the changes, it’s better to be safe than sorry. XEdit is mostly agnostic to the specifics of Fallout 4 mods and can create entries that the game doesn’t support, so you should always test your mod after editing it with XEdit scripts. (FO4Edit is the Fallout 4 version of XEdit that you’ll need for this. XEdit is the collective name for all of the variations of this software that work for different games. For example, TES5Edit is the Skyrim version.)
#Right-click on it in the Object Window and choose NavMesh Object. This will open your model up in the Render window.
 
#Rotate your view until you’re looking at an entryway to the building.
 
#For our purposes, Navmeshing will be done entirely on the floor of the model (Though technically you can do the roof as well if you like), so when I ask you to click and create points, I’m always asking you to do it on the floor.
 
#Right-click near one of the front corners of the doorway. A small green cube should appear, and the model of the building may no longer be highlighted green - this is normal.[[File:Toolkit Chapter 06 Settler Navigation image06.jpg]]
 
#Now, hold the '''Ctrl-key and right click''' in the other front corner. You should now have two green cubes. (If one of them turns a purple color, it means it was deselected, hold your '''Ctrl key and left-click''' to select it again)
 
#With the other two selected (highlighted green), Ctrl+Right-Click on the inside of your doorway (see image below). Another cube should appear, as well as a red triangle. Two of your cubes should be selected, and the other unselected. [[File:Toolkit Chapter 06 Settler Navigation image07.jpg]]
 
#Next, Ctrl+Right-Click in the opposite inside point of your doorway, to create another triangle. You should now have a nice rectangle.[[File:Toolkit Chapter 06 Settler Navigation image08.jpg]]
 
#Continue to follow this pattern around the inside of your building.[[File:Toolkit Chapter 06 Settler Navigation image09.jpg]]
 
  
'''Some important tips while working:'''
 
#The two green cubes will be connected to the next one you create to form a triangle, so be aware of which two are selected.
 
#NEVER create triangles overlapping each other, notice how the overlapping piece is bright red (see below). This will cause the NPC to get stuck![[File:Toolkit Chapter 06 Settler Navigation image10.jpg]]
 
#Instead, change the cubes you have selected so that triangles never cross over each other.[[File:Toolkit Chapter 06 Settler Navigation image11.jpg]]
 
#[[File:Toolkit Chapter 06 Settler Navigation image12.jpg]]
 
#Do not leave gaps in your NavMesh, the surface should have one continuous Navmesh.
 
#If you have a second floor, stairs can be a little tricky, they can just cover the entire stairs with two triangles, and when you get to the top, you could continue the upper floor without breaking the Navmesh. I will show you approximately how to do it with some images: [[File:Toolkit Chapter 06 Settler Navigation image13.jpg]]
 
#Once you have your floor and stair surfaces NavMeshed. Click the NavMesh menu at the top and select Finalize Cell NavMeshes. Then close the NavMesh toolbar. [[File:Toolkit Chapter 06 Settler Navigation image14.jpg]]
 
#Save your plugin.
 
  
The Navmesh can be difficult to test. It requires that your building is created, then you have to save and exit the game, and load back in before it is even recognized. With two story buildings, the NPCs will sometimes still struggle to navigate.
+
==Programs Needed==
  
''Hey what’s the big idea kinggath! I checked some of your model NavMeshes and you didn’t follow your own rules!'' During development, I became convinced that NavMeshes did not work on code created objects. I tested everything I could think of to make them work (you’ll notice some of my model NavMeshes have long “tongues” sticking out the front doors).
+
*Creation Kit
 +
*FO4Edit 3.2 or Greater
 +
*Any Free Text editing software (ex. Notepad)
 +
*Any Free Spreadsheet software (ex. Google Sheets or OpenOffice)
  
It was only when Transfer Settlements was released, that I brought up the issue with cdante (the MA). He was shocked to learn I was correct! He began testing fervantly and finally discovered that exiting the game and coming back in allows the Navmesh to start working again. So props to him for figuring that out!
 
  
So my answer is- I just haven’t gotten to it yet. In a future patch, I will correctly follow my own advice and fix the navmesh in all of the Sim Settlement models.
+
==Importing Stage Data To Your Add-on==
  
 +
Two of the more time-consuming fields to fill out for your Building Plan, are the StageModels and the StageItemSpawns. With the scripts included in the Builder’s Toolkit, the process is greatly simplified.
  
'''You’re Done!'''
 
  
Your Settlers should now navigate your building with ease (well as best as AI can). If you made it through all of the tutorials, your building is feature complete and ready for release!
+
Start by creating your actual building - essentially do all of the staging work of creating your SCOLs and static records for your building levels and construction stages, and laying out all of the objects you’d normally put in
 +
 +
the StageItemSpawns field. A best practice to make this easier is to create a Layer for each level of your building (you’ll understand why shortly).
  
The first few will take you a long time, but after a while they become very easy, especially if you sketch some ideas out in advance. I can usually put together a full model with all of the steps in an evening as long as I know what I want it to look like. I find the part that takes the longest is learning what all the different statics look like in the game so you know what to filter for!
+
If you’re using scripted objects that do things OnInit or OnLoad, you have to consider a few extra things.
  
[[Category:Toolkit]]
+
The below Export process is much simpler if you use the actual objects you want to appear, rather than static placeholders inside the staging cell (which is something you might see that I’ve done in a lot of my builds).
----
+
Doing so will leave active objects that might trigger things happening when the player is playing, even if they haven’t built your building plan.
[[Toolkit_Chapter_07_Releasing_your_Mod]]
 
----
 
All of my guides will highlight things that are specific to your experience level: <span style="color:#006400">'''Green for beginners'''</span>, and <span style="color:#FF0000">'''Red for seasoned modders'''</span>. So if you’re new, you aren’t meant to understand the red messages, and if you’re a vet - you can probably skip the green.''
 
  
==Preamble==
+
As an easy way to combat this, you can actually continue to use the placeholder objects in your staging cell, and then edit the exported records to reference your actual objects by their Editor ID.
 
 
<span style="color:#FF0000">While this tutorial is directed at new mod authors, if you are a vet, you should skip to the section titled '''Coming Up With Standards To Help the Player-base'''. There is a small template you can use with your description so that players can make sure they have the minimum version of Sim Settlements that your Add-On pack requires, as well as outlines which features of SIM Settlements it supports.</span>
 
 
 
<span style="color:#000080">IMPORTANT:</span> <span style="color:#FF0000">Never include any of the Sim Settlements scripts or other files with your mod, as long as the player has Sim Settlements installed, it will detect them. Doing so will make it impossible for players using your Add-On pack from ever receiving updates to those files. Since Sim Settlements is an ESM, every file you include will overwrite those in Sim Settlements.</span>
 
  
The moment is finally here, you’ve spent hours dealing with kinggath’s crazy tutorial series, you’ve made some buildings, or VIP stories and are ready to '''share your work with the community!'''
+
After you’ve done all this, create your Building Plan object like you would for any other building - just don’t fill out the StageModels or StageItemSpawns fields. We’re going to do that with FO4Edit.
  
First things first - consider the limitations of modding Fallout 4. If you’re unaware, due to the way mods are handled in code, there is a limit of 255 mods for any individual player. So releasing a single building plan in your mod, may not be appealing to some players.
+
You’ll want to find the XEdit scripts (.pas files) from the Builder’s Toolkit and copy them to the Edit Scripts
 +
directory where FO4Edit is installed.
  
You are more than '''welcome to release just a tiny bit of content at a time!''' Though I want to give you some ideas to help encourage users to make use of your add-on pack:
 
  
You '''might want to wait until you have a few more buildings/stories''' complete. '''Or you could clearly explain in your description that you plan on adding more content in the future''', maybe mention that you’re looking for feedback before you put in more time on the project.
+
==StageItemSpawns Export/Import Process==
  
'''Or consider teaming up''' with other budding mod authors you meet in the Discord channel to combine your content together to make a super add-on pack (if you decide to go this route, myself and other experienced authors can help you merge your esp files together!).
+
To start, you’ll need to export the position/rotation/scale data of your StageItemSpawns. This is best done in 3 stages so that you can easily keep track of which goes on which stage.
  
 +
1. Select the objects for your Level 1 building, then choose File -> Export -> Ref Placements for Selection.
 +
a. You’ll be prompted to create a file, name it something that makes sense to you, and then repeat the process for your the items of each of your other levels.
 +
2. Now that you have the exported data for each group of items, you need to combine them together in a spreadsheet and fill in the missing data fields.
 +
a. You’re going to need to be sure to follow a template for the spreadsheet you’re making. The first row should be a header row and not hold any of your item data, if you’d like to label that top row, the data will go in this order:
  
And of course, I will gladly promote your add-on pack on the description page of Sim Settlements! Just send me a link after you’ve released it with a screenshot you’d like me to use in promoting it!
+
Editor ID, posX, posY, posZ, RotX, RotY, Rotz, Scale, sSpawnName, iStageNum, iStageEnd, iType, ActorValue, iValidActorValue
  
 +
To make this simpler, I’ve created a file you can paste your data into on a google drive, simply save it to your own drive and edit that copy: https://docs.google.com/spreadsheets/d/1OIgadz52gQLF3jh5by9XyFh9qttDiImIw0ZyVn9jSoc/e dit#gid=0
 +
b. Now that you have your spreadsheet started, open one of your exported documents you created in Step 1. Copy everything but the header row from one of your exported documents, click on the first field in the first empty row of your spreadsheet and paste.
  
With all that said, let’s get started!
+
The software should detect the formatting, and automatically place each piece of data in its own field. You may notice that the EditorID fields don’t quite match the in game version. In order to support multiple objects of the same form, a 3 digit suffix is added to the end. You can leave these on if you like, as the XEdit script will strip them automatically.
 
   
 
   
==Coming Up With Standards To Help the Player-base==
+
c. Fill in the iStageNum and sSpawnName fields at minimum.
 +
d. Fill in any additional fields you’d like to use. If you’re filling in the ActorValue field, be sure to enter the Editor ID of the ActorValue object you used.
 +
e. At this point, you may alter any of the data manually, such as pointing your placeholders to your actual editor ids.
 +
f. Repeat these steps for each of your level files of stage items, be sure to use the correct iStageNum for each.
 +
3. Once your spreadsheet is finished, save it as a .CSV file (comma separated values) - you’re going to end up having to type the exact path to it, so best to store it somewhere simple. I like to create a folder in my C:\ drive called Imports, that way my path will just be C:\Imports\filename.csv
 +
4. Close the Creation Kit and make sure your CSV file isn’t open in any software.
 +
5. Make a backup of your esp file in case something goes wrong (it shouldn’t but, not worth the risk anyway).
 +
6. Open your esp in FO4Edit.
  
Based on the number of requests I’ve received for the Builder’s Toolkit, I think there’s a chance we see a lot of different Add-on packs - '''which is awesome!''' I dream of being able to play this mod one day and never seeing the same building twice after I’ve built up all of my settlements. Obviously, '''I can’t do that alone''' - so I’m incredibly excited that so many of you guys are interested in adding your own flare!
+
Wait for it to finish loading, it is substantially faster than the Creation Kit. When it’s done, you should see a message similar to this in the lower left corner:
  
Sim Settlements is going to continue to gain features over the foreseeable future. Some of these will add major new possibilities to what you as an Add-On builder can do to the system. Since these upgrades will '''change some of the scripts involved''', you’re going to have to require that not only does the player '''update your mod, but also to the appropriate version of Sim Settlements.'''
+
7. On the left side of the screen, you will see all of your mod’s parent files as well as your mod. Expand your esp by clicking the plus sign next to it.
 +
8. Next expand Misc. Item and find your Building Plan in the list (if you click the word EditorID near the top of the screen, it will sort all of the entries alphabetically).
 +
9. Warning: This step is destructive, it will erase the previous entries of your StageItemSpawns property before inserting your spreadsheet data. Right-click on your building plan and choose Apply Script.
 +
10. In the window that pops up, find kgSIM_ImportStageItemSpawns in the list (if you don’t see this, close the box, then copy the .pas files from the XEdit Scripts folder of the Builder’s Toolkit into the Edit Scripts directory where FO4Edit is installed).
  
On top of version concerns, you also have a '''lot of options''' over how complete your buildings are. You can absolutely release a building pack where all you’ve done is the base models and haven’t added construction stages as they will still look awesome inside of player settlements - but you should warn the users about what features you’re not supporting.
+
11. Press OK.
 +
12. After a second or two, you will be prompted to enter the file path. Type the exact path on your local computer to the spreadsheet you created and press OK.
 +
13. As the script runs you should see messages on the right hand side confirming each line of your document was imported.
 +
14. If you receive any errors, fix your spreadsheet, and try running the script again.
  
To help make it easy for Sim Settlement users to know what to expect from your Add-On pack, I’ve included a little template you can add somewhere in your description to help players know what they are getting!
+
==StageModels Import Process==
  
So if you decided to skip the navigation step, I won’t start receiving as many bug reports that navigation stopped working because the player will have clearly seen the template in your description.
+
The StageModels process is much simpler as you can just type up the data needed instead of combining documents.
  
If you don’t like the design of the template, feel free to create your own - I just wanted to provide a starting point.
+
1. Create a new text file or spreadsheet, which ever is easier for you. If you used a naming scheme, it should go fairly quickly as you can just copy/paste the name and change the ending for each stage.
 
+
a. If a text file, type the Editor ID of each of your StageModels, separated by a comma and NO spaces. (Editor ID is the unique ID you gave your Static, for example the Tato Mud Farm’s first stage model Editor ID is: kgSIM_Farm01_SA_L1_Final)
The template can be found inside of the Builder’s Toolkit in a folder called “Add-on Pack Description Template”.
+
 +
b. If a spreadsheet, type the Editor ID of each of your StageModels in a cell across a single row.
 +
2. Save the file as a .CSV file. If you’re using Notepad, just type in .csv at the end of your filename, it won’t be an option in the dropdown menu.
 +
3. Close the Creation Kit and make sure your CSV file isn’t open in any software.
 +
4. Make a backup of your esp file in case something goes wrong (it shouldn’t but, not worth the risk anyway).
 +
5. Open your esp in FO4Edit.
  
 +
Wait for it to finish loading, it is substantially faster than the Creation Kit. When it’s done, you should see a message similar to this in the lower left corner:
  
==The Nexus: Where it All Began==
+
6. On the left side of the screen, you will see all of your mod’s parent files as well as your mod. Expand your esp by clicking the plus sign next to it.
 +
7. Next expand Misc. Item and find your Building Plan in the list (if you click the word EditorID near the top of the screen, it will sort all of the entries alphabetically).
 +
8. Warning: This step is destructive, it will erase the previous entries of your StageModels property before inserting your spreadsheet data. Right-click on your building plan and choose Apply Script.
 +
9. In the window that pops up, find kgSIM_ImportStageModels in the list (if you don’t see this, close the box, then copy the .pas files from the XEdit Scripts folder of the Builder’s Toolkit into the Edit Scripts directory where FO4Edit is installed).
  
Sim Settlements, and my Fallout 4 modding love, wouldn’t exist if it weren’t for nexusmods.com. The site has created such a great community, and wonderful tools for mod authors to manage their mods. So we’re going to start there.
+
10. Press OK.
 +
11. After a second or two, you will be prompted to enter the file path. Type the exact path on your local computer to the spreadsheet you created and press OK.
 +
12. As the script runs you should see messages on the right hand side confirming each of your building stage models was imported.
 +
13. If you receive any errors, fix your spreadsheet, and try running the script again.
  
In fact, I’d recommend you always release on nexusmods.com first, to make sure you fix all the bugs (bugs for add-on packs will probably be little things like placement issues or navigation problems). The Bethesda.net user base is far larger, and will overwhelm you with bug reports if you aren’t prepared.
 
  
I will probably make another tutorial for uploading to Bethesda.net in the future, but the process is very simple, so existing Youtube tutorials may be enough.
+
After you’ve finished importing data for any building plans you’re working with. Close FO4Edit and it will prompt you to save the changes. (If you don’t want to save, simply uncheck the boxes next to the plugins.)
  
'''If for some reason you don’t have a nexusmods.com account, go set one up!'''
+
Load the Creation Kit and confirm everything is setup correctly.
  
First thing we need to do is create you a mod page! Don’t worry, it won’t be public until you decide to publish it.
 
 
#Log into nexusmods/com/fallout4, mouseover Files and choose Add a file[[File:Toolkit Chapter 07 Releasing Your Mod image01.jpg]]
 
#This will take you to a Wizard for adding new files. Start by filling out the first page. If you’re not sure about an entry, it’s probably safe to leave it as the default. You can edit this stuff in the future with the Edit Attributes button on your mod page.
 
#*When you get to the Long Description, if you switch to BBCode (link in the upper-right corner) and then paste the contents of the “Optional Header For Your Nexus Description.txt” in the Builder’s Toolkit, when you click BBCode again, you will have a logo and a list of building types and features that you can fill in the answers for![[File:Toolkit Chapter 07 Releasing Your Mod image02.jpg]]Obviously you can add whatever you like after this, or use something entirely different - but this should help you finish quickly while also informing the players what you’re proving them!
 
#Continue filling out whatever screens you’d like in the wizard, such as adding images or videos to sample some of the new stuff you’re adding (don’t share too much or you’ll take away I’ll the excitement of upgrades!).
 
#*When you get to the requirements screen, check in any DLC that you used content from, and be sure to find Sim Settlements under Files or Mods Available on this Site (see image below)[[File:Toolkit Chapter 07 Releasing Your Mod image03.jpg]]
 
#When you get to the files section, skip it. We’ll do that last.
 
#When you’ve finished everything but the files, click on the View File Page So Far to preview your work.
 
  
 +
==You’re Done!==
  
 
+
You can now speed past the most difficult stages of setting up the building plan! You can even hold onto your spreadsheets for quickly editing things in the future. Once you get really comfortable with it - you’ll even be able to add completely new entries to the spreadsheet and into your add-on without ever entering the Creation Kit.
Alright, almost there. We just need to upload your files. First there are a few steps to do to package them for players to download so that they work with Nexus Mod Manager nicely.
 
 
 
#Let’s package up your files.
 
##We’re going to use a file included with the Creation Kit, instead of the Creation Kit itself. The Creation Kit is notorious for including files it shouldn’t that could break other mods - the most likely one it would break in this case would be Sim Settlements (wouldn’t that be embarassing…)
 
##Go to your Fallout 4/Tools directory, find the Archive2 directory and open it up, then open the program Archive2.exe. (this might be another one worth pinning to your taskbar or adding a shortcut to somewhere else, as you’ll use it every time you want to make an update to your mod!)[[File:Toolkit Chapter 07 Releasing Your Mod image04.jpg]]
 
##Click on the Archive menu and choose Add Folder, now navigate to the folder you’ve been saving your models to. It should be under Fallout 4/Data/Meshes. Click your folder (but don’t open it) and press the Select Folder button. All of your models should be added to the screen![[File:Toolkit Chapter 07 Releasing Your Mod image05.jpg]]''If you added any other custom files to your mod such as sounds, or script fragments you will add them here as well. Do NOT add textures to this archive, textures are stored separately. Since custom textures are not discuss in this tutorial series, I’m not going to go over creating those archives, feel free to ask for an assist if you decided to add some!''
 
##Finally press File->Save As and navigate to the Fallout 4/Data folder. Your archive should be named:<br/>Yourespname - Main<br/>Where yourespname is the file name of your mod without the .esp, and there should be a single space before and after the dash.
 
##In the future, when you want to make updates to your mod, or changes to your models, before uploading the changes, you’ll want to come back and repeat these steps, except that you can first open your existing archive with Archive2. You can then just add your entire meshes folder again, and the program is smart enough to just update the ones you changed.
 
#Next we’re going to create the package that you’ll upload to nexusmods.com
 
##Go to your Fallout 4/Data directory, and grab a copy of your esp and ba2 files.
 
##Set yourself up a folder on your hard drive to work in, I’ll refer to it as your Packaging Directory and paste your two mod files inside of that folder.
 
##Next, create a folder called “fomod”.
 
##Inside the Sim Settlements Builder’s Toolkit is a folder called “FOMOD Template”, inside is a file called info.xml, copy it your newly created fomod directory.
 
##Open your copy of info.xml with an editor such as Notepad++.[[File:Toolkit Chapter 07 Releasing Your Mod image06.jpg]]
 
##Change “Your Mod Name” to whatever you want to call it (use Sim Settlements in the name to help people find it!) Examples, bigjohn’s Sim Settlements Building Pack or mustangsally’s Sim Settlements Story Pack.
 
##Change “yournexususername” to your nexusmods.com username
 
##The version can remain 1.0 for now, but if you decide to update your mod, you should come back here and change this number so that the user can see in Nexus Mod Manager that they have the version that matches the website.
 
##In the Website section, replace “YOUR MOD NUMBER HERE” with the number assigned to your mod, which you can see in your browser url of the mod page we created in the previous steps, it will look like:<br/>http://www.nexusmods.com/fallout4/mods/XXXXX<br/>Where the Xs are your mod number.
 
##In the description, replace the Xs with the version of Sim Settlements you had installed when you last worked on your mod file. This is the earliest version of features you used. That way if I release new features you take advantage of, you can be sure you at least warned your users they need to update Sim Settlements as well as your mod!
 
##After the Sim Settlements link you can add whatever you want to the description. I tend to just put a very simple explanation of what my mod is, and let the main nexus mod page do the talking.
 
##Save the xml file.
 
##Go to your Packaging Directory, select the fomod folder, your mod file, and your archive file, right-click on one and find the 7zip menu and choose Add to archive (continued on next page)[[File:Toolkit Chapter 07 Releasing Your Mod image07.jpg]]
 
##Enter a name for your archive at the top and Press OK.[[File:Toolkit Chapter 07 Releasing Your Mod image08.jpg]]
 
#Now go to your mod page, and click Files on the right hand side, this will take you to the File Management section.[[File:Toolkit Chapter 07 Releasing Your Mod image09.jpg]]
 
#Click the “upload form” button, to be taken to the file details page:[[File:Toolkit Chapter 07 Releasing Your Mod image10.jpg]]
 
#Enter what you’d like people to call your mod (including Sim Settlements AddOn Pack as part of the name will probably be helpful so people know what it is right away!) Examples: Papajulio’s Addon Pack for Sim Settlements, or Raider Home AddOn Pack for Sim Settlements.
 
#Enter something like Main File as the small description (This is a small description of the file itself - you’ll see a lot of mod authors will use this to denote optional files).
 
#Click Select a file to upload… and upload the archive you created.
 
#Type in the exact same version number you have in your info.xml file. (this is how players will confirm they are on your latest version).
 
#Check in the “This is the latest version…” and “Set the new file as the main NMM file”.
 
#When the file finishes uploading a Submit button will appear at the bottom of the screen. Click this to save your work.
 
#Click View File to go to your mod’s page.
 
#'''And finally the moment you’ve been waiting for…. Click Publish.'''
 
 
 
 
 
You are now officially a mod author! Welcome to the club!
 
 
 
Don’t forget to send me a link so I can promote your Addon Pack!
 
 
 
[[Category:Toolkit]]
 

Latest revision as of 17:06, 12 February 2018

Greetings, you people!

My name is Infinithil, I am from Germany and work as a civil servant.

In my free time, I work on my first addon pack for SimSettlements and help around the SimSettlements Wiki.

Have a nice day!

Last finished: Toolkit Extra - Advanced Possibilities


Workshop area


Toolkit Extra - Custom Flag Tutorial


All of my guides will highlight things that are specific to your experience level: Green for beginners, and Red for seasoned modders. So if you’re new, you aren’t meant to understand the red messages, and if you’re a vet - you can probably skip the green.

If you’ve never built a mod or used the Creation Kit before, it’s recommended that you go through the Sim Settlements Builder’s Toolkit. Even if you aren’t interested in creating buildings for Sim Settlements, it teaches you the basics of the Creation Kit and shows you how to package and upload a mod.


This tutorial will go over adding custom flags to the Sim Settlements system. It does not cover photo-editing techniques, only the steps needed to convert an image into a custom flag for use with Sim Settlements.

If you already have a mod with custom flags, and you’d like to integrate them without making Sim Settlements a dependent mod, please contact me and I’d be happy to show you the steps required.


Programs Needed

Gimp or Photoshop

Gimp DDS Plugin or Intel TextureWorks Plugin

Material Editor by Ousnius

Creation Kit (or XEdit, though this tutorial will only show the steps in the Creation Kit)

Sim Settlements 2.0.8 + (make sure you have the mod installed as it includes scripts you’ll need)


Used in this tutorial are several files:

Flag_Material_Template.BGSM - which tells the game which texture files to use.
Flag_Diffuse_Template_d.dds - which is the art texture file.

And two optional files, that you most likely won’t need unless you’re a 3d artist. Most people will just want to use the game’s default files for these.
Flag_Diffuse_Template_n.dds - which is the normal map
Flag_Diffuse_Template_s.dds - which is the specular map

Download the full Builder's Toolkit to get the files.


Setting Up Your Files/Directories

  1. Go into your Fallout 4/Data folder, this is usually found under C:/Program Files(x86)/Steam/steamapps/common. This is where your game files exist.
  2. If you don’t have a folder called Textures, create it. Then inside of that, create a new folder for your mod. Copy Flag_Diffuse_Template_d.dds to this folder, now rename it something for the first flag you want to create, for consistency sake, make sure it ends in “_d” like the current name.
    So if you decide to name it MyFlag, name it MyFlag_d instead. The d stands for diffuse, and represents what most people would consider the texture.
  3. If you don’t have a folder called Materials, create it. Then inside of that, create a new folder for your mod. Copy Flag_Material_Template.BGSM to this folder, now rename it something similar to the texture name you used above for the first flag you want to create.
  4. Open the .BGSM file you just renamed in the Material Editor program.
    File:Toolkit Extra Custom Flag Tutorial image01.jpg
  5. Go to the Material tab, then click on the grey box to the far right next to the Diffuse Texture row, and navigate to the DDS file you copied in step 2. Now save the material and exit this program.

If you are going to be creating custom normal and specular maps, you would link those files here.


Making Your Custom Flag Art

Open the DDS file you copied into your directory in Gimp or Photoshop.
File:Toolkit Extra Custom Flag Tutorial image02.jpg
The flag art is made up of two images that look mostly identical, and for the most part you would fine using the same image on top and bottom. Though they are used slightly differently.

When the Martial Plot is manned, and flag is up in the air, only the top half of the texture is used on both sides of the flag. When the Martial Plot is not manned, and the flag is down, it uses both halves of the texture.

You’ll be fine copy pasting the top half to the bottom as it’s hard to tell the difference when the flag is down anyway. If you’re a perfectionist, you have the option to do each side separately.

The erased parts of the texture file are what will show up as holes in the flag.

  1. Once you have your flag designed the way you want, do the following to save the file correctly:
    1. Gimp: Choose File -> Export As, in the window that pops up, select the file you are editing, then press Export. A second window will come up with DDS settings.
      1. Set Compression to BC3 /DXT5
      2. Change Mipmaps to Generate mimmaps
      3. Press OK.
    2. Photoshop: Choose File -> Save As, in the Save As Type dropdown, select Intel Textureworks, click Save. A second window with come up with DDS settings.
      1. Change Texture Type to Color + Alpha
      2. Set Compression to BC3 8bpp (Linear)
      3. Set Mip Maps to Auto Generate.
      4. Press OK.

Configuring Your Flag

This portion uses the Creation Kit, it will be written as if you’ve never used it before, but you may want to go through a basics tutorial, such as the one included in the Sim Settlement’s Builder’s Toolkit.

  1. Open the Creation Kit.
  2. Click on File->Data and check in SimSettlements.ESM, then press OK.
  3. Once the files are loaded, select the Object Window, and type kgsim*flag in the Filter box. This will show all of the different Sim Settlements objects related to flags.
  4. Find the object with the name kgSIM_FlagDown_USA, right-click it and choose Duplicate and Rename, in the pop-up, type in kgSIM_ in the Search box, and enter your own prefix in the Replace box - it can be whatever you want. You’ll use this prefix to identify all of your custom objects.
    File:Toolkit Extra Custom Flag Tutorial image05.jpg
  5. Press OK.
  6. Now repeat step 4 for kgSIM_FlagWavingUSA01, kgSIM_FlagWallUSA, and kgSIM_DynamicFlag_Template.
  7. In the Object Window, replace the Filter field with the prefix you used for your three objects.
  8. Double-click yourPrefix_FlagDown_USA.
    1. In the ID field, erase USA and give the flag a name.
    2. Click on the Edit button near the center of the window. This will bring up the model selection screen.
    3. Use the Material Swap dropdown menu to select Custom Material Swap.
    4. In the large white section with the headings “Original Material”, “Replacement Material”, and “Remap Index”, double-click the white area under Replacement Material next to “clothflag01alpha.bgsm”.
    5. Navigate to materials folder you created at the beginning of this guide and select your .BGSM file, and press OK.
    6. Press OK again, and when prompted to Create a New form select No. You’ll then be prompted to Rename, answer Yes.
  9. Repeat step 8 for yourPrefix_FlagWavingUSA01 and yourPrefix_FlagWallUSA. The Wall version will be the exact same steps, and the only difference for the Waving version is that screen will look slightly different, so the Edit button won’t be in the exact same position.
  10. Double-click yourPrefix_DynamicFlag_Template. This is going be your Dynamic Flag Record.
    File:Toolkit Extra Custom Flag Tutorial image06.jpg
    1. In the ID field, erase Template and replace it with your flag name.
    2. In the Name field, erase Dynamic Flag and replace it with what you want the player to see when choosing your flag from the list.
    3. Select the SimSettlements:DynamicFlag script and click the Properties button.
    4. Double-click FlagDown.
      1. Select Static from the Form Type dropdown (there may be a slight delay before the Creation Kit response).
      2. Check in the Filter box and type in your prefix.
      3. Select your flag down model from the Pick Object dropdown.
    5. Double-click FlagWall.
      1. Select Static from the Form Type dropdown (there may be a slight delay before the Creation Kit response).
      2. Check in the Filter box and type in your prefix.
      3. Select your flag wall model from the Pick Object dropdown.
    6. Double-click FlagUp.
      1. Select MoveableStatic from the Form Type dropdown.
      2. Check in the Filter box, your prefix should be there already (type it in if not).
      3. Select your flag model from the Pick Object dropdown.
    7. Press OK to exit the properties screen.
    8. Press OK to exit the MiscItem screen, when prompted to Create a new form, select No. Then press Yes when asked to rename.

Adding Your Flag to Sim Settlements

If you already have an add-on pack, you can use your existing Quest during this setup.

Now that you have a flag configured, you’re going to tell Sim Settlements about it.

You’re only going to do this section once, after which, you’ll only need to add additional flags to the form list you’ll configure in this section.

In the Object Window, expand the Character category, then select Quest. Set the Filter to “kgsim_addon”. You’re looking for a quest called kgSIM_AddonTemplate - right-click this and choose Duplicate. Now open the newly created kgSIM_AddonTemplateCOPY0000.

  1. On the Quest Data tab, change the ID to something unique (as always, remember to start with your prefix!).
  2. Press OK. If it asks you to Create a new form, answer No, then answer Yes to renaming.
  3. Next we’re going to prepare a FormList for holding your Flag(s).
    1. In the Object Window, expand the Miscellaneous category and click FormList. Then in the right-side of the Object Window, right-click and select New.
    2. Enter a unique id (remember to start with your prefix), for example: yourPrefix_FlagList
    3. Press OK.
  4. While you’re still in the FormLists category, change the Filter in the Object Window to your prefix and double-click the FormList you just created and drag it off to the side.
  5. In the Object Window, expand the Items category, select MiscItem.
  6. Drag your Dynamic Flag Record into the main part of the formlist. It should look like this:
    File:Toolkit Extra Custom Flag Tutorial image07.jpg
  7. Press OK.
  8. Next, in the Object Window, expand the Characters category, then click on Quest, and filter for your prefix to find the quest you made. Double-click it to open it up.
  9. On the scripts tab, select SimSettlements:AddOnScript and click Properties.
  10. Double-click on SIMParent and select kgSIM_SIMSettlementParent from the drop down menu.
  11. Double-click the MyClutter section, it will be in blue and have a horizontal line next to it. This will expand the MyClutter properties.
  12. Double-click MyMartialFlags.
  13. Check in filter and enter your prefix.
  14. Select your flag list from the Pick Object drop down.
  15. Press OK to close the properties window.
  16. Press OK again to close the quest.
  17. Now click File->Save to save your plugin. Name it anything you like.


You’re done!

Your flag will now be selectable from the flag menu on the City Planner’s Desk!

To add additional flags, just repeat the Configuring Your Flag section and add your additional Dynamic Flag Records to your flag formlist you created. No need to do configure additional quests.

If this is your first Addon for Sim Settlements, know that there can be a short delay after starting up your game before it registers completely with Sim Settlements, so don’t be alarmed if your flag isn’t there in the first 10 seconds.


Toolkit Extra - FO4Edit - Working Faster


This tutorial assumes you know basic navigation and keyboard shortcuts to navigate the Creation Kit. If not, please go back and check out the Creation Kit 101 primer.

All of my guides will highlight things that are specific to your experience level: Green for beginners, and Red for seasoned modders. So if you’re new, you aren’t meant to understand the red messages, and if you’re a vet - you can probably skip the green.


Preamble

This guide assumes you’ve been through the numbered tutorials and understand how Building Plans work. It may use some shorthand that you’d only be familiar with if you’ve successfully created a building for Sim Settlements.

Always be sure that you backup your esp file before applying a script in XEdit. While the software will offer to backup your mod file before committing the changes, it’s better to be safe than sorry. XEdit is mostly agnostic to the specifics of Fallout 4 mods and can create entries that the game doesn’t support, so you should always test your mod after editing it with XEdit scripts. (FO4Edit is the Fallout 4 version of XEdit that you’ll need for this. XEdit is the collective name for all of the variations of this software that work for different games. For example, TES5Edit is the Skyrim version.)


Programs Needed

  • Creation Kit
  • FO4Edit 3.2 or Greater
  • Any Free Text editing software (ex. Notepad)
  • Any Free Spreadsheet software (ex. Google Sheets or OpenOffice)


Importing Stage Data To Your Add-on

Two of the more time-consuming fields to fill out for your Building Plan, are the StageModels and the StageItemSpawns. With the scripts included in the Builder’s Toolkit, the process is greatly simplified.


Start by creating your actual building - essentially do all of the staging work of creating your SCOLs and static records for your building levels and construction stages, and laying out all of the objects you’d normally put in

the StageItemSpawns field. A best practice to make this easier is to create a Layer for each level of your building (you’ll understand why shortly).

If you’re using scripted objects that do things OnInit or OnLoad, you have to consider a few extra things.

The below Export process is much simpler if you use the actual objects you want to appear, rather than static placeholders inside the staging cell (which is something you might see that I’ve done in a lot of my builds). Doing so will leave active objects that might trigger things happening when the player is playing, even if they haven’t built your building plan.

As an easy way to combat this, you can actually continue to use the placeholder objects in your staging cell, and then edit the exported records to reference your actual objects by their Editor ID.

After you’ve done all this, create your Building Plan object like you would for any other building - just don’t fill out the StageModels or StageItemSpawns fields. We’re going to do that with FO4Edit.

You’ll want to find the XEdit scripts (.pas files) from the Builder’s Toolkit and copy them to the Edit Scripts directory where FO4Edit is installed.


StageItemSpawns Export/Import Process

To start, you’ll need to export the position/rotation/scale data of your StageItemSpawns. This is best done in 3 stages so that you can easily keep track of which goes on which stage.

1. Select the objects for your Level 1 building, then choose File -> Export -> Ref Placements for Selection. a. You’ll be prompted to create a file, name it something that makes sense to you, and then repeat the process for your the items of each of your other levels. 2. Now that you have the exported data for each group of items, you need to combine them together in a spreadsheet and fill in the missing data fields. a. You’re going to need to be sure to follow a template for the spreadsheet you’re making. The first row should be a header row and not hold any of your item data, if you’d like to label that top row, the data will go in this order:

Editor ID, posX, posY, posZ, RotX, RotY, Rotz, Scale, sSpawnName, iStageNum, iStageEnd, iType, ActorValue, iValidActorValue

To make this simpler, I’ve created a file you can paste your data into on a google drive, simply save it to your own drive and edit that copy: https://docs.google.com/spreadsheets/d/1OIgadz52gQLF3jh5by9XyFh9qttDiImIw0ZyVn9jSoc/e dit#gid=0 b. Now that you have your spreadsheet started, open one of your exported documents you created in Step 1. Copy everything but the header row from one of your exported documents, click on the first field in the first empty row of your spreadsheet and paste.

The software should detect the formatting, and automatically place each piece of data in its own field. You may notice that the EditorID fields don’t quite match the in game version. In order to support multiple objects of the same form, a 3 digit suffix is added to the end. You can leave these on if you like, as the XEdit script will strip them automatically.

c. Fill in the iStageNum and sSpawnName fields at minimum. d. Fill in any additional fields you’d like to use. If you’re filling in the ActorValue field, be sure to enter the Editor ID of the ActorValue object you used. e. At this point, you may alter any of the data manually, such as pointing your placeholders to your actual editor ids. f. Repeat these steps for each of your level files of stage items, be sure to use the correct iStageNum for each. 3. Once your spreadsheet is finished, save it as a .CSV file (comma separated values) - you’re going to end up having to type the exact path to it, so best to store it somewhere simple. I like to create a folder in my C:\ drive called Imports, that way my path will just be C:\Imports\filename.csv 4. Close the Creation Kit and make sure your CSV file isn’t open in any software. 5. Make a backup of your esp file in case something goes wrong (it shouldn’t but, not worth the risk anyway). 6. Open your esp in FO4Edit.

Wait for it to finish loading, it is substantially faster than the Creation Kit. When it’s done, you should see a message similar to this in the lower left corner:

7. On the left side of the screen, you will see all of your mod’s parent files as well as your mod. Expand your esp by clicking the plus sign next to it. 8. Next expand Misc. Item and find your Building Plan in the list (if you click the word EditorID near the top of the screen, it will sort all of the entries alphabetically). 9. Warning: This step is destructive, it will erase the previous entries of your StageItemSpawns property before inserting your spreadsheet data. Right-click on your building plan and choose Apply Script. 10. In the window that pops up, find kgSIM_ImportStageItemSpawns in the list (if you don’t see this, close the box, then copy the .pas files from the XEdit Scripts folder of the Builder’s Toolkit into the Edit Scripts directory where FO4Edit is installed).

11. Press OK. 12. After a second or two, you will be prompted to enter the file path. Type the exact path on your local computer to the spreadsheet you created and press OK. 13. As the script runs you should see messages on the right hand side confirming each line of your document was imported. 14. If you receive any errors, fix your spreadsheet, and try running the script again.

StageModels Import Process

The StageModels process is much simpler as you can just type up the data needed instead of combining documents.

1. Create a new text file or spreadsheet, which ever is easier for you. If you used a naming scheme, it should go fairly quickly as you can just copy/paste the name and change the ending for each stage. a. If a text file, type the Editor ID of each of your StageModels, separated by a comma and NO spaces. (Editor ID is the unique ID you gave your Static, for example the Tato Mud Farm’s first stage model Editor ID is: kgSIM_Farm01_SA_L1_Final)

b. If a spreadsheet, type the Editor ID of each of your StageModels in a cell across a single row. 2. Save the file as a .CSV file. If you’re using Notepad, just type in .csv at the end of your filename, it won’t be an option in the dropdown menu. 3. Close the Creation Kit and make sure your CSV file isn’t open in any software. 4. Make a backup of your esp file in case something goes wrong (it shouldn’t but, not worth the risk anyway). 5. Open your esp in FO4Edit.

Wait for it to finish loading, it is substantially faster than the Creation Kit. When it’s done, you should see a message similar to this in the lower left corner:

6. On the left side of the screen, you will see all of your mod’s parent files as well as your mod. Expand your esp by clicking the plus sign next to it. 7. Next expand Misc. Item and find your Building Plan in the list (if you click the word EditorID near the top of the screen, it will sort all of the entries alphabetically). 8. Warning: This step is destructive, it will erase the previous entries of your StageModels property before inserting your spreadsheet data. Right-click on your building plan and choose Apply Script. 9. In the window that pops up, find kgSIM_ImportStageModels in the list (if you don’t see this, close the box, then copy the .pas files from the XEdit Scripts folder of the Builder’s Toolkit into the Edit Scripts directory where FO4Edit is installed).

10. Press OK. 11. After a second or two, you will be prompted to enter the file path. Type the exact path on your local computer to the spreadsheet you created and press OK. 12. As the script runs you should see messages on the right hand side confirming each of your building stage models was imported. 13. If you receive any errors, fix your spreadsheet, and try running the script again.


After you’ve finished importing data for any building plans you’re working with. Close FO4Edit and it will prompt you to save the changes. (If you don’t want to save, simply uncheck the boxes next to the plugins.)

Load the Creation Kit and confirm everything is setup correctly.


You’re Done!

You can now speed past the most difficult stages of setting up the building plan! You can even hold onto your spreadsheets for quickly editing things in the future. Once you get really comfortable with it - you’ll even be able to add completely new entries to the spreadsheet and into your add-on without ever entering the Creation Kit.