Item Search
     
BG-Wiki Search
Closed Thread
Page 17 of 302 FirstFirst ... 7 15 16 17 18 19 27 67 ... LastLast
Results 321 to 340 of 6036

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

  1. #321
    Melee Summoner
    Join Date
    Apr 2013
    Posts
    35
    BG Level
    1
    FFXI Server
    Cerberus

    Okay, I been trying to mess around with with creating a drg.lua but I'm not super happy. Haven't poured too much thoughts into sets yet just copied mote's sam.lua and adjusted. 2 things however: Restoring Breath is not working and I don't know why my character won't ever swap to his idle sets. Stays in engaged set, WS sets are used when they should be. NO idea why idle won't trigger.

    http://pastebin.com/FZuKpreV

    Any help would be greatly appreciated.

    Edit: if spell.english:find('Healing Breath') then => would it matter that it's Healing Breath IV I'm after really?
    Edit 2: 4am and going to bed, but! I dismissed my pet and all of a sudden Idle sets were chosen again, so it's maybe related to some pet aftercast thing?

  2. #322
    So hard we fuck rocks
    Join Date
    Jan 2009
    Posts
    3,084
    BG Level
    7
    FFXI Server
    Sylph

    Quote Originally Posted by Byrthnoth View Post
    Dropbox or Google drive. Check my pastebin (in Sig I think) for instructions.
    You still never cease to be awesome as fuck. thanks b

  3. #323
    Fake Numbers
    Join Date
    Aug 2010
    Posts
    77
    BG Level
    2

    Code:
    function precast(spell)
    		if spell.english == 'Protect V' and spell.target.name == player.name then
    			cancel_spell()
    			send_command('input /ma "Protectra V" '..player.name..'')
    			return
    		elseif spell.english == 'Shell V' and spell.target.name == player.name then
    			cancel_spell()
    			send_command('input /ma "Shellra V" <me>')
    			return
    			elseif naSpells:contains(spell.name) and windower.ffxi.get_ability_recasts()[32] < 10 then
    			send_command('input /ja "Divine Caress" <me>;wait 1;input /ma "'..spell.name..'" '..spell.target.raw..'')
    			cancel_spell()
    			return
    		end
    Works perfectly.

  4. #324
    E. Body
    Join Date
    May 2008
    Posts
    2,069
    BG Level
    7
    FFXI Server
    Siren

    I tried using the RUN one that's posted, but it's giving me an error on line 213. Given that I haven't even altered it yet, I have no idea what's going on.

  5. #325
    Sea Torques
    Join Date
    Sep 2012
    Posts
    743
    BG Level
    5
    FFXI Server
    Leviathan

    Quote Originally Posted by Shadowmeld View Post
    on the S() functions, what is the advantage of using S{} over T{} then, I thought the whole point of the S{} was so you could use the if S[] as a boolean argument instead of having to do the :contains function. Just kind of curious.
    You can do it, but like I said, it will backfire in some cases, because [] looks up values in the metatable first, which searches through the "set" and the "table" table for the right keys. Meaning, S{'name', 'id', 'count'}['count'] would be true, as you expect it to. However, S{'name', 'id'}['count'] would also be true, which you wouldn't expect. That's because "count" is a key in the "table" table. Everything that's used as a key in the "set" or "table" table would be invalid as a parameter, which could fuck up a few things. Also, despite what it looks like, this is slower than set.contains. You would think it's just a look-up, but thanks to the metamethod definition it's actually a function call that looks for the key in three tables.

    The real difference in S vs T is that S is more efficient, even for very small tables. s:contains(x) is only one table look-up, t:contains(x) is a whole slew of functions, loop iteration and look-ups for all of those table elements. S is faster than T for everything it does, it just can't do quite as many things. T allows mapping from key to a value, whereas S merely allows an unordered collection of values (like real mathematical sets). Printing out a S table for example, will often print the elements in a different order. So if you rely on the order, but are still only interested in values, not keys, you would use L instead. If you want to actually map certain keys to certain values, you'd use T. I know there's lacking documentation on this, which is why hardly anyone does it, but I'm too busy to write it and others are either busy as well or just don't want to, or don't quite understand it yet.

    The usage is exactly the same though, which is actually a good thing, because it means you don't need to memorize different usage for different data structures. All data structures we provide are used in exactly the same way and have all the same functions available. They follow the closest thing to an interface there is in Lua.

  6. #326
    New Spam Forum
    Join Date
    May 2006
    Posts
    171
    BG Level
    3
    FFXI Server
    Alexander
    WoW Realm
    Doomhammer

    Quote Originally Posted by Motenten View Post
    Sorry, I haven't pushed the fix for that yet. Maneuver's aren't JAs, they're Pet Maneuvers. Change it to sets.precast.Maneuver and it should work (assuming the spell mappings are in place for the version you have).

    The TP set thing I've seen before, but haven't figured out all the issues with it. It'll be fixed when I can work out the problem.
    Thanks, Maneuver thing worked. :D

    Appreciate all the hard work you put into this Motenten!

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

    Quote Originally Posted by Shadowmeld
    also as an additional question related to pet_midcast and aftercast as it relates to DRG, how does that work with spells, does it process the aftercast function first and then the pet_midcast, I admit to a little apprehension as to whether it would work the way I have wrote it or whether you would have to add some form of code to stop aftercast from processing.
    Byrth added pet_midaction() handling a couple days ago. So what you'd do is in aftercast(), if pet_midaction() is true, don't equip anything, and just wait for pet_aftercast() before returning to default gear. I actually need to go back and add this for to my pup file, as testing on that was the original reason for adding the handling. I might just put it in the default include handling.

  8. #328
    Fake Numbers
    Join Date
    Aug 2010
    Posts
    77
    BG Level
    2

    The VW temps don't work from macro's with GS running, is there a local fix I can do?

  9. #329
    BG Content
    Join Date
    Jul 2007
    Posts
    20,128
    BG Level
    10
    FFXI Server
    Lakshmi
    Blog Entries
    1

    The temp fix will be to use them from the menu. I will look at what is wrong tonight. I thought I already fixed this.

    edit:
    The error is in helper_functions.lua on line (probably) 493. It says bag_id = 4 when it should be bag_id = 3.

  10. #330
    Hydra
    Join Date
    Aug 2011
    Posts
    140
    BG Level
    3
    FFXI Server
    Leviathan

    Quote Originally Posted by Upinsmoke View Post
    Question: What do i need to get started with gearswap? And what commands do i use to load files?
    If you're using windower4 you just check the box on the Addon tab for "GearSwap" (I also recommend Shortcuts as a way of replacing Spellcast if you're coming from that).

    It comes with some example jobs under the addons/gearswap/data/ folder, but I just grab the Mote-* and UserGlobals.lua files from here : https://github.com/Kinematics/GearSwap-Jobs and put them into the data folder, then one of those examples (had to make a Rng one for myself based off the template). And if you're still in game while editing you can //gs reload

    Due to the way the Mote-* files are split up, you shouldn't have to edit any of them outside of the UserGlobals.lua, so that way you can just re-download the zip/etc when he updates them for fixes and such.

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

    Quote Originally Posted by Motenten View Post
    Sorry, I haven't pushed the fix for that yet. Maneuver's aren't JAs, they're Pet Maneuvers Commands. Change it to sets.precast.Maneuver and it should work (assuming the spell mappings are in place for the version you have).

    The TP set thing I've seen before, but haven't figured out all the issues with it. It'll be fixed when I can work out the problem.
    Is that the same deal then for Repair and Tactical Switch?

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

    Have pushed another update to Mote-Include. Done a full audit of it, and it's been cleaned up and refined a bunch. It should now be fully stable, with no further planned changes to the core API. Moved the last couple bits of user code out of it.

    Of note, I've put in top-level support for ranged attacks. There's now a state.RangedMode that uses values from options.RangedModes, the same was as state.OffenseMode/options.OffenseModes, and similar types. Ranged attacks are in their own category in spell.action_type, so they're given their own set category as well (sets.precast.Ranged and sets.midcast.Ranged). You may use those defaults, or the refined state versions (eg: sets.midcast.Ranged.Acc), as well as use CustomRangedGroups to further refine things on a situational basis.

    I've also changed get_job_wsmode to get_custom_wsmode, to better describe its use.

    There are minor refinements to the general default set selection code, but mostly everything should still work fine.

    Also added support for calls to user_status_change and user_buff_change, for non-job-specific custom handling that can be put in UserGlobals.

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

    Quote Originally Posted by haruhigumi View Post
    Is that the same deal then for Repair and Tactical Switch?
    No, those are both normal job abilities, so fall under sets.precast.JA.

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

    Also added some utility code for automatically selecting an appropriate elemental gorget and belt for a weaponskill. Use the gear.ElementalGorget and gear.ElementalBelt in your weaponskills sets if you just want to use the auto-calculated version rather than looking up each weaponskill to hand-code it. Also makes use of gear.Gorget.DefaultItem and gear.Belt.DefaultItem (which you can set at any time) as fallbacks if you don't have a properly matching gorget or belt (useful for the default weaponskill set).

    Check Mote-Utility and UserGlobals for details on it.

    Aside: also tweaked the function for selecting obis. This has a small impact on my whm and blm files, or any derivatives.

  15. #335
    Hydra
    Join Date
    Jul 2010
    Posts
    119
    BG Level
    3
    FFXI Server
    Asura

    Quote Originally Posted by Motenten View Post
    Also added some utility code for automatically selecting an appropriate elemental gorget and belt for a weaponskill. Use the gear.ElementalGorget and gear.ElementalBelt in your weaponskills sets if you just want to use the auto-calculated version rather than looking up each weaponskill to hand-code it. Also makes use of gear.Gorget.DefaultItem and gear.Belt.DefaultItem (which you can set at any time) as fallbacks if you don't have a properly matching gorget or belt (useful for the default weaponskill set).

    Check Mote-Utility and UserGlobals for details on it.

    Aside: also tweaked the function for selecting obis. This has a small impact on my whm and blm files, or any derivatives.
    Can you add examples for getting magian staves to work through UserGlobals? I know we talked about it the other night, but the final outcome for me was it not working by adding "sets.precast.FC.Thunder = {main='Apamajas I'}" like you said.

    Probably something I'm doing wrong; much appreciated!

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

    Nope, that was a bug in which set it was trying to equip. Fixed, and pushed.

  17. #337

    I am having a very minor issue with my gearswap. It works great, but I have this function

    Code:
    windower.register_event('weather change', function(id, name)
    	
    	windower.send_command('gs c update idle')
    		
    end)
    
    function update_idle_set()
    
    	if world.weather_element == 'Earth' or buffactive.Sandstorm then
    		sets.Idle = set_combine(sets.Idle, sets.Kite)
    	else
    		sets.Idle = sets.Idle.Default
    	end
    	
    	if buffactive['Sublimation: Activated'] then
    		sets.Idle = set_combine(sets.Idle, sets.Sublimation)
    	end
    
    end
    It works just find normally, but I get an error when I change zones in the helper_functions line 182? (I don't have the error in front of me). I am assuming that it just can't get the weather data while zoning so it is throwing a nil table error. Any way I can stop this from happening?

    Also, for anyone doing this, I have discovered that windower does not recognize gaining storm spell buffs as a weather change event.

  18. #338
    Sea Torques
    Join Date
    Jun 2012
    Posts
    570
    BG Level
    5
    FFXI Server
    Asura
    WoW Realm
    The Scryers

    Gearswap Help Thread!

    Quote Originally Posted by Shadowmeld View Post

    Also, for anyone doing this, I have discovered that windower does not recognize gaining storm spell buffs as a weather change event.
    Yea... Storms are buff, not weather effects... Use the function: buff_change
    Like:
    Code:
    function buff_change(status,gain_or_loss)
        if status == "Sandstorm" then
            if gain_or_loss == "gain" then
               W/e you want when you get it
             Else
                W/e you want when you lost it
               End
           End
    End

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

    More renovations, partly to deal with Heretic's note, partly because I was reminded that I was going about the whole gorget/belt/etc thing in a very archaic way.

    1) There are now variables that represent the current gorget/belt/etc. These are defined as augmented items, but without the augment. What this means is that you can use them in your gear sets, and other functions can change the value of what they contain, without the value being fixed when you first create the variable in the set.

    Relevant vars:

    gear.ElementalGorget
    gear.ElementalBelt
    gear.ElementalObi
    gear.ElementalCape
    gear.ElementalRing
    gear.FastcastStaff
    gear.RecastStaff


    2) I no longer look for a list of 'owned' gorgets/obis/etc. That's silly when I can just look and see what you have in your inventory. If it's not in inventory, even if you own it, it's not going to get worn.

    3) Thus, the owned elemental item tables were removed, and a simple name mapping added for these items: gorgets, elemental belts, obis, fast cast magian staves, fast recast magian staves.

    4) Combining the above, you can now use one of the gear variables in an equip slot, and it will automatically use the appropriate obi/staff/gorget/etc, if it's available in inventory.

    5) Of course, what happens when such item is -not- available? In that case, there's a series of default vars that will be used instead, or a simple empty string (which doesn't change the gear already being worn) if no default is given. You can change what the default item is depending on the spell or situation.


    The magian stave sets that Heretic referenced are thus no longer needed, and won't be automatically equipped. An illustration of what you can do instead:

    sets.idle = {main="Terra's Staff"}
    sets.precast.FC.ElementalMagic = {main=gear.FastcastStaff}
    sets.precast.FC.ElementalEnfeeble = {main="Atinian Staff"}

    And you have a Vourukasha I (ice) in inventory, and Atar I (fire) in mog sack.

    With:
    gear.default.fastcast_staff = ""

    Cast Fire V: Proper fast cast staff not found in inventory. Uses default, which is an empty string. Thus, gear won't change, and precast will still be wearing Terra's Taff.

    Cast Blizzard V: Proper fast cast staff is found, so Vourukasha I is used for precast.

    Cast Frost (ice spell): Proper fast cast staff is found, however the Elemental Enfeeble specifically uses the Atinian Staff, so that will be used instead.

    Now change:
    gear.default.fastcast_staff = "Atinian Staff"

    Cast Fire V: No fast cast staff found, so will instead use the default Atinian Staff for precast.

    Cast Blizzard V: Proper fast cast staff found, so will equip the Vourukasha I.

    Cast Frost: Proper fast cast staff is found, however the Elemental Enfeeble specifically uses the Atinian Staff, so that will be used instead.


    And if you pull the Atar I out of your mog sack, it will now be used when casting Fire V.


    For the Twilight Cape and Zodiac Ring, aside from checking whether they're in your inventory, it only equips them if the appropriate obi was also found, and excludes the ring for the skills it doesn't affect.



    However, in the process I also did some work that slightly refactored all job files. get_sets() is now a basic skeleton function that cals a function now named self_initialize(), as well as a few other function falls. All sets and vars are defined in self_initialize, while get_sets handles other basic upkeep (loading binds, proper include order, default macro book, etc).

    It's a fairly simple change, and copying your modified sets into the new file should be trivial. I'm still looking into a better way of handling such updates, though.

  20. #340
    Hydra
    Join Date
    Aug 2011
    Posts
    140
    BG Level
    3
    FFXI Server
    Leviathan

    How is the set_weaponskill_gorget_belt() command used, that is to say if I use gear = set_weaponskill_gorget_belt("Jishnu's Radiance"), does it come back as gear["belt"] and gear["gorget"] or is multiple variables being returned handled differently?

Closed Thread
Page 17 of 302 FirstFirst ... 7 15 16 17 18 19 27 67 ... LastLast

Similar Threads

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