Talk:Detect If Current Cell Is Wilderness Cell

From the Oblivion ConstructionSet Wiki
Jump to navigation Jump to search

Original Discussion[edit source]

Get In Wilderness?[edit source]

Dragoon Wraith TALK 18:49, 22 July 2006 (EDT): Is there any way to determine if an object is in a "Wilderness" cell, that is, not in a named cell, short of making sure he's in any of the named cells? I really don't feel like checking for every cell other than the one I want to make sure he's in one of the outside cells, and besides, that won't work with mods that change cells from Wilderness cells to actual places (like Frostcrag or something). I'd appreciate help here.

I'm guessing
player.getincell wilderness
doesn't work? Treleth 21:24, 22 July 2006 (EDT)
Dragoon Wraith TALK 22:10, 22 July 2006 (EDT): No, it doesn't, because GetInCell only works for interiors.
ShadowDancer 22:25, 22 July 2006 (EDT): K, so do you mean he is outside of one of the towns and not in a dungeon? If you are looking to make sure that he is not "in an interior" the scripting is as follows:
Begin GameMode
   If XXX.GetInWorldSpace Tamriel == 1
      **Whatever coding**
   EndIf
End
Or you can do whatever if the condition is checked != 1 as the case may be depending on what you are trying to do. Hope that helps. It will also return false if the object you are checking is in one of the City Worlds or Oblivion Worlds. If you are just looking to find out if they are in a cell named Wilderness, then I don't have a clue other than checking every other named cell.
Dragoon Wraith TALK 00:33, 23 July 2006 (EDT): Well, no, because there are places with their own names that don't have their own worldspaces, so that doesn't really do me much good... Ah, well, never mind, I won't bother trying to do it then. Wasn't that important.
ShadowDancer 10:08, 23 July 2006 (EDT): Have you tried GetInCellParam? I haven't ever tried it so I don't know if it will work or not, but it doesn't say that it only works on interior cells. If it works on exterior cells, it should work fine as long as you are checking against an actor or the player.
Dragoon Wraith TALK 12:00, 23 July 2006 (EDT): Haven't tried it, but "same functionality as GetInCell" reads to me to mean that it has the exact same workings, i.e. same limitations. Maybe I'll test it later - at the moment, I have no need for it, as I've figured out a better way to do it anyway.
Sarkandar 19 October 2006: Of course months later, but a solution for this is to create a dummy interior cell called Wilderne (no this is not a typo) with nothing in it. Now you can do getincell on that one as it is an interior. The beauty of this solution is that this returns true if the name is included in the actual cell's name, so it will return true in a wilderness cell.
Dragoon Wraith TALK 18:52, 19 October 2006 (EDT): That's brilliant, thank you!

From Q/A to Tutorial[edit source]

Err... DW, do you remember if this works or not? I think I saw it recently on the forums, so I'll try searching... couldn't find it but if anyone else remembers...--Haama 03:51, 13 March 2008 (EDT)

Never used it, so I can't say. I can test it if you don't find anything.
Dragoon Wraith TALK 06:09, 13 March 2008 (EDT)
Yeah, it works. Vanilla scripts use the same approach - there are cells named "IC" and whatnot that can be tested against in exterior cells to find out if the player's in the Imperial City. Scruggs 11:50, 15 March 2008 (EDT)
Thanks Scruggsy. I'll change this into a short tutorial, then.--Haama 14:17, 15 March 2008 (EDT)
Some questions, though - would GetInWorldspace need to be used instead of GetInCell? Does it really check in the middle of the name (I've only messed with Oblivion cells).
For the wiki, should this be like the MessageBox Tutorial?--Haama 15:06, 15 March 2008 (EDT)

Possibility for Mod Conflict?[edit source]

I currently created 3 new cells to make my companion say specific things when in specific parts of the world. These cells are named 'Chapel', 'Inn', and 'Lodge' to encompass all Chapel, Inn, and Lodge interior cells in Tamriel. I'm worried that it may conflict with mods who do the same. If two cells are named the same from different mods will it conflict? And is there a better way to do this short of defining each single cell where in a lengthy OR list? --S14 02:41, 3 September 2010 (EDT)

Not a concern. Unlike Morrowind, in Oblivion everything has a FormID, and the first two digits of the FormID are always equal to the mod's place in the load order. Thus, no two mods can have the same FormID, since the first two digits will always be different, so they cannot conflict. Oblivion can handle cells with the same name without a problem, as long as they have different FormIDs.
Dragoon Wraith TALK 10:30, 3 September 2010 (EDT)