04/08/14, 05:40 AM | #1 |
Need help with ingredients mod
Hello everyone.
I am a total lua beginner but want to create a addon to see the level/tier of ingredients. Because I am a noob in it I stole pretty much everything in my code from various genius modders But now I am stuck. I try to do the same as ingeniousclown with his brilliant research assistant but instead of showing a texture in the column I want to show the user a label with the tier of the item. (The Version with a texture works more or less (of course my database is far from complete)) Lua Code:
Like I said this is a bit stolen so it is for my personal use only until I have permission from ingeniousclown to edit his code and upload it. - But that will come later first I need to understand what I am doing wrong. Sorry for my english I hope you can help me |
|
04/09/14, 04:43 PM | #2 |
So I did a little work - but I have still problems with it...
(sorry for the self reply but I think editing my main would be confusing) This is my main file Lua Code:
it works with this one (to understand the code) Lua Code:
And now it works For interested ones: Issues with the first code #6 control:SetFont("ZoGameFont") has to be "ZoFontGame" #9(new code) label.itemArea = parentWindow:GetNamedChild("Tier") is needed (for some reason) but i have no idea what it does Oo #26 itemName = string.gsub(itemName,"s^p","") will delete also the "s" to the wanted "^p" but the singular name of grapes is still grapes^^ Buuut it doesn't work fine. All the ingredients get the right number (tier) and the color but a lot of other items get numbers and colors too. They shouldn't because " if itemType == ITEMTYPE_INGREDIENT then" should make sure they keep untouched... (Jazbay Grapes are right (they are for a tier 3 green reciepe) but the rest isn't) I think the issue is with the inventory system of eso because the rows are not absolute like place 20/90 = id 20 but it is always the visual row. If I see row 20-30 bagID 1 is row 20. There is the issue I guess because my code may not delete the numbers after they are placed and with sliding all the numbers (if the row is not an ingredient) will still remain at the ID. Which could also lead to the "Double Same Name Children" Error i recieve^^ Soooo.... the only solution I can think of is to delete my table entry if the bagID is not an ingredient... But how can I do that? Or do you have an other solution? Again: Sorry for my english I try but am a bit rusty (and never was really good with it to begin with ) EDIT: An other issue is that my mod will overwrite the changes of the "research assistant" mod (maybe because I copied so much from him Oo) but I don't now why. It shouldn't^^ The table with the children of the inventory ([#8,8]) has only room for his or my mod... EDIT: Ok I have solved everything - sometimes you just have to post a question to find a answer yourself^^ sorry But at the same time I found an AddOn which does the same but better :/ If anyone is interested in my mod I can post it but I will stop working on it (to test the AddOn from Wobin ) Last edited by Tyx : 04/09/14 at 06:01 PM. Reason: Closed |
|
ESOUI » Developer Discussions » Lua/XML Help » Need help with ingredients mod |
«
Previous Thread
|
Next Thread
»
|
Display Modes |
Linear Mode |
Switch to Hybrid Mode |
Switch to Threaded Mode |
|
|