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.
Member
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
384
Reaction score
45
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
384
Reaction score
45
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,200
Reaction score
1,256
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
256
Reaction score
153
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
256
Reaction score
153
First Language
English
Primarily Uses
RMMV

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

Latest Threads

Latest Profile Posts

I need a new option on YouTube that goes "Dont recommend videos/channels in this language because I do not speak it"
I've reconsidered having a subclass system for my first two games since there will already be plenty of variation in playable actors and usable items in the games. The third game will need it because of the basis for the story but I want the actors in the first two to be more focused in their roles.
Behold! The Sea Doggo.
I am dead tired but at the same time I really wanna write a tutorial x_x
Looked out side and couldn't see the neighbor's house through the snow. That age old Christmas song started going through my head. "It's a lovely day to say the heck at home."

Forum statistics

Threads
93,371
Messages
911,761
Members
122,870
Latest member
BrokenBratva
Top