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

Mr. Bubble

Makes stuff.
Member
Joined
Mar 1, 2012
Messages
853
Reaction score
163
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
410
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
42
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
42
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,266
Reaction score
1,410
First Language
English
Primarily Uses
RMXP
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
262
Reaction score
155
First Language
English
Primarily Uses
RMMV
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
262
Reaction score
155
First Language
English
Primarily Uses
RMMV

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

Latest Threads

Latest Profile Posts


230 paths... roughly 250 light sources on the screen... One serious lag fiesta... But I finally got it all the screen at once. I guess I could have also just made an event to spawn each one in exactly the location I needed, but that's sooo much less fun. :LZSwink:
A wee radio thing I made months and months and months ago. 2020 has felt like such a long year. Maybe made this before 2020.IDK anymore.

Made this one much more recently.
Stream will be live shortly with a surprise session of the Interactive Text Adventure! Feel free to drop by!

Forum statistics

Threads
104,492
Messages
1,006,689
Members
135,994
Latest member
stifler_leon
Top