Reminder - in all my tutorials, green text can be skipped by modding vets, and red text can be skipped by beginners. These are side notes meant to clarify something I imagine certain readers will have questions on, and if they are not targeted at your skill level, you can skip them or ignore them if they are over your head or seem obvious.
This guide will show you how to introduce new things settlers working Caravan Services plots can discover while out doing salvaging missions. This system is an extension of the Unlock System, so almost everything possible on the base Unlockable can be done here as well.
You can have settlers discover anything you like: new buildings, new craftable items, rewards directly into the player's inventory, or even trigger quests to start!
SS2 includes a fair number of Industrial building plans that can be discovered, though the system is hardly limited to those. We will certainly be adding more, as well as other things to the system in the future!
If you haven't read the Unlock System guide, that's OK! You can set up Discoveries anyway for the most part, if you get stuck on the Triggers section you can read more about it then.
Though we won't be covering the Notifications, Requirements, and Triggers sections, if you'd like to learn about those in detail, check out the Unlock System guide.
If you haven't encountered this system in the mod yet, it works like this:
- Player crafts a special item called a Mark 1 Beacon. These are intentionally heavy items the player can carry with them to mark cleared locations.
- Player drops a Mark 1 Beacon, which then searches for a Communications Class building in range, if found, it then checks for all settlements in that Communications Network for a Caravan Services Class building. If found, and the building has a settler assigned that isn't on a mission already, they will be dispatched to come farm the location for resources.
- After a short time, determined by the distance from the settlement, the settler will make their way to the location and sandbox the area for a while.
- Eventually they will return to the settlement and the player will receive a prompt telling them what the settler recovered (generally various scrap resources for the settlement to use in construction and maintenance), and at this point a chance for a Discovery occurs!
The Settler Discovery unlockables can be set up in the same way as other Unlockables, with Notifications, Requirements, and Triggers all working mostly the same way. The exception is that once all Requirements are met, rather than immediately unlocking for the player, these remain dormant ready for a settler to discover them.
The additional SettlerLocationDiscovery section of properties allow you to control which types, or which specific locations your Discovery can be connected to.
- bAlwaysDiscovered: By default, there is only a chance for a discovery each time the salvage team is sent. It is modified by the Caravan worker's Luck and Perception, but still a chance. When this option is checked, your Discovery instead is given a 100% chance to be Discovered at an eligible location. This is useful for Discoveries you want at one particular location, as opposed to a variety of potential locations - as it's unlikely players will ever scan a location more than once. For example, the New Bugle Newspaper has this option checked so that it is always discovered in the Boston Bugle building.
- bExteriorLocationsOnly: When checked, only world locations are eligible for this discovery, ie. those that are NOT behind a load screen.
- bInteriorLocationsOnly: When checked, only interior cells are eligible for this discovery, ie. those that are behind a load screen.
If both bExteriorLocationsOnly and bInteriorLocationsOnly are checked your Discovery will be impossible to trigger! So don't do that.
- FoundAtLocations: This allows for establishing multiple locations as potential places your Discovery can be made. These can be either specific locations, for example, you could explicitly add Corvega Plant, Beacon Hill Pub, or the Prydwen to this list (or all 3!); or keywords which are found on location records to cover a wide variety of locations such as LocSetHospital which cover all of the hospitals in the game; or even a combination of the two mixing specific locations and keywords!
Keywords have several benefits over specific Locations:
- They introduce a random element, so that no two playthroughs are alike.
- They make it more likely your Discovery is actually found, as each keyword is applied to multiple locations (well most of them are anyway).
- They naturally allow you to tie into different flavor elements without having to go research every possible location in the game, for example there are keywords about the type of set the location is, such as LocSetFactory or LocSetOffice; as well as keywords about the primary enemy type, such as LocEncGhouls or LocEncGunners.
You can find the keywords by filtering for Loc in the Miscellaneous > Keywords section. From there you can even see how many locations a keyword is used by looking at the Users column in the Object Window to get an idea of how likely someone is to find your Discovery. Taking that further, if you want a list of the locations with that keyword, right-click the keyword and choose Use Info, which will bring up a list of the records referencing it.
While in the Unlock System tutorials I left the form creation open ended as there are unlimited ways to do it and it has a variety of purposes, the Discovery system is more specific and self-contained. Here I'll show you specifically how we set these up so that yours can feel like part of the same system.
- Create a Message form to explain the Discovery.
- In the Object Window, go to the Miscellaneous > Message category, then right-click on the right-hand side and choose New.
- Enter a unique ID, something like yourPrefix_FeatureMessage_Discovery_DISCOVERYNAME.
- In the Message Text box enter a brief description of the unlock. You can have about 3 lines of text before the game UI will cut it off.
- Click OK to save the message form.
- Create the actual SettlerDiscovery form.
- In the Object Window, filter for SS2_Template_SettlerDiscovery under Items > MiscItem, duplicate it, and edit your copy.
This template was added in patch 1.0.1b, so if you are not finding that template, check our Latest News section for patch releases.
- Change the ID to something unique. Something like yourPrefix_SettlerDiscovery_NAMEOFDISCOVERY.
- In the Name Field, leave the "Location Discovery:" portion and change the rest to the name of your Discovery.
- Click on the Edit button next to the Model text box and point this at a model to represent your Discovery. This can be your building model, or some other item to represent your Discovery. Simply copy-paste the model field from another form in the game that you want to use.
- Change the Preview Transform dropdown to something similar in size to the model you chose. If you are struggling to find something that matches, or your model is quite large (ie. the size of a building), choose the SS2_TF_BuildingPlanPreview_Average which should at least ensure most models appear fully on the screen.
- Change the Featured Item Message dropdown to point to the message you created in step 1.
- Click OK to save this form, answering No to create new, and Yes to rename.
- Re-open the form. (We opened and closed this form so that the ID change you made would be reflected during one of the next steps making it easier for you to find this)
- Double-click the simsettlementsv2:miscobjects:... script entry under the Scripts section to bring up the Properties window.
- Fill out the Notifications section as follows:
-- bPlaySound: Double-click this and check in the box.
-- FeaturedItem: Double-click this and select the Settler Discovery form you created in this section (ie. you're pointing this item to use itself as the FeaturedItem).
- Fill out the SettlerLocationDiscovery properties to match where you want your Discovery found, based on what you learned in the previous section. While you're testing, you may want to check in bAlwaysDiscovered so you guarantee the Discovery happens as soon as you scan one of your locations.
- Fill out the Triggers properties to handle the actual unlock you want your Discovery to provide based on the Unlock System documentation. I recommend for testing, checking in bAlwaysDiscovered, this way you won't have to do multiple salvage runs to test your Discovery. After you've completed testing, you should probably uncheck that (unless you have a specific need for it to always be Discovered bypassing the chance system).
The specifics of Trigger (and any Requirements you want), check out the Triggers and Requirements sub-sections of the Unlock System documentation under "Basic Unlockables".
In addition, if you want to veer from the Notifications steps above, that same documentation will explain how that works. This tutorial was simply showing you the settings we use for Settler Discoveries in the core of SS2.
- Once you've filled out the properties how you want them, click OK to close the script properties, and OK again to close the form.
Once your Discovery records are created, you need to register them with the Discovery system of Sim Settlements 2.
- In the Object Window, filter for SS2_SettlerLocationDiscoveries_AddonTemplate under Miscellaneous > FormList. Right-click and duplicate it, then double-click your copy.
- Change the ID field to something like yourPrefix_SettlerDiscoveries.
- Leave the first entry in place, that keyword always needs to be the first entry, and then drag the title bar of the formlist window off to the side.
- In the Object Window, filter for your Discoveries under Items > MiscItem, then drag them onto the formlist. Then press OK to close the formlist, answering No to creating new, and Yes to rename.
- In the Object Window, filter for your addon config under Items > MiscItem and double-click it to open it, then double-click the script on it to bring up the Script Properties screen.
If this is your first time working on an addon, or you haven't created addon configuration data yet, check out this tutorial).
- Double-click the property MyItems, then click Add on the far right and find the formlist you created in step 1.
Now the potentially hard part. In order to test this in-game, you'll need to set up a level 2 Caravan Services and a Communications building (both from the Municipal plot) within range of a location that your Discovery should be available from, and make sure each is assigned a settler.
These steps should speed up testing:
Pick a settlement as close as possible to a location that your Discovery should be triggered (if you went with Keywords, right-click one of them and choose Use Info to see a list of Locations using that Keyword).
Claim it, either the old-fashioned way, or bypass quest requirements with the Workshop Framework MCM menu or holotape under Tools > Claim This Settlement.
Use the Tools > Cheats section of the City Manager holotape to unlock all plot types, classes, and Story Items so you can more quickly build those plot types, as well as gain immediate access to Mark 1 Beacons.
The console command cf forceplotlevel 2 -1 while each plot is selected to skip to level 2 and bypass the construction costs.
The console command cqf ss2_npc_recruitmentmanager settlers 2 will spawn 2 settlers there to assign to those plots.
Craft yourself a Mark 1 Beacon at a City Planner's Desk.
Clear out the location in mind, you can do this instantly with the console command kah (kill all hostiles), then drop a Mark 1 Beacon on the ground.
Once the Caravan has been dispatched, use the console command passtime 24, wait 30 seconds, then repeat until you get the notification that the Salvage was dropped off. Once you press OK to that message, Discoveries should trigger. If you used the bAlwaysDiscovered, you should see your Discovery among them! (Don't forget to uncheck that now that you've confirmed it works!)