Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 27 additions & 12 deletions addons/EmpyPopTracker/EmpyPopTracker.lua
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
_addon.name = 'Empy Pop Tracker'
_addon.author = 'Dean James (Xurion of Bismarck)'
_addon.commands = { 'ept', 'empypoptracker' }
_addon.version = '2.1.1'
_addon.version = '2.2.1'

config = require('config')
res = require('resources')
Expand Down Expand Up @@ -57,15 +57,30 @@ defaults.text.text.size = 10
defaults.tracking = 'briareus'
defaults.visible = true
defaults.add_to_chat_mode = 8
defaults.colors = {}
defaults.colors.needed = {}
defaults.colors.needed.red = 255
defaults.colors.needed.green = 50
defaults.colors.needed.blue = 50
defaults.colors.obtained = {}
defaults.colors.obtained.red = 100
defaults.colors.obtained.green = 255
defaults.colors.obtained.blue = 100
defaults.colors.pool = {}
defaults.colors.pool.red = 255
defaults.colors.pool.green = 170
defaults.colors.pool.blue = 0
defaults.colors.bgall = {}
defaults.colors.bgall.red = 0
defaults.colors.bgall.green = 75
defaults.colors.bgall.blue = 0

EmpyPopTracker.settings = config.load(defaults)
EmpyPopTracker.text = require('texts').new(EmpyPopTracker.settings.text, EmpyPopTracker.settings)

colors = {}
colors.success = '\\cs(100,255,100)'
colors.danger = '\\cs(255,50,50)'
colors.warning = '\\cs(255,170,0)'
colors.close = '\\cr'
function start_color(color)
return '\\cs(' .. EmpyPopTracker.settings.colors[color].red .. ',' .. EmpyPopTracker.settings.colors[color].green .. ',' .. EmpyPopTracker.settings.colors[color].blue .. ')'
end

function owns_item(id, items)
for _, bag in pairs(items) do
Expand Down Expand Up @@ -149,16 +164,16 @@ function generate_text(data, key_items, items, depth)

local item_colour
if owns_pop then
item_colour = colors.success
item_colour = start_color('obtained')
else
item_colour = colors.danger
item_colour = start_color('needed')
end

local pool_notification = ''
if in_pool_count > 0 then
pool_notification = colors.warning .. ' [' .. in_pool_count .. ']' .. colors.close
pool_notification = start_color('pool') .. ' [' .. in_pool_count .. ']' .. '\\cr'
end
text = text .. '\n' .. get_indent(depth) .. pop.dropped_from.name .. '\n' .. get_indent(depth) .. ' >> ' .. item_colour .. item_identifier .. pop_name .. colors.close .. pool_notification
text = text .. '\n' .. get_indent(depth) .. pop.dropped_from.name .. '\n' .. get_indent(depth) .. ' >> ' .. item_colour .. item_identifier .. pop_name .. '\\cr' .. pool_notification
if pop.dropped_from.pops then
text = text .. generate_text(pop.dropped_from, key_items, items, depth + 1)
end
Expand Down Expand Up @@ -269,9 +284,9 @@ EmpyPopTracker.update = function()
local generated_info = EmpyPopTracker.generate_info(tracked_nm_data, key_items, items)
EmpyPopTracker.text:text(generated_info.text)
if generated_info.has_all_pops then
EmpyPopTracker.text:bg_color(0, 75, 0)
EmpyPopTracker.text:bg_color(EmpyPopTracker.settings.colors.bgall.red, EmpyPopTracker.settings.colors.bgall.green, EmpyPopTracker.settings.colors.bgall.blue)
else
EmpyPopTracker.text:bg_color(0, 0, 0)
EmpyPopTracker.text:bg_color(EmpyPopTracker.settings.text.red, EmpyPopTracker.settings.text.green, EmpyPopTracker.settings.text.blue)
end
if EmpyPopTracker.settings.visible then
EmpyPopTracker.text:visible(true)
Expand Down
6 changes: 4 additions & 2 deletions addons/EmpyPopTracker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ An FFXI Windower 4 addon that tracks items and key items for popping various NMs

Originally developed to track Abyssea Empyrean weapon NMs, hence the name. Key items are identified by the Zhe (Ж) character. Treasure pool counts for pop items are listed in amber after the item in the format of [3] (assuming 3 of that item in the pool).

All text colours are configurable via the auto-generated settings.xml file.

## Load

`//lua load empypoptracker`
Expand Down Expand Up @@ -48,6 +50,6 @@ Fistule is a unique NM when compared to the others. It does not require KIs that

## Contributing

Notice something not quite right? [Raise an issue](https://github.com/xurion/ffxi-empy-pop-tracker/issues).
If there's an NM you want to have added, or if you notice something not quite right, please [raise an issue](https://github.com/xurion/ffxi-empy-pop-tracker/issues).

[Pull requests](https://github.com/xurion/ffxi-empy-pop-tracker/pulls) welcome!
Or better yet, [pull requests](https://github.com/xurion/ffxi-empy-pop-tracker/pulls) are welcome!
28 changes: 14 additions & 14 deletions addons/EmpyPopTracker/nms/chloris.lua
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,10 @@ return {
dropped_from = {
name = 'Ophanim, Forced (G-9)',
pops = { {
id = 2917, --Bloodshot Hecteye
type = 'item',
dropped_from = { name = 'Beholder (G-9)' }
}, {
id = 2946, --Tarnished Pincer
type = 'item',
dropped_from = {
Expand All @@ -86,21 +90,17 @@ return {
id = 2916, --High-quality Limule Pincer
type = 'item',
dropped_from = { name = 'Gulch Limule (H-10)' }
}, {
id = 2917, --Bloodshot Hecteye
type = 'item',
dropped_from = { name = 'Beholder (G-9)' }
}, {
id = 2945, --Shriveled Wing
} }
}
}, {
id = 2945, --Shriveled Wing
type = 'item',
dropped_from = {
name = 'Halimede, Forced (G-12)',
pops = { {
id = 2915, --High-quality Clionid Wing
type = 'item',
dropped_from = {
name = 'Halimede, Forced (G-12)',
pops = { {
id = 2915, --High-quality Clionid Wing
type = 'item',
dropped_from = { name = 'Gully Clionid (G-12)' }
} }
}
dropped_from = { name = 'Gully Clionid (G-12)' }
} }
}
} }
Expand Down