Custom Gearswap Validate To Clean-up Inventory

Langues: JP EN DE FR
users online
Forum » Windower » General » Custom Gearswap Validate to clean-up Inventory
Custom Gearswap Validate to clean-up Inventory
 Asura.Sechs
Offline
Serveur: Asura
Game: FFXI
user: Akumasama
Posts: 7839
By Asura.Sechs 2020-03-12 17:53:22
Link | Citer | R
 
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?
Well, there are several steps you need to perform before being able to use this custom validate.
You basically 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



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
Serveur: Asura
Game: FFXI
user: Akumasama
Posts: 7839
By Asura.Sechs 2020-03-12 17:56:27
Link | Citer | R
 
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
Serveur: Bismarck
Game: FFXI
user: Xurion
Posts: 536
By Bismarck.Xurion 2020-03-12 19:17:31
Link | Citer | R
 
This can be super valuable considering how unlikely we are to see an increase in bag space. Thanks for sharing!
 Asura.Trumpet
Offline
Serveur: Asura
Game: FFXI
user: Trumpet
By Asura.Trumpet 2020-03-13 08:20:49
Link | Citer | R
 
I've been wanting a way to do this exact thing for a while, thanks!
 Valefor.Gorns
Offline
Serveur: Valefor
Game: FFXI
user: Gorns
Posts: 159
By Valefor.Gorns 2020-03-13 08:23:35
Link | Citer | R
 
I've been waiting for this custom since ages, thanx alot !
 Asura.Botosi
Offline
Serveur: Asura
Game: FFXI
user: Botosi
Posts: 373
By Asura.Botosi 2020-03-13 08:27:47
Link | Citer | R
 
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
Serveur: Asura
Game: FFXI
user: Akumasama
Posts: 7839
By Asura.Sechs 2020-03-13 09:03:47
Link | Citer | R
 
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
Serveur: Sylph
Game: FFXI
user: feary
Posts: 440
By Sylph.Feary 2020-03-13 10:04:51
Link | Citer | R
 
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
Serveur: Bahamut
Game: FFXI
user: dannyl
Posts: 1547
By Bahamut.Dannyl 2020-03-13 10:21:47
Link | Citer | R
 
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
Serveur: Asura
Game: FFXI
user: Akumasama
Posts: 7839
By Asura.Sechs 2020-03-13 10:51:27
Link | Citer | R
 
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
Serveur: Sylph
Game: FFXI
user: feary
Posts: 440
By Sylph.Feary 2020-03-14 06:12:39
Link | Citer | R
 
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
Serveur: Asura
Game: FFXI
user: Akumasama
Posts: 7839
By Asura.Sechs 2020-03-15 17:48:09
Link | Citer | R
 
Out of curiosity, did anyone manage to make it work? :D
 
Offline
Posts:
By 2020-03-30 03:40:34
 Undelete | Edit  | Link | Citer | R
 
Post deleted by User.
 Asura.Sechs
Offline
Serveur: Asura
Game: FFXI
user: Akumasama
Posts: 7839
By Asura.Sechs 2020-04-09 18:20:45
Link | Citer | R
 
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
Serveur: Asura
Game: FFXI
user: Trumpet
By Asura.Trumpet 2020-05-21 06:58:59
Link | Citer | R
 
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
Serveur: Asura
Game: FFXI
user: Finbar
Posts: 86
By Asura.Finbar 2020-06-21 05:18:54
Link | Citer | R
 
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
Serveur: Sylph
Game: FFXI
user: mofat
Posts: 106
By Sylph.Ticktick 2020-07-05 02:12:46
Link | Citer | R
 
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
Online
Serveur: Sylph
Game: FFXI
user: Funkworkz
Posts: 1087
By Sylph.Funkworkz 2020-09-21 09:29:40
Link | Citer | R
 
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
Serveur: Asura
Game: FFXI
user: Akumasama
Posts: 7839
By Asura.Sechs 2020-09-27 11:11:15
Link | Citer | R
 
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
Serveur: Asura
Game: FFXI
user: Akumasama
Posts: 7839
By Asura.Sechs 2021-03-26 19:46:34
Link | Citer | R
 
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?
[+]
Log in to post.