+ Reply to Thread
Results 1 to 4 of 4

Thread: Dimension APIs

  1. #1
    Rift Disciple Galuhad's Avatar
    Join Date
    Feb 2011
    Location
    London, UK
    Posts
    130

    Default Dimension APIs

    Would it be possible please for the Inspect.Zone.Detail(zone) API to return 'Dimension' as part of it's 'type' if the zone is a dimension? I would like a way for an addon I'm working on to be disabled in the normal world. I can do this by checking for 'Dimension' in the location name, but it's a bit hacky and means I need translations for each language.

    Also it would be nice to get the name of the dimension from the API somehow. At the moment, zone and location name both return the landscape name of the dimension (e.g. Dimension: Dormant Core) rather than the player assigned name.

    Thank you
    GALUHAD
    CSTM - Faeblight (RP - NA)
    Dimensions: Elven Retreat | Floods of Isengard (PvP)
    Twitter | Twitch | YouTube

  2. #2
    Rift Disciple Galuhad's Avatar
    Join Date
    Feb 2011
    Location
    London, UK
    Posts
    130

    Default

    Also, an API that gives the item limit for the dimension..
    GALUHAD
    CSTM - Faeblight (RP - NA)
    Dimensions: Elven Retreat | Floods of Isengard (PvP)
    Twitter | Twitch | YouTube

  3. #3
    RIFT Fan Site Operator
    Join Date
    Jun 2011
    Posts
    4,776

    Default

    Quote Originally Posted by Galuhad View Post
    Would it be possible please for the Inspect.Zone.Detail(zone) API to return 'Dimension' as part of it's 'type' if the zone is a dimension? I would like a way for an addon I'm working on to be disabled in the normal world.
    Latest changes to Dimension Tools supports that this info is already there.

  4. #4
    Rift Disciple Galuhad's Avatar
    Join Date
    Feb 2011
    Location
    London, UK
    Posts
    130

    Default

    Quote Originally Posted by Kiwi View Post
    Latest changes to Dimension Tools supports that this info is already there.
    From Dimension Tools:

    Code:
    function Dta.CheckZone(hEvent)
        local DimensionID = Inspect.Unit.Detail("player")
        local ZoneInfo = Inspect.Zone.Detail(DimensionID.zone)
        if string.find(ZoneInfo.name, "Dimension") or string.find(ZoneInfo.name, "˜зме€ение") then
            --Dta.ui.toggleMainWindow()
        else
            if Dta.ui.active then Dta.ui.hideMainWindow() end
            --print(Lang[Dta.Language].Prints.DimensionOnly)
        end
    end
    It would seem that the addon uses the same 'Dimension' search in the zone name as mentioned in the original post. Like I said before, it's not difficult to do, but it is a bit hacky. It also needs a translation for 'Dimension' into each possible client language, otherwise it only works in languages where 'Dimension' is recognised. In the above code, the addon will function fine in English, French, German and Russian, but not at all in Chinese, Korean or Taiwanese.

    An easier solution would be for the Inspect.Zone.Detail(zone).type API (which currently returns: instance, warfront or nil) to include 'dimension' in its list of returns. It's not essential, but it would be a nice addition.
    Last edited by Galuhad; 03-19-2014 at 08:37 AM.
    GALUHAD
    CSTM - Faeblight (RP - NA)
    Dimensions: Elven Retreat | Floods of Isengard (PvP)
    Twitter | Twitch | YouTube

+ Reply to Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts