The last thing I did any real scripting on was some basic Perl when I was about 11, which was 15 years ago. So if this comes across as overly basic, I apologize in advance. After a few months of tinkering here and there with my six character's class routines, I decided to go over my primary character's (Brig) in detail. Everything has been going well for a couple days. Then it hits me, I want to add poisons to the class tab. It'd be extremely nice to be able to change poisons out depending on the situation using the UI. I get that done without any problem, and I now have four of each (Damage, Debuff, Util) poison in a drop down box. My problem is coming with taking that definition, and transferring it so that when it is defined the same way the old poisons used to have to be by hand it comes out as text, such as
DebuffPoisonShort:Set[enfeebling poison]
Like right now I've got (Just posting the basics):
UI file:
<combobox Name='DbffPsn'>
<Item Value='2'>Fettering (Snare)</Item>
Class file:
declare DbffPsn string script
DbffPsn:Set[${CharacterSet.FindSet[${Me.SubClass}].FindSetting[DbffPsn,]}]
PreAction[7]:Set[DbffPoisons]
DebuffPoisonShort[7,2]:Set[Cerebral Ebb]
And finally:
case DbffPoisons
if ${MaintainPoison}
{
Me:CreateCustomInventoryArray[nonbankonly]
if ${Me.Maintained[${DebuffPoisonShort[${xAction},${DbffPsn}]}](exists)} && ${Me.CustomInventory[${DebuffPoisonShort[${xAction},${DbffPsn}]}](exists)}
Me.CustomInventory[${DebuffPoisonShort[${xAction},${DbffPsn}]}]:Use
}
So why won't it do... anything? I've tried a hundred variations, realizing often major mistakes/overlooks I'd made. But this as I have it seems like it should work in my totally retarded when it comes to scripting head. Everything looks like it's defined right and should work the same way the old way worked. I'm guessing somehow I'm doing something that is preventing the text definition I'm setting as DebuffPoisonShort from actually becoming text the way it would when you set it manually as a simple this equals [inserttexthere] definition by playing the {xAction},${DbffPsn} and trying to set those to text individually earlier in the script. But I'm extraordinarily new to this, this isn't the most basic of alterations to a script, and right now I've got an epic headache from trying to figure this out for four hours.
Additionally, if I wanted to streamline the process, do the item values in the UI drop box have to be numerical, or could I take out defining them in the class config with something like[7,1]:Set[Gracelessness] [7,2]:Set[Cerebral Ebb] and instead simply have the text string defined as when you select Gracelessness, it's defined as Gracelessness in the UI file (<Item Value='Fettering Poison'>Fettering (Snare)</Item>) without any definitions in the class file? I did a quick search and didn't come up with anything, so hopefully this isn't too idiotic to post here.
DebuffPoisonShort:Set[enfeebling poison]
Like right now I've got (Just posting the basics):
UI file:
<combobox Name='DbffPsn'>
<Item Value='2'>Fettering (Snare)</Item>
Class file:
declare DbffPsn string script
DbffPsn:Set[${CharacterSet.FindSet[${Me.SubClass}].FindSetting[DbffPsn,]}]
PreAction[7]:Set[DbffPoisons]
DebuffPoisonShort[7,2]:Set[Cerebral Ebb]
And finally:
case DbffPoisons
if ${MaintainPoison}
{
Me:CreateCustomInventoryArray[nonbankonly]
if ${Me.Maintained[${DebuffPoisonShort[${xAction},${DbffPsn}]}](exists)} && ${Me.CustomInventory[${DebuffPoisonShort[${xAction},${DbffPsn}]}](exists)}
Me.CustomInventory[${DebuffPoisonShort[${xAction},${DbffPsn}]}]:Use
}
So why won't it do... anything? I've tried a hundred variations, realizing often major mistakes/overlooks I'd made. But this as I have it seems like it should work in my totally retarded when it comes to scripting head. Everything looks like it's defined right and should work the same way the old way worked. I'm guessing somehow I'm doing something that is preventing the text definition I'm setting as DebuffPoisonShort from actually becoming text the way it would when you set it manually as a simple this equals [inserttexthere] definition by playing the {xAction},${DbffPsn} and trying to set those to text individually earlier in the script. But I'm extraordinarily new to this, this isn't the most basic of alterations to a script, and right now I've got an epic headache from trying to figure this out for four hours.
Additionally, if I wanted to streamline the process, do the item values in the UI drop box have to be numerical, or could I take out defining them in the class config with something like[7,1]:Set[Gracelessness] [7,2]:Set[Cerebral Ebb] and instead simply have the text string defined as when you select Gracelessness, it's defined as Gracelessness in the UI file (<Item Value='Fettering Poison'>Fettering (Snare)</Item>) without any definitions in the class file? I did a quick search and didn't come up with anything, so hopefully this isn't too idiotic to post here.
Last edited: