Item Search
     
BG-Wiki Search
+ Reply to Thread
Page 4 of 291 FirstFirst ... 2 3 4 5 6 14 54 ... LastLast
Results 61 to 80 of 5808

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

  1. #61
    Chram
    Join Date
    Sep 2007
    Posts
    2,527
    BG Level
    7
    FFXI Server
    Fenrir

    Ok, massive update on my code. I broke out a bunch of it into an include (Mote-Include.lua), trying to make things nicely generic.

    Brd file: http://pastebin.com/WK9Qw907
    Include file: http://pastebin.com/4JgbYR63

    I actually trap precast/midcast/aftercast in the include, and then call secondary functions within the job script (job_precast, job_midcast, job_aftercast, job_post_precast, job_post_midcast, job_post_aftercast). Since equip() calls are cumulative, you can decide where to add them in the overall sequence, whether before or after the generic handling. Return true from the job_precast()/etc [pre-generic handling] if you don't want the generic handling to modify anything.

    The generic handling depends heavily on set naming, but I've gotten it to where it should be extremely easy and intuitive. A brief general list of how it breaks down:

    sets.precast.JA -- Top level table for all job abilities. Create sub-sets per JA for gear that should be equipped when the JA is used (eg: sets.precast.JA.Berserk).
    sets.precast.WS -- Same as with JAs, though each weaponskill can also have sub-tables. So, for example, sets.precast.WS['Shijin Spiral'].Acc for an accuracy-focused Shijin Spiral build. Those sub-tables must be named from the list of WeaponskillModes values.
    sets.precast.FC -- Top level table for fast cast sets. Place default fast cast set here, and then more specific sets as sub-tables (see below for details).
    sets.precast[type] -- Any unique action type that isn't covered by the others (eg: Jigs, Waltzes, CorsairShots, etc).

    sets.precast.FC[specifics] and sets.midcast[specifics] -- Specifics describes a general priority order of what sets the code will look for. Both of these are limited to magic spells only, since fast cast is only relevant to spells, and only spells have a midcast timing.

    So, in order of priority:
    First it will look for the exact spell name (eg: sets.midcast.Stoneskin).
    Then it will look for spell name mappings (eg: Cure III -> 'Cure', so will use sets.midcast.Cure). Currently the available spell mappings are 'Cure' for single target cures, 'Curaga' for AOE cures, 'Barspell' for elemental (not status) barspells, and most bard song groups.
    Then it will look for the spell skill (eg: sets.midcast.EnhancingMagic for enhancing spells).
    Then it will look for the spell type (eg: sets.midcast.BlackMagic for any black magic type spell).
    Finally it will default to the basic sets.precast.FC for precast, and sets.midcast for midcast.

    Note that for now it doesn't have anything complicated for handling high fast cast. Will get to that later.


    Gear equipping is handled in a similar manner, using the same types of modes I had in my xmls (OffenseMode, DefenseMode, CastingMode, IdleMode, RestingMode, PhysicalDefenseMode and MagicalDefenseMode). The mode values aren't fully fleshed out yet, though.

    So the vast majority of the work needed per job is just defining the gear sets. Brd only has 130 lines of custom work, basically just dealing with special stuff for songs, and a few functions that I left in solely for reference but don't actually do anything.


    Other stuff:
    Binds are set the same way my xml suggested as the default, and I've actually set it up so that they can set the Gearswap binds on lua load, and set it back to Spellcast binds on unload (though one bug will be fixed in 0.722 that will make this smoother). Modifying Windower's init.txt file isn't necessary. Binds in general are easier to deal with than in Spellcast.



    Anyway, play with it, break it, tell me what does and doesn't work. I'll probably make a whm and mnk lua for jobs that would be a bit more common to test with.

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

    Added a whm gearswap file at http://pastebin.com/yCu8PmUQ

    Test it out, etc.

  3. #63
    BG Content
    Join Date
    Jul 2007
    Posts
    16,141
    BG Level
    9
    FFXI Server
    Lakshmi
    Blog Entries
    1

    Quote Originally Posted by Release
    GearSwap v0.722:
    * Exposed a new standard user function "midaction()" to the user environment.
    This function returns true (in the middle of an action) or false (not in the middle of an action) to tell you whether or not you're between precast and aftercast. So, for instance, if you are the type who spams macros, you may slam precast so quickly that you'll accidentally overwrite your midcast gear with precast gear. Adding "if midaction() then return end" at the top of your precast function would solve this. I have avoided making the full lock-out from precast to aftercast a permanent feature of GearSwap because it annoys some people and is kind of buggy in zones where packets get dropped. I still have the 1 second delay after any action attempt (which is reset by failure messages). If you do choose to implement this feature yourself by putting the aforementioned line at the front of precast and midcast, you can use "//lua i gearswap midact" to flip midaction to false and unlock yourself in the case of an error.

    * Fixed an issue where GearSwap would think you were wearing different equipment than you actually were. - You may have noticed this if you were using show_swaps().

    * Fixed the augment system for Hagondes/etc. pieces. - It turns out that SE was only using the lower 5 bits to code augment magnitude. It's not clear what the upper 3 bits of that byte are doing, but they were 0 in any augment gear I looked at before Adoulin.

    * Exposed "S" tables from the Lua sets library. - These are equivalent to making a big table with ['key'] = true, so S{'pants','hats','feet'} would be about the same as {pants=true,hats=true,feet=true} There are a few more options, and it's important to note that S{}.index is always true because they use the __index metamethod (I think).

    * Changed target.status for - This is now a string, and I have moved the Status ID number to target.status_id. This is true for every type of target.

    * Changed subtarget and added last_subtarget - I have decided to change subtarget to be the current subtarget (get_mob_by_target('st')) and let last_subtarget be the monster you'd see if you used /ta <lastst> (get_mob_by_target('lastst')). I am not sure which one spellcast was using, or if it was using some subtarget definition that was higher order than what we have access to in LuaCore.

    * Changed how interrupted spells are handled. - They now *should* pass the spell resources line with a spell.interrupted bool set to true. In cases where the spell is not interrupted, this bool is nil. action.type is now consistently "Interruption" for these cases.

    * Added validity check for functions that are invalid outside of precast.

    * Changed the ranged attack "spell" line to reflect the resources.

    * Enable will now actually equip the right gear (or not equip it). - There was a problem where Enable would equip the last item for each slot that was different from what you were already wearing. Now it only equips stuff if it's different.

    * Made it so file_unload() is called when GearSwap unloads.

    * Changed the search path for user files (include() and normal user file loading). - Now GearSwap checks ../data/<player name>/<file>.lua, ../data/common/<file>.lua, and ../data/<file>.lua in that order. Sorry to players named Common.

    * Added more fancy debugging (for myself =p)

    * Fixed the out-of-range BP bug - For some reason SE sends two action messages if your BP fails. One is for you (as if you just cast a magic spell) and the other is for your Avatar (typical fail message). The one for yourself is actually the one that generates a message, which is confusing.

    * Updated set_combine() so it takes an arbitrary number of sets and collapses them leftwards - Sets to the right get preference over sets to the left.

    * Updated documentation to reflect these changes.
    It is possible that the above list is not comprehensive.






    Other responses:
    Quote Originally Posted by Motenten View Post
    Out of similar curiosity, what's the delay between using an ability and being able to detect it with a buffactive check? I know in Spellcast, something like Sneak Attack + WS can be problematic because you can't tell that SA is up when you try to weaponskill, so I have to set special variables to note that the JA was actually used beforehand.
    I had to check before I could answer this with confidence, but the answer is that the information is available as soon as the buff_change packet comes in. If you use Alacrity, for instance, you generally do not have the Alacrity status in aftercast, but do in buff_change.


    Quote Originally Posted by ChronicCettness View Post
    Alright so been tweaking Byrth's summoner script for myself for a while now and I'm attempting to implement my nuking gear. I'm confused by the results of what I've done so far. Currently my Hagondes cuffs and Coat aren't having any issues equipping appropriately. The feet/ Head aren't picking up the MAB set apparently and are stuck in PET MAB mode! If anyone has any input from these snippets or trouble shooting suggestions let me know! Thanks :D

    Variables :
    Code:
     LegPMacc={name="Hagondes Pants",augments={"Physical Damage Taken -3%","Pet:","Magic Accuracy +20"}}
    LegMab = {name="Hagondes Pants",augments={"Physical damage taken -4%","Magic Attack Bonus +24"}}
    FtPMab = {name="Hagondes sabots",augments={"Physical damage taken -3%","Pet:", "Magic Attack Bonus +23"}}
    FtMab = {name="Hagondes Sabots",augments={"Physical damage taken -3%","Magic Attack Bonus +24"}}
    HdPMab ={name="Hagondes Hat",augments={"Physical damage taken -3%","Pet:","Magic Attack Bonus+20"}}
    HdMab = {name="Hagondes Hat",augments={"Physical damage taken -3%","Magic Attack Bonus +20"}}
    BdyPerp = {name="Hagondes Coat", augments={"Physical damage taken -4%", "Avatar Perpetuation Cost -5"}}
    BdyMab ={name="Hagondes Coat", augments={"Physical damage taken -3%","Magic Attack Bonus +20"}}
    HnPMab ={name="Hagondes Cuffs",augments={"Pet:","Physical damage taken -3%","Magic Attack Bonus +20"}}
    HnFc = {name="Hagondes Cuffs",augments={"Physical damage taken -3%","Fast cast +5"}}

    It turns out that Motenten was correct. You need to put "Pet: Magic Accuracy +20". Also, SE appears to be using the higher bits of extgoal on Hagondes gear, so I had to adjust parse_augments so it would work. I had it working swapping between my "Magic Attack Bonus" and "Pet: Magic Attack Bonus" pieces today.

    Augments that are phrased like:
    Pet: Magic Attack and Magic Accuracy +5
    will not work. They're a special case and I don't have any so it's hard for me to test them.



    Bugtracker: https://github.com/Byrth/Lua/issues
    I need to figure out how to implement <st*> targs better and deal with JHidaka's issue. I am going to be crucified if I do not make it laundry time now, though!

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

    Hmmm Just reloaded windower and downloaded something.... tried to load gearswap and got
    Failed to load gearswap. Lua Error (1) blahblahb/Gearswap.lua:722: attempt to compare number with nil.

  5. #65
    BG Content
    Join Date
    Jul 2007
    Posts
    16,141
    BG Level
    9
    FFXI Server
    Lakshmi
    Blog Entries
    1

    Sorry, fixed now. Always reload your addons after you disable debugging, kids!

  6. #66
    Chram
    Join Date
    Sep 2007
    Posts
    2,527
    BG Level
    7
    FFXI Server
    Fenrir

    -- Never mind. Always reload your thread before posting!

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

    Testing interrupted spells.

    Stoneskin: spell.interrupted=true in all cases, including when not interrupted. action.type=Magic on normal casts, =Interruption when interrupted.

    Blink: spell.interrupted=nil in all cases, including when interrupted. action.type=Interruption when interrupted, though.


    Also have had several cases where the game completely locked up (couldn't even select the window for focus); had to do a hard kill of the process. Not sure yet whether that's due to my lua scripts, though. Testing on sch (where I have no .lua file) didn't break anything, so I'll have to review my stuff to see what might have conflicted with the update.

    Will look into it more when I have time to do a full review of my .lua files.

  8. #68
    Puppetmaster
    Join Date
    Mar 2010
    Posts
    60
    BG Level
    2
    FFXI Server
    Ifrit

    Quote Originally Posted by Motenten View Post
    Testing interrupted spells.

    Stoneskin: spell.interrupted=true in all cases, including when not interrupted. action.type=Magic on normal casts, =Interruption when interrupted.

    Blink: spell.interrupted=nil in all cases, including when interrupted. action.type=Interruption when interrupted, though.


    Also have had several cases where the game completely locked up (couldn't even select the window for focus); had to do a hard kill of the process. Not sure yet whether that's due to my lua scripts, though. Testing on sch (where I have no .lua file) didn't break anything, so I'll have to review my stuff to see what might have conflicted with the update.

    Will look into it more when I have time to do a full review of my .lua files.
    Glad I'm not the only one having issues. Same problem here, testing on Summoner. Won't even have a pet out, hit the release command(macro) andddd frozen.

  9. #69
    BG Content
    Join Date
    Jul 2007
    Posts
    16,141
    BG Level
    9
    FFXI Server
    Lakshmi
    Blog Entries
    1

    I'm not sure what's causing this. It's probably an infinite loop caused by something I just updated, but I can't think what it'd be.


    Looks like I deadlock every time I use windower.ffxi.set_equip(). That's beyond my power to fix.

    Use this hook and it'll fix the deadlocking problem:
    https://www.dropbox.com/s/xbonklrmhz...20-%20Test.dll

  10. #70
    BG Content
    Join Date
    Jul 2007
    Posts
    16,141
    BG Level
    9
    FFXI Server
    Lakshmi
    Blog Entries
    1

    Okay, so I think I've fixed most of the problems that were mentioned in this thread, except for the deadlocking one. The deadlocking issue seems to occur in any addon that both injects packets and has an incoming or outgoing packet event. Just keep using the new hook.

    I'm not sure it was mentioned in this thread, but there was an issue where event spam faster than server-client delay would result in you wearing the wrong gear. I fixed that.

  11. #71

    FYI mote, your whm.lua is an xml in your pastebin.

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

    hmmmmmmmmmm..... Did download that Hook, replaced it, but when I did open the launche it did redownload one (old one I suppose).. either way logged in, loaded gearswap, and on the first swap, windower "not responding"

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

    Quote Originally Posted by Shadowmeld View Post
    FYI mote, your whm.lua is an xml in your pastebin.
    Er... Huh? [Lua] Whm is lua...

  14. #74
    Relic Weapons
    Join Date
    Sep 2007
    Posts
    378
    BG Level
    4
    FFXIV Character
    Caprese Dionir
    FFXIV Server
    Hyperion
    FFXI Server
    Sylph

    Quote Originally Posted by Motenten View Post
    Er... Huh? [Lua] Whm is lua...
    Actually, I see the same thing for what it's worth. I tried to browse to the root of your Pastebin and select "[Lua] WHM" again and it shows an xml file.
    Even tried deleting my browser cache and reloading the page. Every other page in your pastebin that says Lua is an lua file, it's just WHM that shows an xml.
    Spoiler: show

    Edit: Glancing at the screenshot again, it appears pastebin thinks its an lua file with the contents of spellcast in it, so it says the Syntax is lua.

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

    Ah, ok, I'm blind. Fixed.

    Edit: Note that some debugging stuff is in there. I haven't used since I was testing yesterday.

  16. #76
    BG Content
    Join Date
    Jul 2007
    Posts
    16,141
    BG Level
    9
    FFXI Server
    Lakshmi
    Blog Entries
    1

    I spent part of my holiday commute refactoring GearSwap. I am still seeing some ABA errors that I can't easily explain, but the code is much more modular now and slightly safer. I'd like to test it for a day or two (specifically the encumbrance code) and see if it really works before pushing it live, but I bet it does. Following the logic before was painful, but now it's much less so.

    I don't know if it was pushed, but Arcon has a new LuaCore version to go with the current official hook (not the one I linked) that fixes the deadlocking problem.


    Edit: Oh yeah, and about Augments. I'm not really sure what the extdata problem is. My augments appear to require the adjustment I made in 0.722, but Cett's augments don't work with it. For now I have it disabled. I need to figure out how the augments really work, and my sample size is just not very large <_<;

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

    It wasn't pushed to my knowledge, but if you're freezing you can download it here if you want to try it: https://www.dropbox.com/s/eekj8dm7uj...20-%20Test.dll

  18. #78
    Chram
    Join Date
    Sep 2007
    Posts
    2,527
    BG Level
    7
    FFXI Server
    Fenrir

    Did a quick bit of testing, and haven't had any lockups. Back to more serious testing

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

    It has been pushed now. If any further deadlocking occurs let me know.

  20. #80
    Chram
    Join Date
    Sep 2007
    Posts
    2,527
    BG Level
    7
    FFXI Server
    Fenrir

    Ok, my include should be pretty stable now. Mostly cleaned the debug stuff out, and nothing seems broken. Still missing fast cast stuff, but not much aside from that (until I find more stuff as I work through more jobs).

    Documentation: http://pastebin.com/upfwKiyw
    Include: http://pastebin.com/4JgbYR63
    Brd: http://pastebin.com/WK9Qw907
    Whm: http://pastebin.com/yCu8PmUQ


    You'll see that the actual job-specific rules are extremely light; there's very little that needs tweaking per job, once you have the sets set up properly. If anyone wants to test them out, please let me know how they work for you.

+ Reply to Thread
Page 4 of 291 FirstFirst ... 2 3 4 5 6 14 54 ... LastLast

Similar Threads

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