Hachirin-no-obi And Gearswap

Eorzea Time
 
 
 
Langues: JP EN FR DE
users online
Forum » FFXI » Jobs » Black Mage » Hachirin-no-obi and gearswap
Hachirin-no-obi and gearswap
 Odin.Vuq
Offline
Serveur: Odin
Game: FFXI
user: Delagyela
By Odin.Vuq 2016-04-02 16:09:58
Link | Citer | R
 
I have been having a hell of a time getting my gearswap to use the hachirin-no-obi when I am casting the same element. Im using kinematics BLM.lua with my gear in the skeleton which doesn't have obi's implemented but I have placed it in the code in myself.

For starters i have made an obi set in the "Get_Sets" seciton.

sets.Obi = {waist="Hachirin-no-obi"}


Next I have placed the code to recognize the weather and the day in the functions area near the bottom.

function midcast(spell)
if spell.element == world.weather_element or spell_element == world.day_element then
equip(sets.Obi)
end


And since that didnt work on its own I also added this line hat i found on a forum.

function weathercheck(spell_element,set)
if spell_element == world.weather_element or spell_element == world.day_element then
equip(sets.Obi)
else
equip(set)
end


For some reason I cant get this to work at all...

Any ideas?
Offline
Posts: 1412
By Chimerawizard 2016-04-02 16:50:21
Link | Citer | R
 
Code
function job_get_spell_map(spell, default_spell_map)
    if spell.action_type == 'Magic' then
		if spell.element == world.day_element or spell.element == world.weather_element then
			if spell.skill == 'Elemental Magic' then			
				return 'ObiWeather'
			elseif default_spell_map == 'Cure' or default_spell_map == 'Curaga' then
				return 'ObiCure'
			end
		end

---rest of the code in the BS that is in your magic rules. you said kinematics which if memory serves is motenten's stuff.
sets are sets.midcast.ObiWeather & sets.midcast.ObiCure respectively.

This way I can add another sets.midcast.ObiWeather.magicburst for when the castingmode is magicburst.

the names are just what I picked to differentiate between nuke & cure. feel free to change 'em.

I think the reason yours didn't work has to do with it not knowing when to equip it.
 Odin.Vuq
Offline
Serveur: Odin
Game: FFXI
user: Delagyela
By Odin.Vuq 2016-04-02 17:04:44
Link | Citer | R
 
thank you i will try this
 Cerberus.Shadowmeld
Offline
Serveur: Cerberus
Game: FFXI
Posts: 1649
By Cerberus.Shadowmeld 2016-04-02 17:09:43
Link | Citer | R
 
I'm fairly certain it is case sensitive, which means

Hachirin-no-Obi
 Odin.Vuq
Offline
Serveur: Odin
Game: FFXI
user: Delagyela
By Odin.Vuq 2016-04-02 17:21:39
Link | Citer | R
 
sorry, it did not work either.
I am testing in both weather and day of the week and niether work.
Offline
Posts: 1412
By Chimerawizard 2016-04-02 17:32:00
Link | Citer | R
 
i dunno what to tell you. :(
 Siren.Flannelman
Offline
Serveur: Siren
Game: FFXI
Posts: 44
By Siren.Flannelman 2016-04-02 17:58:20
Link | Citer | R
 
This is my weather/magic burst stuff for BLM, it requires putting in a magic burst value toggle.
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
			if state.MagicBurst.value then
				equipSet = set_combine(sets.midcast['Elemental Magic'].CastingMode, sets.magic_burst)
				equipSet = set_combine(equipSet, {waist="Hachirin-No-Obi"})
				equip(equipSet)
				add_to_chat(122, "Weather Magic Burst")
            else 
				equipSet = set_combine(sets.midcast['Elemental Magic'].CastingMode, {waist="Hachirin-No-Obi"})
				equip(equipSet)
				add_to_chat(122, "Weather Nuke")
			end
        elseif state.MagicBurst.value then
				equipSet = set_combine(sets.midcast['Elemental Magic'].CastingMode, sets.magic_burst)
				equip(equipSet)
				add_to_chat(122, "Magic Burst")
        end
	end
	if spell.skill == 'Healing Magic' then	
		if spell.target.type == 'SELF' then	
			if spell.element == world.day_element or spell.element == world.weather_element then
				equip(sets.midcast.CureSelf, {waist="Hachirin-No-Obi"})
				add_to_chat(122, "Weather Cure Self")
			else 
				equip(sets.midcast.CureSelf)
			end		
		elseif spell.element == world.day_element or spell.element == world.weather_element then
				equip(sets.midcast.Cure, {waist="Hachirin-No-Obi"})
				add_to_chat(122, "Weather Cure")
		end
	end
end
 Bismarck.Speedyjim
Offline
Serveur: Bismarck
Game: FFXI
user: speedyjim
Posts: 516
By Bismarck.Speedyjim 2016-04-02 18:08:10
Link | Citer | R
 
Odin.Vuq said: »
I have been having a hell of a time getting my gearswap to use the hachirin-no-obi when I am casting the same element. Im using kinematics BLM.lua with my gear in the skeleton which doesn't have obi's implemented but I have placed it in the code in myself.

For starters i have made an obi set in the "Get_Sets" seciton.

sets.Obi = {waist="Hachirin-no-obi"}


Next I have placed the code to recognize the weather and the day in the functions area near the bottom.

function midcast(spell)
if spell.element == world.weather_element or spell_element == world.day_element then
equip(sets.Obi)
end


And since that didnt work on its own I also added this line hat i found on a forum.

function weathercheck(spell_element,set)
if spell_element == world.weather_element or spell_element == world.day_element then
equip(sets.Obi)
else
equip(set)
end


For some reason I cant get this to work at all...

Any ideas?
Why don't you just do
Code
function job_post_midcast(spell, action, spellMap, eventArgs)
       if spell.element == world.weather_element or spell_element == world.day_element then
				equip({waist="Hachirin-no-Obi"})
			end
[+]
 Odin.Vuq
Offline
Serveur: Odin
Game: FFXI
user: Delagyela
By Odin.Vuq 2016-04-02 19:32:07
Link | Citer | R
 
Bismarck.Speedyjim said: »
Why don't you just do
Code
function job_post_midcast(spell, action, spellMap, eventArgs)
       if spell.element == world.weather_element or spell_element == world.day_element then
				equip({waist="Hachirin-no-Obi"})
			end


That is what i tried at first but i thought perhaps it wasnt working because it is not in the get_sets section of the lua.
 Odin.Vuq
Offline
Serveur: Odin
Game: FFXI
user: Delagyela
By Odin.Vuq 2016-04-02 19:35:07
Link | Citer | R
 
Cerberus.Shadowmeld said: »
I'm fairly certain it is case sensitive, which means

Hachirin-no-Obi


I am going to try this, you may be right however in game on the side menu is its 'obi' and only when u mouseover the item to view the tooltip does it say 'Obi'.
Offline
Posts: 4
By Ruven 2016-04-02 19:40:31
Link | Citer | R
 
If you're using kinematics blm.lua, that uses motes files. You'll need to go into gearswap/libs/mote-mappings.lua and change the 'elements.obi_of" for each element to Hachirin-no-Obi. Then go into gearswap/libs/mote-globals and change gear.default.obi_waist to whatever default waist gear you'd like. Then finally, in your sets.midcast['Elemental Magic'] change waist to "waist=gear.ElementalObi". That works for me and I'm using kinematics blm.lua as well.
[+]
 Odin.Vuq
Offline
Serveur: Odin
Game: FFXI
user: Delagyela
By Odin.Vuq 2016-04-02 20:31:07
Link | Citer | R
 
Ruven said: »
If you're using kinematics blm.lua, that uses motes files. You'll need to go into gearswap/libs/mote-mappings.lua and change the 'elements.obi_of" for each element to Hachirin-no-Obi. Then go into gearswap/libs/mote-globals and change gear.default.obi_waist to whatever default waist gear you'd like. Then finally, in your sets.midcast['Elemental Magic'] change waist to "waist=gear.ElementalObi". That works for me and I'm using kinematics blm.lua as well.

YES! Thank you very much, this works perfectly, I suppose now everytime i upgrade my belt i have to change it in the mote now, but it works.

Thank you Ruven and thank you everyone else who contributed.
 Odin.Vuq
Offline
Serveur: Odin
Game: FFXI
user: Delagyela
By Odin.Vuq 2016-04-02 20:43:17
Link | Citer | R
 
Okay, so we got it equipping the obi from the mote, but after a few minutes of testing it, it is not equipping the default i set in the mote if the element does not match, it is still equipping the Obi.
It was about as succesfull as just putting hachirin-no-obi in the slot and full timing it.

Can't win?
 Siren.Flannelman
Offline
Serveur: Siren
Game: FFXI
Posts: 44
By Siren.Flannelman 2016-04-02 21:17:50
Link | Citer | R
 
You can win if you sidestep that portion of the mote includes.
Offline
Posts: 4
By Ruven 2016-04-02 22:08:42
Link | Citer | R
 
Hmm, I'm not sure why it's not working correctly for you. It works perfectly for me. You could post your lua files to see if there are any errors that you could have missed.
 Odin.Vuq
Offline
Serveur: Odin
Game: FFXI
user: Delagyela
By Odin.Vuq 2016-04-03 09:29:34
Link | Citer | R
 
It may be easier for me just to find a new skeleton and input my gear :)
necroskull Necro Bump Detected! [65 days between previous and next post]
 Quetzalcoatl.Kyrial
Offline
Serveur: Quetzalcoatl
Game: FFXI
user: Kyrial
Posts: 332
By Quetzalcoatl.Kyrial 2016-06-06 23:29:56
Link | Citer | R
 
Ruven said: »
If you're using kinematics blm.lua, that uses motes files. You'll need to go into gearswap/libs/mote-mappings.lua and change the 'elements.obi_of" for each element to Hachirin-no-Obi. Then go into gearswap/libs/mote-globals and change gear.default.obi_waist to whatever default waist gear you'd like. Then finally, in your sets.midcast['Elemental Magic'] change waist to "waist=gear.ElementalObi". That works for me and I'm using kinematics blm.lua as well.
Thank you so much for this. <3 I was starting to worry I'd hafta full-time my obi before I finally figured this out.
necroskull Necro Bump Detected! [189 days between previous and next post]
 Phoenix.Habar
Offline
Serveur: Phoenix
Game: FFXI
user: habarnam
Posts: 19
By Phoenix.Habar 2016-12-13 08:54:10
Link | Citer | R
 
Hello~
I just learnt that hachirin-no-obi can also give negative effects.
Is there a way to make priority on the obi used?
 Phoenix.Techno
Offline
Serveur: Phoenix
Game: FFXI
user: Techno
Posts: 1
By Phoenix.Techno 2016-12-17 16:24:28
Link | Citer | R
 
Attention! If you have paid for wardrobes 3 and 4 then make sure you update this code!

I was having an issue getting gear.ElementalObi to work too. After some debugging I realized it was only looking in my inventory and the first two wardrobes. Wardrobes 3 and 4 didn't exist when the library was written. Update get_elemental_item_name() in Mote-Utility.lua so that it checks the additional wardrobes as follows. The line in question is 499 in my Mote-Utility.lua file.
Code
function get_elemental_item_name(item_type, valid_elements, restricted_to_elements)
    local potential_elements = restricted_to_elements or elements.list
    local item_map = elements[item_type:lower()..'_of']
    for element in (potential_elements.it or it)(potential_elements) do
        if valid_elements:contains(element) and (player.inventory[item_map[element]] or player.wardrobe[item_map[element]] or player.wardrobe2[item_map[element]] or player.wardrobe3[item_map[element]] or player.wardrobe4[item_map[element]]) then
            return item_map[element]
        end
    end
end

Alternatively, you could simply remove the inventory/wardrobe checks from the if statement.
[+]
necroskull Necro Bump Detected! [42 days between previous and next post]
 Quetzalcoatl.Javarr
Offline
Serveur: Quetzalcoatl
Game: FFXI
Posts: 91
By Quetzalcoatl.Javarr 2017-01-28 20:40:31
Link | Citer | R
 
Heya, seeing a lot of examples of using the Obi with like elemental magic and healing magic. Anyone know how the rules would look for using it in conjunction with Trueflight and Wildfire? Beening playing with the rules trying to make it work but haven't had much luck. :(
 Shiva.Arislan
Offline
Serveur: Shiva
Game: FFXI
user: Arislan
Posts: 1052
By Shiva.Arislan 2017-01-28 21:44:24
Link | Citer | R
 
Code
function init_gear_sets()

	sets.Obi = {waist="Hachirin-no-Obi"}

end

Code
function job_post_precast(spell, action, spellMap, eventArgs)
	-- Equip obi if weather/day matches for WS.
    if spell.type == 'WeaponSkill' then
		if spell.english == 'Trueflight' then
			if world.weather_element == 'Light' or world.day_element == 'Light' then
				equip(sets.Obi)
			end
		elseif spell.english == 'Wildfire' and (world.weather_element == 'Fire' or world.day_element == 'Fire') then
			equip(sets.Obi)
		end
	end
end
[+]
 Quetzalcoatl.Javarr
Offline
Serveur: Quetzalcoatl
Game: FFXI
Posts: 91
By Quetzalcoatl.Javarr 2017-01-28 22:10:07
Link | Citer | R
 
Sweets, Thank you!
necroskull Necro Bump Detected! [1286 days between previous and next post]
 
Offline
Posts:
By 2020-08-07 02:24:47
 Undelete | Edit  | Link | Citer | R
 
Post deleted by User.
necroskull Necro Bump Detected! [906 days between previous and next post]
Offline
Posts: 107
By Veydal1 2023-01-30 02:37:32
Link | Citer | R
 
Odin.Vuq said: »
Bismarck.Speedyjim said: »
Why don't you just do
Code
function job_post_midcast(spell, action, spellMap, eventArgs)
       if spell.element == world.weather_element or spell_element == world.day_element then
				equip({waist="Hachirin-no-Obi"})
			end


That is what i tried at first but i thought perhaps it wasnt working because it is not in the get_sets section of the lua.

the "spell_element" above should be "spell.element". Should work like a charm after that change.

Sorry for the necro, but recently trying to get the ele obi working in my gearswap files and this thread comes up on google as one of the first hits. Figured it might help others trying to find a simple solution.