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

Chucksaints

Veteran
Veteran
Joined
Dec 8, 2016
Messages
34
Reaction score
1
First Language
Portuguese
Primarily Uses
RMVXA
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
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
 

TheoAllen

Self-proclaimed jack of all trades
Veteran
Joined
Mar 16, 2012
Messages
5,592
Reaction score
6,522
First Language
Indonesian
Primarily Uses
RMVXA
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.
 

Chucksaints

Veteran
Veteran
Joined
Dec 8, 2016
Messages
34
Reaction score
1
First Language
Portuguese
Primarily Uses
RMVXA
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 ^^
 

Triacular

Villager
Member
Joined
Jan 13, 2019
Messages
27
Reaction score
5
First Language
English
Primarily Uses
RMVXA
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.
 

TheoAllen

Self-proclaimed jack of all trades
Veteran
Joined
Mar 16, 2012
Messages
5,592
Reaction score
6,522
First Language
Indonesian
Primarily Uses
RMVXA
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.
 

Triacular

Villager
Member
Joined
Jan 13, 2019
Messages
27
Reaction score
5
First Language
English
Primarily Uses
RMVXA
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.
 

Juanita Star

Witch of compilations.
Veteran
Joined
Jun 3, 2012
Messages
190
Reaction score
219
First Language
Spanish
Primarily Uses
RMVX
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.
 

TheoAllen

Self-proclaimed jack of all trades
Veteran
Joined
Mar 16, 2012
Messages
5,592
Reaction score
6,522
First Language
Indonesian
Primarily Uses
RMVXA
@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

Witch of compilations.
Veteran
Joined
Jun 3, 2012
Messages
190
Reaction score
219
First Language
Spanish
Primarily Uses
RMVX
@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.
 

Otto

Veteran
Veteran
Joined
Apr 24, 2015
Messages
119
Reaction score
70
First Language
Engilsh
Primarily Uses
RM2k3
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).
 

TheoAllen

Self-proclaimed jack of all trades
Veteran
Joined
Mar 16, 2012
Messages
5,592
Reaction score
6,522
First Language
Indonesian
Primarily Uses
RMVXA
Graphics.transition(1) ?
 

Otto

Veteran
Veteran
Joined
Apr 24, 2015
Messages
119
Reaction score
70
First Language
Engilsh
Primarily Uses
RM2k3
thanks, that actually worked :D
 

ZirconStorms

Veteran
Veteran
Joined
Dec 22, 2014
Messages
359
Reaction score
111
First Language
English
Primarily Uses
RMVXA
How do you go about modifying Window_Help so that you can center help text?
 

Roninator2

Gamer
Veteran
Joined
May 22, 2016
Messages
2,660
Reaction score
563
First Language
English
Primarily Uses
RMVXA
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.
 

Sixth

Veteran
Veteran
Joined
Jul 4, 2014
Messages
2,162
Reaction score
822
First Language
Hungarian
Primarily Uses
RMVXA
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.
 

TheoAllen

Self-proclaimed jack of all trades
Veteran
Joined
Mar 16, 2012
Messages
5,592
Reaction score
6,522
First Language
Indonesian
Primarily Uses
RMVXA
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.
 

Sixth

Veteran
Veteran
Joined
Jul 4, 2014
Messages
2,162
Reaction score
822
First Language
Hungarian
Primarily Uses
RMVXA
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.
 

ZirconStorms

Veteran
Veteran
Joined
Dec 22, 2014
Messages
359
Reaction score
111
First Language
English
Primarily Uses
RMVXA
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.)
 

ZirconStorms

Veteran
Veteran
Joined
Dec 22, 2014
Messages
359
Reaction score
111
First Language
English
Primarily Uses
RMVXA
How would you check if a whole number value is an odd or even number?
 

Sixth

Veteran
Veteran
Joined
Jul 4, 2014
Messages
2,162
Reaction score
822
First Language
Hungarian
Primarily Uses
RMVXA
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.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

People3_5 and People3_8 added!

so hopefully tomorrow i get to go home from the hospital i've been here for 5 days already and it's driving me mad. I miss my family like crazy but at least I get to use my own toiletries and my own clothes. My mom is coming to visit soon i can't wait to see her cause i miss her the most. :kaojoy:
Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.

Forum statistics

Threads
105,868
Messages
1,017,090
Members
137,587
Latest member
Usagiis
Top