Any suggestions of what I could study to see how others do such things? Again, not looking for an immediate fix, more of a long-term learning project, and thanks!
starts at line 1020 for setting DW set (haste level)
Gearinfo does not work with BLU, so I stole borrowed some code to tally up my haste buffs and set the haste level by that. This code makes some assumptions due to the facts GS does not see a difference in Haste vs Haste II, cannot see if you are affected by Haste Samba from an outside source and has no idea which Marches are used.
The assumptions made are (this is based off of my average buff situations)
Haste is always Haste II
Haste Samba is always 5%
2 Marches always M.Haste cap
Gear Haste is capped
A second value could be added to the Haste Samba toggle to account for 10% but I really didn't see a point as I almost never have 10% Haste Samba am lazy.
You could also account for a DRG pet for DRG/NIN but that is very edge case.
Now this code could be adapted to tally up your attack buffs and set your PDL set level BUT I would not suggest this route, as whether or not you are attack capped purely depends on the mobs DEF, which changes. This would probably be case where you should manually decide on your PDL through a cycle state (ie. F9 in a motes lua).
This would probably be case where you should manually decide on your PDL through a cycle state (ie. F9 in a motes lua).
I dont' auto detect anythign with my luas. I like having control over all aspects of accuracy tiers, haste levels for DW, and the like. the ONLY thing I automate vs manually choose is usage of orpheus's sash.
I guess I've simply worded what I'm looking for poorly. I wasn't looking for the given examples that I've seen for years, and I'd hope someone asking for help checked them out first. I don't need to be linked to the DW cheat sheet and then some auto-detecting lua that I've honestly worked very hard to avoid. People's desire to help is appreciated- but very far off what I was hoping for.
I simply wanted to see examples of people's work and how they create multiple function cycling depending on the mode of damage.
function self_command(command)
if command:lower() == 'cycle tp set' then
TP_Index = (TP_Index % #TP_Array) + 1
status_change(player.status)
add_to_chat(TP_Array[TP_Index]..' SET')
end
end
function self_command(command)
if command:lower() == 'cycle tp set' then
TP_Index = (TP_Index % #TP_Array) + 1
status_change(player.status)
add_to_chat(TP_Array[TP_Index]..' SET')
end
end
That's pretty similar to what I'm doing now. Right now my "modes" are {LowACC,HighACC,Aftermath,Haste}, as the mode change affects my ranged, melee, and WSs all at once. But I'd prefer to have those 3 on unique arrays I can cycle through independently.
The current way I do things looks like this:
sets.Midshot.LowACC
sets.Midshot.HighACC
(etc)
sets.engaged.LowACC
sets.engaged.HighACC
(etc)
and such. I think first I'll need to create the arrays using unique modifiers, such as:
sets.Midshot.LowACC
sets.Midshot.HighACC
sets.engaged.LowHaste
sets.engaged.HighHaste
sets.precast.WS.Normal
sets.precast.WS.PDL
and then write commands to cycle each. I am familiar with how to do a basic keybind and cycle command, but its splitting them up among different actions vs just a general cycle that I'm unfamiliar with.
While I know many great people out there can and would gladly say "just send me your lua, I'll set it up", I'm really desiring seeing some examples of setups like this that don't require include files so I can learn a thing or two.
But I'd prefer to have those 3 on unique arrays I can cycle through independently.
I dug through how mote appends modifiers to the meleeSet and basically you can use as many states and modifiers as you want.
Code
function status_change(new, old)
if new == 'Engaged' then
equip(get_melee_set())
else equip(sets.idle)
end
end
Code
function get_melee_set()
local meleeSet = sets.engaged
if not meleeSet then
return {}
end
if state.CombatForm.has_value and meleeSet[state.CombatForm.value] and state.CombatForm.value ~= 'none' then
meleeSet = meleeSet[state.CombatForm.value]
end
if state.CombatHaste.has_value and meleeSet[state.CombatHaste.value] then
meleeSet = meleeSet[state.CombatHaste.value]
end
return meleeSet
end
Using two states (this is still using Mote's Modes.lua and Mote-SelfCommands.lua for definition and cycling. However, you should be able to use the states you define in the function above, like TP_Array and TP_Index to change to the correct state)
The intent is to prevent a few slots from swapping during all actions to keep MaxHp high
Code
function customize_base_set(baseSet)
if state.Tankmode.value == 'On' then
equip(sets.Tank)
disable('back', 'ear1', 'ear2','ring2')
else
enable('back', 'ear1', 'ear2','ring2')
end
end
What am I doing wrong here? I'm just trying to get my lua to equip "Sets.Tank" and then disable these gear slots when Tankmode is set to 'On' and enable when 'Off'.
Well, without testing this or knowing what the error is, or seeing the entirety of your code, you have an identifier named "TankMode" (with a capital 'M') in the first code snippet and "Tankmode" (with a lower-case 'm') in the second. Identifiers in Lua are case sensitive.
Is there a way of preventing the key bindings of F9-F12 completely?
This came to me as a surprise when I first tried gearswap, because F10 is somewhat important for targeting in FFXI itself.
Just a thought... Are you using Mote's library (or a derivative)? And are you calling including Mote's after this portion of code? If you are, then you're unbinding correctly, but then rebinding afterward.
F8 = Target nearest hostile/attackable NPC, if none is in view, target nearest friendly NPC.
F10 = Target nearest friendly NPC, if none is in view, target nearest hostile/attackable NPC.
If you ever stand in front of the Reisenjima Goblin and there's a mob in view, use F10 to target the Gob. :)
I'm struggling to create a toggle to cycle through equipping of weapons. I'm using Arislan's modifications of Mote's luas. Does anyone have any advice on even where to start with this? Nothing I've tried works.
How hard/complex would it be to create a rule in gear swap to provide some sort of functionality to alleviate duplicate earrings and rings? Occasionally on WHM or BLU or other various jobs, equipping duplicate rings/earrings (Mache, Chirich, Stikini, etc.) will hang up and leave me in the wrong piece.
(Using Selindrile's LUA's, if that matters)
This is by no means a major problem, mainly because as far as I can tell, It always equips what I need when I'm doing an action, but only gaff's when returning to Idle/Auto-attack engaged.
I thought of some sort of variable that it could flag if both ring1+ring2 (or left_ring+right_ring) had the same equipment piece, and then assign one of the rings/earrings directly to a slot, maybe with Item ID? Possibly detect the duplicate reference, scan your inventory for said items, and then assign individual item ID's directly to said slots.
I searched this thread, and the internet in general with : 'ffxi duplicate equip gearswap' in the search engine, but mostly i saw comments regarding priority swaps, which i understand, but I've tried that, and I don't think it works
The toggle works. Nothing actually equips. This is the case for any job.
I just made the changes myself to their RDM lua and it worked (changed the name to test.lua, commented out the includes for the geo\global binds and made the changes I suggested). Loaded on my BLU and the lua properly changed weapons (well it changed between Almace, Naegling and Maxentius). Do you have the weapon lock mode on? Otherwise, not sure why it isn't working for you unless you modified the function:
Code
function check_weaponset()
equip(sets[state.WeaponSet.current])
if player.sub_job ~= 'NIN' and player.sub_job ~= 'DNC' then
equip(sets.DefaultShield)
end
end
or how it is called.
I will note that Arislan has two customize_melee_set(meleeSet) functions:
Code
function customize_melee_set(meleeSet)
if state.EnspellMode.value == true then
meleeSet = set_combine(meleeSet, sets.engaged.Enspell)
end
if state.EnspellMode.value == true and player.hpp <= 75 and player.tp < 1000 then
meleeSet = set_combine(meleeSet, sets.engaged.Enspell.Fencer)
end
if state.TreasureMode.value == 'Fulltime' then
meleeSet = set_combine(meleeSet, sets.TreasureHunter)
end
check_weaponset()
return meleeSet
end
-- Modify the default melee set after it was constructed.
--[[function customize_melee_set(meleeSet)
return meleeSet
end]]
which I commented out the empty one after testing and retested to make sure it wasn't causing an issue.
The toggle works. Nothing actually equips. This is the case for any job.
I just made the changes myself to their RDM lua and it worked (changed the name to test.lua, commented out the includes for the geo\global binds and made the changes I suggested). Loaded on my BLU and the lua properly changed weapons (well it changed between Almace, Naegling and Maxentius). Do you have the weapon lock mode on? Otherwise, not sure why it isn't working for you unless you modified the function:
Code
function check_weaponset()
equip(sets[state.WeaponSet.current])
if player.sub_job ~= 'NIN' and player.sub_job ~= 'DNC' then
equip(sets.DefaultShield)
end
end
or how it is called.
I will note that Arislan has two customize_melee_set(meleeSet) functions:
Code
function customize_melee_set(meleeSet)
if state.EnspellMode.value == true then
meleeSet = set_combine(meleeSet, sets.engaged.Enspell)
end
if state.EnspellMode.value == true and player.hpp <= 75 and player.tp < 1000 then
meleeSet = set_combine(meleeSet, sets.engaged.Enspell.Fencer)
end
if state.TreasureMode.value == 'Fulltime' then
meleeSet = set_combine(meleeSet, sets.TreasureHunter)
end
check_weaponset()
return meleeSet
end
-- Modify the default melee set after it was constructed.
--[[function customize_melee_set(meleeSet)
return meleeSet
end]]
which I commented out the empty one after testing and retested to make sure it wasn't causing an issue.
That's just it--weapon lock definitely isn't on, and I haven't changed any of the functions, just remapped the toggle.
i'm having trouble with my thf.lua
i'm using arislan's lua.
i've used it before but my pc got wiped and i lost everything.
whats happening is i use the keybind to switch my TH gear in. the problem is somehow it's still switching in his gearset even though i changed everything to my gear. so i went through and completely removed everything he had in his TH sets and replaced everything with mine using export. now its not switch anything.
i copied the mote-treasurehunter file to make sure mine was up to date.
heres my set for treasure hunter in the lua:
figured it out, wasnt equipping because of idleset. only equips when engaged. thanks to this community. if it wasnt for you guys theres no way in hell i wouldve been able to figure this out by myself
This problem is keeping me up into the middle of the night:
Why would aftercast(spell, act) start before the spell has finished casting? From watching equipviewer icons and showswaps, I seem to be equipping all the gear (precast>midcast>aftercast), but the midcast is already swapped out before the spell goes off.
I thought the aftercast function waits to swap until receiving notice of the spell going off. Why isn't it staying in midcast?
Just looking for someone to explain this addon a bit for me. It looks like it is an alternative to Spellcast.
Is it going to be replacing Spellcast? In which ways is it better or worse. I don't know any programming but I've slowly learned more and more about spellcast and the 'language' used in gearswap is confusing to me.
It says it uses packets so it potentially could be more detectable? but does that also eliminate any lag that spellcast may encounter?
I plan on redoing my PUP xml to include pet casting sets thanks to the new addon petschool. I'm just not sure if it's worth it to just wait until gearswap gets more popular or to go ahead and do it in spellcast.
If anyone could give me more info I'd greatly appreciate it.