Thread Rating:
  • 6 Vote(s) - 2.67 Average
  • 1
  • 2
  • 3
  • 4
  • 5
fishing collectables
#11
for me it works nice the way it is. I never have more than a few red scrip fish in, and sometimes a blue one, so I can use the rest for Reducables that I just set to 1. Of course you have to realize that there's no more semi-manual collectable fish mode, I guess that's what irritates some ppl ;)
Reply
#12
I want to catch large amounts of collectible fish for the achievements, however, I don't know how to do that now with the way it's set up. Why does the collect ability get removed automatically and how do I stop that??
Reply
#13
I also doesn't understand how this work now... Pardon me if I am missing something >.<
Reply
#14
Issued some rework so that those of you who can't/won't learn how to use profiles can continue doing things semi-manual or whatever you're doing now.

@Underwhelp, to help explain why you're not getting the results you want, let me explain this section of code you're looking at.

Code:
for i = 1,15 do
                local var = _G["gFishCollectibleName"..tostring(i)]
                local valuevar = _G["gFishCollectibleValue"..tostring(i)]

The important part of this, is not the loop counter, it is the last 2 lines. 1-15 is simply the counter to concatenate the number onto the GUI variables we have created in the UIInit(). Without these GUI variables being in existence, you could count to a million, but only 1-15 will do anything.


In the UIInit() we have to create these variables as such.
Note that the only thing the collectibles table is even used for is default values for these GUI items.
Code:
for i = 1,15 do
        Settings.FFXIVMINION["gFishCollectibleName"..tostring(i)] = IsNull(Settings.FFXIVMINION["gFishCollectibleName"..tostring(i)],ffxiv_task_fish.collectibles[i].name)
        Settings.FFXIVMINION["gFishCollectibleValue"..tostring(i)] = IsNull(Settings.FFXIVMINION["gFishCollectibleValue"..tostring(i)],ffxiv_task_fish.collectibles[i].minimum)
    end

Here, the (47,120) basically means we want all UI items that are 47 (seafood), which have an item level of 120 or higher. If you wanted to produce items lower than this, you will need to adjust this number or it will not appear in the combobox.

Code:
local group = "Collectible"
    local uistring = IsNull(AceLib.API.Items.BuildUIString(47,120),"")
    for i = 1,15 do
        GUI_NewComboBox(winName,"Collectible","gFishCollectibleName"..tostring(i),group,uistring)
        GUI_NewField(winName,"Min Value","gFishCollectibleValue"..tostring(i),group)
    end

Code:
for i = 1,15 do
        _G["gFishCollectibleName"..tostring(i)] = Settings.FFXIVMINION["gFishCollectibleName"..tostring(i)]
        _G["gFishCollectibleValue"..tostring(i)] = Settings.FFXIVMINION["gFishCollectibleValue"..tostring(i)]
    end

For the rest of the loop, it simply checks each value-pair in the GUI items using the information we pulled in the first part up top.

Code:
                if (var and var ~= "" and tonumber(valuevar) > 0) then
                    local itemid = AceLib.API.Items.GetIDByName(var,47)
                    if (itemid) then
                        if (info.itemid == itemid) then
                            if (info.collectability >= tonumber(valuevar)) then
                                validCollectible = true
                            else
                                fd("Collectibility was too low ["..tostring(info.collectability).."].")
                            end
                        else
                            fd("Collectible was not the item we are looking for.")
                            fd("Looking for ["..tostring(itemid).."], got ["..tostring(info.itemid).."]")
                        end    
                    else
                        fd("Could not find an item ID for:" .. var)
                    end
                end
            end

TL;DR - The table is just a reference for defaults, the GUI is what is being read.
Reply
#15
Ace thanks for the explanation !
Reply
 


Forum Jump:


Users browsing this thread: 3 Guest(s)

We help you win the game.

FFXIV Bot and More.

 

Products