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!

Plot question - adding perks

pakman

Active Member
Community Rockstar
Messages
255
Hello,
Long time skyrim modder, long time SS player, now getting into F4/SS modding.

BACKGROUND
I have had an idea for a LONG time (even posted about it before I think) -
I want to create some plots that add perks to the player while the plot is occupied and the player is in the settlement.

I am not looking for someone to do my work for me, but just wanted a bit of direction.
I know my way around the CK (well, the skyrim one), and have watched the "create a plot tutorials".
I understand events, conditions, spells, magic effects perks, and basic quest composition.
(still learning the diff between skyrim papyrus and F4...the remote event and mandatory properties I am still wrapping my head around....).

MY THEORY/APPROACH
I was suspecting there are workshop/ss scripts that periodically run checking on plots.
I was thinking that something would hook/watch/use events on those that would check when plot upgrades or a player enters a settlement.
Somewhere in there, I would add a spell/magic effect that adds a perk to the player.
That effect (and perk) would then drop when the player leaves the settlement.
Or...something like that. I have no idea if there is a better way in F4/SS modding. I am 100% open to corrections on my misconceptions.
(in skyrim perk conditions do not dynamically check certain things - so it is easier to put conditions on magic effects that add perks).

MY QUESTION
Where would I begin to look for examples on how a plot can add a perk to the player?
I did a bit of poking at some of the SS mods/plots I had, and did not see anything obvious.
If there a good place to start?

thank you for any assistance.
 
How much papyrus scripting have you done so far in your modding adventures? If you are a fluent papyrus speaker, there are events to register for - both for when a plot levels up and for when a player enters a settlement (I can give you some examples of quests/scripts that do this to use as inspiration, if you want). This could then activate your magic effect. Like you say, I think it's best to have the perk permanent but its effects condition dependent.

If you are more starting up on the scripting, have a look at kinggath's Bethesda Mod School series on YouTube. Especially the scripting 1.0.1 etc. This should get you going in the right direction.

For general inspiration, the most plots that do extra things are in Industrial Revolution, in Mytigio's Industrial City and in Pra's addon pack.

EDIT: remote events are used to "subscribe" to events from other scripts (not the game native events), useful to e.g. check for when a plot levels up in SS. The mandatory flag on properties gives you a warning and show up red if you forget to fill them in your quest.

EDIT 2: either way, ask for an invite to the Builder's Discord here - it's a good place when you are making mods, with lots of helpful people.
 
Last edited:
Thanks for the response!
Experience
I am decent with papyrus, but can always learn more.
Worked with mcm, leveled list injections, and events. But all in skyrim (se).

Typical skyrim events I have worked with are the basics (onhit, OnEquipped, OnUnEquipped, OnContainerChanged, etc.). I understand the differences between the conditionals on the perk, and the perk effects, and in working with spells and effects. I know to use aliases, and never try to change base game references, and other best practices I have picked up from more experienced moddders. Again, only in skyrim.
(the timing on when the various conditions are checked in skyrim can be annoying until you figure it out).

I used to be a developer a long time ago, so I try to write well documented code, and am always trying to learn better practices ....but I almost always learn something new when looking at code others have done.

Diving into F4
The couple of F4 mods I have done so far are really basic, either no scripting (simple quest change, modifying globals or game settings) or I have one that adds new items and uses leveled list injection into vendor lists (works very similar to skyrim, so not too hard).

The events in F4 ....look weird. I have not been able to wrap my head around them yet - and the mandatory properties are a bit confusing as I have just started looking at more f4 code...

What I am trying to do.
Basically, I am trying to create a couple of plot types that can gi
I find it annoying and un-immersive that NPCs cant offer certain services that are locked behind perks in the game (I don't want every char of mine to have gunnut and science, etc.)
So, I want have a plot like a "weaponsmith" that when active in your settlement, you get access to gun nut or blacksmith - levels going up as the plot advances. there might be a science/chemist one too....or advanced plots that have a tech tree....not sure, doing baby steps at this point.
I was thinking about either a workbench on the plot that gives the perk (or being near it?) or just having it in the settlement (would lose it when leaving that specific settlement).

Making the Plots / Mod
I was not sure of the best method - I try to keep things simple to help reduce bugs or conflicts, and I try to avoid as much scripting or events if possible (or use register for single update, etc.) to reduce performance load. So, I was in the research phase for trying to learn about what is possible, or what examples I can learn from.

Any Help Appreciated
I will check out the mods you listed, and join the discord.
Examples of mods that do similar things, or code examples would be AWESOME.
Or advice on how to keep script bloat low, etc. I don't want to go super complicated here - (scope creep is a danger all the time...). Long term, if it works, and is stable, I might plan on releasing it.

thanks for your response, and any other code examples or perspectives are very appreciated.
 
Last edited:
Great! Sounds like you are a good bit on the way already :)

Doing extra stuff on Sim Settlements plots can be tricky since they are dynamically placed, and your addon pack hooks onto the Sim Settlements functionality and scripts. There will be three separate parts in getting your perk-temporary-effects to work:
1) making the plots and the addon pack. The Builder's Toolkit tutorials are detailed and easy to follow, but it can be complex. Make sure you get the written version, it's much more detailed than the videos. I would begin by making a simple plot with no extras (maybe a 2x2 residential), just to get the hang of how everything fits together, and then move on to the complicated plots you have plans for. (Also, even if you don't get the perks to work you will then have a fantastic addon pack to publish and all the work won't be wasted ;) )
2) getting the hang of Fallout 4 scripting. I would start by going over this page if you haven't already. It lists the differences between Fallout 4 and Skyrim scripting. Then looking at the Bethesda Mod School scripting 1.0.1-1.0.5 tutorials. They go over how to script in Fallout 4 by making a deployable turret mod that among other things manipulates and adds a perk to the player (you'll probably recognize much from Skyrim).

With those parts done (and the details below are probably better to go over on the Builders' Discord, when you have gotten as far)
3) getting the perk to work through conditions from the plot. I'll list some of kinggath's scripts that have useful functions to work from. You need to decompile them with Champoillion. For that, this video has some nifty tricks. There may be helpful scripts for the Industrial Revolution plots, but the quests I've used most are from the Conqueror expansion, so I'll list those. The quest "kgConq_MMC18_RoomForImprovement" uses the event OnPlotLevelChanged and shows how to register for it. And the "RaidGangManager" quest looks for when a particular building plan has been built in the function "CorrectGangLeaderAssignments()" among others.

Hope it works out!
 
Thanks for the detailed post.

I will take a look at the resources you posted (have some already, but plenty more to look at).

The specific quests and scripts will be useful - thanks.
(now just to find more time....).
Any other suggestions or ideas are welcome too!
 
When you get to that point, I think it might be easiest to set the conditions on the workbench itself with a script, using OnActivate() or something like it - that way you don't have to look at whether the plot is placed and what level it is, you can just have differently scripted workbenches for the different levels of the plot.
 
When you get to that point, I think it might be easiest to set the conditions on the workbench itself with a script, using OnActivate() or something like it - that way you don't have to look at whether the plot is placed and what level it is, you can just have differently scripted workbenches for the different levels of the plot.
That is interesting.
I have been vacillating back and forth between having the player use a workbench on the plot vs. just having it settlement wide (in case they kind of had their own workshop set up).

One of the things I was considering was having different plots for weapons, another for armor and another for science/chemist. That way the player could combine the bonuses from weapons and science - as there are a lot of mods that require both.

I could still use an activator of some-kind - it could just give a buff that lasts long enough to hit another station.

Thanks for the comment - it gives another card in the deck, so to speak.
Also, looking into a hazard type effect on an item on a plot ....

I am open to any additional thoughts...
 
Top