So I've been rigging up a script for dual and triple techs. And it works like an absolute charm! (Well, you might want Yanfly's Action Sequence plugins, since it doesn't deal with animation, but I made that decision before I started the plugin.)
Except...
Well, it deducts the cost of two skills (plus, if it's a triple tech, a preset cost from the third character unrelated to any other skills) from the characters. Oh, it's not the actual deduction or anything like that; I have that worked out. It's the display.
With MP and TP and all the various plugins for various skill costs, I find myself wanting for a function that can detect the length of the skill cost text so it can best display it to the screen. And no such function exists, in Yanfly or otherwise. "drawSkillCost" just makes the text and plops it down, returns nothing, and cares not for the width after displaying it.
In my own project, the only skill cost for most skills is MP, and getting the width of MP cost is easy. But if I want to make it generic for other projects, is there an easy solution?
EDIT: I only just now realize I should have been more specific in my topic title. I don't want the width of just any text; specifically the skill cost text.
Except...
Well, it deducts the cost of two skills (plus, if it's a triple tech, a preset cost from the third character unrelated to any other skills) from the characters. Oh, it's not the actual deduction or anything like that; I have that worked out. It's the display.
With MP and TP and all the various plugins for various skill costs, I find myself wanting for a function that can detect the length of the skill cost text so it can best display it to the screen. And no such function exists, in Yanfly or otherwise. "drawSkillCost" just makes the text and plops it down, returns nothing, and cares not for the width after displaying it.
In my own project, the only skill cost for most skills is MP, and getting the width of MP cost is easy. But if I want to make it generic for other projects, is there an easy solution?
EDIT: I only just now realize I should have been more specific in my topic title. I don't want the width of just any text; specifically the skill cost text.