Gearswap Support Thread

言語: JP EN DE FR
2010-06-21
New Items
users online
フォーラム » Windower » Support » Gearswap Support Thread
Gearswap Support Thread
First Page 2 3 ... 144 145 146 ... 182 183 184
Offline
By Shichishito 2018-10-16 05:27:16  
Quote:
in regards to the abils.xml you need to edit the job_abilities.lua for this to work

changed job_abilities.lua to

but it still throws the flow.lua:349 error code.
unlike the weapon_skills.lua the job_abilities.lua doesn't have any "skillchain_a="",skillchain_b="",skillchain_c structure by default.

if i call '..spell.skillchain_a..' on a regular WS like chant du cygne it does return the corresponding skillchain property from the weapon_skills.lua.

*edit*
the job_abilities.lua and probably all the files in the res folder are auto generated (as the comment in the first line states). means once i restart windower it will recreate the list and all my editing is lost (just tested that).

i suspect they get their information from the abils.xml i originaly edited, is there any way to edit the function that generates the dictionary in the job_abilities.lua or is that only possible for windower devs?
Offline
Posts: 9
By Clandestine350 2018-10-17 16:29:13  
Hi, I'm trying to set up a section that will automatically reapply Utsusemi when my last shadow goes away, however due to the unique nature of Copy Image being a differently named buff depending on how many shadows you have, my currently-written script recasts Utsu whenever any shadow it removed, not just the last.
Any help would be appreciated.
Code
function buff_change(buff, gain)	
	if not T{'Copy Image (3)', 'Copy Image (2)', 'Copy Image',}:contains(buffactive) then
		if player.status == 'Engaged' then
			send_command('@input /ma "Utsusemi: Ni" <me>;')
		end
	end
end
Offline
Posts: 9
By Clandestine350 2018-10-17 20:19:25  
I figured out a way to do it. I put a cancel_spell() in precast that checked to see if Copy Image was active to stop it from casting each time I lost a shadow unless I had no more shadows.
Code
if spell.english:startswith('Utsusemi') then
	if 	buffactive['Copy Image'] or
		buffactive['Copy Image (2)'] or
		buffactive['Copy Image (3)'] then
		cancel_spell()
	end
end


But if anyone has a cleaner was to do it, I would be interested in seeing it. Thanks.
 Carbuncle.Kigensuro
Offline
サーバ: Carbuncle
Game: FFXI
user: dlsmd
Posts: 93
By Carbuncle.Kigensuro 2018-10-18 12:13:34  
Clandestine350 said: »
I figured out a way to do it. I put a cancel_spell() in precast that checked to see if Copy Image was active to stop it from casting each time I lost a shadow unless I had no more shadows.
Code
if spell.english:startswith('Utsusemi') then
	if 	buffactive['Copy Image'] or
		buffactive['Copy Image (2)'] or
		buffactive['Copy Image (3)'] then
		cancel_spell()
	end
end


But if anyone has a cleaner was to do it, I would be interested in seeing it. Thanks.
most do it by cancel the buff not the spell so they can re-up the Copy Image count
this is how most people do it
Code
    if spell.english:startswith('Utsusemi') then
        if buffactive['Copy Image'] then
            send_command('cancel 66')
        elseif buffactive['Copy Image (2)'] then 
            send_command('cancel 444')
        elseif buffactive['Copy Image (3)'] then
            send_command('cancel 445')
        elseif buffactive['Copy Image (4+)'] then
            send_command('cancel 446')
        end
    end

and here is a way to do it to save you from casting an unneeded spell
Code
    local spellt = string.split(spell.english,': ')
    if spellt[1] == 'Utsusemi' then
        if buffactive['Copy Image'] then
            send_command('cancel 66')
        elseif buffactive['Copy Image (2)'] then 
            send_command('cancel 444')
        elseif buffactive['Copy Image (3)'] then
            if spellt[2] == 'Ichi' then
                cancel_spell()
            else
                send_command('cancel 445')
            end
        elseif buffactive['Copy Image (4+)'] then
            if spellt[2] == 'Ichi' or spellt[2] == 'Ni' then
                cancel_spell()
            else
                send_command('cancel 446')
            end
        end
    end


you do need to use the cancel addon
 Asura.Phinneus
Offline
サーバ: Asura
Game: FFXI
user: ayer
Posts: 23
By Asura.Phinneus 2018-10-23 10:47:08  
Trying to make this work in my Corsair Gearswap. Basically I want to equip Oshosi pieces along with Chasseur's Frac +1 in my Ranged attack set when Triple Shot is active. Can anyone help me out?
Code
	if spell.type == 'WeaponSkill' then
		if spell.skill == "Marksmanship" then
			if spell.element == 'None' then
				-- physical weaponskills
				bullet_name = gear.WSbullet
			else
				-- magical weaponskills
				bullet_name = gear.MAbullet
			end
		else
			-- Ignore non-ranged weaponskills
			return
		end
	elseif spell.type == 'CorsairShot' then
		bullet_name = gear.QDbullet
	elseif spell.action_type == 'Ranged Attack' then
		bullet_name = gear.RAbullet
		if buffactive['Triple Shot'] then
			equip (sets.midcast.RA,{head="Oshosi Mask",body="Chasseur's Frac +1",legs="Oshosi Trousers"})
		else
			equip (sets.midcast.RA)
		end
	end
 Bismarck.Xurion
Offline
サーバ: Bismarck
Game: FFXI
user: Xurion
Posts: 694
By Bismarck.Xurion 2018-10-24 01:59:19  
Asura.Phinneus said: »
Trying to make this work in my Corsair Gearswap. Basically I want to equip Oshosi pieces along with Chasseur's Frac +1 in my Ranged attack set when Triple Shot is active. Can anyone help me out?
Code
	if spell.type == 'WeaponSkill' then
		if spell.skill == "Marksmanship" then
			if spell.element == 'None' then
				-- physical weaponskills
				bullet_name = gear.WSbullet
			else
				-- magical weaponskills
				bullet_name = gear.MAbullet
			end
		else
			-- Ignore non-ranged weaponskills
			return
		end
	elseif spell.type == 'CorsairShot' then
		bullet_name = gear.QDbullet
	elseif spell.action_type == 'Ranged Attack' then
		bullet_name = gear.RAbullet
		if buffactive['Triple Shot'] then
			equip (sets.midcast.RA,{head="Oshosi Mask",body="Chasseur's Frac +1",legs="Oshosi Trousers"})
		else
			equip (sets.midcast.RA)
		end
	end
Even though you haven't supplied the whole function, it looks like you're putting the code for triple shot in the precast function?

You want triple shot gear in the midcast function iirc.
 Odin.Archaide
Offline
サーバ: Odin
Game: FFXI
user: Archaide
Posts: 124
By Odin.Archaide 2018-10-26 10:16:05  
Not sure whats going on with my Lua, everything works perfect except for when use Insurgency, it will equip the whole set but not equip the Ratri Sallet +1, it keeps the Flamma Zuchetto +2 on. It will equip ratri head for all the other WS's but not Insurgency. Need some help ..

My DRK Lua
Offline
Posts: 6
By Pudgy 2018-11-01 00:12:26  
I need some help with LUA logic. For the past couple weeks I have been diving into various job LUAs and trying to teach myself how to customize them according to my preferences for personal use. The wall I've hit is in my BLU LUA (original file was bokura_blu.lua). I want to set F9 to be a toggle, so when it is on it equips and locks my melee weapons on so no other equip set will swap them out (causing TP loss). On BLU I have multiple weapons built into various equip sets that I want to be able to utilize while cleaving (and I don't care about keeping TP). Examples include: (other gear not mentioned, but each set below does have gear in it other than just the weapons)

-In my sets.Idle.Town and sets.Idle.Cleave and sets.Idle.Refresh, I use main="Bolelabunga" and sub="Genmei Shield".
-In my sets.TP.Melee, I use main="Sequence" and sub="Almace".
-In my sets.PDT I use main="Bolelabunga" and sub="Genmei Shield".
-In my sets.skill, I use 2x Iris.
-In my sets.Precast.Fastcast I use 2x Nibiru Blades.
-In my sets.Precast['Blue Magic'], I use 2x Iris.
-In my sets.Midcast.Cure I use 2x Nibiru Cudgels.
Etc Etc Etc... needless to say, my weapons are constantly changing with various gearsets. With a single button toggle, I want to continue to be able to utilize the rest of those gear in those gearsets, but equip and lock on my main and sub weapons so they don't change along with the rest of the gear.

Here is what I added to Bokura's LUA to try to do it:
-In the "function get_sets()" section:

Lock_Main = 'ON' -- Set Default Lock Main Weapon ON or OFF Here -
send_command('bind F9 gs c Melee')
function file_unloac()
send_command('unbind F9')
sets.Melee = {main="Sequence",sub="Almace")

In the "function self_command(command)" section:

elseif command == 'Melee' then -- Lock Main Weapon Toggle --
if Lock_Main == 'ON' then
Lock_Main = 'OFF'
add_to_chat(123,'Melee Weapons: [Unlocked]')
else
equip(sets.Melee)
Lock_Main = 'ON'
add_to_chat(158,'Melee Weapons: [Locked]')
end
status_change(player.status)

In the "function check_equip_lock()" section:

if Lock_Main == 'ON' then
equip(sets.Melee)
disable('main','sub')
else
enable('main','sub')
end

The LUA loads properly, no errors, and hitting F9 displays the text saying it is toggling, but nothing actually happens. The weapons don't equip and lock. I've been doing trial and error for 3 days now and I need a lifeline. What am I missing or doing wrong here?
 Carbuncle.Kigensuro
Offline
サーバ: Carbuncle
Game: FFXI
user: dlsmd
Posts: 93
By Carbuncle.Kigensuro 2018-11-01 01:43:15  
Pudgy said: »
I need some help with LUA logic. For the past couple weeks I have been diving into various job LUAs and trying to teach myself how to customize them according to my preferences for personal use. The wall I've hit is in my BLU LUA (original file was bokura_blu.lua). I want to set F9 to be a toggle, so when it is on it equips and locks my melee weapons on so no other equip set will swap them out (causing TP loss). On BLU I have multiple weapons built into various equip sets that I want to be able to utilize while cleaving (and I don't care about keeping TP). Examples include: (other gear not mentioned, but each set below does have gear in it other than just the weapons)
...
Etc Etc Etc... needless to say, my weapons are constantly changing with various gearsets. With a single button toggle, I want to continue to be able to utilize the rest of those gear in those gearsets, but equip and lock on my main and sub weapons so they don't change along with the rest of the gear.

Here is what I added to Bokura's LUA to try to do it:
...

The LUA loads properly, no errors, and hitting F9 displays the text saying it is toggling, but nothing actually happens. The weapons don't equip and lock. I've been doing trial and error for 3 days now and I need a lifeline. What am I missing or doing wrong here?
we cant help you out with this unless you post your whole file
--but please post it to something ;like Pastebin then put the link to it here
Offline
Posts: 6
By Pudgy 2018-11-01 08:04:09  
Okay, here we go: https://pastebin.com/0qRp0NWn
 Carbuncle.Kigensuro
Offline
サーバ: Carbuncle
Game: FFXI
user: dlsmd
Posts: 93
By Carbuncle.Kigensuro 2018-11-01 14:12:04  
Pudgy said: »
your main issue is that the check_equip_lock function is never called in your code

if you do not call a function it will do nothing
--all if gearswaps predetermined functions are called by gearswap
--all of your functions (those that are not gearswaps predetermined functions) you must call somewhere

these are all of gearswaps called functions
get_sets()
pretarget(spell)
precast(spell)
midcast(spell)
aftercast(spell)
pet_change(pet,gain)
pet_midcast(spell)
pet_aftercast(spell)
pet_status_change(new,old)
filtered_action(spell)
sub_job_change(new,old)
status_change(new,old)
pet_status_change(new,old)
buff_change(name,gain,buff_table)
buff_refresh(name,buff_details)
party_buff_change(member,name,gain,buffs)
indi_change(indi_table,gain)
self_command(command)
file_unload(new_job)
Offline
Posts: 6
By Pudgy 2018-11-01 18:03:09  
Carbuncle.Kigensuro said: »
your main issue is that the check_equip_lock function is never called in your code

if you do not call a function it will do nothing
--all if gearswaps predetermined functions are called by gearswap
--all of your functions (those that are not gearswaps predetermined functions) you must call somewhere

Okay. I grasp a bit of what you are saying, but keep in mind I'm really kind of a beginner at this. So if the check_equip_lock function is not a predetermined function called by gearswap, how exactly do I "call" it in my code? What would the line(s) look like and where would I place them?

Or, as an alternative, would there be another way to accomplish what I am trying to do using the predetermined functions?
 Quetzalcoatl.Phob
Offline
サーバ: Quetzalcoatl
Game: FFXI
user: Phobien
Posts: 4
By Quetzalcoatl.Phob 2018-11-02 05:56:36  
Hello everyone,

my problem is that my gearswap just stops working, with no error message. In this time, while gearswap is still activated, i can't even use magic or abilities.
Before this happens, everything works totaly fine....and then, out of the blue, nothing. Sometimes it takes 20 mins then it can take like 1 hour.
I reinstalled windower, even refreshed all the lib folders.
Unload/reload doesn't work at all, i need restart whole ffxi to use gearswap again.... for some time .

Sorry if that problem has been asked before, but i could't find anything like this.

Best regards!
 Bismarck.Xurion
Offline
サーバ: Bismarck
Game: FFXI
user: Xurion
Posts: 694
By Bismarck.Xurion 2018-11-02 16:24:29  
Can you post your gearswap code?
 Quetzalcoatl.Phob
Offline
サーバ: Quetzalcoatl
Game: FFXI
user: Phobien
Posts: 4
By Quetzalcoatl.Phob 2018-11-02 17:34:08  
Gearswap

But like I said before, it works fine until it stops without any errors/messages/etc, I have the same problem with rolltracker btw. And when it stops I cant do anything beside walking & autoattack until i unload gearswap.
My friends tested that lua and they said it works fine, so maybe its an other problem?

And nope I dont have problems with dc or lag, also no router issues.
Gearswap just stops working at some point and even i can restart it it wont do anything.
The only thing what helps is to restart ffxi and then it works for like 30 mins ....
 Carbuncle.Kigensuro
Offline
サーバ: Carbuncle
Game: FFXI
user: dlsmd
Posts: 93
By Carbuncle.Kigensuro 2018-11-03 10:57:07  
Pudgy said: »
Carbuncle.Kigensuro said: »
your main issue is that the check_equip_lock function is never called in your code

if you do not call a function it will do nothing
--all if gearswaps predetermined functions are called by gearswap
--all of your functions (those that are not gearswaps predetermined functions) you must call somewhere

Okay. I grasp a bit of what you are saying, but keep in mind I'm really kind of a beginner at this. So if the check_equip_lock function is not a predetermined function called by gearswap, how exactly do I "call" it in my code? What would the line(s) look like and where would I place them?

Or, as an alternative, would there be another way to accomplish what I am trying to do using the predetermined functions?
the basic call for a function is the function name followed by ()
so in your cast you would use this on its own line
check_equip_lock()
 Bismarck.Xurion
Offline
サーバ: Bismarck
Game: FFXI
user: Xurion
Posts: 694
By Bismarck.Xurion 2018-11-03 11:55:23  
Quetzalcoatl.Phob said: »
Gearswap

But like I said before, it works fine until it stops without any errors/messages/etc, I have the same problem with rolltracker btw. And when it stops I cant do anything beside walking & autoattack until i unload gearswap.
My friends tested that lua and they said it works fine, so maybe its an other problem?

And nope I dont have problems with dc or lag, also no router issues.
Gearswap just stops working at some point and even i can restart it it wont do anything.
The only thing what helps is to restart ffxi and then it works for like 30 mins ....
I'm gonna guess it's something else, considering your friend tested it without issue and rolltracker stops also.

I'm using the same base Lua from Kinematics too and have seen no issues like this. When this happens again, try telling Gearswap to equip your ranged attack set:
Code
//gs equip midcast.RA


If this doesn't work, try enabling all slots:
Code
//gs enable all


Then equip the set again. I've seen some odd occurrences where Gearswap has disabled some/all slots. Something to try at least.

Oh also your triple shot gear isn't placed correctly. You need to be wearing your triple shot +% gear when you fire your ranged attack - wearing it when you use the JA does nothing. This is a problem in the original Kinematics Lua.
 Quetzalcoatl.Phob
Offline
サーバ: Quetzalcoatl
Game: FFXI
user: Phobien
Posts: 4
By Quetzalcoatl.Phob 2018-11-03 12:03:14  
Thank you for the info with triple shot!
Offline
Posts: 6
By Pudgy 2018-11-03 12:25:15  
Kigensuro- thank you! That did it.
 
Offline
Posts:
By 2018-11-12 11:16:28
 Undelete | Edit  | Link | 引用 | 返事
 
Post deleted by User.
Offline
By Shichishito 2018-11-14 07:54:57  
trying to write a addon that requires to know current ready and stratagem charges.
is it reasonable to assume that everyone is using kinematics BST / SCH luas or if they made custom ones, built upon kinematics ones?

and if yes, can i call functions that are defined inside the corresponding job.luas from my addon file?

reason i'm asking this is cause i'd like to use the return values "currentCharges" from the functions "get_current_ready_count()" (BST.lua) and "get_current_strategem_count()" (SCH.lua) to use it in my addon. those functions rely on checking for certain gearsets (for gear that potentialy lowers recast delay) and if the set name got altered or isn't there it will either break the function or return a wrong value. thats the same reason why i can't define a similar function in the addon itself.

i'd like to use it for example this way:
Code
if spell.english:startswith('Ready') then
    send_command('input /p '..spell.english..'(costs'..spell.mp_cost..' charges|'..currentCharges..' charges left) next charge in -'..ReadyRecast..'.')


would this even return the value for currentCharges from the BST.lua? i don't have a bst lua nor do i know yet how to make a addon ready for use so i can't test it myself.

*edit* also would like to know if you can send auto translates with
Code
send_command('input /p ...'
or if you are limited to regular text?
 Bismarck.Xurion
Offline
サーバ: Bismarck
Game: FFXI
user: Xurion
Posts: 694
By Bismarck.Xurion 2018-11-15 15:42:20  
Shichishito said: »
trying to write a addon that requires to know current ready and stratagem charges.
is it reasonable to assume that everyone is using kinematics BST / SCH luas or if they made custom ones, built upon kinematics ones?

and if yes, can i call functions that are defined inside the corresponding job.luas from my addon file?

reason i'm asking this is cause i'd like to use the return values "currentCharges" from the functions "get_current_ready_count()" (BST.lua) and "get_current_strategem_count()" (SCH.lua) to use it in my addon. those functions rely on checking for certain gearsets (for gear that potentialy lowers recast delay) and if the set name got altered or isn't there it will either break the function or return a wrong value. thats the same reason why i can't define a similar function in the addon itself.

i'd like to use it for example this way:
Code
if spell.english:startswith('Ready') then
    send_command('input /p '..spell.english..'(costs'..spell.mp_cost..' charges|'..currentCharges..' charges left) next charge in -'..ReadyRecast..'.')


would this even return the value for currentCharges from the BST.lua? i don't have a bst lua nor do i know yet how to make a addon ready for use so i can't test it myself.

*edit* also would like to know if you can send auto translates with
Code
send_command('input /p ...'
or if you are limited to regular text?
You _can_ get them to communicate, but it'd be hacky and not recommended. I'd suggest each addon is singularly responsible. That way they can work atomic of each other.

IIRC Windower v5 will let addons communicate properly.

I already asked the Windower guys about the auto translate - it's a no ; ;
 Quetzalcoatl.Langly
Offline
サーバ: Quetzalcoatl
Game: FFXI
user: Langly
Posts: 684
By Quetzalcoatl.Langly 2018-11-15 15:49:40  
Shichishito said: »
trying to write a addon that requires to know current ready and stratagem charges.
is it reasonable to assume that everyone is using kinematics BST / SCH luas or if they made custom ones, built upon kinematics ones?

and if yes, can i call functions that are defined inside the corresponding job.luas from my addon file?

reason i'm asking this is cause i'd like to use the return values "currentCharges" from the functions "get_current_ready_count()" (BST.lua) and "get_current_strategem_count()" (SCH.lua) to use it in my addon. those functions rely on checking for certain gearsets (for gear that potentialy lowers recast delay) and if the set name got altered or isn't there it will either break the function or return a wrong value. thats the same reason why i can't define a similar function in the addon itself.

i'd like to use it for example this way:
Code
if spell.english:startswith('Ready') then
    send_command('input /p '..spell.english..'(costs'..spell.mp_cost..' charges|'..currentCharges..' charges left) next charge in -'..ReadyRecast..'.')


would this even return the value for currentCharges from the BST.lua? i don't have a bst lua nor do i know yet how to make a addon ready for use so i can't test it myself.

*edit* also would like to know if you can send auto translates with
Code
send_command('input /p ...'
or if you are limited to regular text?

Why not just include the function (with the gear checking consideration) into your addon so you're not trying to reach across multiple lua files to get a return value?

Edit: https://github.com/SammehFFXI/FFXIAddons/blob/master/PetCharges/petcharges.lua can help you work backwards from it perhaps?
Offline
By Shichishito 2018-11-16 02:21:17  
Quetzalcoatl.Langly said: »

Why not just include the function (with the gear checking consideration) into your addon so you're not trying to reach across multiple lua files to get a return value?

Edit: https://github.com/SammehFFXI/FFXIAddons/blob/master/PetCharges/petcharges.lua can help you work backwards from it perhaps?

how would i use the file you linked to in my addon? download the "petcharges.lua", put it in the same folder as my addon and write:
at the top of my addon?

also i'm confused, i can't for example find a entry for "jp_spent" anywhere in the windower documentation, but in the link you provided sammeh uses those:
Offline
By Shichishito 2018-11-19 09:56:52  
getting "attempt to perform arithmetic on global..." and "attempt to concatenate on global..." for several variables.

i think those variables return nil instead of the correct values. i suspect its cause i try to reuse variables from a previous
function in following functions and somehow run into a scope issue.

but isn't return there to pop a variable from within a function into the next higher (or even global) namespace to be able to reuse it in following code blocks?

*EDIT*
resolved the issue with 2 steps:
1. delete the "function check_job_point_strat_recast_bonus()" and copy its body content (excluding the return lines) outside of the job_precast function.
2. deleting the other 2 functions ("function get_current_strata_charges()" and "function get_recast_per_stratagem()") within the "function job_precast(spell, action, spellMap, eventArgs)" so only their bodies (also excluding the return lines)) are now within the job_precast function body.

took a lot of testing and even tho it works now i don't realy know what made the difference. i probably get the concept of functions and/or return wrong...
so unless someone understands what my mistake was and can explain it to me people can ignore this post.
Offline
By Shichishito 2018-11-21 20:58:31  
is there a way to tell apart sic and ready from wtihin the "function job_pet_aftercast(spell, action, spellMap, eventArgs)" function?
Code
spell.english == "Sic" or spell.english == "Ready"
unfortunately only works from within the job_aftercast function.

the only thing i could currently think of is manually making a list with all the NQ/HQ jug pets and check it with pet.name...

is there a simpler way to achieve this?
Offline
Posts: 21
By Ineeedmoney 2018-11-21 22:44:28  
Hi guys I'm looking for a pup.lua that has a set to flash in pet WS set is that possible or is it still a no go ?
 Asura.Alkk
Offline
サーバ: Asura
Game: FFXI
user: Alkai
Posts: 38
By Asura.Alkk 2018-11-25 17:01:52  
Having an issue with my current corsair lua, can't for the life of me get Luzaf's ring to be used during Phantom rolls. I know it's a toggle and I make sure it's on but still doesn't work.

I've also tried without gearinfo and gearinfo ugs off.
Getting quite desperate, been looking into this for too many hours to mention.

https://pastebin.com/5E4FRJwM
 Bahamut.Ayasha
Offline
サーバ: Bahamut
Game: FFXI
user: Ayasha
Posts: 89
By Bahamut.Ayasha 2018-11-25 19:07:19  
My guess is its line 699-702 causing the problem.

It may very well be equipping your Luzaf's ring during precast, but since you have it re-equip your normal COR roll set in post_precast, it will unequip the ring. A way around this would be to either remove the post precast check altogether, or alternatively you can delete line 258 (your normal COR Roll ring1). No need to have all 16 gear slots defined for rolls when only half of them have any affect. It will swap to idle/engaged/whatever set nearly immediately after the roll anyway.
[+]
First Page 2 3 ... 144 145 146 ... 182 183 184
Log in to post.