Jump to content

Fort Ownership regarding the Civil War


Kapteyn

Recommended Posts

I'm a bit confused here. Say for example I've cleared Fort Greymoor of bandits, so now it's occupied by Imperials (but the civil war stuff is not happening yet, it's a new game). If I enter the fort the guards will grief me, they don't attack but I suppose I'm technically trespassing - if I take that shiny armour off the shelf then it's theft. I'm assuming the armour has ownership flags on the actual object, but in the case of trespass there must be some ownership on the cell itself. Yet if nobody owns the cell, then how am I trespassing?

 

Specifically, how can I possibly manipulate the cell based on its occupants if this is returning as none?

Faction Function GetCellOwner()
    Cell rCell = Game.GetPlayer().GetParentCell()
    Faction rFaction = rCell.GetFactionOwner()
    Return rFaction
EndFunction

Oh, because I was using OnLocationChange() I wasn't getting the notification when entering the fort. In which case, I still have a problem here because there is no change of location when going through the door into the fort - so I can't run this check.

Edited by Kapteyn
Link to comment
Share on other sites

Test which of the CWGarrisonEnableMarker{Imperial,Sons,Monster}FortWhatitsname is enabled.

 

Don't test the cell ownership, it's something that is fixed in Unofficial Patch

https://afktrack.iguanadons.net/index.php?a=issues&i=19198

 

UPDATE: sounds like your intention is to make a mod that won't work without Unofficial Patch... ew...

Edited by simtam
Link to comment
Share on other sites

I no longer have a problem with interiors, I've got the script using OnCellLoad as well now to load a function, so it triggers when entering a fort - which means I can efficiently check the ownership inside. If the interior has the fort faction assigned to it then I know it's occupied, that's good enough for me.

 

The exterior is where the problem is, there is simply no ownership at all (and that's with USLEEP).

 

I'm gonna see if the location reference is attached when occupied, if so then I can probably use it.

 

Okay, so it's not. How exactly do I go about testing a cell or location based on a location reference?

Edited by Kapteyn
Link to comment
Share on other sites

UPDATE: sounds like your intention is to make a mod that won't work without Unofficial Patch... ew...

The intention is that it will work with no updates at all and also on Dawnguard. A couple of things will be stripped from a no-DLC version due to content being unavailable, but so far as general compatibility is concerned it should be, at least it is designed to be, compatible across all versions.

 

Or are you saying that the interiors of forts will work differently without the patch? I need to check this...

 

Eh, it's fine. Even without USLEEP nothing is spawning in occupied forts unless I flip the variable.

Edited by Kapteyn
Link to comment
Share on other sites

  • Recently Browsing   0 members

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