Custom Gearswap Validate To Clean-up Inventory

言語: JP EN DE FR
2010-06-21
New Items
users online
フォーラム » Windower » General » Custom Gearswap Validate to clean-up Inventory
Custom Gearswap Validate to clean-up Inventory
First Page 2
 Asura.Sechs
Offline
サーバ: Asura
Game: FFXI
user: Akumasama
Posts: 9876
By Asura.Sechs 2020-03-12 17:53:22  
LAST UPDATE: 22 February 2022
*** These functions have been integrated into DEFAULT validate.lua! You will no longer need to temporarily overwrite the basic validate.lua with my custom one. ***



Hi, a long time ago I developed a custom version of the "Validate" version of Gearswap. I recently used it again to clean up my inventory, and decided to share it, maybe someone else could find it useful.


What is the Validate lua?
It's one of the Gearswap "libraries".
By default there are only two modes
Validate Inventory => It tells you if any item in your inventory, is not part of your currently loaded Job Lua
Validate Sets => Tells you if all of the items present in your currently loaded Job Lua, are present in your inventory or in Wardrobe1-4

My custom version enhances the first command. It basically allows you to validate each repository individually instead of just the inventory, and it will tell you if any of the items in that specific repository are not part of any of your lua.


Where can I find it?
You can find it HERE.


How can I use it?
As of February 2022 these functions are now built-in with the default Gearswap Validate.lua
Well, there are several steps you need to perform before being able to use this custom validate.
You basically just need to overwrite the default Validate, and then create a "fake" lua by merging all the gearsets from all your luas.
There is an alternate and much easier method to create a fake lua, check this post!

Let's see which are the steps to follow:

1) Backup the current Gearswap Validate (once you're done cleaning up, you will have to recover the original Validate file, overwriting my custom one).
2) Overwrite the Gearswap default Validate.lua with my custom version. If you're already in-game, you will need to re-load Gearswap.
3) Create a fake Lua for a job you never use. It has to be almost empty, just with the following lines
Code
function get_sets()
end
4) Pick one of your regular jobs lua. Copy ALL of the content of your get_sets function (basically all of your sets) then paste that into a blank lua
5) With notepad++ you need to edit the stuff you have just pasted. For example all of my sets begin with sets.* Set Notepad++ to replace the string "sets." with the string "sets.job."
Of course put the job those sets refer to in place of "job". This will take like 2 seconds with Notepad++ if you use the "replace all" button.
6) Once you're done, select all of the stuff in the blank lua, cut it, then paste it into the get_sets function of the fake lua you created on step 3 of this list
7) Rinse and repeat steps 4-6 until you've done it for all your jobs, then save the fake lua.
8) Swap to the job the fake lua refers to
9) Use the command "//gs validate repositoryname"

In place of repository name you can use one of these strings:
  • inventory / inv / i

  • mogsafe / safe / ms / bank

  • mogsafe2 / safe2 / ms2 / bank2

  • storage / st

  • moglocker / locker / ml

  • mogsatchel / satchel / sa

  • mogsack / sack / sk

  • mogcase / case / ca

  • wardrobe / w

  • wardrobe2 / w2

  • wardrobe3 / w3

  • wardrobe4 / w4

  • wardrobe5 / w5

  • wardrobe6 / w6

  • wardrobe7 / w7

  • wardrobe8 / w8




Edit:
Small note.
If you use a lot of aliases and have all of them concentrated in a single lua, probably all of your jobs lua have an include.
Like, for example "include('Aliases.lua')"
If you have such an include file, you need to add it into the fake lua as well, at the beginning, before the get_sets function.
[+]
 Asura.Sechs
Offline
サーバ: Asura
Game: FFXI
user: Akumasama
Posts: 9876
By Asura.Sechs 2020-03-12 17:56:27  
For instance I used this yesterday after not using it for almost 2 years and found 9 items I no longer use that were taking space in my repositories.
Sent them to my mules and gained inv+9, YAIIII xD

It's a long and convoluted process, but I do it so rarely I'm fine with it.
[+]
 Bismarck.Xurion
Offline
サーバ: Bismarck
Game: FFXI
user: Xurion
Posts: 693
By Bismarck.Xurion 2020-03-12 19:17:31  
This can be super valuable considering how unlikely we are to see an increase in bag space. Thanks for sharing!
 Asura.Trumpet
Offline
サーバ: Asura
Game: FFXI
user: Trumpet
By Asura.Trumpet 2020-03-13 08:20:49  
I've been wanting a way to do this exact thing for a while, thanks!
 Valefor.Gorns
Offline
サーバ: Valefor
Game: FFXI
user: Gorns
Posts: 159
By Valefor.Gorns 2020-03-13 08:23:35  
I've been waiting for this custom since ages, thanx alot !
 Asura.Botosi
Offline
サーバ: Asura
Game: FFXI
user: Botosi
Posts: 375
By Asura.Botosi 2020-03-13 08:27:47  
Awesome, thank you! Havent tested it out yet, but this is super nice. So many times I've had items in my gearswap later to find out they were in my Locker or Storage.
 Asura.Sechs
Offline
サーバ: Asura
Game: FFXI
user: Akumasama
Posts: 9876
By Asura.Sechs 2020-03-13 09:03:47  
The only
Valefor.Gorns said: »
I've been waiting for this custom since ages, thanx alot !
It's been out for years! Since before Wardrobe 3 & 4 existed, that's a long time ago lol.
It's just that I use it rarely, like once per year or something like that, so I always forgot to share it.

The only annoying part of this is the process where you have to create a "fake" lua merging the sets of EACH of your jobs.
And also the fact that you need to rename all your sets BEFORE you paste them into the fake lua, otherwise there will be failures.
This is the reason why in my guide I said you have to first paste the sets you copied from a Job's lua into a blank page, use Notepad++ to make all those set names unique, then paste the sets with modified names into the "fake lua".

I'm sure there could be a way to make this process easier with a Specific addon, but I really have no time/will to create yet another addon, sadly ;_;
 Sylph.Feary
Offline
サーバ: Sylph
Game: FFXI
user: feary
Posts: 455
By Sylph.Feary 2020-03-13 10:04:51  
how does this differ from Gearswap Validate Function?

edit. i see that you've expanded the commands for validation of each bag not just inventory or all bags.
 Bahamut.Dannyl
Offline
サーバ: Bahamut
Game: FFXI
user: dannyl
Posts: 1548
By Bahamut.Dannyl 2020-03-13 10:21:47  
This is pretty cool.

I did something similar on a different level by copy-pasting all of the Moogle Slip items into a lua and doing //gs org to attempt to get all my items out of the areas for storage. This was before I heard about the Porter Slip lua which I still haven't used

I'll give this method a try

:thumbsup;
 Asura.Sechs
Offline
サーバ: Asura
Game: FFXI
user: Akumasama
Posts: 9876
By Asura.Sechs 2020-03-13 10:51:27  
Sylph.Feary said: »
how does this differ from Gearswap Validate Function?

edit. i see that you've expanded the commands for validation of each bag not just inventory or all bags.
I thought I explained it like, in the first post of this thread? °-°

Gearswap by default offers 2 ways to use Validate.
One tells you how many items present in your currently loaded Lua are missing from your Inventory/W1/W2/W3/W4.
The other method tells you how many items in your inventory are NOT present in your currently loaded lua.

My version allows you to use this second method not only for Inventory, but for each repository (one at a time).
With this and a special "fake lua" that merges all of the sets from all of your jobs luas, you can basically check each repository one by one hunting for items that are there but not present in any of your sets.
Meaning you can send those items to your mule, or trash them, or whatever else.

Is it clearer now? ;-)



Edit:
My version is meant only for TEMPORARY USE.
Meaning you "install" it, do what you have to do with it, once you're done you need to re-enable the regular default validate.lua
 Sylph.Feary
Offline
サーバ: Sylph
Game: FFXI
user: feary
Posts: 455
By Sylph.Feary 2020-03-14 06:12:39  
Asura.Sechs said: »
Sylph.Feary said: »
how does this differ from Gearswap Validate Function?

edit. i see that you've expanded the commands for validation of each bag not just inventory or all bags.
I thought I explained it like, in the first post of this thread? °-°

Gearswap by default offers 2 ways to use Validate.
One tells you how many items present in your currently loaded Lua are missing from your Inventory/W1/W2/W3/W4.
The other method tells you how many items in your inventory are NOT present in your currently loaded lua.

My version allows you to use this second method not only for Inventory, but for each repository (one at a time).
With this and a special "fake lua" that merges all of the sets from all of your jobs luas, you can basically check each repository one by one hunting for items that are there but not present in any of your sets.
Meaning you can send those items to your mule, or trash them, or whatever else.

Is it clearer now? ;-)



Edit:
My version is meant only for TEMPORARY USE.
Meaning you "install" it, do what you have to do with it, once you're done you need to re-enable the regular default validate.lua

yes thank you
 Asura.Sechs
Offline
サーバ: Asura
Game: FFXI
user: Akumasama
Posts: 9876
By Asura.Sechs 2020-03-15 17:48:09  
Out of curiosity, did anyone manage to make it work? :D
 
Offline
Posts:
By 2020-03-30 03:40:34
 Undelete | Edit  | Link | 引用 | 返事
 
Post deleted by User.
 Asura.Sechs
Offline
サーバ: Asura
Game: FFXI
user: Akumasama
Posts: 9876
By Asura.Sechs 2020-04-09 18:20:45  
Asura.Dexterm said: »
Followed the directions and it just throws an error.
Sorry, just noticed this reply.
Which error are you getting? Maybe I can help you solve it.

If you can offer detail on the error and/or screenshot I'm pretty sure we can solve the issue!
necroskull Necro Bump Detected! [42 days between previous and next post]
 Asura.Trumpet
Offline
サーバ: Asura
Game: FFXI
user: Trumpet
By Asura.Trumpet 2020-05-21 06:58:59  
Might be bc I'm using a bastardization one of those mote based luas, but I can't quite get it to work for multiple job sets. Toying around with it, I got it to load without errors for at least one job by doing
Code
function get_sets()
mote_include_version = 2
include('Mote-Include.lua')
include('Globals.lua')	
end

function init_gear_sets()
allmystuffhere
end


but it throws an error whenever I try to change "sets." to "sets.cor" for all the gears. "Attempt to index field 'cor' (a nil value)"

Any ideas? I can honestly prob make even this work well enough with a little extra manual keeping track of results by job... but your results sound way easier ^^
necroskull Necro Bump Detected! [31 days between previous and next post]
 Asura.Finbar
Offline
サーバ: Asura
Game: FFXI
user: Finbar
Posts: 86
By Asura.Finbar 2020-06-21 05:18:54  
Trying to use this, but I can't get around some errors.

Code
Lua runtime error: gearswap/flow.lua:350:
Gearswap has detected an error in the user function get_sets:
...nlineWindower4/addons/gearswap/data/Finbar_DRG.lua:13: attempt to index field 'BLM' (a nil value)


If I ignore it and try to validate a repository, I get:

Code
Lua runtime error: gearswap/validate.lua.250: bad argument #1 to 'pairs' (table expected, got nil)
 Sylph.Ticktick
Offline
サーバ: Sylph
Game: FFXI
user: mofat
Posts: 116
By Sylph.Ticktick 2020-07-05 02:12:46  
i made this tiny wrapper gearswap file for easily generating the "fake lua" containing all your jobs gear.
Code
-- Initialization function for this job file.

local jobs = T{ "BLU", "COR", "DNC", "DRG", "MNK", "NIN", "PUP", "RUN", "SCH", "THF" }

mysets = {}

for k,v in pairs(jobs) do
	include(v .. '.lua')
	get_sets()
	mysets[v] = sets
	sets = {}
 end


function get_sets()
	for k,v in pairs(mysets) do sets[k] = v end
end


I keep it in a file named all.lua, which can be loaded with "//gs load all"

my gearswap files are named DRG.lua etc. so if you use <character name>_<job>.lua format then make the entries in the jobs list like "Ticktick_DRG".

I don't guarantee this will work for people doing anything extra fancy in their gearswap files.
[+]
necroskull Necro Bump Detected! [78 days between previous and next post]
 Sylph.Funkworkz
VIP
Offline
サーバ: Sylph
Game: FFXI
user: Funkworkz
Posts: 1404
By Sylph.Funkworkz 2020-09-21 09:29:40  
Bumping post for visibility, thank you for this.

Also thanks to your all.lua Ticktick. Just a warning that if you do this all of your overlays, all lockstyles, all chat input appears at once lol

I also recommend something like logger in order to get your list out of game.
[+]
 Asura.Sechs
Offline
サーバ: Asura
Game: FFXI
user: Akumasama
Posts: 9876
By Asura.Sechs 2020-09-27 11:11:15  
Oh that's awesome Ticktick, didn't have a time to test it but it looks promising! Gonna add your post in the guide, so that people can use your method instead of yours.

Thanks for adding this! And glad people are enjoying this custom validate.lua :-D
necroskull Necro Bump Detected! [180 days between previous and next post]
 Asura.Sechs
Offline
サーバ: Asura
Game: FFXI
user: Akumasama
Posts: 9876
By Asura.Sechs 2021-03-26 19:46:34  
Bumping this, friend wanted to make use of this tool to clean up his inventory.

Maybe this thread could be stickyed somewhere, if the mods find it any useful?
[+]
necroskull Necro Bump Detected! [309 days between previous and next post]
 Odin.Lusiphur
Offline
サーバ: Odin
Game: FFXI
user: Chakan
Posts: 229
By Odin.Lusiphur 2022-01-30 04:04:49  
Bumping this because apparently the majority of players need to use it.
 Asura.Sechs
Offline
サーバ: Asura
Game: FFXI
user: Akumasama
Posts: 9876
By Asura.Sechs 2022-01-30 10:40:16  
Can we make this topic sticky? Every time I need to go find it for friends it's a pain lol
 Bismarck.Xurion
Offline
サーバ: Bismarck
Game: FFXI
user: Xurion
Posts: 693
By Bismarck.Xurion 2022-01-30 13:21:47  
Bismarck.Xurion said: »
This can be super valuable considering how unlikely we are to see an increase in bag space. Thanks for sharing!
Eat your words, noob.
[+]
 Asura.Neviskio
Offline
サーバ: Asura
Game: FFXI
user: Neviskio
Posts: 115
By Asura.Neviskio 2022-01-30 22:54:22  
Found the topic thanks to lusiphur, only issue is I'm using selindrile gearswaps and it's not playing nice with it, was trying to use the all.lua from TickTick and yeah I seem to be getting errors.

What I've done is make a backup of old validate, got the one from sechs, reloaded GS, created the all.lua from ticktick, added the jobs I wanted, and loaded it.

As soon as I load the all.lua I get these errors
Code
lua runtime error: gearswap/flow.lua:354:
gearswap has detected an error in the user function self_command:
...(x86)Windower/addons/gearswap/libs/sel-include.lua:1466: attempt to index field 'weapons' (a nil value)


I've not tried manually copying the sets but might try it at some point, altho I dread the idea if you've played a lot of jobs with selindrile GS >.<
 Asura.Sechs
Offline
サーバ: Asura
Game: FFXI
user: Akumasama
Posts: 9876
By Asura.Sechs 2022-02-09 16:17:31  
Should ask Selindrile maybe. Never seen his Luas so I can't really help ya with that :x
 Asura.Sechs
Offline
サーバ: Asura
Game: FFXI
user: Akumasama
Posts: 9876
By Asura.Sechs 2022-02-10 03:21:17  
I need to update this to work on Wardrobes 5-8.
Will do it in the next days.
Should still work perfectly for all the other repositories, I think.

Please let me know if you find new errors after the latest patch (february 2022)
[+]
 Asura.Sechs
Offline
サーバ: Asura
Game: FFXI
user: Akumasama
Posts: 9876
By Asura.Sechs 2022-02-15 08:23:05  
Ok updated it with the 4 new wardrobes.
Tested it quickly and everything seems to be working.

Let me know if something is wrong!
[+]
Offline
Posts: 164
By Spookyfish89 2022-02-15 12:51:59  
Asura.Neviskio said: »
Found the topic thanks to lusiphur, only issue is I'm using selindrile gearswaps and it's not playing nice with it, was trying to use the all.lua from TickTick and yeah I seem to be getting errors.

What I've done is make a backup of old validate, got the one from sechs, reloaded GS, created the all.lua from ticktick, added the jobs I wanted, and loaded it.

As soon as I load the all.lua I get these errors
Code
1
2
3
lua runtime error: gearswap/flow.lua:354:
gearswap has detected an error in the user function self_command:
...(x86)Windower/addons/gearswap/libs/sel-include.lua:1466: attempt to index field 'weapons' (a nil value)


I've not tried manually copying the sets but might try it at some point, altho I dread the idea if you've played a lot of jobs with selindrile GS >.<

Interested in doing this myself when I have time. Did you rename the jobs in Tickticks all.lua to reflect the format Sel's GS has you name yours?
 Asura.Sechs
Offline
サーバ: Asura
Game: FFXI
user: Akumasama
Posts: 9876
By Asura.Sechs 2022-02-16 16:34:23  
Big news for anybody interested in this.
My custom version is getting merged with the default Gearswap Validate.lua.

This means that soon you won't have to do the "Overwrite with custom > do the clean up > Restore default Validate.lua" steps anymore.

More info to come soon!
[+]
 Bahamut.Archdiocesan
Offline
サーバ: Bahamut
Game: FFXI
Posts: 11
By Bahamut.Archdiocesan 2022-02-17 03:47:36  
Hell yeah, I'm excited. Was just trying to figure this out the other day after coming across it and feel like I had very little success; ended up going through gear manually but gave up after the first job.
First Page 2
Log in to post.