Item Search
     
BG-Wiki Search
Page 112 of 302 FirstFirst ... 62 102 110 111 112 113 114 122 162 ... LastLast
Results 2221 to 2240 of 6036

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

  1. #2221
    RIDE ARMOR
    Join Date
    Mar 2014
    Posts
    18
    BG Level
    1

    Geez JSH that was fast, and it worked perfectly! Thank you very much!

    I don't quite know where I went wrong, but the closest i got was activating boost (and it's gear change) , but the weaponskill wouldn't follow (neither the gear change). Maybe I got lost because of the sets names structures (your example used sets.precast, while mine uses sets.JA / WS), if not, it was due to the complex fine tunning you use in your file.

    Now i am wondering if i can use a similar structure to make auto-presto for DNC.

  2. #2222
    Melee Summoner
    Join Date
    Apr 2014
    Posts
    28
    BG Level
    1

    So I was just exp'ing in Woh Gates and noticed my WS doing less damage than a few hours ago.

    I then started to watch gear swaps, this is what I noticed.

    (Using Motenten libs and NIN.lua)

    When I toggle ACC TP gear or MaxAcc TP gear, WS also changes to Acc or MaxAcc sets. I would have to change WS modes with altf9 before, now its changing along with my TP sets.

    Was something changed or am i going crazy?

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

    That's completely normal, and has been in place for forever. If your weaponskill mode is set to Normal, and your OffenseMode (or RangedMode, for ranged weaponskills) is set to anything other than Normal, it will try to use the weaponskill mode that matches that, if such a mode exists. If your Offense Modes are Normal, Acc and Acc2, and your Weaponskill Modes are Normal, Acc, Att, then the Att weaponskill mode will never be automatically selected, and if your offense mode is Acc2, it will never auto-select a weaponskill mode for you.

  4. #2224
    Campaign
    Join Date
    Jul 2007
    Posts
    6,633
    BG Level
    8

    Mote I implemented all of your suggestions, thanks once more!
    A couple of questions so I can understand better the code though, especially within the function handle_siphoning() (which is awesome btw)

    1. What's happening in line 579 of your SMN lua? "local intense = get_weather_intensity()" In the same line you are defining a local variable AND you are assigning a value to that variable using the result of the function you're calling? Did I interpret this right?
    2. Embarassing to ask but what's going on "return (world.weather_id % 2) + 1"? It's a line of your custom "get weather intensity" function. I don't understand what's happening inside the brackets. (altough I get the result of brackets should be either 0 or 1, to be summed with the +1 outside?)
    3. Gave a look at Elemental Gear Utility but need more help. I spotted gear.ElementalGorget.name = get_elemental_item_name("gorget", weaponskill_elements) or gear.default.weaponskill_neck or "". With such a variable then inside my sets I could do something like setname = {head="", neck=gear.ElementalGorget.name, ear1="", ...}. Did I get it right?
      But I still don't understand. Let's say I define Gorgetname = "item1" or "item2" or "item3" and then in my set I go Setname = {neck=Gorgetname}. In which order do the items get processed? Left to right? Right to left? Which gets priority? Let's say for instance I have all Item1, Item2 and Item3 in inventory, so all 3 possibilities are true. Which one would Gearswap prefer for my set in such a circumstance?
    4. For send_command lines, what's the different between ('input ...) and ('@input ...)?

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

    Quote Originally Posted by vtenorio View Post
    Geez JSH that was fast, and it worked perfectly! Thank you very much!

    I don't quite know where I went wrong, but the closest i got was activating boost (and it's gear change) , but the weaponskill wouldn't follow (neither the gear change). Maybe I got lost because of the sets names structures (your example used sets.precast, while mine uses sets.JA / WS), if not, it was due to the complex fine tunning you use in your file.

    Now i am wondering if i can use a similar structure to make auto-presto for DNC.
    Np, and there is an autopresto somewhere already. But yea can be done the "same" way

  6. #2226
    Hydra
    Join Date
    Sep 2012
    Posts
    118
    BG Level
    3

    Quote Originally Posted by Sechs View Post
    Mote I implemented all of your suggestions, thanks once more!
    A couple of questions so I can understand better the code though, especially within the function handle_siphoning() (which is awesome btw)

    1. What's happening in line 579 of your SMN lua? "local intense = get_weather_intensity()" In the same line you are defining a local variable AND you are assigning a value to that variable using the result of the function you're calling? Did I interpret this right?
    2. Embarassing to ask but what's going on "return (world.weather_id % 2) + 1"? It's a line of your custom "get weather intensity" function. I don't understand what's happening inside the brackets. (altough I get the result of brackets should be either 0 or 1, to be summed with the +1 outside?)
    3. Gave a look at Elemental Gear Utility but need more help. I spotted gear.ElementalGorget.name = get_elemental_item_name("gorget", weaponskill_elements) or gear.default.weaponskill_neck or "". With such a variable then inside my sets I could do something like setname = {head="", neck=gear.ElementalGorget.name, ear1="", ...}. Did I get it right?
      But I still don't understand. Let's say I define Gorgetname = "item1" or "item2" or "item3" and then in my set I go Setname = {neck=Gorgetname}. In which order do the items get processed? Left to right? Right to left? Which gets priority? Let's say for instance I have all Item1, Item2 and Item3 in inventory, so all 3 possibilities are true. Which one would Gearswap prefer for my set in such a circumstance?
    4. For send_command lines, what's the different between ('input ...) and ('@input ...)?
    1. You are correct in your interpretation. setting a variable with the local attribute is just a way to limit the memory used on your program. It tells the lua that when the function is done processing, it doesn't need to keep the memory allocated for that variable.
    2. without looking as the weather.lua file in libs, what that function seems to do is take the property from that file single weather would be an even number and double weather would be an odd number. The % 2 is a modular calculation, that divides the number by 2 and gives you the remainder. So if you say had single sand storm weather up. If its id was 4 then that calculation would be 4 % 2 = 0, then add 1 and you get 1 for the intensity.
    3. Using the or in this case will give you the farthest left non nil value, so Gorgetname = nil or "item2" or "item3" would make Gorgetname = "item2". This allows you to eliminate some if statements in your file. Here is how I commonly use this with magic.
    local equipset = set_combine(sets[spell.skill], sets[spell.skill][spell.english] or sets[spell.skill][spell_group] or {}).
    What this does is creates a set with baseset sets[spell.skill] which I always have assigned. It then adds to the set sets[spell.skill][spell.english] if that is not nil. If it is nil then it adds sets[spell.skill][spell_group] if it isn't nil. If both are nil then it just adds an empty table.

    Essentially:

    Code:
    local equipset = set_combine(sets[spell.skill], sets[spell.skill][spell.english] or sets[spell.skill][spell_group] or {})
    Is the same as:
    Code:
    local equipset = sets[spell.skill]
    
    if sets[spell.skill][spell.english] ~= nil then
      equipset = set_combine(equipset, sets[spell.skill][spell.english])
    elseif sets[spell.skill][spell_group] ~= nil then
      equipset = set_combine(equipset, sets[spell.skill][spell_group])
    end
    4. I don't know that one.

  7. #2227
    RIDE ARMOR
    Join Date
    Mar 2014
    Posts
    18
    BG Level
    1

    Quote Originally Posted by JSHidaka View Post
    Np, and there is an autopresto somewhere already. But yea can be done the "same" way
    And yes, it did. It worked perfectly too!
    Now I guess i have completely set gearswap for my purposes. Maybe until the day I decide to play with jobs which actually use magic... but that's an uncertain future.

    Thanks a lot!

  8. #2228
    Campaign
    Join Date
    Jul 2007
    Posts
    6,633
    BG Level
    8

    Cool stuff Shadowmeld!
    I always feel better when I can understand the lines I copypaste in my luas lol

  9. #2229
    Sea Torques
    Join Date
    Sep 2012
    Posts
    736
    BG Level
    5
    FFXI Server
    Leviathan

    Quote Originally Posted by Sechs View Post
    4. For send_command lines, what's the different between ('input ...) and ('@input ...)?
    The @ makes it asynchronous. It should be used when any kind of looping is involved, i.e. when the command invokes other code that can send a new command, which can invoke code again, and so on. Doing that you would normally crashing after a while, when the stack overflows. But with a @, it would not wait for the code to finish, but immediately continue, so the command would be handled on a new thread. That means the stack will never grow above a small size and it won't ever overflow. For a regular command that executes and then terminates the @ makes no discernable difference in most cases (in cases it does you will know why).

    Honestly, since we introduced a proper sleep and yield mechanism, you should never need the @ anymore. If you need a loop, there are better ways to do it, described in this thread, if you care to read up on it. The concept is a bit more advanced, and won't be necessary for most people, but if you're really interested you can give it a whirl.

  10. #2230
    BG Content
    Join Date
    Jul 2007
    Posts
    22,372
    BG Level
    10
    FFXI Server
    Lakshmi
    Blog Entries
    1

    Also, I have GearSwap putting @ at the start of every send_command anyway if it isn't already there.

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

    Shadowmeld answered most stuff, but to clarify a couple things:

    Quote Originally Posted by Sechs View Post
    What's happening in line 579 of your SMN lua? "local intense = get_weather_intensity()" In the same line you are defining a local variable AND you are assigning a value to that variable using the result of the function you're calling? Did I interpret this right?
    Originally I expected to use the weather intensity in a few different parts of the code, so I assigned it to a local variable so I wouldn't have to call the same function over and over. Ended up only using it once, though, so could really eliminate that line and just put the function call in the conditional.

    Quote Originally Posted by Sechs View Post
    Gave a look at Elemental Gear Utility but need more help. I spotted gear.ElementalGorget.name = get_elemental_item_name("gorget", weaponskill_elements) or gear.default.weaponskill_neck or "". With such a variable then inside my sets I could do something like setname = {head="", neck=gear.ElementalGorget.name, ear1="", ...}. Did I get it right?
    But I still don't understand. Let's say I define Gorgetname = "item1" or "item2" or "item3" and then in my set I go Setname = {neck=Gorgetname}. In which order do the items get processed? Left to right? Right to left? Which gets priority? Let's say for instance I have all Item1, Item2 and Item3 in inventory, so all 3 possibilities are true. Which one would Gearswap prefer for my set in such a circumstance?
    No, don't use neck=gear.ElementalGorget.name, use neck=gear.ElementalGorget. In the first version, you're assigning a static string to the neck slot (the name field of the ElementalGorget table). In the second version, you're assigning a table to the neck slot.

    If you just assign the string, that value can't be changed later (caveat: it can be, but not in a way that's useful for what you want to do). If you assign the table, the -table- can't be changed, but the table's contents (including the item's name) can be. That's how you get dynamic items in gear sets.

  12. #2232
    Relic Shield
    Join Date
    Sep 2007
    Posts
    1,740
    BG Level
    6
    FFXI Server
    Sylph

    Tried looking briefly over some gearswap stuff for binding. When it comes to binding, are you able to bind a key to the shift+F#? Or are you stuck using only F#,Alt, and Ctrl?

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

    Don't think shift works, but can use Ctrl ^, Alt !, Windows @ and App # modifiers.

  14. #2234
    Sea Torques
    Join Date
    Sep 2012
    Posts
    736
    BG Level
    5
    FFXI Server
    Leviathan

    Shift works, I belive it's ~ or &, I'm not sure.

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

    Quick question for anyone using my includes: Would there be any interest in having my TH tracking code in an include that could be used by any job, rather than just in thf? Thinking mainly Tarutaru Sashes and Chaac Belts. Getting it working generically may be a bit tricky, but I think I've got a solution worked out.

  16. #2236
    Relic Shield
    Join Date
    Sep 2007
    Posts
    1,740
    BG Level
    6
    FFXI Server
    Sylph

    Quote Originally Posted by Motenten View Post
    Don't think shift works, but can use Ctrl ^, Alt !, Windows @ and App # modifiers.
    Quote Originally Posted by Arcon View Post
    Shift works, I belive it's ~ or &, I'm not sure.
    Thank you kindly

  17. #2237
    Campaign
    Join Date
    Jul 2007
    Posts
    6,633
    BG Level
    8

    Quote Originally Posted by Motenten View Post
    No, don't use neck=gear.ElementalGorget.name, use neck=gear.ElementalGorget. In the first version, you're assigning a static string to the neck slot (the name field of the ElementalGorget table). In the second version, you're assigning a table to the neck slot.

    If you just assign the string, that value can't be changed later (caveat: it can be, but not in a way that's useful for what you want to do). If you assign the table, the -table- can't be changed, but the table's contents (including the item's name) can be. That's how you get dynamic items in gear sets.
    This post made me search for more things and I understood a few aspects better, but I'm still not quite there.
    Example

    Code:
    gear = {}
    gear.ring = {name=""}
    gear.ring.name = "item 1" or "item 2"
    
    ...
    
    set = {head="", neck="" ... ring2=gear.ring.name}

    But it's not working, nothing happens.
    Of course I'm doing something wrong, but what? Something about the "" ?

  18. #2238
    Sea Torques
    Join Date
    Jul 2010
    Posts
    516
    BG Level
    5
    FFXI Server
    Bahamut

    Code:
    gear = {}
    gear.ring = {name=""}
    gear.ring.name = "item 1" or "item 2"
    
    ...
    
    set = {head="", neck="" ... ring2=gear.ring.name}
    From gearswap's perspective (line by line):
    'gear' is a table with no key/value pairs.
    'ring' is a key in the 'gear' table with a corresponding table value. The gear.ring table has a key, 'name', with the value "" (an empty string).
    Assign the value "item 1" or "item 2" to the key "name" in the gear.ring table. Since neither "item 1" nor "item 2" is a boolean, they both have the value true. Gearswap will assign the value "item 1" to "name" every time.
    The last line simplifies to set ={head="",neck="",ring2="item 1"}

    What you should do is:
    Code:
    ring_table = {name="item 1"}
    set = {head="", neck="" ... ring2=ring_table}
    Then assign ring_table.name whichever item is appropriate in the given function.

  19. #2239
    Campaign
    Join Date
    Jul 2007
    Posts
    6,633
    BG Level
    8

    I think I understand what you're saying.
    Motenten's original code doesn't have this problem because he doesn't use static names, he uses functions which may or may not produce a result, and that's when the "or" starts to matter.
    It's not the case with my example because, as you said, the first value will always be "true" etc.

    I think I understand the solution you suggested to me, but I wanted to do something different this time.
    What I need is:

    Let's take for example DNC and "Aeolian Edge".
    Let's take the ring2 slot. I want to have "Acumen Ring" in there, but in case that item is not found, then I want to use "Omega Ring".

  20. #2240
    Sea Torques
    Join Date
    Jul 2010
    Posts
    516
    BG Level
    5
    FFXI Server
    Bahamut

    Code:
    ring2 = (player.inventory['Acumen Ring'] or player.wardrobe['Acumen Ring']) and "Acumen Ring" or "Omega Ring"
    You still need to use the table method, though, or the Omega Ring will always be used if the Acumen Ring was not in your inventory or wardrobe when the file was loaded.


    Does buff_change know the difference between different utsusemi buffs (going from four shadows to three, etc.)?

Page 112 of 302 FirstFirst ... 62 102 110 111 112 113 114 122 162 ... LastLast

Similar Threads

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