Item Search
     
BG-Wiki Search
Closed Thread
Page 14 of 302 FirstFirst ... 4 12 13 14 15 16 24 64 ... LastLast
Results 261 to 280 of 6036

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

  1. #261
    The Syrup To Waffles's Waffle
    Join Date
    Jun 2007
    Posts
    5,053
    BG Level
    8
    FFXIV Character
    Cair Bear
    FFXIV Server
    Excalibur
    FFXI Server
    Fenrir

    It's case sensitive.

  2. #262

    Quote Originally Posted by Byrthnoth View Post
    Well, I still don't know what is causing those deadlocks. I've pushed a new version of GearSwap live, though.

    Features:
    * If you are using an Automaton, now you will have access to all the information that appears on the Automaton equipment menu. The equipped head, the equipped frame, base stats, added stats, attachments, etc. See Variables.xls for more information.
    * pet_status_change(spell) function added. It works the same way as normal status_change.
    * Added (and forgot to document) player.inventory, player.sack, player.satchel, and player.case. These are like buffactive. player.inventory.izhiikoh would be 1 if you had Izhiikoh in your inventory. player.inventory.shihei would be 98 if you had 98 Shihei in your inventory. etc.
    * Error messages from user functions will now occur in console and display the line of the user file causing the error. (also, error handling was added back to set_combine and equip)

    Bugfixes:
    * Sleepga and Sleepga II would not cast, but now they will.
    * //gs export used to require a user file be loaded to export, but now it only requires a user file to export sets.
    * pet_midcast wasn't working for BST pets and Automatons, but now it does.
    * Using "//gs" used to throw an error, but now it doesn't
    * Equipment history was not properly blanking when you changed jobs, but now it does.
    * GearSwap was blocking Itemizer if you spelled out the full command properly, but now it doesn't anymore.



    Shortcuts only had one bug squashed, but I might as well explain it a little. Shortcuts actually uses Lua's string.find to determine name matches, which means you can use patterns (and captures, not that they serve a purpose) when looking for names. I sanitize the target now so that you can't use this to make it throw errors.
    Byrth, I just wanted to let you know that I haven't had a single gearswap deadlock since the most recent luacore update. It has been working very well since saturday.

    Sorry for bugging you so much on chat.

  3. #263
    BG Content
    Join Date
    Jul 2007
    Posts
    21,133
    BG Level
    10
    FFXI Server
    Lakshmi
    Blog Entries
    1

    np! I still have no idea what was causing that.

    Also, I'm going to write a function that should screen out impossible casts (like in Mog Gardens).

    My thoughts about allowing WSs/etc. while not engaged are:
    1) Being able to WS and use other engaged-required JAs while disengaged is useful, so keep it.
    2) WSs are just a subtype of job abilities in general, and not all job abilities can be used while disengaged (like steps). It'll never be perfect and will require a whitelist or blacklist that means upkeep. Upkeep is the enemy, so don't do it.
    3) Using WSs and engaged-required JAs while disengaged is problematic and might get people banned if they're reported, so make a blacklist and accept that it'll never be perfect.

  4. #264
    Hydra
    Join Date
    Aug 2011
    Posts
    140
    BG Level
    3
    FFXI Server
    Leviathan

    This is my current Ranger LUA file (using the lateste Mote-includes and extras though I had to edit out the gearswap_* in front of bind_on_load cuz it was erroring after the new Mote-Include) : http://pastebin.com/VQ5MjRKW

    A couple questions.

    1) Is there something similar to sets.engaged.* that can be used for ranged attacks? As you'll notice I have to have an if/then structure to make sure ranged attacks are changing with the offense mode (and so that there's a separate set for ranged attacks since it's not going to be the same as melee hits). Am I correct in thinking this sets.* bit probably has more to do with Mote's include than it does with GearSwap in general?

    2) What exactly is required to be in precast and midcast, in another thread kept having people mention snapshot sets and all that bit, but is it possible to have a snapshot set in precast, then ratk/racc/etc stuff in midcast and still have both armor's benefit's proc? (like for example in post_precast I have WS belts being swapped since WS tend to be instant but my normal ranged attacks gear being swapped in midcast).

  5. #265
    Hydra
    Join Date
    Aug 2011
    Posts
    140
    BG Level
    3
    FFXI Server
    Leviathan

    Ran into a problem with trying to reconfigure my GearSwap (http://pastebin.com/VQ5MjRKW)

    I set up a precast for normal ranged attacks (ie: snapshot set so to speak), and then the rest of it as midcast. But I can't seem to get the precast to equip before the midcast, or least I'm not seeing it switch.

    Code:
            -- Ranged Attack Sets (normal, not WeaponSkills)
           
            sets.precast.RA = {
                    head="Sylvan Gapette +2",
                    hands="Iuitl Wristbands",
                    pants="Nahtirah Trousers"}
                    -- AF3+2 5%, Iuitl 10%, Nahtirah 9%
                    -- Impulse Belt (3%) Recommended for 4th "snapshot" item
                    -- 5/5 Snapshot Merit gives 10%
                   
            sets.midcast.RA = {
                    head="Orion Beret",neck="Ocachi Gorget",
                    hands="Manibozho Gloves",ring1="K'ayres Ring",ring2="Rajas Ring",
                    back="Libeccio Mantle",waist="Scout's Belt"}
            sets.midcast.RA.Acc = set_combine(sets.midcast.RA, {
                    neck="Ej Necklace",
                    hands="Buremte Gloves",ring1="Paqichikaji Ring"})
            sets.midcast.RA.TP = set_combine(sets.midcast.RA, {
                    back="Sylvan Chlamys", ear2="Bladeborn Earring"})
                    -- Change to Scout's Beret +2 once augment is completed
                    -- For Extra 5% TP per shot [w/o aug. mainly good for recycle]
    Code:
    function job_post_precast(spell, action, spellMap, eventArgs)
     
            if spell.name == 'Ranged' then
                    -- Normal Ranged Attacks
                    equip(sets.precast.RA)
                   
            elseif spell.type:lower() == 'weaponskill' then
           
                    -- compatible WS belt check
                    if SoilBeltWS[spell.name] then
                            equip({waist="Soil Belt"})
                    elseif LightBeltWS[spell.name] then
                            equip({waist="Light Belt"})
                    end
           
                    -- compatible WS gorget check
                    if LightNeckWS[spell.name] then
                            equip({neck="Light Gorget"})
                    end
                   
            elseif spell.name == 'Spectral Jig' and buffactive.sneak then
                    -- If sneak is active when using, cancel before completion
                    send_command('cancel 71')
            end
           
    end
    Code:
    function job_midcast(spell, action, spellMap, eventArgs)
            -- Normal Ranged Attack
            -- unless there's a similar method to the default sets.midcast.*, doing it manually here
            if spell.name == 'Ranged' then
                    if state.OffenseMode == 'Acc' then
                            equip(sets.midcast.RA.Acc)
                    elseif state.OffenseMode == "TP" then
                            equip(sets.midcast.RA.TP)
                    else
                            equip(sets.midcast.RA)
                    end
            end
    end
    Unless there's a better way to go about this.

  6. #266
    BG Content
    Join Date
    Jul 2007
    Posts
    21,133
    BG Level
    10
    FFXI Server
    Lakshmi
    Blog Entries
    1

    Use //gs showswaps in game and it'll print out what it's changing to the chat log. You generally can't see precast gear if you change to something else in midcast.

  7. #267
    Hydra
    Join Date
    Aug 2011
    Posts
    140
    BG Level
    3
    FFXI Server
    Leviathan

    Quote Originally Posted by Byrthnoth View Post
    Use //gs showswaps in game and it'll print out what it's changing to the chat log. You generally can't see precast gear if you change to something else in midcast.
    I'm also curious, could I avoid having to manually if/then in the precast/midcast if I just use sets.precast.Ranged ? since in the documentation it has:

    .~type (ie: spell.type, such as .Waltz, .Jig, .CorsairShot, etc)
    and since I'm already checking to see if the spell.name is Ranged, would the same principle not apply?

  8. #268
    Hydra
    Join Date
    Aug 2011
    Posts
    140
    BG Level
    3
    FFXI Server
    Leviathan

    Quote Originally Posted by Byrthnoth View Post
    Use //gs showswaps in game and it'll print out what it's changing to the chat log. You generally can't see precast gear if you change to something else in midcast.
    Ok, and yep it's showing pre-cast with the pastebin code I showed earlier. But not with the attempt using sets.precast.Ranged.

    Edit: I guess cuz it's showing "Type" as Misc.

  9. #269
    Hydra
    Join Date
    Aug 2011
    Posts
    140
    BG Level
    3
    FFXI Server
    Leviathan

    I got precast working the Mote way:

    Code:
    	sets.precast.Misc['Ranged'] = {
    		head="Sylvan Gapette +2",
    		hands="Iuitl Wristbands",
    		pants="Nahtirah Trousers"}
    So I don't have to code in an if/then in post_precast, unfortunately the same method isn't working for midcast (ie: sets.midcast.Misc['Ranged'] doesn't trigger).

  10. #270
    Chram
    Join Date
    Sep 2007
    Posts
    2,526
    BG Level
    7
    FFXI Server
    Fenrir

    Quote Originally Posted by haruhigumi View Post
    I got precast working the Mote way:

    Code:
    	sets.precast.Misc['Ranged'] = {
    		head="Sylvan Gapette +2",
    		hands="Iuitl Wristbands",
    		pants="Nahtirah Trousers"}
    So I don't have to code in an if/then in post_precast, unfortunately the same method isn't working for midcast (ie: sets.midcast.Misc['Ranged'] doesn't trigger).
    Fixed midcast to also look for sets.midcast[spell.type], and sets.midcast[spell.type][spell.name], so should work the same way for ranged stuff. Pushed to the public repo.

  11. #271
    Hydra
    Join Date
    Aug 2011
    Posts
    140
    BG Level
    3
    FFXI Server
    Leviathan

    Quote Originally Posted by Motenten View Post
    Fixed midcast to also look for sets.midcast[spell.type], and sets.midcast[spell.type][spell.name], so should work the same way for ranged stuff. Pushed to the public repo.
    Nice went ahead and updated it, and appears to be working smoothly.

    http://pastebin.com/VQ5MjRKW

  12. #272
    Hydra
    Join Date
    Aug 2011
    Posts
    140
    BG Level
    3
    FFXI Server
    Leviathan

    Was just going over the lua files, and was wondering is there anything similar to validate, for example (marked with ---> <---):

    Code:
    ...
    	-- Variables
    	U_Shot_Ammo = S{'Aeolus Arrow','Animikii Bullet','Crossbow Bolt'}
    	DefaultAmmo = {}
    	DefaultAmmo["Eminent Gun"] = {ammo="Titanium Bullet"}
    	DefaultAmmo["Echidna's Bow"] = {ammo="Tulfaire Arrow"}
    	DefaultAmmo["Eminent Bow"] = {ammo="Tulfaire Arrow"}
    	DefaultAmmo["Eminent Crossbow"] = {ammo="Bloody Bolt"}
    	DefaultAmmo["Astrild"] = {ammo="Ruszor Arrow"}
    ...
    
    function job_precast(spell, action, spellMap, eventArgs)
    	if spell.type:lower() == 'weaponskill' then
    		if (spell.target.distance >8 and not ranged_ws[spell.name]) or (spell.target.distance >21) then
    			-- Cancel Action if distance is too great, saving TP
    			add_to_chat(122,"Distance too great for WeaponSkill /Canceling")
    			eventArgs.cancel = true
    			return
    		elseif state.Defense.Active then
    			-- Don't gearswap for weaponskills when Defense is on.
    			eventArgs.handled = true
    		end
    	end
    	
    	if spell.name == "Ranged" or spell.type:lower() == 'weaponskill' then
    		-- If ammo is empty, or special ammo being used without buff, replace with default ammo
    		if U_Shot_Ammo[player.equipment.ammo] and not buffactive['unlimited shot'] or player.equipment.ammo == 'empty' then
    			if DefaultAmmo[player.equipment.range] ---> and in_inventory(DefaultAmmo[player.equipment.range]) <--- then
    				add_to_chat(122,"Unlimited Shot not Active or Ammo Empty, Using Default Ammo")
    				equip(DefaultAmmo[player.equipment.range])
    			else
    				add_to_chat(122,"!!Default ammo not available, not equipping")
    				equip({ammo=empty})
    			end
    		end
    	end
    end
    ...
    The idea being that I could pass an equipment argument and would return true/false if that item exists in my inventory.

    Cuz what I'm trying to do is:
    Does a default ammo exist for the ranged weapon I'm using, if so, does it exist in the inventory, if so equip it, otherwise alert that it couldn't be equipped (either because the ammo doesn't exist, or there's no default ammo set for that weapon).

  13. #273
    BG Content
    Join Date
    Jul 2007
    Posts
    21,133
    BG Level
    10
    FFXI Server
    Lakshmi
    Blog Entries
    1

    I added a player.inventory field in the last update, so you're looking for:
    Code:
    if DefaultAmmo[player.equipment.range] and player.inventory(DefaultAmmo[player.equipment.range]) then
    player.inventory['Tulfaire Arrow'] will also give you the number of Tulfaire Arrows that you have left (total number in inventory), if you want to make low-ammo warnings.

    player.case, player.satchel, and player.sack also work, if you want to give yourself some notification about where your Quivers are.

  14. #274
    Hydra
    Join Date
    Aug 2011
    Posts
    140
    BG Level
    3
    FFXI Server
    Leviathan

    Quote Originally Posted by Byrthnoth View Post
    I added a player.inventory field in the last update, so you're looking for:
    Code:
    if DefaultAmmo[player.equipment.range] and player.inventory(DefaultAmmo[player.equipment.range]) then
    player.inventory['Tulfaire Arrow'] will also give you the number of Tulfaire Arrows that you have left (total number in inventory), if you want to make low-ammo warnings.

    player.case, player.satchel, and player.sack also work, if you want to give yourself some notification about where your Quivers are.
    Ahh ok, so if it's 0 that's going to be considered the same as boolean false?

  15. #275
    Chram
    Join Date
    Sep 2007
    Posts
    2,526
    BG Level
    7
    FFXI Server
    Fenrir

    If it's 0, it won't show up at all since you won't have any. Thus, player.inventory["item I don't have"] will return nil, which will evaluate as false in a conditional check.

  16. #276
    Hydra
    Join Date
    Aug 2011
    Posts
    140
    BG Level
    3
    FFXI Server
    Leviathan

    Quote Originally Posted by Motenten View Post
    If it's 0, it won't show up at all since you won't have any. Thus, player.inventory["item I don't have"] will return nil, which will evaluate as false in a conditional check.
    Noted, used your correction of the [] index (since his was shown with ()), and I had to change the way I configured the ammo type, since I can't pass {ammo="..."} to player.inventory.

    Ended up with this:

    Code:
    	DefaultAmmo["Eminent Gun"] = "Titanium Bullet"
    	DefaultAmmo["Echidna's Bow"] = "Tulfaire Arrow"
    	DefaultAmmo["Eminent Bow"] = "Tulfaire Arrow"
    	DefaultAmmo["Eminent Crossbow"] = "Bloody Bolt"
    	DefaultAmmo["Astrild"] = "Ruszor Arrow"
    
    ...
    
    	if spell.name == "Ranged" or spell.type:lower() == 'weaponskill' then
    		-- If ammo is empty, or special ammo being used without buff, replace with default ammo
    		if U_Shot_Ammo[player.equipment.ammo] and not buffactive['unlimited shot'] or player.equipment.ammo == 'empty' then
    			if DefaultAmmo[player.equipment.range] and player.inventory[DefaultAmmo[player.equipment.range]] then
    				add_to_chat(122,"Unlimited Shot not Active or Ammo Empty, Using Default Ammo")
    				equip({ammo=DefaultAmmo[player.equipment.range]})
    			else
    				add_to_chat(122,"Either Default Ammo is Unavailable or Unknown Weapon. Staying empty")
    				equip({ammo=empty})
    			end
    		end
    	end
    I'll work in a low-ammo warning later (ie: I'd rather have it warn me once if It's under 15, but not every shot under 15).

  17. #277
    Chram
    Join Date
    Sep 2007
    Posts
    2,526
    BG Level
    7
    FFXI Server
    Fenrir

    Also note, a little problem I've been having in a side experiment: player.inventory uses the short names of items, not the full names (and a quick question to Byrth indicated that there wasn't an easy way to change between those). Often this won't matter, but in some cases it might. If you have a stack of Orichalcum Bullets, for example, player.inventory["Orichalcum Bullet"] will return nil, while player.inventory["Orichalc. Bullet"] will return 99.

  18. #278
    Hydra
    Join Date
    Aug 2011
    Posts
    140
    BG Level
    3
    FFXI Server
    Leviathan

    Quote Originally Posted by Motenten View Post
    Also note, a little problem I've been having in a side experiment: player.inventory uses the short names of items, not the full names (and a quick question to Byrth indicated that there wasn't an easy way to change between those). Often this won't matter, but in some cases it might. If you have a stack of Orichalcum Bullets, for example, player.inventory["Orichalcum Bullet"] will return nil, while player.inventory["Orichalc. Bullet"] will return 99.
    Though if equip({ammo="..."}) will accept a short name, then for the sake of just that part I could just change the ammo's names to short. Tulfaire Arrow is fortunately the same as the short name, which is why I haven't noticed a problem as of yet. However Dark Adaman Bolt, I would need to go "Drk. Adm. Bolt", and as long as the equip() function takes it like that, I can work with it. (I'll just add a note above the default ammo, since my LUA file is the only ranger example in the shop thread).

  19. #279
    Chram
    Join Date
    Sep 2007
    Posts
    2,526
    BG Level
    7
    FFXI Server
    Fenrir

    I think I may have a better solution to the problem. Will see what Byrth thinks of it.

  20. #280
    Melee Summoner
    Join Date
    Jan 2014
    Posts
    36
    BG Level
    1

    Thank you for the GearSwap work on the RNG Lua

    I posted in the other (AA) related Thread, but then read this one with the updates you guys have made to the RNG lua GearSwap files. I really do appreciate all the work and effort you put into this. I can't wait to get home and try it out.

Closed Thread
Page 14 of 302 FirstFirst ... 4 12 13 14 15 16 24 64 ... LastLast

Similar Threads

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