@Engr Was talking about the actual note box where you put note tags.... (The formula note tag is what I am calling a particular type of note tag that evals any code within it's boundaries). The reason that the randomized items won't work for what I want is that the id for the item I want could be anything. That's why I wanted to see if I could do it through the item name however due to how the randomized item script works this didn't work either. (Works for items that aren't being randomized though).
This is what I am calling a formula note tag (might be the wrong name for it just what I tend to call it).
<eval>
formula
<end_eval>
What script are you using the evaluates those tags? No default script runs note tags, so it means you have a script that does that, and because of that, this isn't a question that doesn't deserve it's own thread.
You would need to supply which script ur using to run the tags, and what script are you using for randomization. If it's Vlue's I'm sure his randomized weapons/armors have an attribute for the original weapon's ID
$data_armors[2].id is 2. You don't need to use the id to get the object to get the id - it's extra, unnecessary processing.
@Engr The original question was not how to get note tags to work (and the above is just an example set of note tags anyway). The original question was how to check what the actor had equipped which was solved.
@Shaz Yea that is the method I am currently using thank you. (2 vs $data_armors[2])
Short and simple one here. What command do I call to see if the party is currently in battle or not?
Is there any way we can assign a width argument to 'draw_text_ex' or it needs an external script?
If it needs a script, did anyone find one for it?
And how could I calculate the width of a text with escape characters properly?
Every time I try it, it calculates the width of the message codes too and adds them to the total width. >.>
You could always edit that since it's there on the editable scripts... Take care in adding though, you might invoke a number of problems.
You would need to run it through a similar method to strip out all the escape codes (adding extra space when necessary for things like icons) and return the width. Then you can pass it into the method that will actually do the display, knowing how wide it's going to be.
I guess, it can be done if we clone the text, remove any possible escape codes from that cloned text, and save the width of that text instead of the original text.
Just guessing.
This was my first idea of it initially, which is why I asked here. It sounds troublesome to scan for all possible text codes, if the text could contain anything.
Luckily my text contained only one color change eescape code which was hard-coded, so it was easy to remove the extra width if the text includes the escape code.
Something like
contents.text_size( text.gsub(/\\[a-zA-Z]\[\d+]/, "").gsub!(/\\./, "") ).widthYou could probably turn that into a single regex if you thought about it a little harder; this is the quickest one I could come up with that should catch everything.
Well, for example if you write \n[1] it would show the first actor's name, which could be arbitrarily long.
If those aren't considered then ya just stripping them off might work.
Ah, you're right, I forgot about those. Yeah, if you want to catch that sort of thing you probably would need to just make special cases for them.
I mean you would pretty much duplicate the existing method, but write it to a dummy sprite instead of the visible one. You don't need to worry about the wait codes, you parse the escape codes that substitute things, and keep track of the width just as the existing method does.
How would I go about adding an extra number variable to the 2nd characters battle "hud"? It wiill be a battle command but the skill can only be used a certain number of times.
You'd better use an actor command script (Yanfly has one), plus a skill limit script
If by "figures" you mean the stat values on level up, that is not defined in the draw_param_names definition you have shown us. That definition only draws the names of them, not the values.
I guess the value drawing is in another definition, and that is what you need to move to the right, or not?
If you mean the HP, MP and TP text besides each actor face, that is not defined in that definition either.
If you mean something else, than I have no idea what you mean, sorry. *-*
Which script are you using for that battle hud?
I'm guessing Moghunter's battle hud, but who knows. 😀
Edit:
Looking at the screenshot, I see that is Yanfly's Victory Aftermath script?
Is so, look for the 'def draw_former_stats', 'def draw_arrows' and 'def draw_newer_stats' definitions, and add to the X value for each draw_text command. You can even modify each x value as you wish.
The easiest method would be to find the 'def draw_actor_changes' definition, and after the 'draw_param_names(actor, dx)' line in that definition, add a new line with 'dx += X'. Replace X with a number, and that will move the whole param display to the right by X pixels.
This would move the draw_new_skills display too, which might get cut-off on the right side, so before that line, you can make a new line just like the one before, and adjust the X value again.
Whoops, nevermind the crossed lines, that would only work in my project.
The original, unedited script won't work like that, sorry.