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!

Question Insert recipes and remove items through scripting?

Alonia Bloodsteel

New Member
Messages
8
Hello all! I'm working on overhauling Fallout's late game, and am slowly wading into the script side... Is there a way to remove an item from a LL after a certain level? For instance, if I had Raiders start to get better stuff than X Mod + Raider armor through script injection into their armor lists (so as to avoid mod conflicts), could I remove them as well through a similar script? I know technically I could insert multiple copies of the weaponry into the Leveled Lists and "dilute" the chance of items I'd remove showing up (at least, in theory/my head such makes sense), but is there a way to remove them altogether (and if not, is anyone familiar with the chance statistics? Is it even split within items in the LL)?

Now, the second, I know that there are notes placed around the Commonwealth that unlock recipes... However, in my experience they are typically placed (I presume to avoid having "repeat" recipes), would it be possible to have them be in a say Leveled List... say... "AB_LLA_WeaponRecipes" but have it so that if someone finds the particular recipe any further instances of it are nulled/replaced?

If not, a simple script relegating recipes based on level would work, I suppose. Finding weapon schematics just seems both a touch more immersive and adds to the looting dynamic as well, IMO.

Thanks for taking the time to read this,
A.B.
 

Tinuvia

Wasteland Venturers
Staff member
Moderator
Verified Builder
Support Team
Messages
926
For formlists, there's Find() and RemoveAddedForm(), but for leveled lists there's unfortunately only Revert() which removes ALL script injected items from any mods the player has installed from the list, reverting the list to vanilla (not ideal, since it's such a brute force solution). The dilution method you describe is what I generally use to make sure the items I add aren't dominating.

For your second question I'm not entirely sure of what you want to do so here are some guesses and possible solutions ;) If it's to place the same recipe in several alternative locations, you could alias the placed recipes in a quest and when one is found disable the other placed ones. You could also set the recipes to enable in the world after the player reaches a certain level. another thing you could do is to have a formlist with recipes, and through a script randomly pick a recipe to enable and then remove this recipe from the list.
 

Alonia Bloodsteel

New Member
Messages
8
Hmm... Thank you in regards to the formlists, I'll most likely just go with the dilution method, although, knowing me, I'll probably toy with the Find and Remove functions (thanks for the link, by the by).

Now, for the recipe bit I was talking about (which your suggestions did give me some thoughts for, so, thank you yet again), I don't want higher tier weapons to initially be within the Chemlab (it undoes the point of having them show up later if the player can just craft one), I was thinking something along the lines of FO3's or NV's weapon schematics.

Then, where F:NV/3 (I played both with TTW, so might accidentally "merge" knowledge on one with the other) upgraded the weapon(/increased the condition) you could build per level of schematic the player has... So, player finds a blueprint for... A laser rifle from the mod. It's the first so they learn how to manufacture the gun and the appropriate entry appears within the Chemlab.

Later they find a second one... The script runs, recognizing the player has found [Schematic] x1, and thus unlocks the second "tier", allowing them to craft new weapon mods. Hopefully that more clearly demonstrates what I meant...

Making a quest to remove copies could work, I'd have to edit a few things, and if I wanted the weapon mods I could split it between multiple schematics, than in the script have copies of the schematic disappear when they are found, and have the "higher" tier schematic inserted in it's place. It does basically what I want, and would most likely be easier to implement instead of everything for one weapon being handled within a single progressive schematic.

Thanks for the help.
 

Tinuvia

Wasteland Venturers
Staff member
Moderator
Verified Builder
Support Team
Messages
926
If the items are crafted in the chem lab, I’m fairly certain that the recipes will only show up if the player meets the conditions. So you could also set conditions on the constructible objects for GetStageDone with a magazine setting the stage on player pick up. Or set a global on pick up and let this be the condition.
 

Alonia Bloodsteel

New Member
Messages
8
Ooh, that's most likely what I'll do for the upgrade/mod portion, it definitely sounds simpler than the thoughts I had been toying with, going to go mess with the CK and see what I can draft up. As always, thank you for the help!
 
Top