Jump to content
Alloder.pro: about Allods with love
Search In
  • More options...
Find results that contain...
Find results in...

New program for writers

We turn from quantity to quality and tell you how we will supplement the Allods Team program with rewards in rubles.

More

The new Updater

Let us to introduce the new addon updater software and to share the details

Read more

Alloder 2.0

We have started the process of project evolve, and this relates not only, and not even primarily of the site's view

Read more

Default nameplate (Frames) addon


Guest ztealmax
 Share

Recommended Posts

Guest ztealmax

hello is it possible to get hold of the original addon for ui for player, target, group etc?

I would love to just change the texture on the default Plates

Link to comment
Share on other sites

  • 2 weeks later...
Guest ztealmax

icreator hi and thank you for your response

im not sure how to use this code you posted to change default textures for nameplates?

Any hints would be greatly apriciated

Sincerally

Martin

Link to comment
Share on other sites

stateMainForm:GetChildUnchecked("Plates", false):GetChildUnchecked("Target", false):GetChildUnchecked("Frame", false):SetBackgroundTexture(common.GetAddonRelatedTexture("NameofTexture"))

I think that will do the work xD

Correct me if i'm wrong.

Link to comment
Share on other sites

  • 3 months later...
Guest ztealmax

Could anyone please make me a working example so i can get started that would be greatly appriciated it would help me understand better how

it is coded :D

Maybe send it to [email protected] or add me to fb https://www.facebook.com/rootaccount (must be logged in to view)

For example just change the texture for the healthbar maybe in PLATES?

Just give me some hints on how to start what files are needed in /addons/myownaddon/*.*

For me this would really enhance the gaming experience :P

iguess this is whats needed inside the folder?

script.lua

AddonDesc.(UIAddon).xdb

MainForm.(WidgetForm).xdb

If so all that remains is what the ... shall be in them ;)

??

Sincerally

Martin

Link to comment
Share on other sites

Do u use skype? Mine is in my profile.

You need a texture. That's the main point. You need a type of texture that is used in that UI element.

I am not sure about all the differences between (WidgetLayerTiledTexture) and (WidgetLayerTiledTexture), first one stretches on resizing and second "inserts texture spacers" if u understand me (Imagine a scroll where there are just 2 lines written, and a scroll where is like 10-15 lines, but their "headers" and "bottoms" are same size, only space between them increases).

I think u need to replace the existing texture with that of same type, but i am not sure.

Also you need an (UIRelatedTextures).xdb file with proper content.

There should be all your textures listed and named.

For example, a function common.GetAddonRelatedTexture("NameofTexture") gets you (it would be proper to say "returns", if you're familliar with programming) a texture named "NameofTexture" from your addon's related textures.

A function SetBackgroundTexture(self, parameter) sets background texture of panel before semicolon to one stated in parameter.

For example the code:

w:SetBackgroundTexture(IAmATexture)

Sets a texture called IAmATexture as background to widget called w.

Code

w:SetBackgroundTexture(common.GetAddonRelatedTexture("NameofTexture"))

Sets a texture found in related textures files under the name "NameofTexture" to widget called w.

You may also do the:

Texture = common.GetAddonRelatedTexture("NameofTexture")

w:SetBackgroundTexture(Texture )

With the same result.

Function :GetChildUnchecked("Plates", false) returns (gives you) the child of vidget called "Plates".

stateMainForm:GetChildUnchecked("Plates", false) searches all the childs of stateMainForm, and if he finds the one called "Plates" - it returns it (i.e. a link to it, so you can operate it).

Code:

stateMainForm:GetChildUnchecked("Plates", false):GetChildUnchecked("Target", false):GetChildUnchecked("Frame", false)

Returns you a child called "Frame" of a child called "Target" of a child called "Plates" of stateMainForm.

If you imagine it as a windows explorer (or a tree), it returns you the 4-th branch of thee "stateMainForm", like:

stateMainForm->Plates->Target->Frame. or stateMainForm\Plates\Target\Frame (however, the last comparsion is not accurate, i would rather say barbarianish).

So, basically what you need to do is get a "links" to all your panels (like target's frame) and set them all new textures.

Link to comment
Share on other sites

You can see a properly filled (UIRelatedTextures).xdb file in "UnitDetector"(or many others) addon.

Example:

Code:
<?xml version="1.0" encoding="UTF-8" ?>

<UIRelatedTextures>

<Items>

<Item>

<name>DRUID</name>

<textureItem href="Classes/Druid.(UISingleTexture).xdb#xpointer(/UISingleTexture)" />

</Item>

<Item>

<name>MAGE</name>

<textureItem href="Classes/Mage.(UISingleTexture).xdb#xpointer(/UISingleTexture)" />

</Item>

</Items>

</UIRelatedTextures>

If you have such file (exactly like in example) then you may use common.GetAddonRelatedTexture("DRUID") and common.GetAddonRelatedTexture("MAGE"), which will return appropriate textures (Classes/Druid.(UISingleTexture).xdb#xpointer(/UISingleTexture) and other for mages one).

Link to comment
Share on other sites

Guest ztealmax

Thank you so much for this now i can fiddle around with this :P

Another question , any one know if there is something like Global UI scale? like i think all PLATES are to big should be about 70% instead of current 100%

any commands for that?

Link to comment
Share on other sites

Search for set shrink ratio.

Not sure about usability.

BTW default size of screen is 1280x1024, if you have different screen resolution, all textures may be properly (or not properly) resized.

It is also advised to use high quality textures so people with resolutions 1600x1200 and more will see good pictures instead of terraria/minecraft art xD

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...

Important Information

By using our site you agree to the Terms of Use