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 ... 41 42 43 ... 182 183 184
 Ragnarok.Worldslost
Offline
サーバ: Ragnarok
Game: FFXI
Posts: 82
By Ragnarok.Worldslost 2014-12-08 09:01:49  
Not sure what you mean by if I'm calling this or is in more includes but the gearswap it's self is from mote and the added function I took from a mote utility lua, hope that's what you were asking and second is yes both plugin and addon are enabled and loaded
 Ragnarok.Flippant
Offline
サーバ: Ragnarok
Game: FFXI
user: Enceladus
Posts: 660
By Ragnarok.Flippant 2014-12-08 18:57:47  
Mote-Utility is already included by Mote-Include--you do not need to, nor should you, copy and paste that function into your job-specific file. If he updates these functions in the future, you will be constantly overwriting them with your own now-obsolete versions.

A function is just a definition of rules. You have to "call" (basically meaning "use") it in order for it to execute those rules. You'd call this function by typing
Code
cancel_conflicting_buffs(spell, action, spellMap, eventArgs)

where it is appropriate (in this case, within your job_precast function). Same with any other function that is within that file (I see from the other thread that you copied a few other functions from there as well).

I already linked Mote's wiki in the previous page, but here is his page specifically about using the Utility functions that he provides: https://github.com/Kinematics/GearSwap-Jobs/wiki/Utility

Second, you should not have both Cancel addon and plugin loaded, only one or the other--plugins and addons that complete the same task may interfere with each other, and there just is no reason to have the plugin version loaded anymore (the addon covers both canceling by name and ID).
 Carbuncle.Calout
Offline
サーバ: Carbuncle
Game: FFXI
user: Calout
Posts: 14
By Carbuncle.Calout 2014-12-08 23:48:26  
Looking for an example of how to use Augmented items in gearswap. Like Double Augmented Dark Rings and Delve Augmented Items.
 Ragnarok.Flippant
Offline
サーバ: Ragnarok
Game: FFXI
user: Enceladus
Posts: 660
By Ragnarok.Flippant 2014-12-09 00:06:14  
From Byrth's instructions

Quote:
-- Augments --
There are a lot of different augments, many/all of which have been mapped in the extdata library.
This system will use the first item it finds in your inventory that matches the name/augment
combination that you provide. If you provide an ambiguous set of conditions, the resulting equipped
item will be ambiguous (could vary based on the pairs iterator).

In order to specify an item by augment, you must write the augment exactly as it appears on your equipment:
sets.aftercast_Idle = {ring1={name="Dark Ring",augments={"Phys. Damage Taken -6%"}},
ring2={name="Dark Ring",augments={"Breath Damage Taken -6%","{Phys. Damage Taken -5%"}}}


If it pleases you, you can store your augmented items in variables:
lefty = {name="Dark Ring",augments={"Phys. Damage Taken -6%"}}
righty = {name="Dark Ring",augments={"Breath Damage Taken -6%","Phys. Damage Taken -5%"}}
sets.aftercast_Idle = {ring1=lefty,ring2=righty}

This will save you a little work when you are dealing with using the same augmented item in multiple sets.


If you are having trouble getting GearSwap to recognize your augment, equip the gear and use //gs export.
This will create a Lua file in ../windower/addons/gearswap/data/export that includes a properly formatted table.

alternatively,

Quote:
-- Specifying a bag --
With the introduction of Mog Wardrobe, it is now possible to equip items from either Inventory or Wardrobe:
sets.wardrobe_feet = {feet={name="Bokwus Boots",bag="wardrobe"}}

There is really no reason to do this 99% of the time, but it has been included as a failsafe to let people
still specify at least two augments in case the augment system stops working in the future.
 Asura.Vafruvant
Offline
サーバ: Asura
Game: FFXI
user: Vafruvant
Posts: 363
By Asura.Vafruvant 2014-12-09 01:08:13  
Asura.Vafruvant said: »
This may have been answered before and I missed it, however...

Awhile back, I had been trying to re-work the downgrade function of Curing Waltz included in Mote's libs into a downgrading Cure function. I came up with the following, but it doesn't change anything about any cures. It doesn't throw any errors, but it won't put any messages in the chat log, won't downgrade based on HP and won't downgrade based on MP. Effectively, it does nothing and seems like it isn't being triggered to begin with. I've probably taken something out of the Waltz function that is just breaking the entire thing, but I'm not sure what it's missing. Any help would be appreciated! Here's the paste:

http://pastebin.com/MErxfsQJ

Thank you all.

So, with the tip from Flippant, and some heavy re-tooling, I got it working!

http://pastebin.com/MErxfsQJ

Certain parts might be able to get cleaned up, like repeating the snippet to cancel a cure on yourself with less than 40 HP for every job/sub. There was one last thing that might prove useful but is generally less important... I had a section to recognize Light Arts or Dark Arts and adjust MP costs accordingly, however it completely bricks the downgrade functionality. What I had looked like this:
Code
	if buffactive['Light Arts'] or buffactive['Addendum: White'] then
		mpCost = math.floor(mpCost * 0.9)
	elseif buffactive['Dark Arts'] or buffactive['Addendum: Black'] then
		mpCost = math.floor(mpCost * 1.1)
	else
		return
	end

Maybe Mote could include this in the next update of the Mote-Utility? I think it could be incredibly useful, much like the DNC Waltz function.
 Ragnarok.Flippant
Offline
サーバ: Ragnarok
Game: FFXI
user: Enceladus
Posts: 660
By Ragnarok.Flippant 2014-12-09 02:30:06  
I'm not sure what you mean by "bricks," but if that's what you had written in before, I totally missed the "return" statement. Return will end a function, so if you were in the case that you didn't have Light Arts or Dark Arts, it would stop the function prematurely.

Can get it to work by just removing the else part (and don't forget to check for Penury before checking for Light Arts).

If, for whatever reason, you wanted a generic MP cost function:
Code
function actual_cost(spell)
    local cost = spell.mp_cost
    if spell.type=="WhiteMage" then
        if buffactive["Penury"] then
            return cost*.5
        elseif buffactive["Light Arts"] or buffactive["Addendum: White"] then
            return cost*.9
        elseif buffactive["Dark Arts"] or buffactive["Addendum: Black"] then
            return cost*1.1
        end
    elseif spell.type=="BlackMagic" then
        if buffactive["Parsimony"] then
            return cost*.5
        elseif buffactive["Dark Arts"] or buffactive["Addendum: Black"] then
            return cost*.9
        elseif buffactive["Light Arts"] or buffactive["Addendum: White"] then
            return cost*1.1
        end   
    end
    return cost
end

You'd have to pass a spell table to the function though, and since at this moment you don't have the proper spell table to pass, you can use the resources and make a function to obtain the table using name (probably a function that can do this already, but it's faster to just make it than look for it).
Code
function get_spell_by_name(s_name)
    local res = require('resources')
    for __,s_table in pairs (res.spells) do
        if s_table.en == s_name then
            return s_table
        end
    end
    return false
end


and finally, you'd get the MP by calling
Code
mpCost = actual_cost(get_spell_by_name(newCure))

Don't need your cure_mp_cost table in that case. It's a lot more code, I just try to avoid hard-coding things in case I find a new purpose for them later and thought I'd share what I use to downgrade cures (for low MP or if cure is on timer).

As for cleaning up the less than 40 HP part, you can take that out of all the job cases and just put it as the first condition to catch instead of if player.main_job=="WHM", since, as you say, it's the same regardless of job. Also, just something to think about, but you may want to consider not refining by HP if it causes a downgrade in the Cure if Solace is on (can use the above function to extract ID--get_spell_by_name(newCure)[id]--and determine if it is lower than current spell.id).

Last but not least, you're using both "newCure" and "preferredCure" for what I assume should be referring to the same variable.
 Cerberus.Conagh
Offline
サーバ: Cerberus
Game: FFXI
user: onagh
Posts: 3189
By Cerberus.Conagh 2014-12-09 18:34:08  
Carbuncle.Calout said: »
Looking for an example of how to use Augmented items in gearswap. Like Double Augmented Dark Rings and Delve Augmented Items.


Equip the ring you want.

//gs export lua

This gives you the ring and the Augments on those specified rings.

Easiest way
 Quetzalcoatl.Valli
Offline
サーバ: Quetzalcoatl
Game: FFXI
user: valli
Posts: 1420
By Quetzalcoatl.Valli 2014-12-09 20:22:31  
Need help with something right quick, wiki says Rudra's doesn't count Soil belt as it's element.

But mont's GS equips soil belt in it's rule instead of shadow. How do I overwrite it to use shadow instead of soil?
 Cerberus.Conagh
Offline
サーバ: Cerberus
Game: FFXI
user: onagh
Posts: 3189
By Cerberus.Conagh 2014-12-09 20:35:23  
Quetzalcoatl.Valli said: »
Need help with something right quick, wiki says Rudra's doesn't count Soil belt as it's element.

But mont's GS equips soil belt in it's rule instead of shadow. How do I overwrite it to use shadow instead of soil?

Can you paste the Gearswap?

I don't use Motes but I can sort it for ya
 Quetzalcoatl.Valli
Offline
サーバ: Quetzalcoatl
Game: FFXI
user: valli
Posts: 1420
By Quetzalcoatl.Valli 2014-12-09 21:03:35  
Code
-- Default set for any weaponskill that isn't any more specifically defined
    sets.precast.WS = neck=gear.ElementalGorget,waist=gear.ElementalBelt,

 Cerberus.Conagh
Offline
サーバ: Cerberus
Game: FFXI
user: onagh
Posts: 3189
By Cerberus.Conagh 2014-12-09 21:37:35  
Quetzalcoatl.Valli said: »
Code
-- Default set for any weaponskill that isn't any more specifically defined
    sets.precast.WS = neck=gear.ElementalGorget,waist=gear.ElementalBelt,



Specifically defining the set ignores that ***

So
Code
-- Default set for any weaponskill that isn't any more specifically defined
    sets.precast.WS = neck=gear.ElementalGorget,waist=gear.ElementalBelt,



Suggest if you did

sets.precast.ws['Rudra's Storm']

and added the gear you wanted it would just equip that gear and ignore the rule here.

Post the THF file (I assume thf) and I'll double check it works
 Quetzalcoatl.Valli
Offline
サーバ: Quetzalcoatl
Game: FFXI
user: valli
Posts: 1420
By Quetzalcoatl.Valli 2014-12-09 22:01:51  
I mean that obviously works for that one ws. I want the rule to work. Not to have to do it to each ws.

I just happened to notice it's incorrect on rudras, it may or may not be incorrect on a thousand other ws's.

All I want to know is why does it equip a soil gorget when soil is not a property of the weaponskill.

If it's wrong for rudra, how many other ws are wrong too.
 Ragnarok.Flippant
Offline
サーバ: Ragnarok
Game: FFXI
user: Enceladus
Posts: 660
By Ragnarok.Flippant 2014-12-09 22:52:37  
It's deconstructing Darkness down. I don't know where the testing is exactly that shows that gorgets work that way (same way Gavialis Helm does), but BG wiki lists the other elements/gorgets/belts as applying http://www.bg-wiki.com/bg/Darkness

If you're really convinced and want to edit it yourself, it'd entail removing the other elements from
Code
skillchain_elements.Light = S{'Light','Fire','Wind','Lightning'}
skillchain_elements.Darkness = S{'Dark','Ice','Earth','Water'}
 Quetzalcoatl.Valli
Offline
サーバ: Quetzalcoatl
Game: FFXI
user: valli
Posts: 1420
By Quetzalcoatl.Valli 2014-12-09 23:00:05  
I was going by this it doesn't list soil


But, that's what I was looking for I can delete ice/water/earth from the darkness and automatically always use shadow for anything that would call dark. right?

Wildfire does NOT work with aqua/snow yet it has darkness property.
 Ragnarok.Flippant
Offline
サーバ: Ragnarok
Game: FFXI
user: Enceladus
Posts: 660
By Ragnarok.Flippant 2014-12-09 23:03:57  
Well, or water/ice because the WS is also Distortion, but yes, it would exclude earth.
 Quetzalcoatl.Valli
Offline
サーバ: Quetzalcoatl
Game: FFXI
user: valli
Posts: 1420
By Quetzalcoatl.Valli 2014-12-09 23:04:18  
So why the *** is gearswap using soil?

By the way, Coronach also chooses Soil > Shadow with only those 2 in inventory.

This is incorrect.

Shadow should be chosen before soil, or soil not at all. Because the properties exclude soil, yet GS picks soil again.
Offline
By Nyruul 2014-12-09 23:26:33  
Mote needs to update Mote-Mappings.lua @line 54+55

skillchain_elements.Light = S{'Light'}
skillchain_elements.Darkness = S{'Dark'}


Any darkness/not-gravitation WS will equip soil. Tested using coro with only soil and shadow neck in inventory/wardrobe.
 Ragnarok.Flippant
Offline
サーバ: Ragnarok
Game: FFXI
user: Enceladus
Posts: 660
By Ragnarok.Flippant 2014-12-09 23:32:47  
Quetzalcoatl.Valli said: »
So why the *** is gearswap using soil?

By the way, Coronach also chooses Soil > Shadow with only those 2 in inventory.

This is incorrect.

Shadow should be chosen before soil, or soil not at all. Because the properties exclude soil, yet GS picks soil again.

Even after you removed those elements from that table?

For the general conclusion that dark/light does not deconstruct, may need to post on BG to get Mote's attention.
 Quetzalcoatl.Valli
Offline
サーバ: Quetzalcoatl
Game: FFXI
user: valli
Posts: 1420
By Quetzalcoatl.Valli 2014-12-09 23:39:21  
No, I had not made the correction myself, I assume it's safe to change.

The note about coronach was just in the example, to counter the "well just change rudra".

More than just Rudra are calling the wrong elements, if it is indeed true that it does not deconstruct.

Which being that wildfire is the only ws you can really test it for 100% sure with (and cloudsplitter). i have to say that if aqua/snow don't work on wildfire, having a darkness property, then it does not deconstruct, and people have been using the wrong gorgets in gearswap for who knows how long.
 Cerberus.Rabies
Offline
サーバ: Cerberus
Game: FFXI
user: Rabies666
Posts: 57
By Cerberus.Rabies 2014-12-10 00:42:20  
First patch since I've started using GS, Everything seemed to work perfectly until I was midrun in delve I noticed my F9 key to toggle to ACC set wasn't working. Is this normal after update? Does windower auto update to fix this or will I have to search for Motes updated files and redo them?
Offline
Posts: 235
By amadis 2014-12-10 08:12:10  
Hello now that BLU can get Dual Wield IV i would like to add a weapon array to my BLU lua so that i can change my sets based on the amount of Dual Wield I have (Single Wielding, DW2, DW3 & DW4) I use heavily modified/updated versions of Bokura's lua files that I have been improving myself. I copied and pasted weapon array code from Bokura's DRK lua into my BLU lua but i cant seem to get the weapon array working and when i engage a enemy I stay in idle gear.
This is my current working lua with no weapon array:
http://pastebin.com/yDS5D1Vu
And this is the lua with the changes I am trying to make:
http://pastebin.com/e89HwFi1
Thanks for any help in advance, I'm sure I've just left out something simple.
 Ragnarok.Flippant
Offline
サーバ: Ragnarok
Game: FFXI
user: Enceladus
Posts: 660
By Ragnarok.Flippant 2014-12-10 08:20:58  
Cerberus.Rabies said: »
First patch since I've started using GS, Everything seemed to work perfectly until I was midrun in delve I noticed my F9 key to toggle to ACC set wasn't working. Is this normal after update? Does windower auto update to fix this or will I have to search for Motes updated files and redo them?

You sure the equip isn't changing, or you're just not getting notification in the chat? Printing to chatlog isn't working atm (well it may have been fixed by now, haven't been logged on).

amadis said: »
Hello now that BLU can get Dual Wield IV i would like to add a weapon array to my BLU lua so that i can change my sets based on the amount of Dual Wield I have (Single Wielding, DW2, DW3 & DW4) I use heavily modified/updated versions of Bokura's lua files that I have been improving myself. I copied and pasted weapon array code from Bokura's DRK lua into my BLU lua but i cant seem to get the weapon array working and when i engage a enemy I stay in idle gear.
This is my current working lua with no weapon array:
http://pastebin.com/yDS5D1Vu
And this is the lua with the changes I am trying to make:
http://pastebin.com/e89HwFi1
Thanks for any help in advance, I'm sure I've just left out something simple.

Quick look, need this after line 1137:
Code
if equipSet[WeaponArray[WeaponIndex]] then
                        equipSet = equipSet[WeaponArray[WeaponIndex]]
                end


Let me know if that doesn't work.
Offline
Posts: 235
By amadis 2014-12-10 11:58:25  
seems to be working fine now, thanks
Offline
Posts: 806
By Crevox 2014-12-10 16:34:39  
My job_pet_aftercast doesn't work after the latest Windower update. Whhenever my pet finishes executing something, my gear does not swap back to idle, and nothing that would trigger after my pet casting a spell (including stuff not in that function) doesn't happen.

Help? I can't do anything because this is broken... my job file is basically the same as Mote's.
 Cerberus.Conagh
Offline
サーバ: Cerberus
Game: FFXI
user: onagh
Posts: 3189
By Cerberus.Conagh 2014-12-10 19:49:00  
Crevox said: »
My job_pet_aftercast doesn't work after the latest Windower update. Whhenever my pet finishes executing something, my gear does not swap back to idle, and nothing that would trigger after my pet casting a spell (including stuff not in that function) doesn't happen.

Help? I can't do anything because this is broken... my job file is basically the same as Mote's.

Its a known bug Pet aftercast events are not being picked up.

I know they added an event termination after 10 seconds rule for MidAction() issue however this doesn't fix the original issue with that either. probably better off just removing the midaction() until a work around can be made...

I'm not sure if they're related but pet_aftercast is an event so if it's being cancelled or not updating correctly it "could" be linked in some roundabout manner.

In any respect it's not just you
 Cerberus.Conagh
Offline
サーバ: Cerberus
Game: FFXI
user: onagh
Posts: 3189
By Cerberus.Conagh 2014-12-10 20:41:30  
Ok!

So I'm trying to do something a little bit differen't that's a tad "out there".

I have worked o the maths on my end and know the theory behid what I want, what I don't know tho is how do you get say the Value you do in game~ Damage you Deal to a Target as a Melee hit and not as a Weaponskill in gearswap?

I know you can check a Players HP Deficit because you know their HP, but is there a way to see "Player deals 540 damage to target" to pull the damage number from chat for say ~ 10 instances and get an approximated value? I honestly have no idea how to extrapolate Damage dealt in chat log, to Gearswap.

Any idea's are greatly appreciated.

I got this so far to check if it's a Melee hit but I don't know how to define the paramters to search the damage dealt by number..
Code
windower.register_event('action',function (act)
	local actor 	= act.actor_id
	local category 	= act.category
	local param		= act.param
	local player	= windower.ffxi.get_player()
	
	if ((actor == (player.id or player.index))) then
		if category == 1 then		
			add_to_chat(167,'test')
			
			end
		end
	end
end)
VIP
Offline
Posts: 111
By Iryoku 2014-12-11 05:33:42  
You're on the right track; act.param is pretty useless for melee hits though. You'll need to dig into the targets and actions tables to find what you're looking for.

The target of the attack is
Code
local target = act.targets[1].id
The number of hits is
Code
local hits = act.targets[1].action_count
The damage for each hit is
Code
local damage_1 = act.targets[1].action[1].param
local damage_2 = act.targets[1].action[2].param
local damage_3 = act.targets[1].action[3].param
...
and so on for each hit (this should normally be done in a loop).

You can also assign hits to main hand/off hand/kicks, track evades/parries/blocks, critical hits, added effects, spike damage, etc., by looking at the other fields in these tables.
 Lakshmi.Byrth
VIP
Offline
サーバ: Lakshmi
Game: FFXI
user: Byrthnoth
Posts: 6184
By Lakshmi.Byrth 2014-12-11 06:03:10  
There's an Actions library that probably has some bugs but is generally complete, if you feel like using it. This code should report damage per hit:
Code
ActionPacket = require 'actions'
ActionPacket.open_listener(function (act)
    local actionpacket = ActionPacket.new(act)
    for target in actionpacket:get_targets() do
        for action in target:get_actions() do
            local event = action:get_basic_info()
            if event.type == 'damage' then
                windower.add_to_chat(8,'Damage: '..tostring(event.value))
            end
        end
    end
end)
 Cerberus.Conagh
Offline
サーバ: Cerberus
Game: FFXI
user: onagh
Posts: 3189
By Cerberus.Conagh 2014-12-11 07:52:53  
Lakshmi.Byrth said: »
There's an Actions library that probably has some bugs but is generally complete, if you feel like using it. This code should report damage per hit:
Code
ActionPacket = require 'actions'
ActionPacket.open_listener(function (act)
    local actionpacket = ActionPacket.new(act)
    for target in actionpacket:get_targets() do
        for action in target:get_actions() do
            local event = action:get_basic_info()
            if event.type == 'damage' then
                windower.add_to_chat(8,'Damage: '..tostring(event.value))
            end
        end
    end
end)

hmm thanks, i had managed to get a print for the damage but obev really help quantify your hits and come to an average.

using this i should be able to implement a pDif calculation into gearswap files usi g a local rule to amend gearsets using equipSet ie if pDif < 1.75 then equip waist prosilio etc to make damage sets more buff and stat specific rather than genralised sets.


I have the code and maths working now, will bug test to ensure it works and quantifies the last 5 hits only.(1 tp phase for Heavy handers) Trying this instead of depending on player attack instead of relying on assuming dia and frailty are on etc and in case we get angon or some Tachi Ageha or bilgestorm procs I don't need to make specified sets i can just make it work based of a pDif value that caps at 2.25
 Cerberus.Conagh
Offline
サーバ: Cerberus
Game: FFXI
user: onagh
Posts: 3189
By Cerberus.Conagh 2014-12-11 08:04:22  
Iryoku said: »
You're on the right track; act.param is pretty useless for melee hits though. You'll need to dig into the targets and actions tables to find what you're looking for.

The target of the attack is
Code
local target = act.targets[1].id
The number of hits is
Code
local hits = act.targets[1].action_count
The damage for each hit is
Code
local damage_1 = act.targets[1].action[1].param
local damage_2 = act.targets[1].action[2].param
local damage_3 = act.targets[1].action[3].param
...
and so on for each hit (this should normally be done in a loop).

You can also assign hits to main hand/off hand/kicks, track evades/parries/blocks, critical hits, added effects, spike damage, etc., by looking at the other fields in these tables.

ah! I missed the target[1] in my code hence the issue with the action param!! Thanks, silly oversight
First Page 2 3 ... 41 42 43 ... 182 183 184
Log in to post.