Difference between revisions of "User:Infinithil"

From Sim Settlements
Jump to: navigation, search
m (Advanced Possibility created)
m
 
(24 intermediate revisions by the same user not shown)
Line 11: Line 11:
 
Workshop area
 
Workshop area
 
----
 
----
[[Toolkit Extra - Animated Objects]]
+
[[Toolkit Extra - Custom Flag Tutorial]]
 
----
 
----
  
''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.''
  
This tutorial will go over several methods for animating objects for use with Sim Settlements. This is an advanced tutorial and assumes you’ve gone through all of the tutorials for creating a Sim Settlements building.''
+
''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.
 +
 
 +
<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>
 +
 
 +
 
 +
==Programs Needed==
 +
 
 +
'''[http://www.gimp.org/downloads/ Gimp] or Photoshop'''
 +
 
 +
'''[http://registry.gimp.org/node/70 Gimp DDS Plugin] or [https://software.intel.com/en-us/articles/intel-texture-works-plugin Intel TextureWorks Plugin]'''
 +
 
 +
'''[http://www.nexusmods.com/fallout4/mods/3635/ Material Editor]''' by Ousnius
 +
 
 +
'''Creation Kit''' (or XEdit, though this tutorial will only show the steps in the Creation Kit)
  
These tutorials are no substitute for 3d Studio Max experience. While you’ll be able to add some very good looking animations with these methods, they are never going to be exactly as you envision them because these methods have certain limitations.
+
'''Sim Settlements 2.0.8 +''' (make sure you have the mod installed as it includes scripts you’ll need)
  
Two of these methods are re-using existing animations and replacing the assets that are being animated, you have some amount of control over the details, but it’s not perfect. The third method can pull off some very convincing production lines, but is limited by what the game engine can handle.
 
  
This preamble isn’t meant to scare you away from using it, but to temper your expectations, so you understand you’ll probably have to make some sacrifices. You’ll still have some of the coolest settlement set pieces around, they just might be slightly different than you dreamed up.
+
Used in this tutorial are several files:
  
 +
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.
  
==Programs Needed==
+
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
  
*'''Nifskope 2.0.6 Alpha or higher '''
+
Download the [https://www.nexusmods.com/fallout4/mods/22808 full Builder's Toolkit] to get the files.
*'''Creation Kit'''
 
*'''Industrial Revolution Expansion''' (includes assets needed for the tutorial)
 
  
  
==Creating Basic Machines==
+
==Setting Up Your Files/Directories==
  
This method involves taking pre-animated nifs, and replacing the model portion so that your model is animated in the same pattern as the animated object. This section will show you various things you can do with existing animated nifs to create whole new ones with the base animation of the original file at the core. While there are tutorial style examples, most of this section is just a tour of animated nifs to help demystify them a bit, so you can edit them more confidently.
+
# 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.
 +
# 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.
  
Included with Sim Settlements - Industrial Revolution, are a handful of nif files that are meant to be copied, dissected, and repurposed for creating machines using simple looped movements. You’ll want to extract '''SimSettlements_XPAC_IndustrialRevolution - Main.ba2''' to a separate directory (<span style="color:#006400">do NOT extract this to your Fallout 4/Data folder or updates to the expansion pack won’t affect your game</span>).
+
<span style="color:#FF0000">If you are going to be creating custom normal and specular maps, you would link those files here.</span>
  
Navigate to the extracted files and find the folder Meshes\SS_IndRev\AnimatedObjects.
 
  
Inside this folder are some nif files and a folder called SoundSynced. The nif files use very basic animations and will loop indefinitely when used. The nif files inside of the SoundSynced folder have two slightly different characteristics:
 
#They won’t start playing until you activate them - this is because they are configured as Door objects.
 
#They have the capability of playing sound files automatically during the animation.
 
  
<span style="color:#000080">Why a door? Doors ended up being the simplest type to create that would support sychronized sounds and didn’t require building special controller files (hkx files) or subgraph records. HKX and Subgraph records are not covered in this tutorial, those are extremely advanced topics you won’t need unless you’re getting into 3d Studio Max animation.</span>
+
==Making Your Custom Flag Art==
  
We’re going to start with one of the simple nifs to demonstrate some of the things you can pull off. I’ll then show you how to make use of the extra features added via the SoundSynced models. You are by no means limited to using these models, if you find other animated objects in the game that loop automatically, you’ll be able to repeat these techniques with those.
+
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.
  
#Make a copy of AnimRotateSlow.nif and open your copy in Nifskope. First thing to note, is the animation control bar above the preview window in the top right:<br/> [[File:Toolkit Extra - Animated Objects image01.jpg]]<br/>This will let you play the animation in Nifskope to preview it as you tweak it, the first button plays/pauses the animation, the second button toggles whether to continuously loop it.
+
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.
#Expand '''0 NiNode''', then expand '''2 NiNode''', where you’ll find 3 things: the animation controller (NiTranformController), the collision (bhkNPCollisionObject), and the model (BSTrishape).
 
##NiTransformController: This is what controls the animation, it doesn’t actually care what it’s animating - all it does is tells its target to change its rotation value by a certain amount every 3.366667 seconds.
 
###How do I know that? Click on '''3 NiTransformController''' then look at the Block Details section.<br/> [[File:Toolkit Extra - Animated Objects image02.jpg]]<br/>This section tells you that the animation lasts 3.3666667 seconds and that it’s going to apply it to the '''2 ThresherTeeth01R Node''' (only the 2 is important, this is the ID of the Node and we’re working on 2 NiNode - these are the same node, they are just displayed differently in each section).<br/>You might be tempted to change the Stop Time here to slow or speed up the animation, while that is part of it - you also need to change the animation keys. For some objects like this (which only have 5 keys), that’s absolutely possible, but for many other items you find, there may be dozens of keys, and manually editing them each becomes impractical (this is one of those limitations I warned you about).<br/>Instead, the easier way to change the speed, is by editing the Frequency. If you change the frequency to a new whole number, you can effectively multiply the speed by that amount. '''Try it and use the animation controls to see the difference.'''<br/><span style="color:#000080">What you can’t do with this technique, is slow it down - let’s say you set the Frequency to 0.5, you’re telling the animation to only run ½ times, which will look very strange when looped as it will snap back into the starting position since a full animation isn’t allowed to run.</span>
 
##<span style="color:#FF0000">'''Don’t let this next part intimidate you, it’s extremely advanced - if you start to glaze over, just skip it - I assure you the next section is easier!'''<br/><br/> Expand NiTransformController, then expand NiTransformInterpolator, then click on NiTransformData and look to the Block Details section of Nifskope.
 
###This is where the individual animation keys exist. You can fine-tune control the animation by changing these values. All an animation is, is a series of frames representing where the object should be (Translations), which direction it should face (XYZ Rotations), and how large it is (Scales) - all of these are numbers that can be tweaked.
 
###Expand XYZ Rotations: there are three more XYZ Rotation entries, the first is the X rotation keyframes, the second is the Y rotation keyframes, and the third is the Z rotation keyframes.
 
###Expand the first XYZ rotation sub-entry, then expand Keys, here you’ll find all of the keyframes for the X rotation also labeled Keys.
 
###Expand the first key. There are 4 entries:
 
####Time - the time during the animation this starts.
 
####Value - how far to rotate on the X-axis in radians (you can find a degree to radian calculator on google if you aren’t comfortable with radians).
 
####Forward - the rate at which the animation is eased into.
 
####Backward - the rate at which the animation is eased out of.
 
###You can change any of the values in those key sections to completely change the existing animations, but if you were to expand the Translations section, you’d find no keys. Technically you could manually create them here, but it will quickly become overwhelming work and is another limitation of this method.</span>
 
#Since the Transform Controller is pointing at the 2 NiNode, any children of that node will have the rotation applied. Which means, you can take any other nif file you like (including one you created from an SCOL), copy it’s node, and paste it into this model as a child of that node, and it will be rotated as well.<br/>Since you’ve already extracted the Industrial Revolution models, let’s use one of those to try this.
 
##Navigate to the Meshes\SS_IndRev\Props directory and open MinedOre.nif in a new NifSkope window (it might be helpful to configure Windows to use Nifskope as the default program for opening .nif files, as you’ll be opening and closing lots of them while doing these projects)
 
##Expand 0 NiNode, then select 2 NiNode, now hit Ctrl+C on your keyboard to copy this node branch to your clipboard.
 
##Go back to the other file you have opened, click on 2 NiNode and hit Ctrl+V on your keyboard, this will paste the MinedOre node into this file. If you press play with the animation controls, you’ll instantly see this works and start rotating.
 
##Next we need to clean this file up to avoid it crashing the CK/game. We need to do the following things - fix the texture, remove the other model we’re replacing, point to the correct collision, and remove the extra node record.
 
###Fix the texture
 
####Go back to MinedOre.nif, expand 2 NiNode, expand 5 BSTrishape, click on 6 BSLightingShaderProperty.
 
####In the Block Details section, click on the Txt icon next to the name field, this will bring up a text input box with the material file path, copy this path to your clipboard. Press Cancel to close this input box.
 
####Back in your animated nif, expand 11 NiNode, expand 14 BSTrishape, click on 15 BSLightingShaderProperty.
 
####In the Block Details section, click on the Txt icon next to the name field, and paste the material path into the input box and press OK, your object should now have the correct texture.
 
###Remove the model we’re replacing
 
####Select 8 BSTrishape and press Ctrl + Delete on your keyboard. When you delete a node, Nifskope will reorganize the IDs so that there are no gaps in the numbers.
 
####That’s it - this was the easy part.
 
###Point to the correct collision
 
####Under 8 NiNode, click on 9 bhkNPCollisionObject.
 
####In the Block Details section, double-click 8 (ThresherTeeth01R) and replace 8 with the number 2 and press Enter. We’re basically telling this collision that it should be the collision for the rotating node we’re working with.
 
####Click on 2 NiNode in the Block List, then in the Block Details section double-click 6 [bhkNPCollisionObject] and replace the 6 with 9 and press Enter (9 being the ID of our new collision object).
 
####The id 6 collision will be moved to the bottom of the Block List, select it and press Ctrl+Delete on your keyboard to remove it.
 
####Click on what should now be 6 NiNode.
 
####We don’t want two nodes using the same collision object or we’ll have a broken nif, so we need to disassociate the collision from this node. In the Block Details section double-click 7 [bhkNPCollisionObject] and erase the number 7 and press Enter.
 
###Remove the extra node record
 
####The Node we originally pasted from MinedOre.nif isn’t necessary- and a basic rule of thumb to avoid broken nifs, is to only keep as many Nodes as you absolutely need. When doing swaps like we’re doing, the easiest way to ensure this, is to confirm our nif has the same number and types of nodes as the original version had (you can always open the original up and compare).<br/>Before we can remove this extra node, we need to get the BSTrishape out of it. The BSTrishape represents our actual model, the node itself is basically an organizational tool (like a folder) and all objects that are a part of the node are considered it’s children.<br/>To get the BSTrishape out of this Node:
 
#####Click on 6 NiNode, then in the Block Details section, expand Children.
 
#####Double-click 9 (ThresherTeeth01R:0), delete the 9, and press Enter. The BSTrishape should now be at the bottom of the Nodes list.
 
######Now that the BSTrishape is free from that node, we can safely delete that extra node without destroying the model. Select 6 NiNode and press Ctrl+Delete.
 
#####If you were to push Play again, you’d see that nothing is rotating. We need to put the BSTrishape back into the rotating NiNode, to do this, we do the opposite of what we just did before and add the BSTrishape as a child of the rotating node.
 
######Click 2 NiNode.
 
######In the Block Details section, expand Children.
 
######Double-click the first None entry and type 8 (which is the ID of the BSTrishape) and press Enter.
 
######If you push Play again, your rock should now be rotating.
 
###Save your file.<br/>Your nodes should now look like the image below (you may have to collapse some of the nodes you have expanded to get it to match the screenshot exactly)
 
##You can now use this model as a static object and it will automatically rotate in place. Best practice will be to include Anim or something similar in the name to avoid accidentally using it in an SCOL.
 
  
 +
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.
  
Next let’s open one of the SoundSynced models to go over the differences in the nif structure. We’re going to choose a fairly complex one so that you can see where all of the different pieces are and transfer this knowledge over when editing even the most complex animated nifs.
+
==Configuring Your Flag==
  
We’re not actually going to replace anything here, I’m just going to explain the differences.
+
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]].
  
1. Open Meshes\SS_IndRev\AnimatedObjects\SoundSynced\Pendulum90.nif
+
# Open the Creation Kit.
2. Expand 0 NiNode.
+
# Click on File->Data and check in SimSettlements.ESM, then press OK.
a. The first difference of note, is the 2 NiControllerManager. This is used to control more complex animated objects and essentially contains and manages all of the individual controllers (such as the NiTransformController we worked with in the other model).
+
# 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.
b. Click on 2 NiControllerManager, then look at the Block Details section.
+
# 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]]
i. NextController is used to point at the first individual controller this manager handles.
+
# Press OK.
ii. Just like our other model, the Target tells us what object is being animated. In the case of a NiControllerManager, it will almost always point at the 0 NiNode (which is essentially the entire nif).
+
# Now repeat step 4 for '''kgSIM_FlagWavingUSA01''', '''kgSIM_FlagWallUSA''', and '''kgSIM_DynamicFlag_Template'''.
iii. Num Controller Sequences is similar to the Num Children section of a node, this tells you how many different animation sequences are handled. A sequence is essentially a complete animation, the NiControllerManager allows a nif file to have multiple animations, instead of just the single set of keyframes like you saw in our first example.
+
# In the Object Window, replace the Filter field with the prefix you used for your three objects.
iv. Expanding Controller Sequences will reveal the individual sequences.
+
# Double-click '''yourPrefix_FlagDown_USA'''.
v. Object Pallete is a special node that basically tells the NiControllerManager which nodes will be involved in the animation.
+
## 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.
 
   
 
   
c. Expand 2 NiControllerManager, here you’ll notice all of the different pieces we found in the Block Details section.
+
==Adding Your Flag to Sim Settlements==
d. Notice that in this particular nif, the animation toolbar at the top is different
+
 
The first two icons are the same, but there is a third icon, as well as a new drop down menu.
+
<span style="color:#FF0000">If you already have an add-on pack, you can use your existing Quest during this setup.</span>
 +
 
 +
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.
 +
 
 +
# 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.
 +
 
 +
 
 +
==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.
 +
 
 +
[[Category:Toolkit]]
 +
 
 +
----
 +
[[Toolkit Extra - FO4Edit - Working Faster]]
 +
----
 +
 
 +
''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.
  
The new icon tells Nifskope to loop through all of the different sequences, and the drop down menu allows you to select the sequence to play.
+
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.''
  
Take a look at the NiControllerSequences, the names next to them in the Block List section match the entries in this dropdown list.
 
e. For these particular models, since we’re using the Door type, they only have two sequences “Open” and “Close”, other models you work with may have many more sequences than this.
 
i. When using these models, you’ll only be using the “Open” sequence. These models are designed to loop the Open sequence forever, so once you trigger the animation, it will never stop - which means the other sequences on this become irrelevant.
 
  
This is not the norm, it’s essentially a trick we used to create constant animated objects that could be synchronized with a sound file.
 
ii. Expand 4 NiControllerSequence.
 
1. The NiTransformInterpolator works exactly like what was described in the red scary section of the first half of this section.
 
2. To synchronize sound files, you’re going to make use of the NiTextKeyExtraData section.
 
a. Click on 7 NiTextKeyExtraData.
 
b. In the Block Details section, expand Text Keys, then expand each of the sub entry Text Keys.
 
c. These are essentially keyframes that tell the game engine something at a particular moment during the animation.
 
d. The first entry “start” tells the game engine the animation started.
 
e. The second entry “Sound: UIWorkshopModeItemPickUpMetal3Large” is the format used to cause a sound file to play. “UIWorkshopModeItemPickUpMetal3Large” is the ID of the SoundDescriptor entry in the Creation Kit. So you can make it play absolutely any sound you like.
 
  
Note that you can create additional entries and play more sounds at additional time stamps if you like by increasing the Num Text Keys field and adding more entries the same way you’ve added more Children to other nodes.
+
==Preamble==
f. The last entry “end” tells the game engine the animation completed.
 
f. Click on 3 NiMultiTargetTransformController, then look to the Block Details section.
 
i. Just like the NiControllerManager, the Target field points to the top level node, this won’t always be the case, but usually is. The target object in these complex animated nodes usually isn’t being animated, but instead holds all of the objects that are being animated.
 
ii. Expand Extra Targets - these are the nodes that will actually be animated (you can ignore the blank entries, they were most likely placeholders that ended up not being used on export from 3ds Max).
 
 
Notice the one entry in this particular model is node 13. This is the node you’ll edit if you want to swap out the model.
 
g. Expand 13 NiNode.
 
i. This node has multiple tri-shapes. This is absolutely allowed. You can add more, delete one of the existing, or just replace one of the trishapes.
 
ii. If you decide to add additional BSTrishape or node objects under 13 NiNode, it’s very important that you also update the NiDefaultAVObjectPallete object or you’ll end up with a game crashing nif.
 
1. Click on 12 NiDefaultAVObjectPallete.
 
2. You can then increase the Num Objs field and fill in your new nodes/trishapes, just like you would add Children to another node.
 
3. Expand the Objs and then all of the sub-entry Objs. Notice how not only is the 13 AnimRope node here, but also both of it’s BSTrishape objects (16 AnimWeight and 19 AnimRope:0).
 
  
It’s very important that if you add a new node, you include it AND it’s children trishapes in the object pallete.
+
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.)
  
The most difficult part of editing animated nifs, is keeping track of all of the different objects - especially since they are often displayed in different ways. The nif format was meant to be generated and read by computers, not edited by hand like this. That means that it’s a very logical format, but can also be cumbersome to edit.
 
  
The key to getting past this, is leaning on those ID numbers. Once you start getting used to looking for those ID numbers, you’ll see that often the same ID is repeated over and over - and they aren’t actually different objects, just references all pointing to the exact same object.
+
==Programs Needed==
  
Start small with your tweaks, test often in the Creation Kit to check for corruption, and make frequent backups before you make additional changes after you’ve confirmed a previous change worked in the Creation Kit.
+
*Creation Kit
 +
*FO4Edit 3.2 or Greater
 +
*Any Free Text editing software (ex. Notepad)
 +
*Any Free Spreadsheet software (ex. Google Sheets or OpenOffice)
  
Fortunately, you don’t have to be afraid of breaking nifs and losing work because Nifskope is very forgiving. You’ll just save yourself a lot of frustration if you can roll back to when the file was working as a lot of this ends up being trial and error.
 
  
A great way to test models in the Creation Kit is to open the Creation Kit and don’t load any esp or esm files at all. Then go to World Objects -> Statics, and bring up a New static form and select your model from here. If there’s a problem with the model, it will crash even without you loading your esp files.
+
==Importing Stage Data To Your Add-on==
  
==Creating Animated Textures==
+
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.
  
This method simulates movement by animating the texture of an object, it’s very useful when the moving just the surface of an object is enough - such as conveyor belts or water. This process is very simple, and similar to the first part of the previous section.
 
  
Go to the directory where you extracted the Industrial Revolution assets and make copies of Meshes\SS_IndRev\Props\ConveyorStr01A_anim.nif,
+
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
 
   
 
   
Meshes\SS_IndRev\IndustrialSizeA\Water\FiltrationPlant01\Water.nif, and Meshes\SS_IndRev\Props\MinedOre.nif.
+
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).
  
Each of these has a different type of controller on it. The first is for the LightShader type, which represent most textures in the game, and the second is for the EffectShader type which represent special effects that usually don’t have a direct texture. You’ll essentially be able to able to use these two models for all of your looping animated texture needs.
+
If you’re using scripted objects that do things OnInit or OnLoad, you have to consider a few extra things.
  
Let’s go over them to see how they work and how you can change them.
+
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.
  
1. Open your copy of the Conveyor nif.
+
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.
2. Expand 0 NiNode, expand 8 BSTrishape, click on 9 BSLightingShaderProperty.
 
3. In the Block Details section, you’ll see that this shader has a Controller. These controllers work nearly identically to the transform controllers you worked with in the previous section.
 
  
If you were to open the Water nif, you’d find the same thing under the BSEffectShaderProperty, except it would be called a BSEffectShaderPropertyFloatController. The two controllers are functionally identical, but the game engine demands the controller type match the shader type.
+
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.
4. Expand 9 BSLightingShaderProperty and click on 10 BSLightingShaderProperyFloatController.
 
a. Look to the Block Details section, the only difference you really need to be concerned with between these controllers and the transform controllers is the Type of Controlled Variable field.
 
  
If you double click it and then look all the way to the right, you should see a drop-down arrow for this field (you might have to use the scroll bar at the bottom to find this).
+
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.
  
  
This determines which part of the shader will be animated.
+
==StageItemSpawns Export/Import Process==
  
For movement, you’ll use the U Offset or V Offset which determines whether the texture moves left to right or up and down.
+
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.
  
You can also use any of the other options to animate those things, you’ll have to experiment to see what they each do.
+
1. Select the objects for your Level 1 building, then choose File -> Export -> Ref Placements for Selection.
5. In a new nifskope window, open your copy of MinedOre.nif
+
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.
6. Back in the conveyor belt window: click on 9 BSLightingShaderProperty and press Ctrl+C on your keyboard. (You want the entire shader property, not just the controller)
+
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.
7. Return to the MinedOre window and click on the model in the preview window, which will expand down to and the BSTrishape in the Block List section, click on that BSTrishape node entry to ensure it is active. Now press Ctrl+V to paste the shader property you copied from the conveyor nif.
+
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:
  
It should be at the bottom of the Block List.
+
Editor ID, posX, posY, posZ, RotX, RotY, Rotz, Scale, sSpawnName, iStageNum, iStageEnd, iType, ActorValue, iValidActorValue
8. Click on the MinedOre BSTrishape again and look to the Block Details section, expand BS Properties.
+
 
 +
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.
 
   
 
   
9. Double-click 6 (materials\Landscape\Rocks\RockBoulders.BGSM) and type in 8, which is the ID given to the shader property we copied over, and press enter. The two shaders should have swapped positions.
+
c. Fill in the iStageNum and sSpawnName fields at minimum.
a. In this particular example, the copied shader should have automatically picked up the correct material file/texture. If doing this in the future, it does not, be sure to fix the material following the same steps you did in the previous section tutorial.
+
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.
10. We no longer need the extra shader property, so select the 6 BSLightingShaderProperty and press Ctrl+Delete to remove it.
+
e. At this point, you may alter any of the data manually, such as pointing your placeholders to your actual editor ids.
11. If you were to hit Play now in the animation controls, you’d see the texture on the mined ore begin animating. It will look very strange because this particular texture doesn’t match up to the animation, but it was just used as a simple example. In general you’ll want to use textures that cover the full usable space, unlike this boulder texture which has lots of gaps in it, causing the black and grey sections which aren’t colored in the texture file. The way animating the U and V offset works, is that the texture is literally moved in one direction while the UV Mapping stays in place - if you’re not familiar with what UV Mapping is, check on youtube to find some simple explanations.
+
f. Repeat these steps for each of your level files of stage items, be sure to use the correct iStageNum for each.
12. One common thing you’ll want to do with these, that can be a bit tricky, is to reverse the direction of the animation.
+
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
a. Expand down through the BSLightingShaderProperty until you reach the NiFloatData node, then go to the Block Details section and expand all of those entries. Here there are two keys.
+
4. Close the Creation Kit and make sure your CSV file isn’t open in any software.
b. In the first key, change the value from 0 to 1. Think of these like decimal percentages, so 1 = 100%. We’re telling it to start with the texture at the end of the animation.
+
5. Make a backup of your esp file in case something goes wrong (it shouldn’t but, not worth the risk anyway).
c. Also in the first key, change the Backward entry from 1 to -1. Since we’re reversing the direction, we also need to reverse the easing.
+
6. Open your esp in FO4Edit.
d. In the second key, change the value from 1 to 0. So now in the first key we’re starting at the end of the animation and working back to the beginning - aka reverse!
 
e. Finally, change the Forward entry of the second key from 1 to -1 (as before, we need to reverse the easing as well).
 
f. Why does this particular animation go from 6.66667 to 11.9666667? This controller was plucked from a model that had multiple animations. If you’d like you can change the key times to 0 and 5.3 (11.96666667 - 6.6666667 = 5.3), and then select the BSLightingShaderPropertyFloatController and change it’s Start and Stop times to 0 and 5.3, respectively. It doesn’t actually matter, but it will make it easier for you in the future if you want to tweak the animation length.
 
  
For these kinds of simple looping animations, it’s very easy to manually edit the keyframes since there are only two of them, which means you can continuously copy and reuse the FloatControllers available in these two files for all of your animated texture needs. You could even add additional keyframes if you like, to make more complex animations.
+
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).
  
==Creating Production Loops==
+
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.
  
This method uses a script to move an object, or a continuous parade of objects along a path you create. This is especially useful for simulating assembly line productions without the need for the Contraptions DLC.
+
==StageModels Import Process==
  
With patch 2.04 a new script called AnimatedObjectSpawner was added, this can be added to an object which is meant to be used as a StageItemSpawn to generate an object or objects that will follow a path you set up.
+
The StageModels process is much simpler as you can just type up the data needed instead of combining documents.
  
To start, let’s layout a path we want to follow.
+
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)
 
   
 
   
1. Open your add-on and bring up one of your building models that’s aligned at 0,0,0 in a cell, just like if you were about to lay out furniture and lights for configuring the StageItemSpawns.
+
b. If a spreadsheet, type the Editor ID of each of your StageModels in a cell across a single row.
2. Start by laying out the object type you want to spawn in the position you’d like them to first appear, this is often best going to be inside of something to hide the spawning from view, but it doesn’t have to be if you don’t mind the object materializing in front of the player.
+
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.
a. This represents the coordinates you’ll use when placing your AnimatedObjectSpawner.
+
3. Close the Creation Kit and make sure your CSV file isn’t open in any software.
3. Duplicate that object and move it a short ways, (if you have experience with animation, you’re essentially going to lay out the major keyframes for this object).
+
4. Make a backup of your esp file in case something goes wrong (it shouldn’t but, not worth the risk anyway).
4. Continue duplicating this along a path of your choosing. In general, you only need an extra copy where the direction or rotation changes, otherwise the script will handle all of the in between motion to get from point to point.
+
5. Open your esp in FO4Edit.
  
Once you have a path laid out, we’ll create your spawner.
+
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:
5. In the Object Window, expand World Objects and click on Activators.
 
6. Right-click in the right hand side and select New.
 
7. Give the spawner a unique ID and set it’s model file. (I tend to use kgSIM_HelperTiny_Marker as it’s invisible. You can use any model you like, but remember that the objects to animate will spawn at the origin point of the model.)
 
8. Press OK to save the form and then re-open it.
 
9. Click Add under the scripts section and add SimSettlements:AnimatedObjectSpawner.
 
  
10. Double-click AutoBuildParent and select the only option from the dropdown menu.
+
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.
11. I’ll now explain what the optional fields do, you can decide what to set them to.
+
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).
a. bWaitUntilTransitionCompletes: If checked, this won’t spawn another object until the original finishes its journey. This is especially useful if you want to simulate a single object continuously making a loop.
+
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.
b. fInitialMovementDelay: This will pause the items after spawning for this many seconds before they are moved on the path.
+
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).
c. fPauseBetweenObjects: This will place a pause for this many seconds before creating the next object. This has a hard minimum of 0.25 seconds. Be very careful with this setting, having it too low without limits in the next two fields could quickly overwhelm the engine.
 
d. iEndPositionObjectCount: The number of spawned objects allowed to exist that have been through the animation. Once this number is reached, after the next object reaches the end of the animation, the oldest object will be removed. This allows a continuous stream of items to be dumped into a pile (assuming you are using havok enabled items), without getting out of control. This is hard capped at 100 items to avoid overloading the engine.
 
  
If you don’t need any objects to stick around, for example if the path ends inside somewhere hidden, set this to 0, and each object will be removed after it completes the path.
+
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.
e. iTotalObjects: Once this many objects have been spawned, the spawner will shut down until the cell is unloaded and loaded again. At which point it will start creating objects again until it reaches that number.
+
12. As the script runs you should see messages on the right hand side confirming each of your building stage models was imported.
12. ObjectToAnimate can be pretty much anything, it can even be a FormList to allow a random entry from that list to be spawned each time. Here are some things to consider when deciding what to animate:
+
13. If you receive any errors, fix your spreadsheet, and try running the script again.
a. If you use actual lootable objects, the player will be able to pick them all up, creating an unlimited resource - which is probably not good.
 
b. Objects are released to gravity (via the Havok engine) at the end of the path, which means MoveableStatics make the best form type. You can take most existing items, such as food, chems, and weapons, and use their model file in a MoveableStatic record and it’s havok data will still work in the new form.
 
c. If you use a static object, the item will stay frozen at the end of the path and will not be controlled by Havok.
 
13. Phases are what control your keyframes. They work very similar to StageItemSpawn entries in that you’ll enter the coordinates and rotations of the items you laid to represent the path.
 
a. Skip your first item, because that’s where the actual spawner will go, so double-click the second item to bring up its properties.
 
b. Add a new phase and copy paste all of the position and rotation data from the item properties window.
 
c. Next choose a speed, this is in units per second. For reference, a plot is 512 units wide.
 
d. The fHavokPause is an optional setting. Entering a number of seconds here will temporarily release the item to gravity when it reaches the coordinates you entered. This is useful if you’d like to add a drop in the middle of the animation.
 
  
This setting can result in some funky things happening that you’ll have to do trial and error to correct. Once an item is dropped to gravity, it’s origin may be in a different spot than you originally planned for, so that the next phase coordinates may end up being too low or too high. Once you test the cycle in game, you’ll get a feel for which direction the item will land each time and be able to roughly compensate by altering the fOffsetZ of the next phase. It’s imperfect, but you should be able to find something that works most of the time.
 
e. The bDoNotRotate option will prevent the object from rotating back to 0/0/0 after a Havok pause. I tend to use this on every phase after introducing a havok pause. Alternatively, you can do the same adjustments described in step 13d, to alter the phase rotations based on what you see happen during tests in-game.
 
14. Once your Phases are configured, press OK to save your spawner.
 
15. Open your building plan, and add a new StageItemSpawn record, using the coordinates and rotation of the starting position object you placed.
 
16. Test it in game by building or refreshing that plot!
 
  
This script method is great for both creating translation movement in the game world and spawning continuous objects to simulate a production line. Versus the other two methods which create looping movement of the object itself. It definitely takes some trial and error to pull off, but the effect is very cool and avoids reliance on things like the Contraptions DLC objects.
+
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’re now equipped with the knowledge to start tearing apart and assembling animated nifs and laying out scripted production lines (or other creative uses of that script).
+
==You’re Done!==
 
As with all the tutorials, if you need help with any of this, just ask on the SimSettlements.com forums or the Discord server!
 
  
[[Category:Toolkit]]
+
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.

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.