Jump to content

[LE] How can I get the display name of the location I'm in?


Recommended Posts

Hello! I can't figure out a simple way to get location.name() or something along those lines for the location that I'm in. I can use GetCurrentLocation and get a ton of other information, but not the name. I would like to, at any given point, display in a notification where the player is located, for example:

 

"I am in Whiterun" or "I am in Winterhold"

 

The dirty way would be to load ALL locations in as properties, and then do a big IF/ELSEIF block against GetCurrentLocation, but the primary issue is that this needs to work for all DLC, and all new lands mods. And I want to do it cleanly.

 

I feel like there are ways to get at this value because it's displayed in-game at various times. I saw something about quests/aliases in my searching, but it's a little baffling to me that if I have the current location as an object, why I can't just display the name, and have to build a quest with aliases/etc. just for that.

 

Any thoughts? Thank you!

Link to comment
Share on other sites

Because those names are their editor IDs..which is impossible to get. And while GetName will return the name, it will not return say "WhiterunHold". Just "Whiterun".

 

Ah, but that's not 100% accurate, all location records have both EditorID and Name, where Name is the full string, as seen here: http://i.imgur.com/uz1R5Fj.jpg

 

(I know it won't say "Hold", I was just using that as an example of the eventual message I would like to show, using a placeholder or AliasMarker for the hold itself, i.e. Whiterun.) :)

 

My qualm with the method you outlined is that it requires piping in all of the locations as properties, which is something I absolutely want to avoid. I want to dynamically look up and display the area I'm in, even if it means having to run a quest and filling the alias. I want it to be "future-proof" / compatible with every new land mod.

Link to comment
Share on other sites

Well good luck but I know a lot about locations that most people do not know. Also you wouldn't have to "pipe" ALL the locations..there are things you do not know that need to be taken into account that has not been uncovered in those links, nor on any mod on the nexus..

Edited by Terra Nova
Link to comment
Share on other sites

  • 4 years later...
  • 1 year later...

A little late I know but: playerRef. GetCurrentLocation().GetName() This will give you the name of the place your at.

 

I'm trying to get this to work to give me the name of the location of a xmarkerheading ref, as xmarkerheadingREFname = nameofREF.GetCurrentLocation().GetName() and it sometimes returns a value, and sometimes not, funny, as I'm loading some values and for one of them it shows the location and the other it doesn't and both markers are located in Jorrvskar <sp?>, weird.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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