Ruby/RGSSx questions that don't deserve their own thread

out of curiosity ... what is that game?
Tales of vesperia, a meh game but with good graphics at least.

Can you just use
Code:
$game_party.members.each {|m| <draw face method>}

sorry for asking, drawi face method? draw_actor_face?
such a noob :x


@Roninator2
Spoiler
Tales of Vesperia. PC version came out not long ago (with terrible optimization - even Berseria runs way better than this one).
Clunky combat, sometimes unresponsive even... No idea why fans like(d) it so much. It's like a downgraded Tales of the Abyss as far as combat goes.
I only played it a little, but so far that's my impression of it.

As for the face question...
It's not really the "next face", those face images include all party members, and the selected one is highlighted.
Theo's answer is correct, but you will need to make an exception for the currently selected face to show it differently than the other ones. This means that if you change the selected actor, you will have to redraw the previous/next (depending on which direction you change it) and the newly selected actor's face at the very least, or use sprites instead and play with sprite effects on them (position change, flash effect, etc).
I would like to be cache images but since I have no experience in making scripts it's difficult to get there..
sorry to bother & my English also xD
The question you asked is actually a bigger question than you thought. All those answers are just a hint with an assumption you know the fundamental and how to script in general like how to handle windows and sprites. Maybe you can try to consider:
  1. Learn the basics of how to write a script
  2. Request a script by creating a new thread request if you're not going to learn how to write a script.
The question you asked is actually a bigger question than you thought. All those answers are just a hint with an assumption you know the fundamental and how to script in general like how to handle windows and sprites. Maybe you can try to consider:
  1. Learn the basics of how to write a script
  2. Request a script by creating a new thread request if you're not going to learn how to write a script.
ok, thank you for your hint ^^
Is there a way to automatically print something on a connected printer with RPG VXA?
It would be cool to have this function for various reasons. I wouldn't be surprised is there's no way to do so.
Is there a way to automatically print something on a connected printer with RPG VXA?
It would be cool to have this function for various reasons. I wouldn't be surprised is there's no way to do so.
Why would u do that though.
Why would u do that though.
For my game, there would be a place to read cooking recipes.
When confirming that you want to see one, it will display the recipe. It will then ask if you want to print it off for convenience.
A nice little bit for those who like to cook.
I’m using Quest Journal from Modern Algebra (VX, version 2.1c). I don’t really get this one (I blame the language barrier): can the script give the rewards automatically after completing the quest or I have to event it? On the demo example, there is a mission for a Long sword, and it appears to be done automatically (no change weapon: Long Sword +1). But for other examples, is done manually. So, I got confused by that.
@Juanita Star you may get a better answer if you create a thread for better visibility. Since it's involving someone's script.
@Juanita Star you may get a better answer if you create a thread for better visibility. Since it's involving someone's script.
For the record, I managed to find the solution after a good time of experimenting. I made objectives starting from 1 instead of 0, that was my mistake. I feel dumb xD
On the good side, it was a good practice to learn a good part of the script.
It's a dumb questio but... hell, I asked a lot of dumb questions so hopefully noone will mind one more lol

what's the "opposite" script call to Graphics.freeze ?

basically I wanted the screen to freeze, do some stuff in background then unfreeze so that the player sees the change instantly.
I know that I can use Graphics.transition but I was wondering if there is an actual "instant" transition (without the fading effect you normally see on transition).
Graphics.transition(1) ?
thanks, that actually worked 😀
How do you go about modifying Window_Help so that you can center help text?
Window_help uses draw_text_ex, which does not seem to have the option for alignment.
draw_text does.

So perhaps try changing the refresh from draw_text_ex(4, 0, @text)
to draw_text(x, y, width, fitting_height(line_number), @text, 1)

Have no idea if that will work.
It should work, but message codes will not be recognized that way.
Message codes are the reason why that method got no alignment option in the first place, I guess.
It is possible to make the text centered even with the draw_text_ex method, but it requires additional calculations after the text has been fully processed to get the width of the displayed text correctly.
RIght, the text codes need to be removed first and every time you use \I[n], you add the text width by 24 (draw icon), as well as if you're using \N[x], for draw actor name. Possible, but not simple.
It's much more elegant to just track the X position of the text than to process the whole text again for message codes, not to mention that there are tons of other message codes (mostly custom made from other scripts) that may alter the text position in different ways.
The text position is already tracked in draw_text_ex, so you just need to use that to calculate the final position of the centered text. It's actually fairly simple if you approach it this way. I use this method in my custom scripts made for commissions to provide every possible options for my customers with their text settings, even with message codes.
If you want to save some processing time, you can also make a flag that will make the method skip the real drawing and will only calculate the necessary variables for text positioning, than disable that flag, store the variables, and run the method again now with the corrected X/Y positions.

Or you can use a dummy window that will draw the text, get the necessary data from there. You can use that data to position the text and you can also copy the contents of that dummy window too instead of going through draw_text_ex again for drawing the text. This is what I saw many people do in some of their scripts on older engines.
For the sake of what I'm looking to achieve, Roninator2's solution works for me, but thank you for the detailed info/explanations, TheoAllen & Sixth. (It was near impossible to get info on why alignment didn't work for the help window.)
How would you check if a whole number value is an odd or even number?
Code:
if num % 2 == 0
Where num is the number you check.
Basically, if you can divide the number with 2 and there is no remainder, it is even, else it's odd.

Original thread: https://forums.rpgmakerweb.com/threads/ruby-rgssx-questions-that-dont-deserve-their-own-thread.150/