Kapteyn Posted October 8, 2017 Share Posted October 8, 2017 (edited) 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 October 8, 2017 by Kapteyn Link to comment Share on other sites More sharing options...
simtam Posted October 9, 2017 Share Posted October 9, 2017 (edited) 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 Patchhttps://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 October 9, 2017 by simtam Link to comment Share on other sites More sharing options...
Kapteyn Posted October 9, 2017 Author Share Posted October 9, 2017 (edited) 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 October 9, 2017 by Kapteyn Link to comment Share on other sites More sharing options...
Kapteyn Posted October 9, 2017 Author Share Posted October 9, 2017 (edited) 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 October 9, 2017 by Kapteyn Link to comment Share on other sites More sharing options...
Recommended Posts