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

Mr. Bubble

Makes stuff.
Member
Joined
Mar 1, 2012
Messages
853
Reaction score
164
Feel free to ask any questions here that you feel do not warrant its own thread.
 
Last edited by a moderator:

Hendrik

Villager
Member
Joined
Mar 14, 2012
Messages
38
Reaction score
1
First Language
German
Will i be able using the net library in rgss3?
 

Solstice

Warper
Member
Joined
Mar 13, 2012
Messages
4
Reaction score
0
First Language
English
Primarily Uses
is it possible to use a sprite sheet, that uses 4 frames instead of 3 for animations
 

Kread-EX

You're all bakas
Veteran
Joined
Mar 16, 2012
Messages
863
Reaction score
81
First Language
French
Primarily Uses
Will i be able using the net library in rgss3?
If you mean calling functions from the .NET framework, then no. It's possible in theory of course, but in practice nobody with sense will put the effort to do so.
 

♥SOURCE♥

Too sexy for your party.
Veteran
Joined
Mar 14, 2012
Messages
693
Reaction score
411
Primarily Uses
Is it still possible to call functions from a custom dll? I just tested it and gives an error.
 
Last edited by a moderator:

Kread-EX

You're all bakas
Veteran
Joined
Mar 16, 2012
Messages
863
Reaction score
81
First Language
French
Primarily Uses
Depending of the function, you may need to pack and/or unpack binary data.
 

Mihel

Veteran
Veteran
Joined
Mar 13, 2012
Messages
382
Reaction score
43
Primarily Uses
In the long run, is it more efficent to use text_color(n) or Color.new(n, n, n, n)?
 

Kread-EX

You're all bakas
Veteran
Joined
Mar 16, 2012
Messages
863
Reaction score
81
First Language
French
Primarily Uses
If you work with windows, you should use text_color(n), if only because it takes color from your windowskin file and should (in theory; depends on the windowskin's creator) ensure the colored text will be readable. Color.new will be an arbitrary color chosen independently from the windowskin you are using. And if you work with Sprites, you'll have to do it that way.
 

Mihel

Veteran
Veteran
Joined
Mar 13, 2012
Messages
382
Reaction score
43
Primarily Uses
I work 99% with text and gauges (readability in this case is of secondary importance since I edit the graphics with external programs), so it's mostly about windows. I was mainly wondering about performance, say in a scene where there are many gauges being drawn at the same time would it be best to stick with text_color or it's not particularly relevant?

Thanks for the reply.
 

Kread-EX

You're all bakas
Veteran
Joined
Mar 16, 2012
Messages
863
Reaction score
81
First Language
French
Primarily Uses
Well, performance-wise, text_color returns a Color object anyways since it's the return value of the get_pixel. I'd need to benchmark to determine the exact performance gain but I'd say just creating the Color object yourself via Color.new should be faster.
 

Velex

Veteran
Veteran
Joined
Mar 25, 2012
Messages
71
Reaction score
2
First Language
English
Primarily Uses
Hope this is an ok place to ask this, but how do I apply a downloaded .rb file to my game? I got how to paste code snippets and such, but I don't know what to do with an actual .rb file. (Specifically in VXAce).
 

Velex

Veteran
Veteran
Joined
Mar 25, 2012
Messages
71
Reaction score
2
First Language
English
Primarily Uses
Thanks!

Also, to be honest, your grumpy avatar is making me feel ashamed of myself right now.
 

Space Lizard

Warper
Member
Joined
Mar 13, 2012
Messages
1
Reaction score
0
First Language
English
Primarily Uses
In RMVX Ace, is there a code snippet I can use to change the opacity of the "shadow" squares? Thanks.
 

Kread-EX

You're all bakas
Veteran
Joined
Mar 16, 2012
Messages
863
Reaction score
81
First Language
French
Primarily Uses
The shadow squares are hard-coded in the Tilemap class. It's possible to 'overwrite' them after the map is loaded but it can be a time consuming process. I don't see why you would need to do that by the way.
 

Zeriab

Huggins!
Veteran
Joined
Mar 20, 2012
Messages
1,400
Reaction score
1,612
First Language
English
Primarily Uses
Other
Is it still possible to call functions from a custom dll? I just tested it and gives an error.
Yes. Win32API seems to work just as it did before.

What did you do to get an error?
 

Kenen

Veteran
Veteran
Joined
Apr 3, 2012
Messages
445
Reaction score
527
First Language
English
Primarily Uses
RMMZ
Something I'm having trouble with: changing the font color of part of a string that Window_BattleLog spits out.



Code:
#--------------------------------------------------------------------------
# * Display Skill/Item Use
#--------------------------------------------------------------------------
  def display_use_item(subject, item)
	if item.is_a?(RPG::Skill)
	  add_text(subject.name + item.message1)
I'd like to set item.message1 to be a different color. I've tried this:



Code:
add_text(subject.name)
change_color(system_color)
add_text(item.message1)
Which works, but causes a line break (Which I recently learned is because of how add_text behaves).

Thanks.
 

Kread-EX

You're all bakas
Veteran
Joined
Mar 16, 2012
Messages
863
Reaction score
81
First Language
French
Primarily Uses
You'll have to use a color escape character. Replace the line by something like this:



Code:
add_text(subject.name + "\\C[n]" + item.message1)
n being the color number (determined by your windowskin).
 

Kenen

Veteran
Veteran
Joined
Apr 3, 2012
Messages
445
Reaction score
527
First Language
English
Primarily Uses
RMMZ

Latest Threads

Latest Profile Posts

Heading to Orlando in six days! It'll be my first time going to Disney's Typhoon Lagoon. And then my dad will pick what we do for Father's Day!
With this, I'm gonna have a good night sleep
Damn. We’ve gotten so close to 0 reports, 0 approvals a few times over the past couple weeks. Does it matter? No. Is it realistic. No? Do I rely on your reports and want everyone to keep posting. Yes. Do I 100% games? …sigh… Yes.

Ah yes, all three of my moods all at once.

Forum statistics

Threads
131,757
Messages
1,223,028
Members
173,521
Latest member
MaverickZero
Top