Quantcast
Download
(13 Kb)
Download
Updated: 10/17/19 05:07 AM
Pictures
File Info
Compatibility:
Scalebreaker (5.1.5)
Updated:10/17/19 05:07 AM
Created:10/14/19 10:49 PM
Monthly downloads:73
Total downloads:107
Favorites:6
MD5:
XL Gear Banker
Version: 0.7.3.1
by: XL_Olsen [More]
XL Gear Banker

By @XL_Olsen
(PC EU - Guild: Winter Rose)

Contact me for any questions and/or feedback (Either on ESOUI or directly through ingame whisper/mail).

News
  • Added small demo gifs that shows various use cases.
Description

XL Gear Banker (XLGB) is an ESO addon that strives to combat the tedious task of funneling all your gear to another character.
Got multiple healer characters? Multiple tanks? DDs? This addon might be for you!

Before XLGB:
  1. Log into character with the gear you need.
  2. Go to bank or house storage chest
  3. For every gear piece you need, find it in your inventory and manually put it into bank/chest.
  4. Log into character that needs the gear.
  5. Go to bank or house storage chest
  6. For every gear piece you need, find it in your bank/chest and manually withdraw it from the bank/chest.
After XLGB:

- Step 3: Use slash_command or keybind to deposit all gear pieces at once.
- Step 6: Use slash_command or keybind to withdraw all gear pieces at once.

Easy!

Dependencies

This addon uses the following libraries:

- LibCustomMenu

These libraries are required to run the addon.

Known Issues
  • Performance issue on deposit/withdraw spam will lead to disconnect due to flooding item_move requests.

How to use the addon


Usage of slash_commands

The main interaction with this addon happens through slash_commands (for now). A slash_command is simply something you type into your ESO chat while having the game open (e.g. a favourite one of mine is "/hammerlow" to help ZOS fix the servers).
Some slash_commands take an "argument" which basically is extra information the command needs to do its thing. In this addon every slash_command takes up to 1 argument, where the argument is what you write after the slash_command itself.

Add a gear set

First off you'll need to add a gear set. Using the slash_command "/xlgb_addset setName" you'll create a new empty set with the name specified (setName).
'setName' can be anything you'd like it to be.

Examples:
/xlgb_addset Stamina Necro DD
/xlgb_addset Healer sets
/xlgb_addset Tank sets
/xlgb_addset Everything

Demo gif - Adding sets

Add items to a gear set

If you have atleast 1 set you can right-click any armor or weapon in your bank, inventory or even equipped items, an extra item in the drop-down menu will appear reading 'XLGB add >'.
If you hover over this menu you'll see all your sets, and if you click on of the sets the item you've right-clicked will be added to that set.

Demo gif - Adding items to a set

Depositing/withdrawing gear

Depositing and withdrawing gear happens either through keybindings or slash_commands similar to adding gear sets. Using the slash_commands "/xlgb_deposit setNumber", "/xlgb_withdraw setNumber", while having your bank/storage chest open will result in depositing/withdrawing the gear set #(setNumber) to/from the bank/storage chest.
**Note:** *The argument 'setNumber' should be a number between 1 and total number of sets.*

Examples:
/xlgb_withdraw 1
/xlgb_deposit 2

Demo gif - Using banker and slash_commands
Demo gif - Using storage chest assigned sets

Getting the setNumber of a set or items in a set

How do you know which set belongs to which set number? Using the provided slash_command "/xlgb_sets" will print out all sets you've added together with their respective set numbers. "/xlgb_items setNumber" will print out all items you've added to the set #(setNumber).
**Note:** *The argument 'setNumber' should be a number between 1 and total number of sets.*

Examples:
/xlgb_sets
/xlgb_items 3

Remove items from a gear set

Accidentally added an item to the wrong set? Fear not! When an item belongs to a set a new menu item appears in the drop-down menu, similar to adding items, this menu item reads 'XLGB remove >'.
Clicking on one of the sets listed in the sub-menu will result in removing that gear piece from the set again.

Demo gif - Removing items from a set

Remove a gear set

If you've spelled a name wrong (Sorry no support for renaming sets yet) or just don't like a set you've previously created you can remove it with the slash_command "/xlgb_removeset setNumber".
**Warning:** *This slash_command will immediately remove the gear set specified without any prompts, with no way to restore the gear set. (Doesn't delete the items themselves but removes your hard work of adding things to a set).*

Examples:
/xlgb_removeset 2

Demo gif - Removing a set

Assign sets to storage chest

To assign items to a chest simply open up the chest you want to assign to and use the slash_command "/xlgb_assign setNumber". This will assign the items from the set to the opened chest up to the total chest size number of items assigned. When adding/removing items to/from a gearSet the assigned items stored in the storage chest will also automatically update.
**Note:** *The argument 'setNumber' should be a number between 1 and total number of sets.*

Example:
/xlgb_assign 4

Demo gif - Assigning sets to chest

Unassign sets from/reset storage chest


If you want to remove (or reassign) a set from sets assigned to a chest, you'd open the chest you want to unassign the set from (similar to assigning sets) and use the slash_command "/xlgb_unassign setNumber". This way the items in the set will be unassigned (unless they also appear in another set). If you want to fully reset a chest (i.e. unassign all sets and items from the chest) you could also use the slash_command "/xlgb_clearassigned" which will reset the currently opened chest.

**Note:** *The argument 'setNumber' should be a number between 1 and total number of sets.*

Examples:
/xlgb_unassign 4
/xlgb_clearassigned

Print assigned sets and number of items

If you want to know which sets you've assigned to a chest and how many items that are assigned to it you can use the slash_command "/xlgb_assignedsets" while having a chest open, and the information will be printed in chat.

Example:
/xlgb_assignedsets

List of slash_commands

/xlgb_sets
Prints out saved sets to chat.

/xlgb_items setNumber
Prints out set #(setNumber)s items to chat.

/xlgb_addset setName
Creates a new set named (setName).

/xlgb_removeset setNumber
Removes set #(setNumber).

/xlgb_deposit setNumber
Deposit all items from set #(setNumber) into the bank.

/xlgb_withdraw setNumber
Withdraw all items from set #(setNumber) into the player inventory.

/xlgb_assign setNumber
Assigns set #(setNumber) to opened chest.

/xlgb_unassign setNumber
Unassigns set #(setNumber) from opened chest.

/xlgb_clearassigned
Clears the list of sets assigned to opened chest.

/xlgb_assignedsets
Prints out the sets assigned to opened chest.

/xlgb_debug
Toggles debug mode. (Note: quite verbose)

/xlgb_help
Prints out these commands in the chat.

Other
Github @ https://github.com/XLOlsen/XLGearBanker

Thanks to ESOUI wiki and other addon developers for inspiration, as this is my first ever addon, I've been reading through alot of code to get me started and help me write this addon.
Version 0.7.3
  • Editing gearSets now automatically updates the storage assigned sets aswell. (No need to manually reassign set to chest)
  • Added /xlgb_clearassigned command.
  • Updated /xlgb_help message

Version 0.7.3.1 Hotfix!
  • Fixed bug when using /xlgb_removeset setNumber
Optional Files (0)


Archived Files (1)
File Name
Version
Size
Uploader
Date
0.7
14kB
XL_Olsen
10/14/19 10:49 PM


Post A Reply Comment Options
Unread 10/24/19, 11:45 AM  
Baertram
 
Baertram's Avatar
AddOn Author - Click to view AddOns

Forum posts: 2499
File comments: 2807
Uploads: 57
You could also use the LibAddonMenu-2.0 LAM library to create a settings panel for the overview of your sets in banks and handling them. It already provides standard controls and you can alsoa dd customd efined controls to the settings menu.
This library here is nice as it provides a listbox with 2 sides where you can drag&drop or move/add items to. It maybe good to e.g. show the different banks / storage chests on one side and the sets defined in another one so you can drag&drop them from one to another etc.
https://www.esoui.com/downloads/info...hifterBox.html


Originally Posted by XL_Olsen
Originally Posted by Baertram
This looks very prommissing, thanks!
Any chance you can add multi language support for the context menu?

You can have a look at pChat, there is an easy way to support multiple language "files" dynamically.
Just define in your addon's txt file an entry like
Code:
/lang/lang_base.lua  #Contains all the strings in EN e.g.
/lang/lang_$(language).lua  # Contains the translated strings in file lang_de.lua, or lang_fr.lua or lang_jp.lua etc.
See here for the possible variables in teh manifest txt file: https://wiki.esoui.com/Addon_manifes...able_Expansion
The constant $(language) will be replaced with the 2 character client language text, e.g. de, en, fr.
If the file does not exists it will be just skipped. You can also define an empty en.lua e.g. so it will be found but nothing is loaded. The base strings should ALWAYS be loaded with e.g. english so having a base file or alwaysLoaded file as fallback is a best practice.

Then check the pChat language folder files how to lpoad the base strings and then how to load the other strings in other language files. Define your own constants like SI_XLGB_CONTEXTMENU_ADD etc.

And in your addon replace the static english texts with GetString(SI_XLGB_CONTEXTMENU_ADD) and the game will handle the correct translations from the files for you.

For texts containing values (e.g. d("[XLGB] Item " .. itemLink .. " is already in " .. gearSetName) ) you can use string.format like this:
Define a string constant SI_XLGB_PREFIX = "[XLGB] ". This will be reused for all your leading prefix texts.
Define a string constant SI_XLGB_ALREADY_IN_SET = "Item %s is already in %s"

Lua Code:
  1. d(GetString(SI_XLGB_PREFIX) .. d(string.format(GetString(SI_XLGB_ALREADY_IN_SET), itemLink , gearSetName)


German translations:
--> Ideas:
As bank and storage chest messages are quite similar:
You could even use a placeholder for "bank" or "storage" or "chest" in your messages and define texts where you can use string.format
to dynamically replace the placeholder with "storage chest" or "bank" then.


-----Strings-----
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1st line English
2nd line German

... English
... German

and so on...
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Code:
--Error mesages
d("[XLGB_ERROR] GearSetNumber is invalid. Got:", gearSetNumber)
d("[XLGB_FEHLER] GearSetNummmer ist ungültig: ", gearSetNumber)

d("[XLGB_ERROR] Enter a name for the set.")
d("[XLGB_FEHLER] Bitte gib einen Namen für das Set ein.")

d("[XLGB_ERROR] A set named ".. gearSetName .." does already exist! Set names should be unique.")
d("[XLGB_FEHLER] Ein Set mit Namen ".. gearSetName .." existiert bereits! Set Namen müssen eindeutig sein.")

d("[XLGB_ERROR] Trying to move " .. numberOfItemsToMove/#itemsToMove.. "items into a bag with " .. #availableBagSpaces/numberOfAvailableSpaces .." empty slots.")
d("[XLGB_FEHLER] Versuche " .. numberOfItemsToMove/#itemsToMove.. " Gegenstände in einen Beutel mit " .. #availableBagSpaces/numberOfAvailableSpaces .." freien Plätzen zu verschieben.")

d("[XLGB_ERROR] Bank is not open, abort!")
d("[XLGB_FEHLER] Bank ist nicht geöffnet, Abbruch!")

d("[XLGB_ERROR] Cannot assign set to storage. Trying to assign " .. #itemsNotAlreadyAssigned .. " items when only " .. storageBag.slotsLeft .. " are open for assignment.")
d("[XLGB_FEHLER] Kann Set nicht der Lagertruhe zuweisen. Versuche insgesamt " .. #itemsNotAlreadyAssigned .. " Gegenstände zuzuweisen, wobei nur " .. storageBag.slotsLeft .. " übrig sind für die Zuweisung.")

d("[XLGB_ERROR] House storage chest not open, abort!")
d("[XLGB_FEHLER] Haus Lagertruhe nicht geöffnet, Abbruch!")

d("[XLGB_ERROR] Gearset already assigned to this storage chest.")
d("[XLGB_FEHLER] Gearset ist bereits dieser Lagertruhe zugewiesen.")

d("[XLGB_ERROR] Set \'" .. gearSet.name .. "\' is already not assigned to this chest.")
d("[XLGB_FEHLER] Set \'" .. gearSet.name .. "\' ist noch nicht dieser Truhe zugewiesen.")

d("[XLGB_ERROR] On item update: Couldn't reassign set \'".. gearSetAfter.name .."\' to storageBag with ID: " .. storageBagID)
d("[XLGB_FEHLER] Bei Gegenstandsaktualisierung: Konnte das Set \'".. gearSetAfter.name .."\' nicht der Lagertruhe mit ID: " .. storageBagID .. " zuweisen.")


--Texts chat output etc.
d(Item " .. itemLink .. " is already in " .. gearSetName)
d(Gegenstand " .. itemLink .. " ist bereits in " .. gearSetName)

d("[XLGB] Assigned \'" .. gearSet.name .. "\' to chest.")
d("[XLGB] \'" .. gearSet.name .. "\' wurde Truhe zugewiesen.")

d("[XLGB] Depositing " .. gearSet.name)
d("[XLGB] Einlagerung " .. gearSet.name)

d("[XLGB] Set \'" .. gearSet.name .. "\' deposited!")
d("[XLGB] Set \'" .. gearSet.name .. "\' eingelagert!")

d("[XLGB] Withdrawing " .. gearSet.name)
d("[XLGB] Auslagerung " .. gearSet.name)

d("[XLGB] Set \'" .. gearSet.name .. "\' withdrawn!")
d("[XLGB] Set \'" .. gearSet.name .. "\' ausgelagert!")

d("[XLGB] Set \'" .. gearSet.name .. "\' is no longer assigned to this chest.")
d("[XLGB] Set \'" .. gearSet.name .. "\' ist nicht länger dieser Lagertruhe zugewiesen.")

d("[XLGB] Depositing assigned items from sets: ", storageBag.assignedSets)
d("[XLGB] Lagere zugewiesene Gegenstände des Sets ein: ", storageBag.assignedSets)

d("[XLGB] Assigned items deposited!")
d("[XLGB] Zugewiesene Gegenstände eingelagert!")

d("[XLGB] Withdrawing assigned items from sets", storageBag.assignedSets )   -->Here is missing the <space>: behind sets, or you should remove the : behind the sets: of "Depositing assigned items from sets: "
d("[XLGB] Lagere zugewiesene Gegenstände des Sets aus: ", storageBag.assignedSets )

d("[XLGB] Assigned items withdrawn!")
d("[XLGB] Zugewiesene Gegenstände ausgelagert!")

d("[XLGB] Cleared storage chest assigned sets.")
d("[XLGB] Zugeweisung der Sets zur Lagertruhe wurden aufgehoben.")

d("[XLGB] Chest contains the following assigned sets:")
d("[XLGB] Truhe beinhält die folgenden zugewiesenen Sets:")

d("[XLGB] Total sets: " .. #storageBag.assignedSets/totalGearSets)
d("[XLGB] Anzahl Sets: " .. #storageBag.assignedSets/totalGearSets)

d("[XLGB] Total items: " .. #storageBag.assignedItems .. " out of " .. storageBag.size)
d("[XLGB] Anzahl Gegenstände: " .. #storageBag.assignedItems .. " von " .. storageBag.size)

d("[XLGB] Created new set: " .. gearSetName)
d("[XLGB] Neues Set erstellt: " .. gearSetName)

d("[XLGB] Removed set: " .. gearSet.name)
d("[XLGB] Set entfernt: " .. gearSet.name)

d("[XLGB] Added item " .. itemLink .. " to " .. gearSet.name)
d("[XLGB] Gegenstand " .. itemLink .. " zu " .. gearSet.name .. " hinzugefügt")

d("[XLGB] Removed item " .. itemLink .. " from " .. gearSetName)
d("[XLGB] Gegenstand " .. itemLink .. " aus " .. gearSetName .. " entfernt")

d("Set " .. i .. " = " .. gearSet.name)
d("Set " .. i .. " = " .. gearSet.name)

d("Set \'" .. gearSet.name .. "\' contains the following items:")
d("Set \'" .. gearSet.name .. "\' beinhält die folgenden Gegenstände:")

d("[XLGB] Total items = " .. #gearSet.items)
d("[XLGB] Anzahl Gegenstände = " .. #gearSet.items)

--Context menu entries
self.ADD_ITEM_TO_GEARSET = "XLGB addItem"
self.ADD_ITEM_TO_GEARSET = "XLGB Hinzufügen"

self.REMOVE_ITEM_FROM_GEARSET = "XLGB removeItem"
self.REMOVE_ITEM_FROM_GEARSET = "XLGB Entfernen"

--Keybinds
name = "Deposit Assigned",
name = "Zugewiesene Einlagern",

name = "Withdraw Assigned",
name = "Zugewiesene Auslagern",

"Deposit Gear Set <number 1 to 9>"
"Lagere Gear Set <number 1 to 9> ein"

"Withdraw Gear Set <number 1 to 9>"
"Lagere Gear Set <number 1 to 9> aus"

--Slash commands
d("\'/xlgb_sets\': Prints out saved sets to chat.")
d("\'/xlgb_sets\': Chat Ausgabe gespeicherter Sets.")

d("\'/xlgb_items setNumber\': Prints out set #(setNumber)s items to chat.")
d("\'/xlgb_items setNumber\': Chat Ausgabe der Gegenstände des Sets #(setNummer).")

d("\'/xlgb_addset setName\': Creates a new set named (setName).")
d("\'/xlgb_addset setName\': Erstellt ein neues Set mit Namen (setName).")

d("\'/xlgb_removeset setNumber\': Removes set #(setNumber).")
d("\'/xlgb_removeset setNumber\': Entfernt Set #(setNummer).")

d("\'/xlgb_deposit setNumber\': Deposit all items from set #(setNumber) into the bank.")
d("\'/xlgb_deposit setNumber\': Einlagern aller Gegenstände des Sets #(setNummer) in die Bank.")

d("\'/xlgb_withdraw setNumber\': Withdraw all items from set #(setNumber) into the player inventory.")
d("\'/xlgb_withdraw setNumber\': Auslagern aller Gegenstände des Sets #(setNummer) in das Inventar.")

d("\'/xlgb_assign setNumber\': Assigns set #(setNumber) to opened chest.")
d("\'/xlgb_assign setNumber\': Weist Set #(setNummer) der geöffneten Truhe zu.")

d("\'/xlgb_unassign setNumber\': Unassigns set #(setNumber) from opened chest.")
d("\'/xlgb_unassign setNumber\': Hebt Zuweisung des Sets #(setNummmer) zur geöffneten Truhe auf.")

d("\'/xlgb_clearassigned\': Clears the list of sets assigned to opened chest.")
d("\'/xlgb_clearassigned\': Leert die Liste der zugewiesenen Sets der geöffneten Truhe.")

d("\'/xlgb_assignedsets\': Prints out the sets assigned to opened chest.")
d("\'/xlgb_assignedsets\': Chat Ausgabe der Truhen zugewiesenen Sets.")

d("\'/xlgb_debug\': Toggles debug mode. (Note: quite verbose)")
d("\'/xlgb_debug\': Debug Modus umschalten. (Notiz: sehr wortreich)")
Hey Baertram!
Thank you for your feedback!
For sure I will look into adding multi-lang support, didn't think I'd get noticed this quick, so didn't think it'd be needed !
I'm also working on a UI module to give a better overview of saved sets and items, similar to e.g. Dressing Room (Distinguish between sets) or Inventory Insight (the way the items are listed), but I ran into problems here - Would be nice to have something other than the slash_commands but I guess they'll work while the addon is in its infant stages.
Again - Thanks for the tips, translation and how to approach multi-lang support, it's appreciated!
Report comment to moderator  
Reply With Quote
Unread 10/17/19, 12:10 PM  
XL_Olsen
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 1
Uploads: 1
Originally Posted by Baertram
This looks very prommissing, thanks!
Any chance you can add multi language support for the context menu?

You can have a look at pChat, there is an easy way to support multiple language "files" dynamically.
Just define in your addon's txt file an entry like
Code:
/lang/lang_base.lua  #Contains all the strings in EN e.g.
/lang/lang_$(language).lua  # Contains the translated strings in file lang_de.lua, or lang_fr.lua or lang_jp.lua etc.
See here for the possible variables in teh manifest txt file: https://wiki.esoui.com/Addon_manifes...able_Expansion
The constant $(language) will be replaced with the 2 character client language text, e.g. de, en, fr.
If the file does not exists it will be just skipped. You can also define an empty en.lua e.g. so it will be found but nothing is loaded. The base strings should ALWAYS be loaded with e.g. english so having a base file or alwaysLoaded file as fallback is a best practice.

Then check the pChat language folder files how to lpoad the base strings and then how to load the other strings in other language files. Define your own constants like SI_XLGB_CONTEXTMENU_ADD etc.

And in your addon replace the static english texts with GetString(SI_XLGB_CONTEXTMENU_ADD) and the game will handle the correct translations from the files for you.

For texts containing values (e.g. d("[XLGB] Item " .. itemLink .. " is already in " .. gearSetName) ) you can use string.format like this:
Define a string constant SI_XLGB_PREFIX = "[XLGB] ". This will be reused for all your leading prefix texts.
Define a string constant SI_XLGB_ALREADY_IN_SET = "Item %s is already in %s"

Lua Code:
  1. d(GetString(SI_XLGB_PREFIX) .. d(string.format(GetString(SI_XLGB_ALREADY_IN_SET), itemLink , gearSetName)


German translations:
--> Ideas:
As bank and storage chest messages are quite similar:
You could even use a placeholder for "bank" or "storage" or "chest" in your messages and define texts where you can use string.format
to dynamically replace the placeholder with "storage chest" or "bank" then.


-----Strings-----
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1st line English
2nd line German

... English
... German

and so on...
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Code:
--Error mesages
d("[XLGB_ERROR] GearSetNumber is invalid. Got:", gearSetNumber)
d("[XLGB_FEHLER] GearSetNummmer ist ungültig: ", gearSetNumber)

d("[XLGB_ERROR] Enter a name for the set.")
d("[XLGB_FEHLER] Bitte gib einen Namen für das Set ein.")

d("[XLGB_ERROR] A set named ".. gearSetName .." does already exist! Set names should be unique.")
d("[XLGB_FEHLER] Ein Set mit Namen ".. gearSetName .." existiert bereits! Set Namen müssen eindeutig sein.")

d("[XLGB_ERROR] Trying to move " .. numberOfItemsToMove/#itemsToMove.. "items into a bag with " .. #availableBagSpaces/numberOfAvailableSpaces .." empty slots.")
d("[XLGB_FEHLER] Versuche " .. numberOfItemsToMove/#itemsToMove.. " Gegenstände in einen Beutel mit " .. #availableBagSpaces/numberOfAvailableSpaces .." freien Plätzen zu verschieben.")

d("[XLGB_ERROR] Bank is not open, abort!")
d("[XLGB_FEHLER] Bank ist nicht geöffnet, Abbruch!")

d("[XLGB_ERROR] Cannot assign set to storage. Trying to assign " .. #itemsNotAlreadyAssigned .. " items when only " .. storageBag.slotsLeft .. " are open for assignment.")
d("[XLGB_FEHLER] Kann Set nicht der Lagertruhe zuweisen. Versuche insgesamt " .. #itemsNotAlreadyAssigned .. " Gegenstände zuzuweisen, wobei nur " .. storageBag.slotsLeft .. " übrig sind für die Zuweisung.")

d("[XLGB_ERROR] House storage chest not open, abort!")
d("[XLGB_FEHLER] Haus Lagertruhe nicht geöffnet, Abbruch!")

d("[XLGB_ERROR] Gearset already assigned to this storage chest.")
d("[XLGB_FEHLER] Gearset ist bereits dieser Lagertruhe zugewiesen.")

d("[XLGB_ERROR] Set \'" .. gearSet.name .. "\' is already not assigned to this chest.")
d("[XLGB_FEHLER] Set \'" .. gearSet.name .. "\' ist noch nicht dieser Truhe zugewiesen.")

d("[XLGB_ERROR] On item update: Couldn't reassign set \'".. gearSetAfter.name .."\' to storageBag with ID: " .. storageBagID)
d("[XLGB_FEHLER] Bei Gegenstandsaktualisierung: Konnte das Set \'".. gearSetAfter.name .."\' nicht der Lagertruhe mit ID: " .. storageBagID .. " zuweisen.")


--Texts chat output etc.
d(Item " .. itemLink .. " is already in " .. gearSetName)
d(Gegenstand " .. itemLink .. " ist bereits in " .. gearSetName)

d("[XLGB] Assigned \'" .. gearSet.name .. "\' to chest.")
d("[XLGB] \'" .. gearSet.name .. "\' wurde Truhe zugewiesen.")

d("[XLGB] Depositing " .. gearSet.name)
d("[XLGB] Einlagerung " .. gearSet.name)

d("[XLGB] Set \'" .. gearSet.name .. "\' deposited!")
d("[XLGB] Set \'" .. gearSet.name .. "\' eingelagert!")

d("[XLGB] Withdrawing " .. gearSet.name)
d("[XLGB] Auslagerung " .. gearSet.name)

d("[XLGB] Set \'" .. gearSet.name .. "\' withdrawn!")
d("[XLGB] Set \'" .. gearSet.name .. "\' ausgelagert!")

d("[XLGB] Set \'" .. gearSet.name .. "\' is no longer assigned to this chest.")
d("[XLGB] Set \'" .. gearSet.name .. "\' ist nicht länger dieser Lagertruhe zugewiesen.")

d("[XLGB] Depositing assigned items from sets: ", storageBag.assignedSets)
d("[XLGB] Lagere zugewiesene Gegenstände des Sets ein: ", storageBag.assignedSets)

d("[XLGB] Assigned items deposited!")
d("[XLGB] Zugewiesene Gegenstände eingelagert!")

d("[XLGB] Withdrawing assigned items from sets", storageBag.assignedSets )   -->Here is missing the <space>: behind sets, or you should remove the : behind the sets: of "Depositing assigned items from sets: "
d("[XLGB] Lagere zugewiesene Gegenstände des Sets aus: ", storageBag.assignedSets )

d("[XLGB] Assigned items withdrawn!")
d("[XLGB] Zugewiesene Gegenstände ausgelagert!")

d("[XLGB] Cleared storage chest assigned sets.")
d("[XLGB] Zugeweisung der Sets zur Lagertruhe wurden aufgehoben.")

d("[XLGB] Chest contains the following assigned sets:")
d("[XLGB] Truhe beinhält die folgenden zugewiesenen Sets:")

d("[XLGB] Total sets: " .. #storageBag.assignedSets/totalGearSets)
d("[XLGB] Anzahl Sets: " .. #storageBag.assignedSets/totalGearSets)

d("[XLGB] Total items: " .. #storageBag.assignedItems .. " out of " .. storageBag.size)
d("[XLGB] Anzahl Gegenstände: " .. #storageBag.assignedItems .. " von " .. storageBag.size)

d("[XLGB] Created new set: " .. gearSetName)
d("[XLGB] Neues Set erstellt: " .. gearSetName)

d("[XLGB] Removed set: " .. gearSet.name)
d("[XLGB] Set entfernt: " .. gearSet.name)

d("[XLGB] Added item " .. itemLink .. " to " .. gearSet.name)
d("[XLGB] Gegenstand " .. itemLink .. " zu " .. gearSet.name .. " hinzugefügt")

d("[XLGB] Removed item " .. itemLink .. " from " .. gearSetName)
d("[XLGB] Gegenstand " .. itemLink .. " aus " .. gearSetName .. " entfernt")

d("Set " .. i .. " = " .. gearSet.name)
d("Set " .. i .. " = " .. gearSet.name)

d("Set \'" .. gearSet.name .. "\' contains the following items:")
d("Set \'" .. gearSet.name .. "\' beinhält die folgenden Gegenstände:")

d("[XLGB] Total items = " .. #gearSet.items)
d("[XLGB] Anzahl Gegenstände = " .. #gearSet.items)

--Context menu entries
self.ADD_ITEM_TO_GEARSET = "XLGB addItem"
self.ADD_ITEM_TO_GEARSET = "XLGB Hinzufügen"

self.REMOVE_ITEM_FROM_GEARSET = "XLGB removeItem"
self.REMOVE_ITEM_FROM_GEARSET = "XLGB Entfernen"

--Keybinds
name = "Deposit Assigned",
name = "Zugewiesene Einlagern",

name = "Withdraw Assigned",
name = "Zugewiesene Auslagern",

"Deposit Gear Set <number 1 to 9>"
"Lagere Gear Set <number 1 to 9> ein"

"Withdraw Gear Set <number 1 to 9>"
"Lagere Gear Set <number 1 to 9> aus"

--Slash commands
d("\'/xlgb_sets\': Prints out saved sets to chat.")
d("\'/xlgb_sets\': Chat Ausgabe gespeicherter Sets.")

d("\'/xlgb_items setNumber\': Prints out set #(setNumber)s items to chat.")
d("\'/xlgb_items setNumber\': Chat Ausgabe der Gegenstände des Sets #(setNummer).")

d("\'/xlgb_addset setName\': Creates a new set named (setName).")
d("\'/xlgb_addset setName\': Erstellt ein neues Set mit Namen (setName).")

d("\'/xlgb_removeset setNumber\': Removes set #(setNumber).")
d("\'/xlgb_removeset setNumber\': Entfernt Set #(setNummer).")

d("\'/xlgb_deposit setNumber\': Deposit all items from set #(setNumber) into the bank.")
d("\'/xlgb_deposit setNumber\': Einlagern aller Gegenstände des Sets #(setNummer) in die Bank.")

d("\'/xlgb_withdraw setNumber\': Withdraw all items from set #(setNumber) into the player inventory.")
d("\'/xlgb_withdraw setNumber\': Auslagern aller Gegenstände des Sets #(setNummer) in das Inventar.")

d("\'/xlgb_assign setNumber\': Assigns set #(setNumber) to opened chest.")
d("\'/xlgb_assign setNumber\': Weist Set #(setNummer) der geöffneten Truhe zu.")

d("\'/xlgb_unassign setNumber\': Unassigns set #(setNumber) from opened chest.")
d("\'/xlgb_unassign setNumber\': Hebt Zuweisung des Sets #(setNummmer) zur geöffneten Truhe auf.")

d("\'/xlgb_clearassigned\': Clears the list of sets assigned to opened chest.")
d("\'/xlgb_clearassigned\': Leert die Liste der zugewiesenen Sets der geöffneten Truhe.")

d("\'/xlgb_assignedsets\': Prints out the sets assigned to opened chest.")
d("\'/xlgb_assignedsets\': Chat Ausgabe der Truhen zugewiesenen Sets.")

d("\'/xlgb_debug\': Toggles debug mode. (Note: quite verbose)")
d("\'/xlgb_debug\': Debug Modus umschalten. (Notiz: sehr wortreich)")
Hey Baertram!
Thank you for your feedback!
For sure I will look into adding multi-lang support, didn't think I'd get noticed this quick, so didn't think it'd be needed !
I'm also working on a UI module to give a better overview of saved sets and items, similar to e.g. Dressing Room (Distinguish between sets) or Inventory Insight (the way the items are listed), but I ran into problems here - Would be nice to have something other than the slash_commands but I guess they'll work while the addon is in its infant stages.
Again - Thanks for the tips, translation and how to approach multi-lang support, it's appreciated!
Report comment to moderator  
Reply With Quote
Unread 10/17/19, 06:06 AM  
Baertram
 
Baertram's Avatar
AddOn Author - Click to view AddOns

Forum posts: 2499
File comments: 2807
Uploads: 57
This looks very prommissing, thanks!
Any chance you can add multi language support for the context menu?

You can have a look at pChat, there is an easy way to support multiple language "files" dynamically.
Just define in your addon's txt file an entry like
Code:
/lang/lang_base.lua  #Contains all the strings in EN e.g.
/lang/lang_$(language).lua  # Contains the translated strings in file lang_de.lua, or lang_fr.lua or lang_jp.lua etc.
See here for the possible variables in teh manifest txt file: https://wiki.esoui.com/Addon_manifes...able_Expansion
The constant $(language) will be replaced with the 2 character client language text, e.g. de, en, fr.
If the file does not exists it will be just skipped. You can also define an empty en.lua e.g. so it will be found but nothing is loaded. The base strings should ALWAYS be loaded with e.g. english so having a base file or alwaysLoaded file as fallback is a best practice.

Then check the pChat language folder files how to lpoad the base strings and then how to load the other strings in other language files. Define your own constants like SI_XLGB_CONTEXTMENU_ADD etc.

And in your addon replace the static english texts with GetString(SI_XLGB_CONTEXTMENU_ADD) and the game will handle the correct translations from the files for you.

For texts containing values (e.g. d("[XLGB] Item " .. itemLink .. " is already in " .. gearSetName) ) you can use string.format like this:
Define a string constant SI_XLGB_PREFIX = "[XLGB] ". This will be reused for all your leading prefix texts.
Define a string constant SI_XLGB_ALREADY_IN_SET = "Item %s is already in %s"

Lua Code:
  1. d(GetString(SI_XLGB_PREFIX) .. d(string.format(GetString(SI_XLGB_ALREADY_IN_SET), itemLink , gearSetName)


German translations:
--> Ideas:
As bank and storage chest messages are quite similar:
You could even use a placeholder for "bank" or "storage" or "chest" in your messages and define texts where you can use string.format
to dynamically replace the placeholder with "storage chest" or "bank" then.


-----Strings-----
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1st line English
2nd line German

... English
... German

and so on...
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Code:
--Error mesages
d("[XLGB_ERROR] GearSetNumber is invalid. Got:", gearSetNumber)
d("[XLGB_FEHLER] GearSetNummmer ist ungültig: ", gearSetNumber)

d("[XLGB_ERROR] Enter a name for the set.")
d("[XLGB_FEHLER] Bitte gib einen Namen für das Set ein.")

d("[XLGB_ERROR] A set named ".. gearSetName .." does already exist! Set names should be unique.")
d("[XLGB_FEHLER] Ein Set mit Namen ".. gearSetName .." existiert bereits! Set Namen müssen eindeutig sein.")

d("[XLGB_ERROR] Trying to move " .. numberOfItemsToMove/#itemsToMove.. "items into a bag with " .. #availableBagSpaces/numberOfAvailableSpaces .." empty slots.")
d("[XLGB_FEHLER] Versuche " .. numberOfItemsToMove/#itemsToMove.. " Gegenstände in einen Beutel mit " .. #availableBagSpaces/numberOfAvailableSpaces .." freien Plätzen zu verschieben.")

d("[XLGB_ERROR] Bank is not open, abort!")
d("[XLGB_FEHLER] Bank ist nicht geöffnet, Abbruch!")

d("[XLGB_ERROR] Cannot assign set to storage. Trying to assign " .. #itemsNotAlreadyAssigned .. " items when only " .. storageBag.slotsLeft .. " are open for assignment.")
d("[XLGB_FEHLER] Kann Set nicht der Lagertruhe zuweisen. Versuche insgesamt " .. #itemsNotAlreadyAssigned .. " Gegenstände zuzuweisen, wobei nur " .. storageBag.slotsLeft .. " übrig sind für die Zuweisung.")

d("[XLGB_ERROR] House storage chest not open, abort!")
d("[XLGB_FEHLER] Haus Lagertruhe nicht geöffnet, Abbruch!")

d("[XLGB_ERROR] Gearset already assigned to this storage chest.")
d("[XLGB_FEHLER] Gearset ist bereits dieser Lagertruhe zugewiesen.")

d("[XLGB_ERROR] Set \'" .. gearSet.name .. "\' is already not assigned to this chest.")
d("[XLGB_FEHLER] Set \'" .. gearSet.name .. "\' ist noch nicht dieser Truhe zugewiesen.")

d("[XLGB_ERROR] On item update: Couldn't reassign set \'".. gearSetAfter.name .."\' to storageBag with ID: " .. storageBagID)
d("[XLGB_FEHLER] Bei Gegenstandsaktualisierung: Konnte das Set \'".. gearSetAfter.name .."\' nicht der Lagertruhe mit ID: " .. storageBagID .. " zuweisen.")


--Texts chat output etc.
d(Item " .. itemLink .. " is already in " .. gearSetName)
d(Gegenstand " .. itemLink .. " ist bereits in " .. gearSetName)

d("[XLGB] Assigned \'" .. gearSet.name .. "\' to chest.")
d("[XLGB] \'" .. gearSet.name .. "\' wurde Truhe zugewiesen.")

d("[XLGB] Depositing " .. gearSet.name)
d("[XLGB] Einlagerung " .. gearSet.name)

d("[XLGB] Set \'" .. gearSet.name .. "\' deposited!")
d("[XLGB] Set \'" .. gearSet.name .. "\' eingelagert!")

d("[XLGB] Withdrawing " .. gearSet.name)
d("[XLGB] Auslagerung " .. gearSet.name)

d("[XLGB] Set \'" .. gearSet.name .. "\' withdrawn!")
d("[XLGB] Set \'" .. gearSet.name .. "\' ausgelagert!")

d("[XLGB] Set \'" .. gearSet.name .. "\' is no longer assigned to this chest.")
d("[XLGB] Set \'" .. gearSet.name .. "\' ist nicht länger dieser Lagertruhe zugewiesen.")

d("[XLGB] Depositing assigned items from sets: ", storageBag.assignedSets)
d("[XLGB] Lagere zugewiesene Gegenstände des Sets ein: ", storageBag.assignedSets)

d("[XLGB] Assigned items deposited!")
d("[XLGB] Zugewiesene Gegenstände eingelagert!")

d("[XLGB] Withdrawing assigned items from sets", storageBag.assignedSets )   -->Here is missing the <space>: behind sets, or you should remove the : behind the sets: of "Depositing assigned items from sets: "
d("[XLGB] Lagere zugewiesene Gegenstände des Sets aus: ", storageBag.assignedSets )

d("[XLGB] Assigned items withdrawn!")
d("[XLGB] Zugewiesene Gegenstände ausgelagert!")

d("[XLGB] Cleared storage chest assigned sets.")
d("[XLGB] Zugeweisung der Sets zur Lagertruhe wurden aufgehoben.")

d("[XLGB] Chest contains the following assigned sets:")
d("[XLGB] Truhe beinhält die folgenden zugewiesenen Sets:")

d("[XLGB] Total sets: " .. #storageBag.assignedSets/totalGearSets)
d("[XLGB] Anzahl Sets: " .. #storageBag.assignedSets/totalGearSets)

d("[XLGB] Total items: " .. #storageBag.assignedItems .. " out of " .. storageBag.size)
d("[XLGB] Anzahl Gegenstände: " .. #storageBag.assignedItems .. " von " .. storageBag.size)

d("[XLGB] Created new set: " .. gearSetName)
d("[XLGB] Neues Set erstellt: " .. gearSetName)

d("[XLGB] Removed set: " .. gearSet.name)
d("[XLGB] Set entfernt: " .. gearSet.name)

d("[XLGB] Added item " .. itemLink .. " to " .. gearSet.name)
d("[XLGB] Gegenstand " .. itemLink .. " zu " .. gearSet.name .. " hinzugefügt")

d("[XLGB] Removed item " .. itemLink .. " from " .. gearSetName)
d("[XLGB] Gegenstand " .. itemLink .. " aus " .. gearSetName .. " entfernt")

d("Set " .. i .. " = " .. gearSet.name)
d("Set " .. i .. " = " .. gearSet.name)

d("Set \'" .. gearSet.name .. "\' contains the following items:")
d("Set \'" .. gearSet.name .. "\' beinhält die folgenden Gegenstände:")

d("[XLGB] Total items = " .. #gearSet.items)
d("[XLGB] Anzahl Gegenstände = " .. #gearSet.items)

--Context menu entries
self.ADD_ITEM_TO_GEARSET = "XLGB addItem"
self.ADD_ITEM_TO_GEARSET = "XLGB Hinzufügen"

self.REMOVE_ITEM_FROM_GEARSET = "XLGB removeItem"
self.REMOVE_ITEM_FROM_GEARSET = "XLGB Entfernen"

--Keybinds
name = "Deposit Assigned",
name = "Zugewiesene Einlagern",

name = "Withdraw Assigned",
name = "Zugewiesene Auslagern",

"Deposit Gear Set <number 1 to 9>"
"Lagere Gear Set <number 1 to 9> ein"

"Withdraw Gear Set <number 1 to 9>"
"Lagere Gear Set <number 1 to 9> aus"

--Slash commands
d("\'/xlgb_sets\': Prints out saved sets to chat.")
d("\'/xlgb_sets\': Chat Ausgabe gespeicherter Sets.")

d("\'/xlgb_items setNumber\': Prints out set #(setNumber)s items to chat.")
d("\'/xlgb_items setNumber\': Chat Ausgabe der Gegenstände des Sets #(setNummer).")

d("\'/xlgb_addset setName\': Creates a new set named (setName).")
d("\'/xlgb_addset setName\': Erstellt ein neues Set mit Namen (setName).")

d("\'/xlgb_removeset setNumber\': Removes set #(setNumber).")
d("\'/xlgb_removeset setNumber\': Entfernt Set #(setNummer).")

d("\'/xlgb_deposit setNumber\': Deposit all items from set #(setNumber) into the bank.")
d("\'/xlgb_deposit setNumber\': Einlagern aller Gegenstände des Sets #(setNummer) in die Bank.")

d("\'/xlgb_withdraw setNumber\': Withdraw all items from set #(setNumber) into the player inventory.")
d("\'/xlgb_withdraw setNumber\': Auslagern aller Gegenstände des Sets #(setNummer) in das Inventar.")

d("\'/xlgb_assign setNumber\': Assigns set #(setNumber) to opened chest.")
d("\'/xlgb_assign setNumber\': Weist Set #(setNummer) der geöffneten Truhe zu.")

d("\'/xlgb_unassign setNumber\': Unassigns set #(setNumber) from opened chest.")
d("\'/xlgb_unassign setNumber\': Hebt Zuweisung des Sets #(setNummmer) zur geöffneten Truhe auf.")

d("\'/xlgb_clearassigned\': Clears the list of sets assigned to opened chest.")
d("\'/xlgb_clearassigned\': Leert die Liste der zugewiesenen Sets der geöffneten Truhe.")

d("\'/xlgb_assignedsets\': Prints out the sets assigned to opened chest.")
d("\'/xlgb_assignedsets\': Chat Ausgabe der Truhen zugewiesenen Sets.")

d("\'/xlgb_debug\': Toggles debug mode. (Note: quite verbose)")
d("\'/xlgb_debug\': Debug Modus umschalten. (Notiz: sehr wortreich)")
Last edited by Baertram : 10/17/19 at 07:10 AM.
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: