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,213
Reaction score
1,266
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
261
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
261
Reaction score
155
First Language
English
Primarily Uses
RMMV

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

Latest Threads

Latest Posts

Latest Profile Posts

My book/game tackles racism alot so I've been watching the news and social media absorbing everything as unbiasedly as I can for research but as a proud Caribbean black man my emotions are a whirlwind right now.
I discovered the new English word "Secular religion" today It is an oxymoron word. Now, I wonder how many English words create per year? According to Global Language Monitor, around 5,400 new words are created every year; it's only the 1,000 or so deemed to be sufficiently widespread use that makes it into print. [I think it probably slangs or combines words] :kaoluv:
Is it normal that I love a game that I can't even play due to how bad I'm at it?
Anyone have advice for recruiting friends to bugtest with you? I had some buddies volunteer without me asking, and we agreed on dates and times... and they all just flaked...
A mousefolk sprite I made, I think I did good.

Forum statistics

Threads
98,026
Messages
948,624
Members
129,281
Latest member
Lehamme
Top