Get Cells for a Location

Post » Tue Aug 26, 2014 1:06 am

This question seems so obvious I almost feel silly asking, but after searching everywhere I just can't seem to find it.

In CK there is a clear parent/child relationship between a Location and the Cells it contains.

How can I programmatically get a list of cells for a given location?

(GetParentCell and GetCurrentLocation seem to be of limited use. And there doesn't even seem to be a function to get the Location of a given Cell.)

I'm certain I'm missing something simple and obvious. Thanks in advance for your help.

User avatar
Devin Sluis
 
Posts: 3389
Joined: Wed Oct 24, 2007 4:22 am

Post » Tue Aug 26, 2014 3:10 am

Find something inside the celly of the wanted location and use...

http://www.creationkit.com/HasRefType_-_Location on them? Or maybe this, if loaded area equals to location http://www.creationkit.com/IsAttached_-_Cell

User avatar
Miss Hayley
 
Posts: 3414
Joined: Tue Jun 27, 2006 2:31 am

Post » Mon Aug 25, 2014 9:17 pm

I've tried ALL NIGHT working out how to do this.

And HasRefType is used for aliases that have a LocationRefType assigned to them. IsAttached wont return the location attached, but the cell.

Basically what we need is a bool CellHasLocation() or GetLocationOfCell()

User avatar
James Wilson
 
Posts: 3457
Joined: Mon Nov 12, 2007 12:51 pm

Post » Tue Aug 26, 2014 7:49 am

Looking inside the locations there's a cell tab. Can't you just adress them somehow?

User avatar
Ludivine Poussineau
 
Posts: 3353
Joined: Fri Mar 30, 2007 2:49 pm

Post » Tue Aug 26, 2014 1:00 am

That's the thing and what the OP has pointed out. The link between the two is certainly there, but that same link isn't in papyrus.

You can't do GetParentCell().IsInLocation() either.

There's probably a way, but not a very obvious and friendly way.

User avatar
Sammygirl
 
Posts: 3378
Joined: Fri Jun 16, 2006 6:15 pm

Post » Tue Aug 26, 2014 6:27 am

GetParentCell tells me it's fired on ObjectReference, did you tried...

GetParentCell().GetBaseObject().IsInLocation()

...or similar. Also found this...

http://steamcommunity.com/groups/SkyrimCKPublic/discussions/0/882962698531824096/?l=german

https://coderwall.com/p/kfs8ka

Just figured...cells are forms so you can define them as property... so probably as array[] as well

Cell Property xxx_cell Auto

...then use http://www.creationkit.com/GetCurrentLocation_-_ObjectReference on the property?

User avatar
Susan
 
Posts: 3536
Joined: Sun Jun 25, 2006 2:46 am

Post » Tue Aug 26, 2014 12:09 pm

GetCurrentLocation only works on specific object references, so you can't use it on a cell. I haven't been able to find any useful functions to figure out this relationship either. However, if the cells are listed in the Creation Kit, that data is probably stored somewhere, it just hasn't been exposed to papyrus yet by SKSE.

User avatar
Madeleine Rose Walsh
 
Posts: 3425
Joined: Wed Oct 04, 2006 2:07 am


Return to V - Skyrim