Jump to content

A few questions about Custom settlement building.


AtomsChosen

Recommended Posts

14 hours ago, hereami said:

If we lean towards low-level code intervention, then it might be worthy to hack workshop routines and make it add every single built ref to NoResetZone, perhaps? Or flag it as NoReset another way, if such a way exists. Because that's what looks very reasonable to be implemented originally.

Hm, here's what i've actually missed re OnWorkshopObjectPlaced "The event is sent to both the Workshop reference and the reference being placed", so it might be intercepted generally by regular means to respawn and substitute a ref, well, if original placement Zone inheritance does actually work and zone affiliation persists. Or maybe there is already a func in F4SE to specify EncounterZone for a ref?

No, only the vanilla GetEncounterZone(). In theory, SetEncounterZone() shouldn't be difficult to expose to Papyrus, this data is held in one of the ExtraData classes if a ref has it specified.

Link to comment
Share on other sites

Ok, thanks for explanations. Guess there would be seamless solution if such func existed, because if we destroy and respawn a built ref, that might ruin efforts of other scripts who catch ObjectPlaced, or maybe interfere with something else, not very good.

Link to comment
Share on other sites

On 12/14/2023 at 7:42 PM, hereami said:

Ok, thanks for explanations. Guess there would be seamless solution if such func existed, because if we destroy and respawn a built ref, that might ruin efforts of other scripts who catch ObjectPlaced, or maybe interfere with something else, not very good.

Might be off topic: OnWorkshopObjectPlaced() is sent only if the ref is built with the Workshop Menu interface, refs spawned with PlaceAtMe() don't make the code send it. (I aim to support Transfer Settlements in my settlement mods so I rather rely on OnInit or maybe OnLoad on newly created refs). By the way, Starfield's outpost system puts this into a new context, with its runtime generated Cells and Worldspaces. There's a slight chance the developers backport some of the hardcoded improvements of the new system into the Next-Gen update..

Link to comment
Share on other sites

On 12/18/2023 at 4:19 AM, LarannKiar said:

OnWorkshopObjectPlaced() is sent only if the ref is built with the Workshop Menu interface, refs spawned with PlaceAtMe() don't make the code send it. 

That's the reason why respawn bypass in regards to Zone assignment can't be perfect. Possible extra initialization will be lost.

@niston, thanks.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...