Awesome, thanks!
I need some advice/suggestion/teaching in how to handle subjobs conditionals.
Basically I want to do... what do I want to do lol?
I guess use different TP/Idle sets according to different subjobs.
So far I've defined two different groups of subjobs and two related different TP and Idle sets
Group1: /NIN, /DNC
Group2: /WHM, /RDM, /SCH maybe? But honestly I'd be fine handling group2 even with "anything that's not group1"
I could solve this easily with a manual toggle/variable where I set "Group1 mode" or "group2 mode", but I think there should be a built-in way to set conditionals related to subjobs.
Question is hoooooow?
Thanks <3
like you say with the variable...
and for the "automatic" part you could put in get_set()Code:if command == 'Toggle SJ' then if player.sub_job == 'NIN' or player.sub_job == 'DNC' then sj = 'Group1' else sj = 'Group2' end
send_command('gs c Toggle SJ')
sadly GS doesnt detect when you change subjobs... just the mainjob.. and doesnt detect when you zone... so after changing jobs if you did set subjob after main, you would have to set the variabla manual..
if you put it inside status_change(), would need to at least heal, engage, or do something that trigger it.
Oooh? That's strange.
I'm pretty sure Spellcast could do that? I think? I'm pretty sure I had that in one of my mage jobs XML.
Oh well, given this picture I think I'll just go the manual trigger way and handle different subjobs with a cycle/toggle, same way as I handle different TP/WS/Idle sets on my other jobs.
I am pretty sure that I added a subjob change event a few months ago. It should be documented.
Hmmm just saw "function sub_job_change(new,old)" in the xls.
Why didn't I have this in the XLS I have home? >.>
Using that and using player.sub_job_id or player.sub_job I should be able to track pretty much everything automatically without the need for me to use manual triggers, which are a bit unncessary for a situation like this (reason why I was looking to automatize it in the first place!)
Back to work now!
the forgotten fuction:
edit..the add to chat was testing the functon, and meh could have edited last post -_-Code:function sub_job_change(newSubjob, oldSubjob) add_to_chat(100, 'SJ Changed') end
For equip lines, does GS need "Range" for the range slot, or does it accept "Ranged" too?
And another question about the "targets" field in the spells resources lua file.
1= Castable on self only
5= Castable on party members
29= Castable on any PC
32= Castable on enemies only
Correct? Then I can discriminate using spell.target.id, am I right?
Would using spell.target.type be the same? (granted that I would be using strings of text instead of numbers, of course)
I'm trying to discriminate between "buff" songs and "debuff" songs. And spell.prefix, spell.type and spell.skill clearly aren't enough because they are all shared by both type of songs.
Target type is the only different thing that I could think of. Anything else I'm missing?
Last question since I remember someone mentioning it some pages ago regarging instant cast procs for mages.
With spellcast or windower script macros, during Nightingale (instacast songs) you had to precast songs using your midcast sets.
With GS this is not necessary and songs will be correctly sung with the right midcast set even when Nightingale is active?
If it's really true I could just ignore Nightingale checks in my function precast and make code simpler.
Either works.
The resources use numbers; GearSwap translates that into proper values. spell.targets is a S{} set listing the valid target types. I believe the full list of possible values is: S{'Self', 'Player', 'Party', 'Ally', 'NPC', 'Enemy'} I make use of that in the auto_change_target() function in Mote-Utility, if you want an example.
No, that's different. spell.target.type holds a string value (as opposed to a set) that's in all-caps of one of 'SELF', 'PLAYER', or 'MOB' (if I remember correctly). Possibly 'NPC', too.
Also insufficient because they don't even try to distinguish between such things.
spell.target.type will only tell you if the spell is a debuff after you've already selected the target. You'll probably also want to be careful about charmed players (such as using Lullaby on a charmed player).
spell.targets could tell you if it's a debuff before targetting, but again you'll need to be careful of exceptions. For example, Cure can be cast on Enemy types (used to damage undead, etc).
So, you'll want one of the following:
Code:if spell.target.type == 'MOB' or spell.target.charmed == true then is_debuff = true end if spell.targets:contains('Enemy') and not spell.targets:contains('Player') then is_debuff = true end
That is correct.
To identify debuff songs I use this
so w/ debuff:contains(spell.name) is enough to know what "type" of song I'm castingCode:debuff = S{"Carnage Elegy", "Battlefield Elegy", "Foe Requiem IV", "Foe Requiem V", "Foe Requiem VI", "Foe Requiem VII", "Horde Lullaby", "Horde Lullaby II", "Magic Finale", "Foe Lullaby II", "Foe Lullaby", "Dark Threnody", "Light Threnody", "Water Threnody", "Ltng. Threnody", "Earth Threnody", "Wind Threnody", "Fire Threnody", "Ice Threnody", "Pining Nocture", "Magic Finale", "Maiden's Virelai"}
and for Nighttingale... check my precast for songs
yea dont need to worry about that..Code:{ head="Aoidos' Calot +2", body="Marduk's Jubbah +1", hands="Gendewitha Gages", legs="Gendewitha Spats", feet="Bihu Slippers", neck="Aoidos' Matinee", waist="Witful Belt", --occ Occ. quickens spellcasting 3 left_ear="Aoidos' Earring", right_ear="Loquac. Earring", left_ring="Prolix Ring", right_ring="Veneficium Ring", --occ Occ. quickens spellcasting 1 back="Ogapepo Cape", --occ Occ. quickens spellcasting 2 range=empty, ammo="Impatiens", --occ Occ. quickens spellcasting 2 main="Felibre's Dague", sub=empty, }
Yeah I thought about creating a string to "manually" discriminate between songs, actually already did lol, but was looking for something a bit more dynamic.
I'll try motenten's tip and see which I like best.
Thanks guys!
for spell.target.type is MONSTER instead of MOB accordign to the Variables file i have in my folder.
I made a GS file for Ranger earlier today, after figuring out how to make things work on melee jobs. It probably has issues,<-- which is why I am posting it here for some possible help.
from what it looks, it do the job. so not sure what kind of help you looking for, but for example a tip with this code
you can replace:Code:function get_sets() sets.JA.['Velocity Shot'] = {body="Sylvan Caban +2"} sets.JA.Sharpshot = {legs="Orion Braccae +1"} sets.JA.Barrage = {hands="Orion Bracers +1"} sets.JA.['Double Shot'] = {head="Sylvan Gapette +2"} sets.JA.Shadowbind = {hands="Orion Bracers +1"} sets.JA.Camouflage = {body="Orion Jerkin +1"} sets.JA.['Velocity Shot'] = {body="Sylvan Caban +2"} sets.JA.Scavenge = {feet="Orion Socks +1"} sets.JA.['Bounty Shot'] = {hands="Sylvan Glovettes +2"} end function precast(spell,action) if spell.type == 'JobAbility' then if sets.JA[spell.english] then equip(sets.JA[spell.english]) end end end
the precast code works, (and used this example w/ your file) it check if you used a JobAbility, then it check if it exist a set for that JA, if exist then equip it.Code:function precast(spell) if spell.name == "Ranged" then equip(sets.Utility.Snapshot) end if spell.english == "Velocity Shot" then equip(sets.JA.VelocityShot) end if spell.english == "Scavenge" then equip(sets.JA.Scavenge) end if spell.english == "Double Shot" then equip(sets.JA.DoubleShot) end if spell.english == "Barrage" then equip(sets.JA.Barrage) end if spell.english == "Sharpshot" then equip(sets.JA.Sharpshot) end if spell.english == "Bounty Shot" then equip(sets.JA.BountyShot) if spell.english == "Shadowbind" then equip(sets.JA.Shadowbind) end if spell.english == "Eagle Eye Shot" then equip(sets.JA.EagleEyeShot) end end
I just updated all the Mote files today and I'm not sure if it's the same issue as last time, but none of my midcast gear is swapping in my RNG lua. If I remember right it was something with the midcast set being labeled as precast or something like that. Can some else check it to see if it's broken? I was using gearswap set to true and none of my midcast gear showed up.