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!

ASAM Maintenance Software

pra

Well-Known Member
Staff member
Verified Builder
Messages
580
This is a mod I made mostly for SimSettlements troubleshooting, but also to have some tools.
Mostly it runs some checks on the plots you have, and allows you to update only these.

See the nexus page for more infos:
https://www.nexusmods.com/fallout4/mods/30500

I'd also like to ask @kinggath for some infos here. Like, can I trigger automatic assignment for a specific settlers? Also, I can send you the source code of the quest which does the whole work.
I'd pack the source of all my scripts into the ba2 by default, if there was a way to do this automatically...

Edit: I have another question:
I used this line in my "Call Unemployed/Call Homeless":
SimParentScript.WorkshopBellEvent.SendStoryEvent(akDestinationTarget.GetCurrentLocation(), akDestinationTarget, None, 0, 0)
It's taken from the Town Meeting Gavel script... It causes everyone to come to the player. I have no idea how these "story events" work. Is there a way to make only specific NPCs come to you?
 
Last edited:
Is there a way to make only specific NPCs come to you?
The only way i know of to do this is to get that npc id then use a console command to move either the npc to you or move yourself to the npc. I have done this to find dogmeat a few times in Sanctuary
 
Er, just moving NPCs around is not the problem here. I'm asking about how to make they follow you afterwards.
 
No, to specific settler. The autoassignment handler is only written from a plot perspective and loops through all NPCs testing for an available one, I never wrote code in the other direction (ie. take an NPC and loop through everything that needs assignment).

Call homeless/unemployed could be done, but would require new story events be configured.
 
No, to specific settler. The autoassignment handler is only written from a plot perspective and loops through all NPCs testing for an available one, I never wrote code in the other direction (ie. take an NPC and loop through everything that needs assignment).
Okay. Is there a function which I can call to make unoccupied plots try to find occupants?

I see AddToAutoAssignmentQueue in AutoBuildParentScript, I guess I can try putting a plot there. But is there something like a "checkUnassignedPlotsAndTryToAutoAssign", which I could call?
Also, I see several lock variables in there.
The plot has bAutoAssignmentLock, and the auto build parent has bAutoAssignmentLock[iThisWorkshopID]. I assume I should not do any kind of assignment if these are locked. Anything else I should be careful of?

Basically, I see from time to time settlers idling, being both homeless and unemployed. Or at least homeless, job assignment seems to work faster. My idea here was a way to manually trigger the whole auto-assignment mechanics.

Call homeless/unemployed could be done, but would require new story events be configured.
Can you point me toward a direction so that I can look at how you did it? I have no idea what "story event" even meants at this point...
 
You could call AutoBuildParent.ProcessAssignmentQueue() .

Per story events, I just called the one from the workshop bell, so it was very simple. I don't know of a lot of resources on the story event system yet, though there should be many available for Skyrim - I've only started reverse engineering some of it.

The general gist is that you go to Character -> SM Event Node, then open up Script Event and add new nodes, under the node you add quests that can be started under various conditions. To trigger a node, you set up a keyword and then call SomeKeyword.SendStoryEvent
 
Ah crap. That sounds too complicated. I guess I'll let it be for now. Just calling people to your position seems to work well enough.

Something else. How can I get the ASAM sensor which belongs to a specific plot? I noticed that for me, it sometimes isn't rotated and is pointing upwards. I thought that checking that would be a good way of detecting plots which needs to be refreshed.
 
Ah crap. That sounds too complicated. I guess I'll let it be for now. Just calling people to your position seems to work well enough.
This is something I've been trying to do too as I have a terminal with some settler summoning options, but haven't been able to emulate the "follow for 30 seconds" part of it. When I tried adding a new node to script events it counted as a vanilla override, so I backed off of that method. If you look at the existing info for the workshop bell event, it points to a quest (WorkshopSummonSettlers I think), and you can look at that quest's stage fragment for an idea of how it works. It applies the AI package that makes the settlers follow you while the quest is active. I tried duplicating the quest and starting it with a script (terminal) or console commands, but it wouldn't start and I couldn't figure out why. It's something I've been meaning to revisit when I have the time to get a better handle on AI packages and quests that aren't typical quests.

Something else. How can I get the ASAM sensor which belongs to a specific plot? I noticed that for me, it sometimes isn't rotated and is pointing upwards. I thought that checking that would be a good way of detecting plots which needs to be refreshed.
Keep in the mind that they point upwards for agricultural plots.
 
Have you ever added a quest marker to a settler only to discover they are completely buried underground? Have them gather in a ditch or in the water for some reason? I select a settler in the console and use 'moveto player' but it'd be nice if there was some logical way to find trapped settlers.

Do any of those factory whistle type mods move settlers to their work,home, or relax stations? Maybe settler options for "go to work station" or "go home" would be useful.

I know amazing follower tweaks checks to see if a companion is being focused on when the utility is activated and automatically switches to "all companions" if none is. Maybe something like that with the above so it could be used for one or all settlers would be possible. It could just be a boot you activate. :)

It might actually be more useful to activate an option for a plot you are next to in order to call the settler to their work station since the other way requires that you find them first.
 
Have you ever added a quest marker to a settler only to discover they are completely buried underground? Have them gather in a ditch or in the water for some reason? I select a settler in the console and use 'moveto player' but it'd be nice if there was some logical way to find trapped settlers.
I have no idea if I could detect that. Doesn't "Call town meeting" fix it? It is doing a moveto player, I think.

Do any of those factory whistle type mods move settlers to their work,home, or relax stations? Maybe settler options for "go to work station" or "go home" would be useful.
That is actually planned :D
I have no idea if they will actually stay, but I guess I can try moving them there.

I know amazing follower tweaks checks to see if a companion is being focused on when the utility is activated and automatically switches to "all companions" if none is. Maybe something like that with the above so it could be used for one or all settlers would be possible. It could just be a boot you activate. :)
It might be me being drunk right now, but I honestly don't understand this part...
 
I have no idea if I could detect that. Doesn't "Call town meeting" fix it? It is doing a moveto player, I think.

Sometimes there are lots of settlers. My sanctuary has 56 of them haha.

That is actually planned :D
I have no idea if they will actually stay, but I guess I can try moving them there.

Awesome. I think the game tries to trigger them walking to work and they get lost.

It might be me being drunk right now, but I honestly don't understand this part...

I was just wondering if plots or settlers could be selected for a task by being focused on when a hotkeyed item is activated. I know it's possible to make something separate from the configuration settings holotape like a "clipboard" or something and then identify whatever was focused on when the item was activated. So, if it was a plot then open the plot tools if a settler then settler tools, etc. for just that one object. Just an idea to make a shortcut to performing an operation for just one settler or plot without going through the list building and selection process.
 
I wonder if calling MoveToNearestNavmeshLocation() on all settlers in a settlement would dig up the buried ones but leave the others where they originally started if they were in a good spot already. Usually when settlers end up underground I've either left a void below a placed object or it's a vanilla terrain location. With vanilla locations I think hidden parts of placed objects prevented the settlers from falling into the void like they would normally and being automatically repositioned.
 
Ah crap. That sounds too complicated. I guess I'll let it be for now. Just calling people to your position seems to work well enough.
It's actually not that bad, and the story manager can be extremely powerful if you know how to use it, but documentation for the story manager stuff is kinda sparse. You could try reverse-engineering my Logistics Stations mod, because I use the story manager in that mod to do a neat trick to get a reference to an arbitrary location's map marker (look at idek:ils:LogisticsParentScript.GetMarkerFromLocation()), or my Smart MIRV mod where I use it to get a reference to the nearest six enemies.

Edit: actually, here's a working example of what was being discussed: [Link]
I realized pretty quickly that the story manager didn't actually need to be used at all for this, but I used it anyway since it was the point of the demonstration. In simple terms, the story manager (at least, the way we're interested in using it here) allows you to start quests via Papyrus with some extra data passed in. That extra data (a location and/or some object references etc) can be used as the basis for auto-filling other aliases, which isn't possible with other methods because aliases only auto-fill immediately upon the quest starting.

In the case of this example, the alch item triggers a function in IDEK_QUST_FindJobless, which then starts IDEK_QUST_FindJobless via the story manager, and the extra data we're passing in is the player's current location, and a reference to the workbench at the settlement they're standing in. The location data isn't actually used in this example, but the workbench reference gets inserted into CurrentWorkshop, and CurrentWorkshop is then used, along with a bunch of other conditions, to fill the JoblessCollection and HomelessCollection ref collection aliases. All of the actors in JoblessCollection are then teleported to the player, and the AI packages temporarily added to those actors (copied from the vanilla workshop bell quest) force those actors to follow the player until IDEK_QUST_FindJobless is shut down again, which automatically happens after a half-hour game-time timer.

You're welcome to rip that mod apart yourself and use the parts of it as you see fit, by the way. It does at least sort of work, but it would take a bit of polishing that I can't be bothered to do before it's totally usable.
 
Last edited:
Cool! Some settlers just hang out at home all day. I never said they could work at home. :-p

Is there an indicator which says specifically why a plot was chosen for the problem list? Sometimes it isn't obvious to me if all of the flags are there. Could there be a setting for "Display problem flags only?".

Also, do you know what the pre-3.1.6 issue with plots was that required refreshing? I'm wondering if that got fixed in some cases or if the refresh took place.
 
Great little app @pra ! Thank you for taking the time to make and release it. It's become indispensable for me.

I am having a few issues, though:
  • Refreshing problem plots completes instantly, and the plots never seem to actually get refreshed.
  • Vacant plots that are waiting for settlers are flagged even when that's turned off in the settings.
  • It seems unbuilt can't be toggled in settings and remains in an off state.
 
Oh right, I had that instant refresh thing happen too when I tried it. I wonder if the refresh logic changed in 3.2.0 and the script Pra is using needs to be updated.
 
I can't reproduce the refresh stuff, but something seems to be changed allright. Plots refreshed via AMS aren't really refreshed.

Edit: but I don't see anything different in AutoBuildParentScript::RefreshWorkshopPlots!
 
Last edited:
Top