Item Search
     
BG-Wiki Search
Page 46 of 302 FirstFirst ... 36 44 45 46 47 48 56 96 ... LastLast
Results 901 to 920 of 6036

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

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

    Quote Originally Posted by Motenten View Post
    Yes. However you need to define what you mean by "call". It has a specific meaning within programming languages, which is not what it sounds like you're wanting to do.




    If by "call" you mean "retrieve the value of", then yes. However I have to fix some apparent assumptions that change the answer, depending on what you think you're doing.

    Code:
    Main.Weapon.Type = GreatAxe
    In this case, Main.Weapon.Type is assigned the value of GreatAxe. Note that GreatAxe is not a string in and of itself, it's a label. Being a label, it represents a variable. If you have assigned GreatAxe a value, that value will be assigned to Main.Weapon.Type. If you have not assigned GreatAxe a value, then Main.Weapon.Type will be assigned the value of nil with the above statement.

    If your intent is to assign the value "GreatAxe" to the variable Main.Weapon.Type, then GreatAxe needs to be a string: "GreatAxe", not a label: GreatAxe.

    Same with sword.

    Code:
    if spell.wsA == '[world.day_element] and or [world.weather_element]' then
    You have enclosed the comparson in single quotes. That makes the -entire- quote a string. You're comparing the value of the spell.wsA variable with the literal string, '[world.day_element] and or [world.weather_element]'. That comparison will never be true.

    It appears you want to create some sort of vague logical comparison using the values of world.day_element and world.weather_element, and combine them with and/or. The way you've written it is completely non-functional, though.

    Further, spell.wsA gives you the skillchain property of the spell, not the element of the skillchain property. That means you need to map it onto a list of elements before you can use it to compare with the day or weather element.


    A quick (incomplete) bit of coding to roughly do what you're asking would be:

    Code:
        skillchain_elements = get_skillchain_elements(spell.wsA, spell.wsB, spell.wsC)
    
        -- assuming get_skillchain_elements returns a set S{}
        if skillchain_elements:contains(world.day_element) or skillchain_elements:contains(world.weather_element) then
            -- stuff
        end
    And then you'd need a function to convert skillchains to elements (eg: Fragmentation -> S{Wind, Lightning}; etc).



    The answer to your question is no, though the example you give to explain your question doesn't match what your question seems to be asking. Overall I have no idea if I even know what you're asking.
    so if im reading you correctly i would have to do it like this(these are examples)

    Main.Weapon.Type = string: "GreatAxe"

    if Main.Weapon.Type == 'GreatAxe' then

    equip(sets.ws[Main.Weapon.Type]) would equal equip(sets.ws.GreatAxe)

    this is what im trying to remake for GS
    Code:
    <variables>
            <var Name=".changestaff">0</var> <!-- 0 for no 1 for yes -->
            <var Name=".Usestaff">Damagestaff</var> <!-- Change to Accuracystaff to use Accuracy Staves and change to Damagestaff to use Damage Staves -->
            <var Name="DarkAccuracystaff">Xsaeta II</var>
            <var Name="DarkDamagestaff">Xsaeta I</var>
            <var Name="EarthAccuracystaff">Vishrava II</var>
            <var Name="EarthDamagestaff">Vishrava I</var>
            <var Name="FireAccuracystaff">Atar II</var>
            <var Name="FireDamagestaff">Agni's Staff +2</var>
            <var Name="IceAccuracystaff">Vourukasha II</var>
            <var Name="IceDamagestaff">Vourukasha I</var>
            <var Name="LightAccuracystaff">Arka II</var>
            <var Name="LightDamagestaff">Arka I</var>
            <var Name="ThunderAccuracystaff">Apamajas II</var>
            <var Name="ThunderDamagestaff">Apamajas I</var>
            <var Name="WaterAccuracystaff">Haoma II</var>
            <var Name="WaterDamagestaff">Haoma I</var>
            <var Name="WindAccuracystaff">Vayuvata II</var>
            <var Name="WindDamagestaff">Vayuvata I</var> 
     </variables>
     <rules>
            <if advanced='$.changestaff= 1'>
             <if skill="*Magic|Singing|Ninjutsu">
              <equip when="precast">
               <main>$%SpellElement$.UseStaff</main>
               <sub>%SpellElement Grip</sub>
              </equip>
              <equip when="aftercast" set="%Status" />
             </if>
            </if>
     </rules>
    and i would need to use these commands to select what i want
    //sc var set .changestaff 0
    //sc var set .Usestaff Accuracystaff

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

    so if im reading you correctly i would have to do it like this(these are examples)

    Main.Weapon.Type = string: "GreatAxe"

    if Main.Weapon.Type == 'GreatAxe' then

    equip(sets.ws[Main.Weapon.Type]) would equal equip(sets.ws.GreatAxe)
    Correct, except for one thing.

    Code:
    Main.Weapon.Type = string: "GreatAxe"
    should be
    Code:
    Main.Weapon.Type = "GreatAxe"
    "string:" is me telling you what type of value I'm talking about, not telling you what to write.

  3. #903
    Bagel
    Join Date
    Dec 2012
    Posts
    1,488
    BG Level
    6

    Quote Originally Posted by Motenten View Post
    Correct, except for one thing.

    Code:
    Main.Weapon.Type = string: "GreatAxe"
    should be
    Code:
    Main.Weapon.Type = "GreatAxe"
    "string:" is me telling you what type of value I'm talking about, not telling you what to write.
    ok i got confused there for a min

    would this be the command for changing variables??

    //gs c set <state> <value>

    also what function should i put it under so it can be changed at any time??

    also would this work
    h??p://pastebin.com/JGWQths5

  4. #904
    CoP Dynamis
    Join Date
    Jul 2007
    Posts
    270
    BG Level
    4
    FFXI Server
    Asura

    I'm having trouble dealing with augments, more specifically, typing the exact description interferes with the line itself and gearswap doesn't read this because of the quotation marks around "Store TP", any advice?
    Code:
    body={name="Xaddi Mail",augments={"[1]Attack+15,[2]Accuracy+10,[3]"Store TP"+3"}}

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

    Quote Originally Posted by Fival View Post
    I'm having trouble dealing with augments, more specifically, typing the exact description interferes with the line itself and gearswap doesn't read this because of the quotation marks around "Store TP", any advice?
    Code:
    body={name="Xaddi Mail",augments={"[1]Attack+15,[2]Accuracy+10,[3]"Store TP"+3"}}
    why not just do this
    body={name="Xaddi Mail",augments={"[1]Attack+15,[2]Accuracy+10,[3]Store_TP+3"}}

  6. #906
    CoP Dynamis
    Join Date
    Jul 2007
    Posts
    270
    BG Level
    4
    FFXI Server
    Asura

    That doesn't work either, if im understanding this correctly, the augment description has to be exactly matching the actual augments. It works fine for Xaddi Mail rank C, but theres no quotation marks to interfere in that description, with this one it does and just doesn't swap body at all.

  7. #907
    Relic Weapons
    Join Date
    Apr 2007
    Posts
    348
    BG Level
    4
    FFXI Server
    Ragnarok

    Use escape codes on the ". Like so: \"Store TP\" I'm not sure if Lua uses the backslash as an escape identifier though.

  8. #908
    Smells like Onions
    Join Date
    Mar 2014
    Posts
    3
    BG Level
    0

    u could use '' and "" also

    below is how my codes are:
    feet={name="Hagondes Sabots",augments={"Physical Damage taken -2%",'"Magic Attack Bonus" +16'}},

  9. #909
    CoP Dynamis
    Join Date
    Jul 2007
    Posts
    270
    BG Level
    4
    FFXI Server
    Asura

    None of these seems to work, it loads fine, the lines themselves look fine, but it doesn't equip the body, just all the other gear in the set.

    Code:
    body={name="Xaddi Mail",augments={"[1]Attack+15,[2]Accuracy+10,[3]\"Store TP\"+3"}}
    body={name="Xaddi Mail",augments={'[1]Attack+15,[2]Accuracy+10,[3]"Store TP"+3'}}
    body={name="Xaddi Mail",augments={"[1]Attack+15","[2]Accuracy+10",'[3]"Store TP"+3'}}
    body={name="Xaddi Mail",augments={"[1]Attack+15,[2]Accuracy+10",'[3]"Store TP"+3'}}
    Meanwhile, this line works fine.
    Code:
    body={name="Xaddi Mail",augments={"[1]VIT+12,[2]Physical Damage Taken -5%,[3]Magic Damage Taken -3%"}}
    Perhaps i'm just spelling something wrong, though i've double/tripled/quadruple checked and can't for the life of me see what it is.

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

    have you tried
    body={name="Xaddi Mail",augments={"[1]Attack +15,[2]Accuracy +10,[3]Store TP +3"}}

  11. #911
    CoP Dynamis
    Join Date
    Jul 2007
    Posts
    270
    BG Level
    4
    FFXI Server
    Asura

    I just did, still doesn't recognize/equip the path A xaddi mail.

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

    how can i do this with Gearswap with as few lines as posible like i can with spellcast
    <if Spell="Escape|Warp|Warp II|Retrace|Teleport-*">
    <return />
    </if>

    i do not believe this is correct

    if spell.name="Escape|Warp|Warp II|Retrace|Teleport-*" then
    return
    end

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

    I've never used Gearswap's augment system, but try

    Code:
    body={name="Xaddi Mail",augments={"[1]Attack+15",  "[2]Accuracy+10",'[3]\"Store TP\"+3'}}
    or maybe an ambiguous case

    Code:
    body={name="Xaddi Mail",augments={"[1]Attack+15", "[2]Accuracy+10"}}
    It's probably the quotes around store TP causing trouble.

    Based on the examples given in the beta folder, the other augment syntax should be
    Code:
    body={name="Xaddi Mail",augments={"[1]VIT+12","[2]Physical Damage Taken -5%","[3]Magic Damage Taken -3%"}}
    Maybe it works anyway because it's able to match the VIT+12 augment, even if it can't read the rest of the line.

    Maybe it's the brackets messing everything up? If nothing else works, you could try

    Code:
    body={name="Xaddi Mail",augments={"\[1\]Attack+15", "\[2\]Accuracy+10",'\[3\]\"Store TP\"+3'}}

  14. #914
    CoP Dynamis
    Join Date
    Jul 2007
    Posts
    270
    BG Level
    4
    FFXI Server
    Asura

    I tried with just the Attack, and with Attack and Accuracy, neither worked, and none of the above works either. Unless im somehow spelling Attack or Accuracy wrong or missing something, i'm pretty sure it has to be an exact match but the quotation marks are messing it up, and i can't seem to break them with backslash, because while this makes it look like its fixed and the file loads, it doesn't swap to the body.

  15. #915
    First invited, last in the zone.
    Join Date
    Sep 2008
    Posts
    1,448
    BG Level
    6
    FFXI Server
    Lakshmi

    Quote Originally Posted by Fival View Post
    I tried with just the Attack, and with Attack and Accuracy, neither worked, and none of the above works either. Unless im somehow spelling Attack or Accuracy wrong or missing something, i'm pretty sure it has to be an exact match but the quotation marks are messing it up, and i can't seem to break them with backslash, because while this makes it look like its fixed and the file loads, it doesn't swap to the body.
    Try double or quadruple backslashes. Depending on how the actual functionality works, there's a chance that multiple function layers need additional escaped backslashes.

  16. #916
    BG Content
    Join Date
    Jul 2007
    Posts
    22,371
    BG Level
    10
    FFXI Server
    Lakshmi
    Blog Entries
    1

    No, extdata is (occasionally) broken on live Windower right now, which would consequently break augment recognition. SE decided to change how extdata is handled . . . sometimes. We can't really figure it out. Sometimes extdata appears normally in the item array in memory, and sometimes it doesn't seem to.

    This problem has been fixed on -dev.

  17. #917
    Sea Torques
    Join Date
    Aug 2007
    Posts
    725
    BG Level
    5
    FFXI Server
    Ramuh

    Quote Originally Posted by dlsmd View Post
    how can i do this with Gearswap with as few lines as posible like i can with spellcast
    <if Spell="Escape|Warp|Warp II|Retrace|Teleport-*">
    <return />
    </if>
    .
    i do not believe this is correct

    if spell.name="Escape|Warp|Warp II|Retrace|Teleport-*" then
    return
    end
    you can define a table:
    Code:
    no_swap_spells = S{"Escape","Warp","Warp II", other spells}
    then, wherever you're handling swaps (if using Mote's files use eventArgs.handled = true to stop processing):
    Code:
    if no_swap_spells[spell.name] then
    return
    end

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

    Quote Originally Posted by TSFFXI View Post
    Did you read this? Motenten's stuff
    Tried to give it a read but I had just woke up so I'm gonna have to try again.
    I understood some things better, but many others didn't really make sense to me. Include this, include that, it all seems like a very complicated stratification of shared components which I'm not sure I really need. I'd rather have something less complex, more straightforward, and easier to mantain/modify without breaking something.

    Tbh I had the same feeling with some SC files when I decided to start using SC, so it's not like it's a specific problem with GS coding, and in the end the only way to stop the headache was to make my own SC files.
    I don't know what's wrong with me, seriously...

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

    Quote Originally Posted by Byrthnoth View Post
    No, extdata is (occasionally) broken on live Windower right now, which would consequently break augment recognition. SE decided to change how extdata is handled . . . sometimes. We can't really figure it out. Sometimes extdata appears normally in the item array in memory, and sometimes it doesn't seem to.

    This problem has been fixed on -dev.
    Gears or items at inventory doesn't have an "unique" ID that you could use to manually identify them, then equip then?

    .

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

    Quote Originally Posted by arshesney View Post
    you can define a table:
    Code:
    no_swap_spells = S{"Escape","Warp","Warp II", other spells}
    then, wherever you're handling swaps (if using Mote's files use eventArgs.handled = true to stop processing):
    Code:
    if no_swap_spells[spell.name] then
    return
    end
    ok thats cool but what is this S for
    = S{"E

    could i do it like this as well
    if spell.name == spells.transport then
    return
    end

    with this
    spells.transport = S{"Escape","Warp","Warp II", other spells}

Page 46 of 302 FirstFirst ... 36 44 45 46 47 48 56 96 ... LastLast

Similar Threads

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