Item Search
     
BG-Wiki Search
Page 267 of 302 FirstFirst ... 217 257 265 266 267 268 269 277 ... LastLast
Results 5321 to 5340 of 6036

Thread: Gearswap Help Thread!     submit to reddit submit to twitter

  1. #5321
    Puppetmaster
    Join Date
    Sep 2015
    Posts
    73
    BG Level
    2

    Hrm.. I'm having a very strange issue with gearswap's debugmode. It's happening no matter what kind of job.lua I load -whether it's mote-based or not mote-based. It's looking through my inventory and trying to find a jobs field from the resources for each item in my inventory apparently... Why? lol. The chat log spam is so bad that it makes using gearswap's debugmode pretty cumbersome. Any ideas on what would make it do something so absurd? Here's a screenshot.

    http://oi66.tinypic.com/4uvr74.jpg

    From looking through google results for 'gearswap item does not have a jobs field' it looks like this issue has happened before and it's an error with gearswap itself. I see a post from Nov 2014 and July 2016 on this matter. Considering that these items giving errors are old items and would have been (and were according to /debugmode working just a few months ago when I tried last) sorted out a long time ago, why is this error popping up now?

    Edit! It's happening because new debug lines have been added to the equip_processing.lua of gearswap. Nothing against the developer for putting that code there, as I'm sure he has a good debugging reason, but there is a way to get this to go away for us end-users. Simply remove lines 40 and 41 from your equip_processing.lua; the lines relating to the item.id jobs. Woohoo, the message is gone! Back to my gearswap debugging.

  2. #5322
    Puppetmaster
    Join Date
    Sep 2015
    Posts
    73
    BG Level
    2

    I'm trying to understand why my precast isn't working the way I'm trying to code it. I've figured out a solution but I still don't see why my first instinct of how to code it didn't work; the code looks like it all adds up logically.

    My goal is to get the midcast function to identify Indi spells and do what I tell it to do when they are cast. Eventually I want it to equip my Indi midcast equipset but for now it's just a debug 'Hello!'.

    Here is what I tried:

    Code:
    function job_midcast(spell, action, spellMap, eventArgs)
    	if spell.action_type == 'Magic' then
    		-- Default base equipment layer of fast recast.
    		equip(sets.midcast.FastRecast)
    	elseif spell.english:startswith('Indi') then
    		add_to_chat('Hello!')
    	end
    end
    that 'elseif spell.english:startswith('Indi')' should, as far as I know, trigger when an Indi spell is cast and print Hello! to my chat log. It doesn't... ><

    Here what I had to do (I found this in AlanWarren's geo.lua)

    Code:
    function job_get_spell_map(spell, default_spell_map)
        if spell.action_type == 'Magic' then
            if spell.skill == 'Geomancy' then
                if spell.english:startswith('Indi') then
                    add_to_chat('Hello!')
                end
            end
        end
    end
    This code prints 'Hello!' to my chat log.

    Bleh, I don't see why the midcast function didn't catch indi spells at all. I'd like to understand this that way I can further customize my midcasts if I come across anything else I'd like to change too.

    From what I can tell that midcast function isn't good for anything. I also tried "elseif spell.skill == 'Geomancy' then" and that didn't print the message either. I've also tried to make it midcast warp in fast cast/recast gear in the past and it refused to work at that time, too. Is it just just a placebo function?

  3. #5323
    trv
    trv is offline
    Melee Summoner
    Join Date
    Oct 2014
    Posts
    48
    BG Level
    1

    Follow your code. An indi-spell's action_type is 'Magic'. The first statement is true, so the rest is not executed.

  4. #5324
    Lygre
    Guest

    ^^^ What trv said.

    Code:
    function job_midcast(spell, action, spellMap, eventArgs)
    	if spell.action_type == 'Magic' then
    		if spell.english:startswith('Indi') then
    			add_to_chat('Hello!')
    		else
    		-- Default base equipment layer of fast recast.
    			equip(sets.midcast.FastRecast)
    		end
    	end
    end

  5. #5325
    Bagel
    Join Date
    Dec 2012
    Posts
    1,488
    BG Level
    6

    Quote Originally Posted by Roland_J View Post
    Hrm.. I'm having a very strange issue with gearswap's debugmode. It's happening no matter what kind of job.lua I load -whether it's mote-based or not mote-based. It's looking through my inventory and trying to find a jobs field from the resources for each item in my inventory apparently... Why? lol. The chat log spam is so bad that it makes using gearswap's debugmode pretty cumbersome. Any ideas on what would make it do something so absurd? Here's a screenshot.

    http://oi66.tinypic.com/4uvr74.jpg

    From looking through google results for 'gearswap item does not have a jobs field' it looks like this issue has happened before and it's an error with gearswap itself. I see a post from Nov 2014 and July 2016 on this matter. Considering that these items giving errors are old items and would have been (and were according to /debugmode working just a few months ago when I tried last) sorted out a long time ago, why is this error popping up now?

    Edit! It's happening because new debug lines have been added to the equip_processing.lua of gearswap. Nothing against the developer for putting that code there, as I'm sure he has a good debugging reason, but there is a way to get this to go away for us end-users. Simply remove lines 40 and 41 from your equip_processing.lua; the lines relating to the item.id jobs. Woohoo, the message is gone! Back to my gearswap debugging.
    that line would be more of an advanced debug only needed for when an item is in a set thats trying to be equiped
    so it should be in show_swaps but mirrored in debug_mode only if you try to equip it but how to do this i have no clue

  6. #5326
    Melee Summoner
    Join Date
    May 2014
    Posts
    36
    BG Level
    1
    FFXI Server
    Ragnarok

    Quote Originally Posted by Tronian View Post
    Hi,
    I am using Mote's code. I just came back from a long break. gearswap works when i left.
    I am now getting the below error whenever i try to cast a cure spell.
    attempt to call global 'refine_cure' (a nil value)

    I have the function defined in Mote-Utility.lua

    is it not allowed anymore? I hope not else all healing job i need to manually add it in....
    anyone know what is wrong? Thanks

  7. #5327
    Melee Summoner
    Join Date
    May 2014
    Posts
    36
    BG Level
    1
    FFXI Server
    Ragnarok

    Quote Originally Posted by Tronian View Post
    anyone know what is wrong? Thanks
    hmm, seems need to check the folder structure to see if the correct files were called.

    edit: ya, the Mote-?? files need to be in the lib folder.

  8. #5328
    Smells like Onions
    Join Date
    Sep 2013
    Posts
    2
    BG Level
    0

    I'm trying to setup files for gearswap using the includes from dlsmd's signature. When loading the example pup.lua with no edits I receive the following error in console.

    Code:
    06:08:19 > User file problem: C:\Program Files (x86)\Windower4\/addons/GearSwap/data/PUP.lua:122: <name> or '...' expected near ''prerender''
    lines 121 - 140
    Code:
    function
    windower.raw_register_event('prerender', function()
        if Enable_auto_pup and (os.clock()-log_in_time) >= 10 then
            if check_recast('ability',205) and not pet.isvalid then send_command('input /ja "Activate" <me>')
            elseif pet.isvalid and player.hpp > 75 and pet.hpp < 25 and check_recast('ability',211) then send_command('input /ja "Role Reversal" <me>')
            elseif player.in_combat then
                if pet.status ~= 'Engaged' then send_command('input /ja "Deploy" <t>')
                elseif check_recast('ability',114) and buffactive['Overload'] then send_command('input /ja "Cooldown" <t>')
                elseif check_recast('ability',210) and not buffactive['Overload'] then 
                    if Enable_pup_skill_up then
                        -- if not buffactive['Water Maneuver'] then send_command('input /ja "Water Maneuver" <me>') --skill up 1
                        if buffactive['Water Maneuver'] ~= 2 then send_command('input /ja "Water Maneuver" <me>') --skill up x2
                        elseif not buffactive['Light Maneuver'] then send_command('input /ja "Light Maneuver" <me>') --HP
                        -- elseif buffactive['Dark Maneuver'] ~= 2 then send_command('input /ja "Dark Maneuver" <me>') -- MP
                        end
                    end
                end
            end
        end
    end)
    I haven't found a solution through various searches and was hoping I could get a few hints pointing in the right direction.
    Thanks

  9. #5329
    Chram
    Join Date
    Nov 2007
    Posts
    2,622
    BG Level
    7

    speaking of pup, i was wondering if there's a way to change gear to pet: fast cast, before an automaton casts a spell. I guess pet.midcast is for after it's started casting the spell, so you can swap in cure potency/pet MAB/etc for that,but is gearswap able to detect the automatons spells before it starts to cast?

  10. #5330
    Bagel
    Join Date
    Dec 2012
    Posts
    1,488
    BG Level
    6

    Quote Originally Posted by knownunknown View Post
    I'm trying to setup files for gearswap using the includes from dlsmd's signature. When loading the example pup.lua with no edits I receive the following error in console.

    ...

    I haven't found a solution through various searches and was hoping I could get a few hints pointing in the right direction.
    Thanks
    --edit--
    i just pushed a new update that also fixed this issue

    also if you mind any more bug's can you post them to git hub here:https://github.com/smd111/Gearswap/issues
    this way i can have a list of them to fix when i finally can log back in (i currently just dont have the money to pay for it right now)

  11. #5331
    Smells like Onions
    Join Date
    Sep 2013
    Posts
    2
    BG Level
    0

    Quote Originally Posted by Psion View Post
    speaking of pup, i was wondering if there's a way to change gear to pet: fast cast, before an automaton casts a spell. I guess pet.midcast is for after it's started casting the spell, so you can swap in cure potency/pet MAB/etc for that,but is gearswap able to detect the automatons spells before it starts to cast?
    While I'm no expert, everything I've read states that the pet puppet's precast is just too fast for it to work reliably, if at all. There are workarounds but they generally cause a decrease in dps due to sitting in precast a few seconds while waiting for the pet to take an action.

  12. #5332
    Bagel
    Join Date
    Dec 2012
    Posts
    1,488
    BG Level
    6

    Quote Originally Posted by Psion View Post
    speaking of pup, i was wondering if there's a way to change gear to pet: fast cast, before an automaton casts a spell. I guess pet.midcast is for after it's started casting the spell, so you can swap in cure potency/pet MAB/etc for that,but is gearswap able to detect the automatons spells before it starts to cast?
    no there is no pet_precast for a reason
    and thats because the client does not get the info that a pet is doing anything until it has started already

  13. #5333
    Groinlonger
    Join Date
    Oct 2006
    Posts
    2,963
    BG Level
    7
    FFXI Server
    Fenrir

    This is more of a windower question than a gearswap question but I'm sure someone here knows (or Byrth will see it) and the answer is probably good to know. I added the following to my ninja gearswap today.

    Code:
    function job_setup()
        state.Utsusemi = 3
    end
    
    local utsusemi = {
        ["Utsusemi: Ichi"] = 1,
        ["Utsusemi: Ni"] = 2,
        ["Utsusemi: San"] = 3,
    }
    
    -------------------------------------------------------------------------------------------------------------------
    -- Job-specific hooks for standard casting events.
    -------------------------------------------------------------------------------------------------------------------
    function job_midcast(spell, action, spellMap, eventArgs)
        if spellMap == 'Utsusemi' then
            if state.Utsusemi > utsusemi[spell.name] then
                if buffactive['Copy Image'] then
                    windower.ffxi.cancel_buff(66)
                elseif buffactive['Copy Image (2)'] then
                    windower.ffxi.cancel_buff(444)
                elseif buffactive['Copy Image (3)'] then
                    windower.ffxi.cancel_buff(445)
                elseif buffactive['Copy Image (4+)'] then
                    windower.ffxi.cancel_buff(446)
                end
            end
        end
    end
     
    function job_aftercast(spell, action, spellMap, eventArgs)
        if (not spell.interrupted) and spellMap == 'Utsusemi' then
            state.Utsusemi = utsusemi[spell.name]
        end
    end
    It seems to work okay. My question is regarding the packet ordering that is produced. Is the cancel inserted before or after spell packet? If it's after then I can't use quick cast gear without additional modification.

    Thanks

  14. #5334
    Bagel
    Join Date
    Dec 2012
    Posts
    1,488
    BG Level
    6

    Quote Originally Posted by Mojo View Post
    It seems to work okay. My question is regarding the packet ordering that is produced. Is the cancel inserted before or after spell packet? If it's after then I can't use quick cast gear without additional modification.

    Thanks
    it depends on which packet your talking about
    here is some info
    packets:
    <= from server
    => to server

    when using gearswap
    you use command
    gearswap precast (this is why cancel spell is only here)
    =>
    <=
    gearswap midcast
    <=
    gearswap aftercast

  15. #5335
    Groinlonger
    Join Date
    Oct 2006
    Posts
    2,963
    BG Level
    7
    FFXI Server
    Fenrir

    I was referring to the outgoing 0xf1 and the other packets (outgoing 0x50/0xa1) that gearswap handles. It seems that the 0xf1 is inserted before (just tested and finally got a quick cast to proc on Ichi and it works okay.)

  16. #5336
    Relic Shield
    Join Date
    Mar 2007
    Posts
    1,789
    BG Level
    6
    FFXIV Character
    Rehn Valor
    FFXIV Server
    Sargatanas
    FFXI Server
    Ragnarok

    So this commonly happens when I do avatars/bc in general (with a zoning after I kill whatever nm). Let's say I'm doing garuda: I kill her in my ws set, I get the usual zoning screen, and once I fully zoned out I'm still in my ws set. What piece of code do I need so that it updates back into my idle?

    Code:
    function aftercast(spell,action)
    	status_change(player.status)
    end
    
    function status_change(new,old)
        if new == 'Engaged' then
    		if Set_Mode == 0 then
    			if Set_Accuracy == 0 then
    				equip(sets.engaged.TP)
    			end
    			if Set_Accuracy == 1 then
    				equip(sets.engaged.TP_Accuracy_1)
    			end
    			if Set_Accuracy == 2 then
    				equip(sets.engaged.TP_Accuracy_2)
    			end
    		elseif Set_Mode == 1 then
    			equip(sets.engaged.TP_Hybrid)
    		end
        else
    		if Set_Idle == 0 then
    			equip(sets.aftercast.Idle_Regen)
    		elseif Set_Idle == 1 then
    			equip(sets.aftercast.Idle_DT)
    		end
    	end
    end

  17. #5337
    Bagel
    Join Date
    Dec 2012
    Posts
    1,488
    BG Level
    6

    Quote Originally Posted by Rehn View Post
    So this commonly happens when I do avatars/bc in general (with a zoning after I kill whatever nm). Let's say I'm doing garuda: I kill her in my ws set, I get the usual zoning screen, and once I fully zoned out I'm still in my ws set. What piece of code do I need so that it updates back into my idle?

    Code:
    function aftercast(spell,action)
        status_change(player.status)
    end
    
    function status_change(new,old)
        if new == 'Engaged' then
            if Set_Mode == 0 then
                if Set_Accuracy == 0 then
                    equip(sets.engaged.TP)
                end
                if Set_Accuracy == 1 then
                    equip(sets.engaged.TP_Accuracy_1)
                end
                if Set_Accuracy == 2 then
                    equip(sets.engaged.TP_Accuracy_2)
                end
            elseif Set_Mode == 1 then
                equip(sets.engaged.TP_Hybrid)
            end
        else
            if Set_Idle == 0 then
                equip(sets.aftercast.Idle_Regen)
            elseif Set_Idle == 1 then
                equip(sets.aftercast.Idle_DT)
            end
        end
    end
    whats happening with your code (i think)
    is after your battle there is not enuf time for gearswap to trigger aftercast or status_change equip after your battle and before you get sent out of the battlefield then during the zone change it cant do so because you cant change gear while zoning

  18. #5338
    Relic Shield
    Join Date
    Mar 2007
    Posts
    1,789
    BG Level
    6
    FFXIV Character
    Rehn Valor
    FFXIV Server
    Sargatanas
    FFXI Server
    Ragnarok

    So is this one of those "deal with it" moments? Guess I could do that, just wanted to be sure there wasn't a better solution.

  19. #5339
    Puppetmaster
    Join Date
    Sep 2015
    Posts
    73
    BG Level
    2

    Is there a way to make a foolproof /assist system for your alt through gearswap and the send addon? I'm not pleased with the vanilla assist system since it tends to fail if the character already has a target, even if not engaged to said previous target. <bt> also tends to fail either due to the char facing away from the mob or for w/e random reasons. I'd like to make an assist that takes the player.target.ID, or whatever is most fitting, and tells the alt char to target that target ID.

    I've tried using the change_target() function with limited success. The following successfully changes the final target of spells cast using <st> to the value I assign to AssistID.

    Code:
    function job_pretarget(spell,action)
    	if spell.target.raw:contains('<st>') then
    		add_to_chat(123,'Pretarget debug message. ID: '..AssistID..'')
    		change_target(''..AssistID..'')
    	end
    end
    
    function job_self_command(cmdParams, eventArgs)
    	if cmdParams[1] == 'YouAttack' then
    		AssistID = player.target.id
    		send_command('input //send altchar //gs c IAttack '..AssistID..'')
    		add_to_chat(123,'Telling altchar to attack ID: '..AssistID..'.')
    	elseif cmdParams[1] == 'YouAssist' then
    		AssistID = player.target.id
    		send_command('input //send altchar //gs c IAssist '..AssistID..'')
    		add_to_chat(123,'Telling altchar to assist on ID: '..AssistID..'.')
    	elseif cmdParams[1] == 'IAttack' then
    		AssistID = cmdParams[2]
    		send_command('input //stone <st>')
    		add_to_chat(123,'Trying to attack ID: '..AssistID..'.')
    	elseif cmdParams[1] == 'IAssist' then
    		AssistID = cmdParams[2]
    		send_command('input /attack <st>')
    		add_to_chat(123,'Trying to engage target ID: '..AssistID..'')
    	end
    end
    This works for a limited purpose, just for certain actions and I'd have to implement a toggle or completely devote <st>, which I don't use anyways (I use <stnpc>, <stpt>, or <stal>), to this feature. This method, however, doesn't work so far for making my character attack the assist. //send altname /attack <st> just makes a subtarget icon pop up; /attack's pretarget seems to work differently than the pretarget for spells. I also don't yet have a way to make my alt actually target any given mob, where their target cursor actually gets put on the mob.

    If this will be too complicated to be worth it then I'll just stick with the flaws of the vanilla system but hopefully this would be simple to get coded in.

    Thanks for any help!

  20. #5340
    Bagel
    Join Date
    Dec 2012
    Posts
    1,488
    BG Level
    6

    Quote Originally Posted by Roland_J View Post
    Is there a way to make a foolproof /assist system for your alt through gearswap and the send addon? I'm not pleased with the vanilla assist system since it tends to fail if the character already has a target, even if not engaged to said previous target. <bt> also tends to fail either due to the char facing away from the mob or for w/e random reasons. I'd like to make an assist that takes the player.target.ID, or whatever is most fitting, and tells the alt char to target that target ID.

    I've tried using the change_target() function with limited success. The following successfully changes the final target of spells cast using <st> to the value I assign to AssistID.

    --- code redacted

    This works for a limited purpose, just for certain actions and I'd have to implement a toggle or completely devote <st>, which I don't use anyways (I use <stnpc>, <stpt>, or <stal>), to this feature. This method, however, doesn't work so far for making my character attack the assist. //send altname /attack <st> just makes a subtarget icon pop up; /attack's pretarget seems to work differently than the pretarget for spells. I also don't yet have a way to make my alt actually target any given mob, where their target cursor actually gets put on the mob.

    If this will be too complicated to be worth it then I'll just stick with the flaws of the vanilla system but hopefully this would be simple to get coded in.

    Thanks for any help!
    windower has no way to target someone with there id as far as i know (i can never get it to work for me if it does exist(with id or name))

    and <st>,<stpc>,<stpt>,<stal>,<stnpc> all bring up the sub target selection arrow
    while <lastst> targets the last selected pc/npc/mob you selected with the sub target selection arrow

    if you want to target a specific party/alliance member its best to use <p?>,<a1?>,<a2?>
    here is some code to figure it out
    Code:
    function get_party_member_slot(name)--returs true if given name is in allience
         for pt_num,pt in ipairs(alliance) do
             for pos,party_position in ipairs(pt) do
                 if party_position.name == name then
                    return pt_num,pos
                 end
             end
         end
    end
    
    
    local pt_num,pos = get_party_member_slot(target_name)
    local target = ""
    
    --this is all if pt_num and pos have a base count of 1
    if pt_num = 1 then
        target = "<p"..pos-1..">"
    elseif pt_num = 2 then
        target = "<a1"..pos-1..">"
    elseif pt_num = 3 then
        target = "<a2"..pos-1..">"
    end
    
    --or--
    
    if pt_num and pos then
        target = (pt_num = 1 and "<p"..pos-1..">" or (pt_num = 2 and "<a1"..pos-1..">" or "<a2"..pos-1..">"))
    end
    (im unsure if pos starts with 0 or 1)
    --if it is a base count of 0 just remove all the -1's

Page 267 of 302 FirstFirst ... 217 257 265 266 267 268 269 277 ... LastLast

Similar Threads

  1. Replies: 6547
    Last Post: 2014-07-08, 22:45