Item Search
     
BG-Wiki Search
Page 189 of 302 FirstFirst ... 139 179 187 188 189 190 191 199 239 ... LastLast
Results 3761 to 3780 of 6036

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

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

    I'm on my first baby steps into the world of "include", a function I never used before.
    Let's say you have an "aftercast" in your main lua, and then another "aftercast" in your include.
    What's going to happen? One of them will be ignored? Gearswap will "merge" them into one?

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

    Quote Originally Posted by Sechs View Post
    I'm on my first baby steps into the world of "include", a function I never used before.
    Let's say you have an "aftercast" in your main lua, and then another "aftercast" in your include.
    What's going to happen? One of them will be ignored? Gearswap will "merge" them into one?
    only one will work

  3. #3763
    Relic Shield
    Join Date
    Jan 2013
    Posts
    1,868
    BG Level
    6

    One aftercast to rule them all.

    I was kinda wondering. since i put sneak cancelling and stoneskin cancelling and also cure/waltz tier adjusting code in all my luas can I just make an include and invent a new function to put precast in the include for those specific spells? and still have precast code for job specific things in the main lua? Or is there really no way around it since either the main or include will overwrite the other?

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

    Quote Originally Posted by Trumpy View Post
    One aftercast to rule them all.

    I was kinda wondering. since i put sneak cancelling and stoneskin cancelling and also cure/waltz tier adjusting code in all my luas can I just make an include and invent a new function to put precast in the include for those specific spells? and still have precast code for job specific things in the main lua? Or is there really no way around it since either the main or include will overwrite the other?
    yes
    Code:
    --job file
    include("includefile.lua")
    function precast(spell)
        precast_extra(spell)
        -- job specific things
    end
    Code:
    --includefile.lua
    function precast_extra(spell)
        --sneak cancelling and stoneskin cancelling and also cure/waltz tier adjusting code
    end
    the second set of functions need to be named something different from the first

  5. #3765
    Relic Shield
    Join Date
    Jan 2013
    Posts
    1,868
    BG Level
    6

    ok cool thanks.

  6. #3766
    Puppetmaster
    Join Date
    Jan 2014
    Posts
    59
    BG Level
    2

    If you're using Kinematics then you can create a file named (Yourcharactername)-Globals.lua to set rules for all your jobs so you won't need to edit every single job.lua because well, it's global. You won't need to add anything to your main job.lua. The only difference is that you must prefix the various functions with 'user_'

    Here's one example how I use Globals to equip Mecistopins Mantle for any job when I have trusts out.
    Code:
    ------------------------------------------------------------------------------
    -- An example of setting up user-specific global handling of certain events.
    -- This is for personal globals, as opposed to library globals.
    ------------------------------------------------------------------------------
    
    function user_customize_idle_set(idleSet)
        if is_trust_party() and areas.Adoulin:contains(world.area) then
            idleSet = set_combine(idleSet, {back="Mecisto. Mantle"})
        end
    
        return idleSet
    end
    
    function user_customize_melee_set(meleeSet)
        if is_trust_party() and areas.Adoulin:contains(world.area) then
            meleeSet = set_combine(meleeSet, {back="Mecisto. Mantle"})
        end
    
        return meleeSet
    end
    
    -----------------------------------------------------------
    -- Test function to use to avoid modifying library files.
    -----------------------------------------------------------
    
    function user_test(params)
    
    end
    Edit* Don't forget to add new Trusts down at the bottom of Mote-Mappings as they come out. At the time of this writing I had to add Koru-Moru.

  7. #3767
    Melee Summoner
    Join Date
    Jul 2014
    Posts
    44
    BG Level
    1
    FFXI Server
    Phoenix

    OK trieds the new obi for my geo nukes and i noticed it not working, same goes for tier 5 nukes. Anyone have an idea how to add these in motentens lua, or is he updating those with windower update?

  8. #3768
    Puppetmaster
    Join Date
    Jan 2014
    Posts
    59
    BG Level
    2

    Quote Originally Posted by gargurty View Post
    OK trieds the new obi for my geo nukes and i noticed it not working, same goes for tier 5 nukes. Anyone have an idea how to add these in motentens lua, or is he updating those with windower update?
    Included commentary and job_aftercast() to give you reference points where to place the code in your Motes' Geo lua. Don't include the job_aftercast() part in your paste it is just a reference point.
    Code:
    -------------------------------------------------------------------------------------------------------------------
    -- Job-specific hooks for standard casting events.
    -------------------------------------------------------------------------------------------------------------------
    
    -- Run after the default midcast() is done.
    -- eventArgs is the same one used in job_midcast, in case information needs to be persisted.
    function job_post_midcast(spell, action, spellMap, eventArgs)
        if spell.skill == 'Elemental Magic' then
            if spell.element == world.day_element or spell.element == world.weather_element then
                equip(sets.midcast['Elemental Magic'], {waist="Hachirin-No-Obi"})
            end
        end
    end
    
    function job_aftercast(spell, action, spellMap, eventArgs)
        -- stuff
        -- stuff
    end

  9. #3769
    Puppetmaster
    Join Date
    Jan 2014
    Posts
    59
    BG Level
    2

    Get it while it's hot!

    Fotia Gorget/Belt
    Code:
    function job_setup()
        ws_elements_to_check = S{'Compression', 'Darkness', 'Detonation', 'Distortion', 'Fragmentation', 'Fusion',
        'Gravitation', 'Impaction', 'Induration', 'Light', 'Liquefaction', 'Reverberation', 'Scission', 'Transfixion'}
    end
    
    function job_post_precast(spell, action, spellMap, eventArgs)
        if spell.type == 'WeaponSkill' and ws_elements_to_check:contains(spell.skillchain_a)
                or ws_elements_to_check:contains(spell.skillchain_b)
                or ws_elements_to_check:contains(spell.skillchain_c) then
            equip({neck="Fotia Gorget", waist="Fotia Belt"})
        end
    end
    Lugra Earring (+1)
    Code:
    sets.DusktoDawn_WS = {ear1="Lugra Earring +1", ear2="Lugra Earring"}
    
    function job_post_precast(spell, action, spellMap, eventArgs)
    	if spell.type == 'WeaponSkill' then
    		if world.time <= (7*60) or world.time >= (17*60) then
    			equip(sets.DusktoDawn_WS)
    		end
    	end
    end
    And for Mega Obi.
    Code:
    function job_post_midcast(spell, action, spellMap, eventArgs)
        if spell.skill == 'Elemental Magic' then
            if spell.element == world.day_element or spell.element == world.weather_element then
                equip(sets.midcast['Elemental Magic'], {waist="Hachirin-No-Obi"})
            end
        elseif spell.skill == 'Healing Magic' then
            if spell.name:startswith('Cure') and world.day_element == 'Light' or world.weather_element == 'Light' then
                equip(sets.midcast.Cure, {waist="Hachirin-No-Obi"})
            end
        end
    end

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

    for Weapon Skills this is what i recommend for a base set
    Code:
    WSi_types={['Hand-to-Hand']={head="Tokon Hachimaki"},['Dagger']={head="Issen Hachimaki"},['Sword']={head="Kensho Hachimaki"},['Great Sword']={head="Hako Hachimaki"},
            ['Axe']={head="Ryoshi Hachimaki"},['Great Axe']={head="Senshin Hachimaki"},['Scythe']={head="Rekka Hachimaki"},['Polearm']={head="Shitotsu Hachimaki"},
            ['Katana']={head="Kanja Hachimaki"},['Great Katana']={head="Kengo Hachimaki"},['Club']={head="Rokugo Hachimaki"},['Staff']={head="Hakke Hachimaki"},
            ['Archery']={head="Shunten Hachimaki"},['Marksmanship']={head="Saika Hachimaki"},['Throwing']={},}
            
        if spell.type == "WeaponSkill" then
            equip(WSi_types[spell.skill], {neck="Fotia Gorget",waist="Fotia Belt"})
        end
    now i need to know if i need to have a specific synergy lvl to craft them

    here is my magic obi code
    Code:
    Typ_abilitys = {'/jobability','/pet','/weaponskill','/monsterskill'}
        if not table.contains(Typ_abilitys,spell.prefix) then
            if spell.element == world.weather_element or spell.element == world.day_element then
                equip({waist="Hachirin-No-Obi"})
            end
        end

  11. #3771
    Melee Summoner
    Join Date
    Jul 2014
    Posts
    44
    BG Level
    1
    FFXI Server
    Phoenix

    Tried to put the obi part in my lua but its not kicking in?
    Same goes for tier 5, no idea how to add that?
    Register to see the NSFW content

  12. #3772
    Puppetmaster
    Join Date
    Jan 2014
    Posts
    59
    BG Level
    2

    Quote Originally Posted by gargurty View Post
    Tried to put the obi part in my lua but its not kicking in?
    Same goes for tier 5, no idea how to add that?
    Register to see the NSFW content
    Your Obi won't equip because your job_post_midcast() block has quite a few errors.

    For one, it's nested incorrectly and one 'end' is in the wrong spot.
    You have too many instances of, "if spell.skill == 'Elemental Magic' then" where it's not necessary.
    The command, "equip(set_combine(sets.midcast['Elemental Magic'], {main="Marin Staff +1",back="Kaikias' cape",}))" is an improper syntax.
    Same as, "if job_get_spell_map(spell,default_spell_map) == 'Low' then".

    If you've created a custom Castingmode option, 'Low' then the correct syntax should be
    Code:
    state.CastingMode:options('Normal', 'Resistant', 'Low')
    
    if state.CastingMode.value == 'Low' then
        -- put whatever rule here
    end
    Use this instead.
    Spoiler: show
    Code:
    function job_post_midcast(spell, action, spellMap, eventArgs)
        if spell.skill == 'Elemental Magic' then
            if spell.element == 'Earth' then
                equip(sets.midcast['Elemental Magic'], {neck="Quanpur Necklace"})
            elseif spell.element == 'Ice' then
                equip(sets.midcast['Elemental Magic'], {main="Ngqoqwanb"})
            elseif spell.element == 'Wind' then
                equip(sets.midcast['Elemental Magic'], {main="Marin Staff +1", back="Kaikias' cape"})
            end
    
            if spell.element == world.day_element or spell.element == world.weather_element then
                equip(sets.midcast['Elemental Magic'], {waist="Hachirin-No-Obi"})
            end
    
        end
    end

  13. #3773
    Melee Summoner
    Join Date
    Jul 2014
    Posts
    44
    BG Level
    1
    FFXI Server
    Phoenix

    ok i will try that out when off from work

    btw ye got a clue how to add t5 spells for geo, cos motentens lua doesnt work with it yet.

  14. #3774
    Melee Summoner
    Join Date
    Jul 2014
    Posts
    44
    BG Level
    1
    FFXI Server
    Phoenix

    Wel thanks for the raply my obi is kicking in, now i have to wait for tier 5 lol

  15. #3775
    Puppetmaster
    Join Date
    Jan 2014
    Posts
    59
    BG Level
    2

    Quote Originally Posted by gargurty View Post
    Wel thanks for the raply my obi is kicking in, now i have to wait for tier 5 lol
    They're still working on T5 for Rdm and Geo so gotta be patient.

  16. #3776
    Hydra
    Join Date
    Sep 2012
    Posts
    118
    BG Level
    3

    its been a while since I have played, but if you want some control over whether to use the obi with one conflicting weather or not you could use logic similar to this...

    Note 1: I have the following mappings
    Code:
    elements = {}
    elements.use_on_single_conflict = false
    elements.strong_against = {['Fire'] = 'Ice', ['Earth'] = 'Thunder', ['Water'] = 'Fire', ['Wind'] = 'Earth', ['Ice'] = 'Wind', ['Thunder'] = 'Water', ['Light'] = 'Dark', ['Dark'] = 'Light'}
    elements.weak_against = {['Fire'] = 'Water', ['Earth'] = 'Wind', ['Water'] = 'Thunder', ['Wind'] = 'Ice', ['Ice'] = 'Fire', ['Thunder'] = 'Earth', ['Light'] = 'Dark', ['Dark'] = 'Light'}
    Note 2: Logic code for using obi
    Code:
    function use_obi(spell, equip_set)
    	local use_obi = false
    
            -- first check to see if any elemental obi rule matches
    	if(S{world.day_element, world.weather_element}:contains(spell.element)) then
    
                    -- If at least one matches, try to find out if there is also a weak element involved
    		if ( world.weather_element == elements.weak_against[spell.element] ) then
    
                            -- If weak weather is involved, but it is only single weather, check to see if use_on_single_conflict is set to true
    			if ( world.weather_id % 2 == 0 and elements.use_on_single_conflict) then
    				use_obi = true
    			end
    
    		elseif (world.day_element == elements.weak_against[spell.element]) then
    
                            -- If weak day is involved check for double weather or single weather + use_on_single_conflict set to true
    			if (world.weather_id % 2 == 1 or ( elements[use_on_single_conflict] and world.weather_id % 2 == 0) ) then
    				use_obi = true
    			end
    
    		end
    
    	end
    
    	if (use_obi) then
    		equip_set = set_combine(equip_set, { waist = "Hachirin-No-Obi"})
    	end
    
            return equip_set
    end
    What this does is if the elements.use_on_single_conflict is set to false, it will only use obis if there is not a conflicting element involved so:
    day matches + no weather or non conflicting weather
    weather matches double weather + conflicting day
    weather matches + non conflicting day

    if you set elements.use_on_single_conflict to true it would add the following:
    day matches + conflicting single weather
    single weather match + conflicting day

    I see a need for the toggle because you may desire consistency in your damage and not want to have a chance at negative proc even at the expense of removing your chance at a positive proc. Like say in a situation where it takes exactly x number of nukes to kill something, but if negative procs at least once it would take x + 1 nukes to kill.

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

    I'm a huge noob when it comes to opposing elements stuff, can anybody confirm if these are the right conditions for the new elemental Obi? If so I will proceed to convert them into GS code for my luas

    1. Doubleweather/Stormspell2 same element of Spell being cast (when doubleweather is up it's beneficial to equip obi regardless of day, even if it's opposing element day)
    2. weather/stormspell same element AND day NOT opposing element (no use to equip obi with singleweather if it's opposing day, they cancel each other)
    3. Day same element and NOT storm/storm2/weather/doubleweather of the opposing element (similar as above)


    These are the situations where I want to EQUIP belt in midcast. In all other situations I want to equip whatever my current midcast set is. Correct? Did I miss some other situation?

  18. #3778
    Hydra
    Join Date
    Sep 2012
    Posts
    118
    BG Level
    3

    There might be situations where you would still want to use an Obi even if there is a mismatch day/single weather just for consistency. but in general you are right.

    1. 2x matching weather always
    2. matching day or matching weather with no (conflict) always
    3. matching day + conflict single weather (maybe sometimes)
    4. matching single weather + conflict day (maybe sometimes)

    See my code above for an example.

  19. #3779
    BG Content
    Join Date
    Jul 2007
    Posts
    22,396
    BG Level
    10
    FFXI Server
    Lakshmi
    Blog Entries
    1

    Tier 6 works for my BLM and the relevant changes are live. If your JP spells do not work, delete windower/updates/ and rerun launcher.

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

    Uhm... Does the obi give only affinity potency or affinity accuracy too?
    If it's also the latter I guess It could be nice to use with enfeebling magic as well, not just elemental magic.

Page 189 of 302 FirstFirst ... 139 179 187 188 189 190 191 199 239 ... LastLast

Similar Threads

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