Hachirin-no-obi And Gearswap

Language: JP EN DE FR
2010-09-08
New Items
users online
Forum » FFXI » Jobs » Black Mage » Hachirin-no-obi and gearswap
Hachirin-no-obi and gearswap
 Odin.Vuq
Offline
Server: Odin
Game: FFXI
user: Delagyela
By Odin.Vuq 2016-04-02 16:09:58
Link | Quote | Reply
 
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: 708
By Chimerawizard 2016-04-02 16:50:21
Link | Quote | Reply
 
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
Server: Odin
Game: FFXI
user: Delagyela
By Odin.Vuq 2016-04-02 17:04:44
Link | Quote | Reply
 
thank you i will try this
 Cerberus.Shadowmeld
Offline
Server: Cerberus
Game: FFXI
Posts: 535
By Cerberus.Shadowmeld 2016-04-02 17:09:43
Link | Quote | Reply
 
I'm fairly certain it is case sensitive, which means

Hachirin-no-Obi
 Odin.Vuq
Offline
Server: Odin
Game: FFXI
user: Delagyela
By Odin.Vuq 2016-04-02 17:21:39
Link | Quote | Reply
 
sorry, it did not work either.
I am testing in both weather and day of the week and niether work.
Offline
Posts: 708
By Chimerawizard 2016-04-02 17:32:00
Link | Quote | Reply
 
i dunno what to tell you. :(
 Siren.Flannelman
Offline
Server: Siren
Game: FFXI
Posts: 43
By Siren.Flannelman 2016-04-02 17:58:20
Link | Quote | Reply
 
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
Server: Bismarck
Game: FFXI
user: speedyjim
Posts: 516
By Bismarck.Speedyjim 2016-04-02 18:08:10
Link | Quote | Reply
 
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
Server: Odin
Game: FFXI
user: Delagyela
By Odin.Vuq 2016-04-02 19:32:07
Link | Quote | Reply
 
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
Server: Odin
Game: FFXI
user: Delagyela
By Odin.Vuq 2016-04-02 19:35:07
Link | Quote | Reply
 
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 | Quote | Reply
 
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
Server: Odin
Game: FFXI
user: Delagyela
By Odin.Vuq 2016-04-02 20:31:07
Link | Quote | Reply
 
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
Server: Odin
Game: FFXI
user: Delagyela
By Odin.Vuq 2016-04-02 20:43:17
Link | Quote | Reply
 
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
Server: Siren
Game: FFXI
Posts: 43
By Siren.Flannelman 2016-04-02 21:17:50
Link | Quote | Reply
 
You can win if you sidestep that portion of the mote includes.
Offline
Posts: 4
By Ruven 2016-04-02 22:08:42
Link | Quote | Reply
 
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
Server: Odin
Game: FFXI
user: Delagyela
By Odin.Vuq 2016-04-03 09:29:34
Link | Quote | Reply
 
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
Server: Quetzalcoatl
Game: FFXI
user: Kyrial
Posts: 332
By Quetzalcoatl.Kyrial 2016-06-06 23:29:56
Link | Quote | Reply
 
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
Server: Phoenix
Game: FFXI
user: habarnam
Posts: 18
By Phoenix.Habar 2016-12-13 08:54:10
Link | Quote | Reply
 
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
Server: Phoenix
Game: FFXI
user: Techno
Posts: 1
By Phoenix.Techno 2016-12-17 16:24:28
Link | Quote | Reply
 
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
Server: Quetzalcoatl
Game: FFXI
Posts: 68
By Quetzalcoatl.Javarr 2017-01-28 20:40:31
Link | Quote | Reply
 
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
Server: Shiva
Game: FFXI
user: Arislan
Posts: 789
By Shiva.Arislan 2017-01-28 21:44:24
Link | Quote | Reply
 
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
Server: Quetzalcoatl
Game: FFXI
Posts: 68
By Quetzalcoatl.Javarr 2017-01-28 22:10:07
Link | Quote | Reply
 
Sweets, Thank you!
Log in to post.