|
Gearswap Support Thread
サーバ: Asura
Game: FFXI
Posts: 363
By Asura.Vafruvant 2015-10-01 01:52:49
EDIT: NVM I fixed the problem I had originally outlined in this post. However still haven't gotten augments to work, gonna keep working since I'm getting new errors now and gonna work on em until I hit a wall or I get it working. To reiterate though, the way I had it coded worked perfectly fine, did not throw any errors. The only time I got errors was when I put in Mote's includes to try and get GS to recognize different augmented gear. Without the includes it works fine other than not recognizing augs. So, for augments, you can do something like this: Code DarkRing = {}
DarkRing.PDT = {name="Dark Ring",augments={}}
DarkRing.MDT = {name="Dark Ring",augments={'Magic dmg. taken -4%', 'Phys. dmg. taken -3%'}}
DarkRing.BDT = {name="Dark Ring",augments={}}
DarkRing.INT = {name="Dark Ring",augments={'Spell interruption rate down 4%', 'Phys. dmg. taken -3%', 'Magic dmg. taken -3%'}} then in your gear sets, you just say: Code ring1=DarkRing.INT,ring2=DarkRing.MDT The way you have it should work, too, so I would verify that you are using //gs export when listing augments. I prefer the shorthand version so my sets appear much less cluttered.
By oyama 2015-10-01 02:53:51
Yea I got all the errors I was getting fixed, took out the includes since it doesn't seem like those are what make the aug system work, and decided to just copy and paste a full set from an export file into the set in my BLU file and see if that worked. It did. I did try the thing you mentioned there, using DarkRings = {} and then just making DarkRings.PDT1 = {name and augs}, DarkRings.PDT2 = {name and augs}, etc. but that still did not work. I typed everything meticulously but I guess I was still making some error somewhere.
Thanks for the help. Seems like just copying and pasting a set exported from in game into the set in my BLU lua file did the trick. I am going to use the shorthand version as well though for the same reason, especially since I need those rings in multiple sets on multiple jobs.
By zaxtiss 2015-10-01 03:18:29
Just a quick question what's the main differences register.event and the raw version can do more events then the other ?
By Bongarippa 2015-10-01 04:48:40
So I'm using Prothescar's gearswap from the blue mage guide on this website, minus a few changes for my gear and added another couple lines for some spells, but it seems to equip my ws set no matter the spell I use. I'm wondering if someone could take a look at it and tell me where the problem lies. Thanks
http://pastebin.com/uCqH4vGCOne problem is that for most of your WSs, and I know this is how Prothescar has it in his file but, you have two sets defining different things, e.g.: Code sets.WS.SanguineBlade = {}
sets.WS.SanguineBlade = {ammo="Erlene's notebook",
head="Hagondes hat +1",neck="Eddy necklace",ear1="Hecate's earring",ear2="Novio earring",
body="Hagondes Coat +1",hands="Hagondes cuffs",ring1="Archon ring",ring2="Strendu ring",
back="Cornflower cape",waist="Aswang sash",legs="Iuitl Tights",feet="Hagondes sabots"} The first sets.WS.SanguineBlade = {} isn't necessary, as you have already mapped the base set, sets.WS, earlier in the file, so you'll want to correct those.
Other than that, I'm not seeing anything that should be triggering a WS set on a spell. Have you verified this with //gs showswaps, not just eyeballing it? Also, a handy tool to see what set is being applied is to use //gs debugmode, as it will actually tell you which set is being called in what part of the casting.
Yea I used showswaps to verify and it was using the same ws set for everything. I messed around with it a little bit and got it working correctly, but thank you for taking a look at it and giving me some feedback. Much appreciated :D
サーバ: Asura
Game: FFXI
Posts: 363
By Asura.Vafruvant 2015-10-01 12:46:19
Just a quick question what's the main differences register.event and the raw version can do more events then the other ? I'm really not familiar with the details on them, but I think it's just a syntax thing. My understanding is that register.event is something you have to have the name of the event, where the raw version you use the event ID. I could be thoroughly off, though.
Leviathan.Vow
サーバ: Leviathan
Game: FFXI
Posts: 125
By Leviathan.Vow 2015-10-01 13:01:19
Code function register_event_user(str,func)
if type(func)~='function' then
error('\nGearSwap: windower.register_event() was passed an invalid value ('..tostring(func)..'). (must be a function)', 2)
elseif type(str) ~= 'string' then
error('\nGearSwap: windower.register_event() was passed an invalid value ('..tostring(str)..'). (must be a string)', 2)
end
local id = windower.register_event(str,user_equip_sets(func))
registered_user_events[id] = true
return id
end
function raw_register_event_user(str,func)
if type(func)~='function' then
error('\nGearSwap: windower.register_event() was passed an invalid value ('..tostring(func)..'). (must be a function)', 2)
elseif type(str) ~= 'string' then
error('\nGearSwap: windower.register_event() was passed an invalid value ('..tostring(str)..'). (must be a string)', 2)
end
local id = windower.register_event(str,setfenv(func,user_env))
registered_user_events[id] = true
return id
end
function user_equip_sets(func)
return setfenv(function(...)
if not gearswap.gearswap_disabled then
gearswap.refresh_globals(true)
return gearswap.equip_sets(func,nil,...)
end
end,user_env)
end
function refresh_globals(user_event_flag)
local current = os.clock()
local dt = current - last_refresh
if not user_event_flag or dt > 0.05 then
refresh_player(dt,user_event_flag)
refresh_ffxi_info(dt,user_event_flag)
refresh_group_info(dt,user_event_flag)
last_refresh = current
end
end
As indicated in the spreadsheet, register_event refreshes global variables as many as 20 times per second. The functions refresh_player, refresh_ffxi_info, and refresh_group_info are relatively heavy functions, and calling them 20 times per second will drop your framerate.
You should use register_event if: your function compares data in the event to gearswap variables and the event is not likely to occur often.
You should use raw_register_event if: the event occurs frequently (incoming chunk) or you do not need to compare data in the event to gearswap variables.
Ragnarok.Boq
サーバ: Ragnarok
Game: FFXI
Posts: 31
By Ragnarok.Boq 2015-10-03 09:22:34
I'm having trouble adjusting Kinematic's WHM lua so that it will equip Hachirin-no-Obi, Twilight Cape, and Zodiac Ring for cures when there is Lightsday, Light weather, or under the effect of Aurorastorm. I can get the Obi to equip using the gear.ElementalObi in the waist slot. But I am at a loss for how to do it for the back and ring slot.
I tried making a "CureWeatherDay" set like this:
sets.midcast.CureWeatherDay = set_combine(sets.midcast.Cure,{
ring1="Zodiac Ring",
back="Twiligiht Cape",
waist="Hachirin-no-Obi"
})
and then for example within the "Custom Spell Mapping Section at line 283, I put a
elseif default_spell_map == 'Cure' and state.Buff['Aurorastorm'] then
return "CureWeatherDay"
And it doesn't seem to work at all when I have Aurorastorm active. I have a feeling I'm missing something pretty obvious to most people. Could someone help me alter the code? I've put Kinematic's WHM.lua code in the spoiler below.
Code -------------------------------------------------------------------------------------------------------------------
-- Setup functions for this job. Generally should not be modified.
-------------------------------------------------------------------------------------------------------------------
-- Initialization function for this job file.
function get_sets()
mote_include_version = 2
-- Load and initialize the include file.
include('Mote-Include.lua')
end
-- Setup vars that are user-independent. state.Buff vars initialized here will automatically be tracked.
function job_setup()
state.Buff['Afflatus Solace'] = buffactive['Afflatus Solace'] or false
state.Buff['Afflatus Misery'] = buffactive['Afflatus Misery'] or false
end
-------------------------------------------------------------------------------------------------------------------
-- User setup functions for this job. Recommend that these be overridden in a sidecar file.
-------------------------------------------------------------------------------------------------------------------
-- Setup vars that are user-dependent. Can override this function in a sidecar file.
function user_setup()
state.OffenseMode:options('None', 'Normal')
state.CastingMode:options('Normal', 'Resistant')
state.IdleMode:options('Normal', 'PDT')
select_default_macro_book()
end
-- Define sets and vars used by this job file.
function init_gear_sets()
--------------------------------------
-- Start defining the sets
--------------------------------------
-- Precast Sets
-- Fast cast sets for spells
sets.precast.FC = {main=gear.FastcastStaff,ammo="Incantor Stone",
head="Nahtirah Hat",neck="Orison Locket",ear2="Loquacious Earring",
body="Vanir Cotehardie",hands="Gendewitha Gages",ring1="Prolix Ring",
back="Swith Cape +1",waist="Witful Belt",legs="Orvail Pants +1",feet="Chelona Boots +1"}
sets.precast.FC['Enhancing Magic'] = set_combine(sets.precast.FC, {waist="Siegel Sash"})
sets.precast.FC.Stoneskin = set_combine(sets.precast.FC['Enhancing Magic'], {head="Umuthi Hat"})
sets.precast.FC['Healing Magic'] = set_combine(sets.precast.FC, {legs="Orison Pantaloons +2"})
sets.precast.FC.StatusRemoval = sets.precast.FC['Healing Magic']
sets.precast.FC.Cure = set_combine(sets.precast.FC['Healing Magic'], {main="Tamaxchi",sub="Genbu's Shield",ammo="Impatiens"})
sets.precast.FC.Curaga = sets.precast.FC.Cure
sets.precast.FC.CureSolace = sets.precast.FC.Cure
-- CureMelee spell map should default back to Healing Magic.
-- Precast sets to enhance JAs
sets.precast.JA.Benediction = {body="Piety Briault"}
-- Waltz set (chr and vit)
sets.precast.Waltz = {
head="Nahtirah Hat",ear1="Roundel Earring",
body="Vanir Cotehardie",hands="Yaoyotl Gloves",
back="Refraction Cape",legs="Gendewitha Spats",feet="Gendewitha Galoshes"}
-- Weaponskill sets
-- Default set for any weaponskill that isn't any more specifically defined
gear.default.weaponskill_neck = "Asperity Necklace"
gear.default.weaponskill_waist = ""
sets.precast.WS = {
head="Nahtirah Hat",neck=gear.ElementalGorget,ear1="Bladeborn Earring",ear2="Steelflash Earring",
body="Vanir Cotehardie",hands="Yaoyotl Gloves",ring1="Rajas Ring",ring2="K'ayres Ring",
back="Refraction Cape",waist=gear.ElementalBelt,legs="Gendewitha Spats",feet="Gendewitha Galoshes"}
sets.precast.WS['Flash Nova'] = {
head="Nahtirah Hat",neck="Stoicheion Medal",ear1="Friomisi Earring",ear2="Hecate's Earring",
body="Vanir Cotehardie",hands="Yaoyotl Gloves",ring1="Rajas Ring",ring2="Strendu Ring",
back="Toro Cape",waist="Thunder Belt",legs="Gendewitha Spats",feet="Gendewitha Galoshes"}
-- Midcast Sets
sets.midcast.FastRecast = {
head="Nahtirah Hat",ear2="Loquacious Earring",
body="Vanir Cotehardie",hands="Dynasty Mitts",ring1="Prolix Ring",
back="Swith Cape +1",waist="Goading Belt",legs="Gendewitha Spats",feet="Gendewitha Galoshes"}
-- Cure sets
gear.default.obi_waist = "Goading Belt"
gear.default.obi_back = "Mending Cape"
sets.midcast.CureSolace = {main="Tamaxchi",sub="Genbu's Shield",ammo="Incantor Stone",
head="Gendewitha Caubeen",neck="Orison Locket",ear1="Lifestorm Earring",ear2="Orison Earring",
body="Orison Bliaud +2",hands="Theophany Mitts",ring1="Prolix Ring",ring2="Sirona's Ring",
back="Tuilha Cape",waist=gear.ElementalObi,legs="Orison Pantaloons +2",feet="Piety Duckbills +1"}
sets.midcast.Cure = {main="Tamaxchi",sub="Genbu's Shield",ammo="Incantor Stone",
head="Gendewitha Caubeen",neck="Orison Locket",ear1="Lifestorm Earring",ear2="Orison Earring",
body="Vanir Cotehardie",hands="Theophany Mitts",ring1="Prolix Ring",ring2="Sirona's Ring",
back="Tuilha Cape",waist=gear.ElementalObi,legs="Orison Pantaloons +2",feet="Piety Duckbills +1"}
sets.midcast.Curaga = {main="Tamaxchi",sub="Genbu's Shield",ammo="Incantor Stone",
head="Gendewitha Caubeen",neck="Orison Locket",ear1="Lifestorm Earring",ear2="Orison Earring",
body="Vanir Cotehardie",hands="Theophany Mitts",ring1="Prolix Ring",ring2="Sirona's Ring",
back="Tuilha Cape",waist=gear.ElementalObi,legs="Orison Pantaloons +2",feet="Piety Duckbills +1"}
sets.midcast.CureMelee = {ammo="Incantor Stone",
head="Gendewitha Caubeen",neck="Orison Locket",ear1="Lifestorm Earring",ear2="Orison Earring",
body="Vanir Cotehardie",hands="Bokwus Gloves",ring1="Prolix Ring",ring2="Sirona's Ring",
back="Tuilha Cape",waist=gear.ElementalObi,legs="Orison Pantaloons +2",feet="Piety Duckbills +1"}
sets.midcast.Cursna = {main="Beneficus",sub="Genbu's Shield",
head="Orison Cap +2",neck="Malison Medallion",
body="Orison Bliaud +2",hands="Hieros Mittens",ring1="Ephedra Ring",ring2="Sirona's Ring",
back="Mending Cape",waist="Goading Belt",legs="Theophany Pantaloons",feet="Gendewitha Galoshes"}
sets.midcast.StatusRemoval = {
head="Orison Cap +2",legs="Orison Pantaloons +2"}
-- 110 total Enhancing Magic Skill; caps even without Light Arts
sets.midcast['Enhancing Magic'] = {main="Beneficus",sub="Genbu's Shield",
head="Umuthi Hat",neck="Colossus's Torque",
body="Manasa Chasuble",hands="Dynasty Mitts",
back="Mending Cape",waist="Olympus Sash",legs="Piety Pantaloons",feet="Orison Duckbills +2"}
sets.midcast.Stoneskin = {
head="Nahtirah Hat",neck="Orison Locket",ear2="Loquacious Earring",
body="Vanir Cotehardie",hands="Dynasty Mitts",
back="Swith Cape +1",waist="Siegel Sash",legs="Gendewitha Spats",feet="Gendewitha Galoshes"}
sets.midcast.Auspice = {hands="Dynasty Mitts",feet="Orison Duckbills +2"}
sets.midcast.BarElement = {main="Beneficus",sub="Genbu's Shield",
head="Orison Cap +2",neck="Colossus's Torque",
body="Orison Bliaud +2",hands="Orison Mitts +2",
back="Mending Cape",waist="Olympus Sash",legs="Piety Pantaloons",feet="Orison Duckbills +2"}
sets.midcast.Regen = {main="Bolelabunga",sub="Genbu's Shield",
body="Piety Briault",hands="Orison Mitts +2",
legs="Theophany Pantaloons"}
sets.midcast.Protectra = {ring1="Sheltered Ring",feet="Piety Duckbills +1"}
sets.midcast.Shellra = {ring1="Sheltered Ring",legs="Piety Pantaloons"}
sets.midcast['Divine Magic'] = {main="Bolelabunga",sub="Genbu's Shield",
head="Nahtirah Hat",neck="Colossus's Torque",ear1="Psystorm Earring",ear2="Lifestorm Earring",
body="Vanir Cotehardie",hands="Yaoyotl Gloves",ring2="Sangoma Ring",
back="Refraction Cape",waist=gear.ElementalObi,legs="Theophany Pantaloons",feet="Gendewitha Galoshes"}
sets.midcast['Dark Magic'] = {main="Bolelabunga", sub="Genbu's Shield",
head="Nahtirah Hat",neck="Aesir Torque",ear1="Psystorm Earring",ear2="Lifestorm Earring",
body="Vanir Cotehardie",hands="Yaoyotl Gloves",ring1="Strendu Ring",ring2="Sangoma Ring",
back="Refraction Cape",waist="Demonry Sash",legs="Bokwus Slops",feet="Piety Duckbills +1"}
-- Custom spell classes
sets.midcast.MndEnfeebles = {main="Lehbrailg +2", sub="Mephitis Grip",
head="Nahtirah Hat",neck="Weike Torque",ear1="Psystorm Earring",ear2="Lifestorm Earring",
body="Vanir Cotehardie",hands="Yaoyotl Gloves",ring1="Aquasoul Ring",ring2="Sangoma Ring",
back="Refraction Cape",waist="Demonry Sash",legs="Bokwus Slops",feet="Piety Duckbills +1"}
sets.midcast.IntEnfeebles = {main="Lehbrailg +2", sub="Mephitis Grip",
head="Nahtirah Hat",neck="Weike Torque",ear1="Psystorm Earring",ear2="Lifestorm Earring",
body="Vanir Cotehardie",hands="Yaoyotl Gloves",ring1="Icesoul Ring",ring2="Sangoma Ring",
back="Refraction Cape",waist="Demonry Sash",legs="Bokwus Slops",feet="Piety Duckbills +1"}
-- Sets to return to when not performing an action.
-- Resting sets
sets.resting = {main=gear.Staff.HMP,
body="Gendewitha Bliaut",hands="Serpentes Cuffs",
waist="Austerity Belt",legs="Nares Trews",feet="Chelona Boots +1"}
-- Idle sets (default idle set not needed since the other three are defined, but leaving for testing purposes)
sets.idle = {main="Bolelabunga", sub="Genbu's Shield",ammo="Incantor Stone",
head="Nahtirah Hat",neck="Wiglen Gorget",ear1="Bloodgem Earring",ear2="Loquacious Earring",
body="Gendewitha Bliaut",hands="Serpentes Cuffs",ring1="Sheltered Ring",ring2="Paguroidea Ring",
back="Umbra Cape",waist="Witful Belt",legs="Nares Trews",feet="Herald's Gaiters"}
sets.idle.PDT = {main="Bolelabunga", sub="Genbu's Shield",ammo="Incantor Stone",
head="Nahtirah Hat",neck="Twilight Torque",ear1="Bloodgem Earring",ear2="Loquacious Earring",
body="Gendewitha Bliaut",hands="Gendewitha Gages",ring1="Defending Ring",ring2=gear.DarkRing.physical,
back="Umbra Cape",waist="Witful Belt",legs="Gendewitha Spats",feet="Herald's Gaiters"}
sets.idle.Town = {main="Bolelabunga", sub="Genbu's Shield",ammo="Incantor Stone",
head="Gendewitha Caubeen",neck="Wiglen Gorget",ear1="Bloodgem Earring",ear2="Loquacious Earring",
body="Gendewitha Bliaut",hands="Gendewitha Gages",ring1="Sheltered Ring",ring2="Paguroidea Ring",
back="Umbra Cape",waist="Witful Belt",legs="Nares Trews",feet="Herald's Gaiters"}
sets.idle.Weak = {main="Bolelabunga",sub="Genbu's Shield",ammo="Incantor Stone",
head="Nahtirah Hat",neck="Twilight Torque",ear1="Bloodgem Earring",ear2="Loquacious Earring",
body="Gendewitha Bliaut",hands="Yaoyotl Gloves",ring1="Defending Ring",ring2="Meridian Ring",
back="Umbra Cape",waist="Witful Belt",legs="Nares Trews",feet="Gendewitha Galoshes"}
-- Defense sets
sets.defense.PDT = {main=gear.Staff.PDT,sub="Achaq Grip",
head="Gendewitha Caubeen",neck="Twilight Torque",
body="Gendewitha Bliaut",hands="Gendewitha Gages",ring1="Defending Ring",ring2=gear.DarkRing.physical,
back="Umbra Cape",legs="Gendewitha Spats",feet="Gendewitha Galoshes"}
sets.defense.MDT = {main=gear.Staff.PDT,sub="Achaq Grip",
head="Nahtirah Hat",neck="Twilight Torque",
body="Vanir Cotehardie",hands="Yaoyotl Gloves",ring1="Defending Ring",ring2="Shadow Ring",
back="Tuilha Cape",legs="Bokwus Slops",feet="Gendewitha Galoshes"}
sets.Kiting = {feet="Herald's Gaiters"}
sets.latent_refresh = {waist="Fucho-no-obi"}
-- Engaged sets
-- Variations for TP weapon and (optional) offense/defense modes. Code will fall back on previous
-- sets if more refined versions aren't defined.
-- If you create a set with both offense and defense modes, the offense mode should be first.
-- EG: sets.engaged.Dagger.Accuracy.Evasion
-- Basic set for if no TP weapon is defined.
sets.engaged = {
head="Nahtirah Hat",neck="Asperity Necklace",ear1="Bladeborn Earring",ear2="Steelflash Earring",
body="Vanir Cotehardie",hands="Dynasty Mitts",ring1="Rajas Ring",ring2="K'ayres Ring",
back="Umbra Cape",waist="Goading Belt",legs="Gendewitha Spats",feet="Gendewitha Galoshes"}
-- Buff sets: Gear that needs to be worn to actively enhance a current player buff.
sets.buff['Divine Caress'] = {hands="Orison Mitts +2",back="Mending Cape"}
end
-------------------------------------------------------------------------------------------------------------------
-- Job-specific hooks for standard casting events.
-------------------------------------------------------------------------------------------------------------------
-- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
-- Set eventArgs.useMidcastGear to true if we want midcast gear equipped on precast.
function job_precast(spell, action, spellMap, eventArgs)
if spell.english == "Paralyna" and buffactive.Paralyzed then
-- no gear swaps if we're paralyzed, to avoid blinking while trying to remove it.
eventArgs.handled = true
end
if spell.skill == 'Healing Magic' then
gear.default.obi_back = "Mending Cape"
else
gear.default.obi_back = "Toro Cape"
end
end
function job_post_midcast(spell, action, spellMap, eventArgs)
-- Apply Divine Caress boosting items as highest priority over other gear, if applicable.
if spellMap == 'StatusRemoval' and buffactive['Divine Caress'] then
equip(sets.buff['Divine Caress'])
end
end
-------------------------------------------------------------------------------------------------------------------
-- Job-specific hooks for non-casting events.
-------------------------------------------------------------------------------------------------------------------
-- Handle notifications of general user state change.
function job_state_change(stateField, newValue, oldValue)
if stateField == 'Offense Mode' then
if newValue == 'Normal' then
disable('main','sub','range')
else
enable('main','sub','range')
end
end
end
-------------------------------------------------------------------------------------------------------------------
-- User code that supplements standard library decisions.
-------------------------------------------------------------------------------------------------------------------
-- Custom spell mapping.
function job_get_spell_map(spell, default_spell_map)
if spell.action_type == 'Magic' then
if (default_spell_map == 'Cure' or default_spell_map == 'Curaga') and player.status == 'Engaged' then
return "CureMelee"
elseif default_spell_map == 'Cure' and state.Buff['Afflatus Solace'] then
return "CureSolace"
elseif spell.skill == "Enfeebling Magic" then
if spell.type == "WhiteMagic" then
return "MndEnfeebles"
else
return "IntEnfeebles"
end
end
end
end
function customize_idle_set(idleSet)
if player.mpp < 51 then
idleSet = set_combine(idleSet, sets.latent_refresh)
end
return idleSet
end
-- Called by the 'update' self-command.
function job_update(cmdParams, eventArgs)
if cmdParams[1] == 'user' and not areas.Cities:contains(world.area) then
local needsArts =
player.sub_job:lower() == 'sch' and
not buffactive['Light Arts'] and
not buffactive['Addendum: White'] and
not buffactive['Dark Arts'] and
not buffactive['Addendum: Black']
if not buffactive['Afflatus Solace'] and not buffactive['Afflatus Misery'] then
if needsArts then
send_command('@input /ja "Afflatus Solace" <me>;wait 1.2;input /ja "Light Arts" <me>')
else
send_command('@input /ja "Afflatus Solace" <me>')
end
end
end
end
-- Function to display the current relevant user state when doing an update.
function display_current_job_state(eventArgs)
display_current_caster_state()
eventArgs.handled = true
end
-------------------------------------------------------------------------------------------------------------------
-- Utility functions specific to this job.
-------------------------------------------------------------------------------------------------------------------
-- Select default macro book on initial load or subjob change.
function select_default_macro_book()
-- Default macro set/book
set_macro_page(4, 14)
end
サーバ: Asura
Game: FFXI
Posts: 363
By Asura.Vafruvant 2015-10-03 10:10:32
sets.midcast.CureWeatherDay = set_combine(sets.midcast.Cure,{
ring1="Zodiac Ring",
back="Twiligiht Cape",
waist="Hachirin-no-Obi"
}) You don't need to do all this; just use this: Code gear.default.obi_waist = "item name"
gear.default.obi_back = "item name"
gear.default.obi_ring = "item name"
sets.midcast['Elemental Magic'] = {ring1=gear.ElementalRing,back=gear.ElementalCape,waist=gear.ElementalObi} where the item names are whatever you want your non-matching weather/day casting piece to be.
Ragnarok.Boq
サーバ: Ragnarok
Game: FFXI
Posts: 31
By Ragnarok.Boq 2015-10-03 11:42:40
Thanks so much! That worked perfectly. I didn't realize it was so simple.
By Aeyela 2015-10-03 14:00:34
Directly, this will only work with his files, but it could easily be tweaked for a non-Mote file. I've seen buffactive check for buff IDs (buffactive[###]), as in the event of Haste 2 or Victory March instead of Advancing March, but I've had poor experiences with it in the past. You can play with it if you want, as all the buff IDs are listed in /Windower4/res/buffs.lua
I'm having problems with buff active when using the names as well now. Actually, I likely have been since the latest update to GS, though only with Thief (which directly uses name inputs for checking stacks on Rudras) have I now noticed it.
Changing the names to their relative ID's in the res/buffs.lua List file fixes it no problem. Shame though, it's definitely easier and more readable to put "Sneak Attack" rather than "65".
(Posting as a mere follow up, since I know a few people have been having problems using the names recently in various GS related questions.)
サーバ: Siren
Game: FFXI
Posts: 228
By Siren.Noxzema 2015-10-04 15:23:00
So I'm failing at google atm... I know I've seen it somewhere before, but how do you set up a function to equip different gear if other slots are empty (I.E in salvage)?
As an example, Code if player.status == 'Engaged' and player.equipment.body == 'empty' then
equip(set_combine(sets.avatar.perp, {head="Glyphic Horn +1"}))
elseif player.status == 'Idle' and player.equipment.body == 'empty' then
equip(set_combine(sets.avatar.perp, {head="Glyphic Horn +1"}))
Is what I thought would work, but it doesn't do anything.
サーバ: Asura
Game: FFXI
Posts: 363
By Asura.Vafruvant 2015-10-04 23:59:48
So I'm failing at google atm... I know I've seen it somewhere before, but how do you set up a function to equip different gear if other slots are empty (I.E in salvage)?
As an example, Code if player.status == 'Engaged' and player.equipment.body == 'empty' then
equip(set_combine(sets.avatar.perp, {head="Glyphic Horn +1"}))
elseif player.status == 'Idle' and player.equipment.body == 'empty' then
equip(set_combine(sets.avatar.perp, {head="Glyphic Horn +1"}))
Is what I thought would work, but it doesn't do anything. Anytime I've done salvage, it equips gear as I go, as just about every action makes a check and will equip gear. You shouldn't need to do anything extra to make it work, and if you do, you probably have something coded incorrectly elsewhere.
Bismarck.Inference
サーバ: Bismarck
Game: FFXI
Posts: 417
By Bismarck.Inference 2015-10-05 20:10:20
So I'm failing at google atm... I know I've seen it somewhere before, but how do you set up a function to equip different gear if other slots are empty (I.E in salvage)?
As an example, Code if player.status == 'Engaged' and player.equipment.body == 'empty' then
equip(set_combine(sets.avatar.perp, {head="Glyphic Horn +1"}))
elseif player.status == 'Idle' and player.equipment.body == 'empty' then
equip(set_combine(sets.avatar.perp, {head="Glyphic Horn +1"}))
Is what I thought would work, but it doesn't do anything.
Your code is fine in general so I'd imagine there's a difference between encumbrance and just not having something equipped in a slot that is open.
Mote-Utility has an is_encumbered function, so you could either include that file or copy/paste the function into your file.
サーバ: Siren
Game: FFXI
Posts: 228
By Siren.Noxzema 2015-10-05 20:46:49
So I'm failing at google atm... I know I've seen it somewhere before, but how do you set up a function to equip different gear if other slots are empty (I.E in salvage)?
As an example, Code if player.status == 'Engaged' and player.equipment.body == 'empty' then
equip(set_combine(sets.avatar.perp, {head="Glyphic Horn +1"}))
elseif player.status == 'Idle' and player.equipment.body == 'empty' then
equip(set_combine(sets.avatar.perp, {head="Glyphic Horn +1"}))
Is what I thought would work, but it doesn't do anything. Anytime I've done salvage, it equips gear as I go, as just about every action makes a check and will equip gear. You shouldn't need to do anything extra to make it work, and if you do, you probably have something coded incorrectly elsewhere.
It does work fine, I was just trying to get it to equip different gear as I go instead of my normal gear, to get more -perp, saving mp.
Bismarck.Inference said: »So I'm failing at google atm... I know I've seen it somewhere before, but how do you set up a function to equip different gear if other slots are empty (I.E in salvage)?
As an example, Code if player.status == 'Engaged' and player.equipment.body == 'empty' then
equip(set_combine(sets.avatar.perp, {head="Glyphic Horn +1"}))
elseif player.status == 'Idle' and player.equipment.body == 'empty' then
equip(set_combine(sets.avatar.perp, {head="Glyphic Horn +1"}))
Is what I thought would work, but it doesn't do anything.
Your code is fine in general so I'd imagine there's a difference between encumbrance and just not having something equipped in a slot that is open.
Mote-Utility has an is_encumbered function, so you could either include that file or copy/paste the function into your file.
Thanks for the heads up, I'll check it out.
サーバ: Asura
Game: FFXI
Posts: 13
By Asura.Miizuki 2015-10-06 16:50:36
Hey,
I'm looking for some help on Gearswap please, I'm kinda new to it since like a week or so.
I was wondering if something was possible on my BST.
The thing is I made it so my sub axe and legs switch for the recast delay of Sic & Ready so I'm losing all my TP because of this but it's okay as long I don't fight together with my pet.
My problem is: Is it possible to make a rule that make the axe does not switch and only the legs when I fight along with my Pet so I won't lose my TP to WS? If yes, could someoone tell me what to write and where please? would be much appreciated.
Hope I explained this well, my english isn't that great.
By Bongarippa 2015-10-06 17:23:28
Could just equip the axes you want to wield and leave the others you dont in your satchel or safe. Thats how I do it with my bst lua.
サーバ: Asura
Game: FFXI
Posts: 13
By Asura.Miizuki 2015-10-06 18:17:18
Thanks for the answer, I did not think about that but I would like a way where I can keep all my axes on me if it's possible.
But yea if there are not any way to do this I'll just do as you said.
Quetzalcoatl.Falkirk
サーバ: Quetzalcoatl
Game: FFXI
Posts: 683
By Quetzalcoatl.Falkirk 2015-10-06 19:18:53
My problem is: Is it possible to make a rule that make the axe does not switch and only the legs when I fight along with my Pet so I won't lose my TP to WS? If yes, could someoone tell me what to write and where please? would be much appreciated.
In your precast you can check whether or not you're engaged before you do the gear swaps. i.e.:
Code function job_precast
if spell.type == "Monster" then
if player.status == 'Engaged' then
equip(ReadyLegs)
else
equip(ReadyAxeAndLegs)
end
end
...
サーバ: Asura
Game: FFXI
Posts: 13
By Asura.Miizuki 2015-10-06 21:47:57
Hey Falkirk, thanks for your answer.
Here is what I try to do based on what you said.
Code
sets.midcast.Pet.ReadyRecast = {sub="Charmer's Merlin",legs="Desultor Tassets",}
sets.midcast.Pet.ReadyEngaged = {legs="Desultor Tassets",}
I added the sets.midcast.Pet.ReadyEngaged a bit hgher in the lua then I did this in the end of the lua but it does not seem to works.
Code
if ready_moves_to_check:contains(spell.name) and pet.status == 'Engaged' then
classes.CustomClass = "WS"
equip(sets.midcast.Pet.ReadyRecast)
else
equip(sets.midcast.Pet.ReadyEngaged)
end
end
I only added the line Code
else
equip(sets.midcast.Pet.ReadyEngaged)
Like I said I'm totally new on Gearswap, sorry if I did a bad mistake, well I'm totally sure I did a mistake there but I don't know where, I can even do //gs reload without him to tell me there is a error.
Quetzalcoatl.Falkirk
サーバ: Quetzalcoatl
Game: FFXI
Posts: 683
By Quetzalcoatl.Falkirk 2015-10-06 22:34:28
Code
if ready_moves_to_check:contains(spell.name) and pet.status == 'Engaged' then
classes.CustomClass = "WS"
equip(sets.midcast.Pet.ReadyRecast)
else
equip(sets.midcast.Pet.ReadyEngaged)
end
end
Your code just needs a slight modification for the outcome you want. Try something like this:
Code
if ready_moves_to_check:contains(spell.name) and pet.status == 'Engaged' then
classes.CustomClass = "WS"
if player.status == 'Engaged' then
equip(sets.midcast.Pet.ReadyEngaged)
else
equip(sets.midcast.Pet.ReadyRecast)
end
end
By vm0d 2015-10-07 01:41:12
could also try this instead of making more gearsets:
Code function job_precast(spell, action, spellMap, eventArgs)
if player.status == 'Engaged' then
disable('main','sub','range')
else
enable('main','sub','range')
end
end
additionally:
Code function user_setup()
send_command('bind f9 gs c cycle OffenseMode')
state.OffenseMode:options('None', 'Normal')
end
function job_state_change(stateField, newValue, oldValue)
if stateField == 'Offense Mode' then
if newValue == 'Normal' then
disable('main','sub','range')
else
enable('main','sub','range')
end
end
end
can use both of these methods of locking in your gs. then you can either manually lock gear or auto-lock if you randomly engage.
just be aware that gs will lock whatever you have equipped in main, sub, range when you enable offensemode=normal or engage a monster. you can change them manually, but gs will not equip your sets.engaged items for you.
サーバ: Asura
Game: FFXI
Posts: 13
By Asura.Miizuki 2015-10-07 02:37:40
Thanks again Falkirk, that's what I was thinking to do right when I logged out yesterday.
But it seems that there is an error this time, it says:
end expected (to close 'function' at line 389) near '<eof>'
The end of my lua look like this now, not sure if I that's the wrong place where I did put what you write or something too.
Code
function job_precast(spell, action, spellMap, eventArgs)
cancel_conflicting_buffs(spell, action, spellMap, eventArgs)
-- Define class for Sic and Ready moves.
if ready_moves_to_check:contains(spell.name) and pet.status == 'Engaged' then
classes.CustomClass = "WS"
if player.status == 'Engaged' then
equip(sets.midcast.Pet.ReadyEngaged)
else
equip(sets.midcast.Pet.ReadyRecast)
end
end
function job_pet_midcast(spell, action, spellMap, eventArgs)
-- Equip monster correlation gear, as appropriate
if ready_moves_to_check:contains(spell.english) and pet.status == 'Engaged' then
equip(sets.midcast.Pet.WS)
end
if mab_ready_moves:contains(spell.english) and pet.status == 'Engaged' then
equip(sets.midcast.Pet.MabReady)
end
if buffactive['Unleash'] then
hands="Regimen Mittens"
end
-- If Pet TP, before bonuses, is less than a certain value, equip Ferine Manoplas +1 or +2
end
-- Return true if we handled the aftercast work. Otherwise it will fall back
-- to the general aftercast() code in Mote-Include.
function job_aftercast(spell, action, spellMap, eventArgs)
end
By Aeyela 2015-10-07 02:46:10
You need an extra end before job_pet_midcast. If you make sure you indent your code properly it's a lot easier to spot when they're missing.
So the job_precast function would become:
Code function job_precast(spell, action, spellMap, eventArgs)
cancel_conflicting_buffs(spell, action, spellMap, eventArgs)
-- Define class for Sic and Ready moves.
if ready_moves_to_check:contains(spell.name) and pet.status == 'Engaged' then
classes.CustomClass = "WS"
if player.status == 'Engaged' then
equip(sets.midcast.Pet.ReadyEngaged)
else
equip(sets.midcast.Pet.ReadyRecast)
end
end
At which point you can see you're missing an end on the end. :)
サーバ: Asura
Game: FFXI
Posts: 13
By Asura.Miizuki 2015-10-07 02:48:21
Wow I finally got it to works, Thanks alot Vm0d.
Thank you for your help too Aeyela and Falkirk.
what I did was this, not sure if it's correct but it seems to works fine for me, when I fight along with my pets it doesn't switch my axe and when I disengage and use a ready move it switch my axes.
Code
-- Define class for Sic and Ready moves.
if ready_moves_to_check:contains(spell.name) and pet.status == 'Engaged' then
classes.CustomClass = "WS"
equip(sets.midcast.Pet.ReadyRecast)
end
if player.status == 'Engaged' then
disable('main','sub','range')
else
enable('main','sub','range')
end
end
By vm0d 2015-10-07 02:53:15
Wow I finally got it to works, Thanks alot Vm0d.
Thank you for your help too Aeyela and Falkirk.
what I did was this, not sure if it's correct but it seems to works fine for me, when I fight along with my pets it doesn't switch my axe and when I disengage and use a ready move it switch my axes.
Code
-- Define class for Sic and Ready moves.
if ready_moves_to_check:contains(spell.name) and pet.status == 'Engaged' then
classes.CustomClass = "WS"
equip(sets.midcast.Pet.ReadyRecast)
end
if player.status == 'Engaged' then
disable('main','sub','range')
else
enable('main','sub','range')
end
end
yeah, that's the easiest way to do it if you just don't want to switch while you're engaged. :]
[+]
サーバ: Siren
Game: FFXI
Posts: 116
By Siren.Blackroses 2015-10-07 13:10:13
Hello, I am trying to add a function to my smn gearswap so that if I am engaged and have above 100 TP, main and sub are locked.
Here's the code I currently have. I dosnt return me any error, but it dosnt work as expected.
Code if player.status == 'Engaged' then
if player.tp >= 100 then
disable('main','sub')
else
enable('main','sub')
end
end
Help would be appreciated!
サーバ: Asura
Game: FFXI
Posts: 363
By Asura.Vafruvant 2015-10-07 18:28:28
Hello, I am trying to add a function to my smn gearswap so that if I am engaged and have above 100 TP, main and sub are locked.
Here's the code I currently have. I dosnt return me any error, but it dosnt work as expected.
Code if player.status == 'Engaged' then
if player.tp >= 100 then
disable('main','sub')
else
enable('main','sub')
end
end
Help would be appreciated! It depends on where you have that chunk in your file. If it's in a precast function, it will only trigger on the precast phase of abilities/spells, same with midcast or aftercast. Ideally, you would have it in customize_melee_set, but I think that is a Mote-based function and won't work unless it's uses his includes. Otherwise, everything you have here should work, but I would caution using 100 TP as the deciding point, given Ionis will always give you 100 TP on return, and there might be times in Adoulin you need to switch weapons.
サーバ: Siren
Game: FFXI
Posts: 116
By Siren.Blackroses 2015-10-07 18:50:57
Thanks for your answer Vafruvant. The gearswap I use is indeed Mots based, so I will have to look deeper into that customize_melee_set.
As for the TP return, im kinda old school, my mind is still set on 100, 200 and 300 TP WS. I Definitly needed to put 1000 there.
Edit: Any chance you could guide me or write me that customize_melee_set?
edit2 :Got it working with:
Code -- Modify the default melee set after it was constructed.
function customize_melee_set(meleeSet)
if player.status == 'Engaged' then
if player.tp >= 1000 then
meleeSet = (sets.engaged)
disable('main','sub','ammo')
else
enable('main','sub','ammo')
end
return meleeSet
end
サーバ: Asura
Game: FFXI
Posts: 363
By Asura.Vafruvant 2015-10-07 22:44:59
Thanks for your answer Vafruvant. The gearswap I use is indeed Mots based, so I will have to look deeper into that customize_melee_set.
As for the TP return, im kinda old school, my mind is still set on 100, 200 and 300 TP WS. I Definitly needed to put 1000 there.
Edit: Any chance you could guide me or write me that customize_melee_set?
edit2 :Got it working with:
Code -- Modify the default melee set after it was constructed.
function customize_melee_set(meleeSet)
if player.status == 'Engaged' then
if player.tp >= 1000 then
meleeSet = (sets.engaged)
disable('main','sub','ammo')
else
enable('main','sub','ammo')
end
return meleeSet
end Three things:
1) you don't need the line meleeSet = (sets.engaged); it already knows that.
2) you can change ammo and keep tp, you can't change ranged (bows, etc)
3) you're missing an end in that function, and it should be throwing an error. Double check your file and make sure you don't have a stray end somewhere, because that could brick a multitude of functions.
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.
|
|