+ Reply to Thread
Results 1 to 8 of 8

Thread: Other beginner questions

  1. #1
    Shadowlander Alisu's Avatar
    Join Date
    Feb 2014
    Posts
    26

    Default Other beginner questions

    Frames:
    I've understood that once created, there is no way to remove frames. That is, even if I don't reference at them from my addon, they still do stay around. In scope of my pie menu addon idea, what would be a proper way to handle them
    a) store unused frames, and reuse them later, or
    b) just wantonly create new frames and recommend the user to reloadui after editing his ring configuration, which shouldn't happen all that often after all.

    File Order:
    Can I assume the multiple files of the addon are loaded in the order they are listed in the RiftAddon.toc. I'm passing data between them with the first lines
    local addon, RPie = ...
    Can I assume that something defined in a file earlier in the loading order is usable in later listed file, or does it even matter?

    Enter World Event:
    Is there some definitive event I can use to judge the whole gameworld has been loaded. Some values I have tried to initialise with Inspect.* functions have turned out to have nil values, only on login, not in reload, which I assume has been due the values not been available yet when I ran the function during SavedVariablesLoaded

    maybe more questions will follow...

  2. #2
    Shield of Telara Adelea's Avatar
    Join Date
    Mar 2011
    Posts
    734

    Default

    Regarding player entering the world - if you only really care about when they are available the first time, and you dont care about if they teleport etc, then the most reliable way I have found is:

    Code:
    local function Event_Unit_Availability_Full(h,t)
    	for k,v in pairs(t) do
    		if v == "player" then
    			-- Player is loaded. Do stuff.
    			Command.Event.Detach(Event.Unit.Availability.Full, nil, nil, nil, addon.identifier)
    		end
    	end
    end
    
    Command.Event.Attach(Event.Unit.Availability.Full, Event_Unit_Availability_Full, "Event.Unit.Availability.Full")
    From experience, files are indeed loaded in the order they are given in the RiftAddon.toc file, and things defined in the previous ones are available in the later ones.
    http://forums.riftgame.com/image.php?type=sigpic&userid=125779&dateline=13553  38065

  3. #3
    Shadowlander Alisu's Avatar
    Join Date
    Feb 2014
    Posts
    26

    Default

    That settles those two questions
    New one, partial textures:
    I got this funny idea of trying to make my dialog look the same as rifts own dialogs, for example, macro window. They are compartmentalised with various size of box graphics layered on top of each other and I even found the right graphic with texture viewer. However, the size of it is 512x512 and I'd need something half of that width for the left window column. If I just use that texture to correct size frame, it stretches badly. I'm pretty sure that the system which actually draws the native windows (something else than lua frames) uses some kind of partial stretching where it keeps the edges/corners of the image intact and just stretches the inner parts.

    Is there a way to use only part of a texture to cover a frame, or extract the said texture so that I can edit outside of the game a correctly proportioned one and use that instead? The only solution I have figured out this far would be to use complex set of frames and masks just for one partial window background...

  4. #4
    Shield of Telara Adelea's Avatar
    Join Date
    Mar 2011
    Posts
    734

    Default

    You can use Mask frames for this I think, but they are performance killers.

    You are probably better off just making your own images as png's and using those.
    http://forums.riftgame.com/image.php?type=sigpic&userid=125779&dateline=13553  38065

  5. #5
    Shadowlander Alisu's Avatar
    Join Date
    Feb 2014
    Posts
    26

    Default

    Is there a way to extract the textures from Rift so that I can edit my own texture from proper looking ones. Making my own from scratch is pretty much the same as using just colored boxes, it wouldn't look right anyway.

  6. #6
    RIFT Guide Writer Noshei's Avatar
    Join Date
    Feb 2011
    Posts
    1,886

    Default

    Quote Originally Posted by Alisu View Post
    Is there a way to extract the textures from Rift so that I can edit my own texture from proper looking ones. Making my own from scratch is pretty much the same as using just colored boxes, it wouldn't look right anyway.
    there are some textures on ftp://ftp.trionworlds.com/rift/

    other than that screenshots are the only way to extract textures from in game.

  7. #7
    Shadowlander Alisu's Avatar
    Join Date
    Feb 2014
    Posts
    26

    Default

    The ftp mainly consists things like ability icons and item icons, usefull for websites, not so for dialog window building. The parts I need are some of halftransparent backdrops which can be found with the texture viewer but.. *sigh*.. It's frustrating to be so close but yet so far. Getting them out of screenshots is certainly impossible. I hope the other thread where that graphical guy promised some addon assets will prove fruitfull..

  8. #8
    Shadowlander Alisu's Avatar
    Join Date
    Feb 2014
    Posts
    26

    Default

    I was able to create what I want with three canvases and some texture transformation matrixes, Apparently, unlike in normal Texture frame, on canvas the texture is applied in it's natural size and the scaling of it can be controlled. I have no idea how this compares to the performance hog of masks though, nor if it only does the calculation once when the object is created, or in every frame update tick. Since there is no option for partial scaling I still have to do it in pieces.

+ 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