Ohh, I see.
In that case, you can use something like this:
x = sprintf("%2d", $game_variables[81])This makes a 2 digit number, regardless if it is less than 10 or not. If it is less, it adds a 0 before the actual number.
But do note that this will convert the original variable value (which is an integer number) into a string for the 'x' variable!
I tried it, but it still displays 1 digit for single digit numbers.
Script Call
x = sprintf("%2d", $game_variables[81])$game_variables[81] = xTextbox = \V[month_string] \V[day],
\V[day_string], \V[hour]:\V[minute]\V[AM/PM]
Edit: Now that I think about it, this wouldn't work anyway. I actually need this number to be an integer in order for my other events to work. Also, it would be a bad idea to change the time variable directly. If I can get this to work, I'll need to store the converted value in a new variable anyway. (duh)
Whoops, it should be '%02d', I missed the 0 in my previous post, sorry!
And yeah, that is why I wrote that about the conversion.
That did the trick.
x = $game_variables[81]x > 9 ? y = "" : y = 0$game_variables[90] = yvs x = sprintf("%02d", $game_variables[81])$game_variables[92] = xTextbox1 = \V[89] \V[85],
\V[88], \V[87]:\V[90]\V[81]\V[91]
Textbox2 = \V[89] \V[85],
\V[88], \V[87]:\V[92]\V[91]
It's only slightly more efficient, but I'll take it. Thanks for the help. xD
One question, I want to replicate Magic Reflect state. A regular Magic Reflect state allows you to reflect all skills thrown at you by the enemy by default. Is there a way on how to create a magic reflect state but it only reflects the skill if it has a certain note tag? I don't want to mess up with the magic reflection, so a new state of the same method but just works when the skill used has a tag would be a great help with me.
If everything for the common event is contained within it, is there any particular reason you're using engine variables and not local Ruby ones?
Edit: Missed the extra page in the topic, this was directed at the time system guy.
well... I'm messing aroung with displaying busts again... and now I want to know, how in the hell can I display pictures above the message windows???
Change the z value of the bust sprites, or if it uses a different viewport, change the z value of the viewport itself to something higher. Around 300 should surely work.
def include?(item)
case @category
when :mail_item
item.note?(Soulpour::MailingList::Battle_Item_RegEx)
Soooo apparently item.note outside of
@data = $game_party.all_items.select {|item| item.note =~ ....)
isn't a thing.
Is there a method to check an item for a notetag?
"item.note" and "item.note?" are 2 different functions. The former exists, the latter doesn't.
Ok, but when I replace it with the actual one that should exist
def include?(item)
case @category
when :mail_item
item.note =~ (Soulpour::MailingList::Battle_Item_RegEx)
it still says the method doesn't exist. Am I just completely misunderstanding how methods work inside "when"?
If you playtest with the console open, add
p itembefore the line that gives you the error.
You can enable the console inside the maker with "Game -> Show Console"
Also please post the whole error (screenshot, if possible) and link to the script you are using.
DrDHoom's suggestion fixed it!
Thank you both for helping me out.
Yeah, i thought so. The line i posted would have told you if the item was nil. I would have done the same afterwards.
Just as an addition to lavra's advice if you find that you need to use debug statements often: use "puts" instead of "p"; it'll allow you to find your debug statements using the Find... function, which is a lot harder if you use p.
In applying substitution, the player can't evade the attacks, since they are certain:
def check_substitute(target, item) target.hp < target.mhp / 4 && (!item || !item.certain?) endis there a way to make sure that even the substituting friend / ally can still evade attacks he is substituting for?
I'm pretty sure they can. That method is essentially saying
"We'll say the substitute is a valid one if the target's HP is less than a quarter of its max AND there's either no item OR the item isn't a certain hit."
So certain hit attacks, if I'm reading the code correctly, won't even be substituted; they're essentially considered "unsubstitutable".
Edit: Confirmed this by having an actor with TGR 1000% and a substitute actor with TGR 0%. Had the enemy use a skill set to "magical attack" and the substitute took the damage for it, but when I made it certain hit, it hit the original target.
The way substitute works is that it merely replaces the target of an attack/skill with the battler who's set to "substitute" but this is done before missing/evading etc. are calculated, so those still happen as normal.