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 Assignable objects on plots

Karthas077

Member
Messages
35
So I've gone through the tutorial PDFs, and read through some of the WSFW code, but I can't quite see how assignment to a plot that has assignable objects (or formerly assignable objects) on it is resolved by the scripts. Thought I'd post here and see if I could confirm my thoughts while I wait for my Discord invitation.

When going through the tutorial PDFs, the section on creating custom agriculture plots with duplicated crop entries says to remove the WorkshopWorkObject keyword, which should make the object itself no longer assignable, but it leaves the workshopobjectscript on it (with some possibly cleared values, I'm not QUITE sure why the script needs to be left there in the case of crops? It feels like it could just be a static object that looks like the old assignable and it would have the same result). I'm assuming this works because the AVs that used to be on the assignable crop are moved to the plot itself, and so the changes to the settlement values occurs on plot assignment and not object assignment.

I have however come across an addon that does this "differently". It has the building plan place the unmodified assignable object as part of StageItemSpawns, and flags the plot as "kgSIM_TypeCommercial", and this SEEMS to somehow work correctly in-game, but I can't wrap my head around how, and I feel like understanding that would be relatively useful/important in making my own plots behave the way I want them to.

Edit: The weird part specifically is that despite never assigning a settler to the unmodified assignable object, it is being counted as being assigned to? And I'm not sure how exactly that magic is happening or if I'm missing something.
 
From what I understand, the WorkshopWorkObject keyword is what tells the game engine that an object is assignable in workshop mode.

The actual assignments are handled by the workshopscript and workshopparentscript. IIRC, there are some functions in workshopworkobjectscript that workshopparentscript calls during the dailyupdate. This is about the extent of my knowledge on this.
 
From what I understand, the WorkshopWorkObject keyword is what tells the game engine that an object is assignable in workshop mode.
Yeah that matches my understanding of the custom Agricultural crop tutorial instructions.
The actual assignments are handled by the workshopscript and workshopparentscript. IIRC, there are some functions in workshopworkobjectscript that workshopparentscript calls during the dailyupdate. This is about the extent of my knowledge on this.
Ah that checks out. Looking through that granted a bit more clarity, and after I went looking through the mods again and I noticed that the SimSettlements:SimPlot script has an option for PreventManualAssignmentToSpawnedItems so I guess I can now assume that's where the actual "Automatically assign settler to spawned items" magic happens?

I /think/ I have a firm enough grasp now to actually work on making the new plots for the add-ons.
 
If you're asking will an NPC that takes ownership of a plot also take ownership of items (furniture animation, et) I believe this happens in the SS2_StagedItems_Template.csv via the iOwnerNumber column. Enter 1 on the row of the item you want the NPC to use. 1 in this case means the first NPC to take ownership of the plot, then (if multi npc plot) the 2nd and so on.
 
Top