What's new
the Sim Settlements forums!

Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Missing Script for supplies injections

Yes, the link is noted as missing
Folks previously reported that the link was broken.
After some digging around, I found that there is no ss2supplyinjectiontemplate.txt so I flagged it in red.
I couldn't find a SS2SupplyInjectionTemplate using the Creation Kit either.
Kinggath is the one that need to update this page with more current information, and unfortunately, he's extremely busy.
 
Sorry, didn't realize it was an intentional flag rather than just a broken link
No worries, I'm always happy to answer wiki questions, or fix stuff people find.
 
The wiki at https://wiki.simsettlements2.com/CreateAddons/Injecting-Supplies has a missing link for the script to be copied. Was that broken in the NG update, or should there still be a script there?
If I'm remembering correctly, the method of injection was changed. Read: the wiki is out of date.

IIRC, the current method of injection is to add items to inject to the script property(s) of <your prefix>_AddonConfig_* for your addon.
For more information:

@Cessori
You want me to create a quick tutorial with pics? IIRC, CaptainLazerBeam has experience with this as well.
(I kinda remember you saying before that it is a "KG" page)
 
If I'm remembering correctly, the method of injection was changed. Read: the wiki is out of date.

IIRC, the current method of injection is to add items to inject to the script property(s) of <your prefix>_AddonConfig_* for your addon.
For more information:

@Cessori
You want me to create a quick tutorial with pics? IIRC, CaptainLazerBeam has experience with this as well.
(I kinda remember you saying before that it is a "KG" page)
Yes, the page is out of date and is part of KG's documentation for creating add-ons.
I made him a to-do list of pages that are empty, or seems to be incomplete (including this page).
I'm in no way opposed to someone else helping to do that documentation, but he did say my questions to him is on his todo list - intended to be done "soon".
Images to explain how to do things along with text instructions do make these things easier for new folks to understand.
Maybe discuss it with him and the Captain? We can chat/discuss together on discord or forum conversation between us too if you'd like.
 
Yes, the way the injection is handled is fairly simple - it's in the script properties for the add-on quest template. You just create formlists of the items to be injected and then point the properties to that formlist. I could certainly help with a tutorial.
 
Edit to Section: injecting your mod items
To inject your own mod's items from your SS2 addon, you'll need to create a quest record, some formlists., and set up a script. The script has already been written, you'll just need to copy-paste some code and give it a custom name.
  1. Open your addon plugin in the Creation Kit.
  2. Create a new quest record and give it a unique Editor ID, such as yourModsPrefix_SS2Supplies. Open your addon quest, such as yourPrefix_SS2_Addon. (If you do not have a SS2_Addon quest, make a copy of SS2_AddonTemplate and rename it such as yourPrefix_SS2_Addon. Click OK and re-open so you can open the script properties.)
  3. Make sure Start Game Enabled is checked on the quest. Open properties for AddonPack script.
  4. Click OK to save the quest record. Double-click SupplyCategorizationInjection to expand.
    1734118963361.png
  5. Open the quest record again by double-clicking it and go to the Scripts tab. The documentation string explains the different categories you can inject to.
  6. Click Add, and then double-click "[New Script]". Give it a unique name, such as yourModsPrefix_SupplyInjector, and click OK. Next you'll need to set up formlists for all of the items you want to inject. We have support for the following breakdown of items:

    Ammo: Ballistic, Energy, Explosive
    Armor: Makeshift, Standard, Heavy, Power Armor
    Chems: Anti-Radiation, Cures, Enhancements, Stims
    Weapons: Makeshift, Standard, Heavy

    Most are self-explanatory, but a couple we receive questions on:
    • Makeshift: Items that have a hand-made or jury-rigged feel to them. Things being used as armor/weapons that wouldn't normally be for that. This would be things like pipe-weapons, or raider metal armor.
    • Standard: Anything that is being used appropriately as weapons/armor, but that you wouldn't normally consider heavy. For example, an Assault Rifle, or leather armor.
    • Cures: Chems that have to deal with recovering from diseases or status issues, such as Antibiotics.
    • Stims: Health-related chems, such as Stimpaks.
    • Enhancement: Stat or combat enhancing chems such as Mentats or Jet.
    • For each category you have entries for, do the following:
      • Create a new formlist under Miscellaneous > Formlist, and give it a unique Editor ID. For example, yourModsPrefix_BallisticAmmo.
      • Keep the formlist open and drag all of that type of record from your mod into the formlist.
      • Click OK to save the formlist.
      • Open the script properties for the quest in the previous section, and double-click the script you added in step 2. Find the corresponding property and double-click it, then select the list you created for that category.
      • Repeat for each category you have items for.
  7. Close the properties screen that comes up. Increment your espVersion global variable so SS2 will inject the added items the next time you load the game. (just like with building plans.)
  8. Right-click your new script and choose Edit Source.
  9. Click this link to download a script, and copy the text from it into that source window: Download Link: ss2supplyinjectiontemplate.txt
  10. At the very top of the code you just pasted is a line that starts with "Scriptname", change the text "SS2SupplyInjectionTemplate" to the unique name you used in step 6.
  11. Click File > Save on the source window. This should compile the script and save it. If you receive an error, it most likely means you didn't complete step 10 correctly.
That's it! When the game loads, the quest will check for Sim Settlements 2, and if found, will inject the items appropriately.
 
Last edited:
Edit to Section: Creating a Patch for Other Mods

The steps for create a patch mod are identical to the section above, with one small change.

Add -> Note: if you have a mod like CK Fixes that allows an esp as master, you can skip the following.

In order for the Creation Kit to allow your patch mod to be parented to another mod, you'll need to flag that mod as a master. To do this, you'll first need to make a small tweak to that mod in FO4Edit.

@Cessori The above posts should be the corrections required.
 
KG fixed the issue with the file not being accessible that was reported originally today... so the above are additional changes to the page, that you now want removed?
 
KG fixed the issue with the file not being accessible that was reported originally today... so the above are additional changes to the page, that you now want removed?
With the file now accessible the method as written will work. The method I wrote above is easier as no script needs to be compiled. Somewhere along the line KG rolled that script into SS2_AddonTemplate.
 
Top