Can anybody tell me where I can find the full structure/possibilities of the "items" luacore variable?
I know the following:
items.inventory
items.wardrobe
What's the correct syntax for the other repositories? Mog Locker, Mog Safe 2, Storage etc?
Can anybody tell me where I can find the full structure/possibilities of the "items" luacore variable?
I know the following:
items.inventory
items.wardrobe
What's the correct syntax for the other repositories? Mog Locker, Mog Safe 2, Storage etc?
res/bags.lua
Ok thanks.
So, referring to an old request I made some months ago, I finally found some time to check validate.lua
Initially I was trying to add more functions (by default there's only validate_inventory and validate_sets) but after a closer look I found out that the current validate_inventory and related functions, are already written in a way that it accepts parameters, it's just that currently there's an "inventory" default parameter defined.
So changing a few things, I allowed the valdiate_inventory function to accept an additional parameter, this should allow the function to work not only for inventory, but for every item repository, one at a time.
Here it is, explanations after:
Spoiler: show
I only changed these 2 functions. The third one (search_sets_for_items_in_bag) already had an entry parameter called "bag", problem was that it was always called with "items.inventory". It should work with every repository if you actually feed the function with a different value.
So let's see what I changed in the first function.
I basically added parameters for all the other repositories. By default it only accepts "sets" and "inv" as options. Now it's gonna accept many other options, each for every repository type.
Then I slightly changed how the variable "validateType" gets handled, so that I can use it later to call another function without the necessity to create a new specific variable.
In the last "if" of this function I inverted the order. It originally used to be "if inv then ... else validate_sets", now it does the opposite. It checks if it's "sets" and then it calls validate_sets. Otherwise it calls validate_inventory with options and an additional parameter, validateType (see above).
Next I slightly changed validate_inventory function to accept a second parameter, and this second parameter gets used within the function in those places where it had items.inventory. Now it's gonna be items.parameter.
I'm not home so I can't test it, and I won't be home for like ~14 more hours. I would be really happy if someone could test it meanwhile :D
Oh I didn't explain the purpose of this function ><
I created it to "clean up" my repositories.
As I get new items and update my luas, my repositories are full of items which I no longer use, but I forget to delete them or send to mule.
How can I spot all these items that I no longer use in any of my sets?
validate(inv) is an useful function that checks for extra (unused) items that are currently in your inventory but not used in your current lua sets.
What if I could use the same function to check mog locker, storage etc?
And that's why I created it.
Of course, it makes no sense to use this new validate function with a "normal" lua.
You need to create a "special" lua that merges together all the sets of all your jobs' lua. You load this custom lua, and then launch validate. At that point it should work, in theory.
Can create this lua on your own by copy-pasting whatever is inside your "sets" function, or you could use a smarter way like TRV explained in this post.
Just manually load this lua and then launch validate, and it should work!
Can't wait to test it and do some cleaning in my mog house...
No word on Dressup in the works to being fixed? Or did I miss it.
Gear Swap still doesnt allow you to use a /item "Item Name" <t/stnpc/ect> type macro. It jsut acts as if you did nothing at all. especially annoying trying to do the halloween event and had to jsut unload the addon (or use Zaldon or a few other things.) I am not sure but i think it allows you to macro forbidden keys still. Id have to check I havent been to abby in forever.
That sounds more like a Shortcuts issue than a Gearswap one?
No, it's an issue with specific items. There are two item usage packets and I still have no idea why the game uses one vs. the other.
Ok, tested my customization of validate.lua and it sorta works, now you're able to use it for each repository and not just inventory, but still I encountered one major issue, I need guidance to solve it.
Is there a way to create a "fake" lua that includes all of my other LUA files? I have one for each job and I tried to create a blank lua with "include('filename')" for each of my files. I don't get errors, but it doesn't seem to work. Otherwise, can you think of another way to create a big "function get_sets()" that includes all of my function get_sets for my other luas? Tried the method TRZ suggests in this post but it's not working for me, I get errors.
Getting an error
extdata.lua.1878: bad argument #1 to 'match' (string expected, got table)
Gearswap I am pretty sure.
But win/addons/libs
I tried two things so far, first a blank lua with:
Spoiler: show
with this test I get an error on the line 6, says loadfile is a wrong command or returns nil, don't remember, an error related to the loadfile command though.
Then I tried a blank file with this:
Spoiler: show
This doesn't work either, the content of the get_sets within those luas doesn't get loaded.
Not sure I get what it is that you're suggesting me to do D:
Nvm fixed it! I think
Had an extra { on one of my augments
if your trying to get all the sets from each of your gearsets to populate in to one setup there what i said should work but and gearsets with the same name will be overwritten
if this is being done in geqarswap this is what you need but what i just said is true(one line up)
Code:user_files = {MNK', 'RUN', 'DNC', 'PUP', 'NIN', 'THF', 'SCH', 'GEO', 'SMN', 'BRD'} used_gear = S{} sets = {}-- define the sets table, then load the contents of the user files. The gearsets defined in your files will automatically load into sets. for i = 1, #user_files do local path = windower.windower_path .. '/addons/GearSwap/data/' .. user_files[i] .. '.lua' include(path) -- the last set of parenthesis is very important if get_sets then -- check to see if you defined your gear in a get_sets function rather than outside of a function. get_sets() get_sets = nil -- wipe the get_sets function to avoid any conflict with the next files (if they don't contain a get_sets function, etc.) end end
Yeah the solution would be u sing Notepad++, going into each of my jobs' sets, and using the replace function to replace "sets." with "sets.job."
That way each set on each job lua will have a different name and the function you shared above wouldn't overwrite anything.
Worth trying I guess.
Atm I created a file manually with copy/paste lol.
But it was enough to test my changes to validate.lua and they work perfectly. Cleaned my inventory from 9 items already! :D
I won't submit it to github though, doubt anybody else would be interested.