Yeah, it's a LuaCore bug that will be fixed presently. Also, someone already reported a midaction/pet_midaction bug that's going to be somewhat difficult to fix. If you spam the same spell over and over it will reset midaction. Kind of trivial, but not something I tested for.
Ok, the puppet issues should be fixed. Available_attachments (as opposed to actual equipped attachments) won't have anything in it due to a bug in luacore, but it's unlikely to be needed by anyone, really. Primary behavior should all be fine, though.
I updated my SCH and PUP files to the ones you updated around 2 hours ago, but it's not pulling from the sidecar file anymore, was that functionality omitted from the MoteInclude ? Or was the function name(s) for the sidecar file changed yet again? (ie: user.init_gear_sets() -> ?)
Also shouldn't the User's local gearset (ie: JOB_gear) be pulled after the main init otherwise the those sets will be overwritten by the one from the main file's init (ie: otherwise would have to remove the content of init_gear_sets each time I update the file to your changes).
From History
Edit: I know it's not pulling from the side car because the following isn't happening from within the _gear file:Code:-- Optional: load a sidecar version of the init and unload functions. load_user_gear(player.main_job) init_gear_sets()
Code:add_to_chat(123,'sidecar load')
I edited this function in Mote-Utility, and while it does show to chat log that "Included: SCH_gear.lua", the actual including does not appear to be happening.
Code:function optional_include(filenames) for _,v in pairs(filenames) do local path = gearswap.pathsearch({v}) if path then add_to_chat(123, "Included: "..v) include(v) return true end end end
I just updated the -dev GearSwap. It is the result of about 5 hours of refactoring, so there are plenty of things that could go wrong. However, midaction and pet_midaction seem to work perfectly for me now. Likely culprits if you're going to test it:
1) Aftercast passing the wrong spell
2) midaction() not working under certain conditions
3) pet_midaction() not working under certain conditions
You need to edit your sidecar files. Remove the return user at the end, the very first line (I think) and then the user in front of any of the functions in the sidecar.
So it's changed yet again to require removing the following:
does function user.init_gear_sets() remain as such or does user. need to be removed from it?Code:local user = {} ... return user
Before I had it without the first and last line and was told to put those in to make it work.
Edit: Without those, GW says that attempt to use user was improper since it's a nil var. So yea guess have to remove the user.* part, even though his documentation says:
Removing all instances of the 'user' prefix in the sidecar seems to work again.Within whm_gear.lua, create a function called init_gear_sets(). When first created you can copy everything from the main file's init_gear_sets() function, and then fill in your own actual gear. file_unload() is called when the file is unloaded, if you need any custom unload logic.
These sidecar files will not be part of the repository, and thus will not be updated or modified when you keep your files updated to the latest public version.
Example code:
local user = {}
function user.init_gear_sets()
-- Put all set definitions here, as well as any other customization that is user-specific.
end
function user.file_unload()
-- Called on unload, if needed
end
return user
He hasn't updated the docs yet. There was a post a few pages back with instructions on making the switch.
Just have to remove the function you quotes and the user in front of init get sets and the file unload.
http://www.bluegartr.com/threads/119...=1#post6013277
This is the post you're looking for.
Actually, no. It's not calling init_gear_sets twice (once for the user file, once for the default, with one overriding the other), but only once. The order of what happens:Originally Posted by haruhigumi
Gearswap loads whm.lua file. This defines the init_gear_sets() function from the default file, as well as get_sets().
Gearswap calls get_sets(). get_sets() calls include('Mote-Include')
include('Mote-Include') loads the Mote-Include file, which defines the init_include function, and then calls it automatically.
The init_include() function calls load_user_gear(). load_user_gear calls include() on whm_gear.lua, if it can find that file.
By including whm_gear.lua, if that file has its own copy of init_gear_sets(), it overwrites (ie: completely replaces) the original one from whm.lua.
init_include() then calls init_gear_sets(). If whm_gear exists and has init_gear_sets(), that's the version that will be called due to having just been loaded. Otherwise it will call the original one defined in whm.lua.
Also a note for haruhigumi, or anyone else using the default ranged groups: I had to change sets.precast.Ranged and sets.midcast.Ranged to sets.*.RangedAttack. This is because 'ranged' is an alternate slot name for 'range', which means gearswap will try to actually directly equip that table in that gear slot. It was renamed so as not to conflict with that.
I sill cant get it to load my sidecar file after the updates. Do the same rules apply or have those changed?
Thanks
Sidecar files are working fine for me. Make sure you make the adjustments mentioned on this page and the last.
Yes i finally got it figured out and its working perfectly now.
Having an error in the Mote THF.lua can someone help.
if spell.type:lower() ~= 'weaponskill' and spell.type:lower() ~= 'step' then
line 306 attempt to index field tpye nil value
thanks
Is there a //gs command where you de-equip all of your gear?