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!

Empty Plot Reports in a mod settlement

pra

Well-Known Member
Staff member
Verified Builder
Messages
580
I noticed that the plot report at huntress island (from settlemods, yes, I know, but I'm stuck with it...) show everything as 0. My suspicition was that the city manager holotape failed to properly identify the workshop, or something like that.

However, my Asam Maintenance Software is able to load plots there just fine. Here is the function I use to find the workshop:

Code:
Workshopscript function findWorkshop(ObjectReference term)
    workshopobjectscript wsObj = (term as workshopobjectscript)
    Workshopscript result
   
    ; try by workshop id
    if (wsObj && wsObj.workshopID > -1)
        result = WorkshopParent.GetWorkshop(wsObj.workshopID)
        if(result)
            return result
        endif
    endif
   
    if(term)
        ; try by linked ref of the terminal, if any
        result = (term.getLinkedRef(WorkshopParent.WorkshopItemKeyword) as Workshopscript)
        if(result)
            return result
        endif
    endif
   
    ; otherwise, by location
    return WorkshopParent.GetWorkshopFromLocation(Game.GetPlayer().GetCurrentLocation())
endfunction
Maybe this can help.
 
Thanks, pra. I made sure that function got noticed. It might become handy for mod authors in the future.
 
The holotape is supposed to hide the local plot report as name aliases don’t work in the pipboy. If you view the local plot report on a City Planner’s Desk there, does it work?
 
uh, no, I opened the menu from a terminal. even from a city manager's desk.
 
Looking through the code, the plot report doesn't actually query for a workshop at all, and instead relies on the central "LastWorkshop" alias that SS has setup to check for a new workshop when the location changes. Since SS constantly needs to know which workshop you're in and calls it all the time, I rely on the alias instead of a function to look for it each time.

Do you know if that settlement is set up correctly? Does it return correctly when WorkshopParent.GetWorkshopFromLocation(akLocationRef) is called?

If it is setup correctly, and GetWorkshopFromLocation is returning correctly for it, then we need to figure out why the event is never making it to SS.
 
Do you know if that settlement is set up correctly? Does it return correctly when WorkshopParent.GetWorkshopFromLocation(akLocationRef) is called?
I wouldn't be surprised if it wasn't, but I don't know. I'll look into it when I get home. I know that the settlement HUD works there, at least. Where does that look for the current workshop?
 
The WorkshopHUDScript keeps a direct reference (not an alias) in the script, but it comes from the same event. I have a single quest that monitors for the location change event and then updates all of the other quests that need it.

So it's very strange that it would be hitting the HUD quest and not the quest that holds the alias....
 
Found the problem. It really is because the settlement is buggy. The location links to the workshop one of the player home interiors it has, instead of the main workshop. Can be closed.
 
Top