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
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,308
Reaction score
1,507
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
341
Reaction score
253
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
341
Reaction score
253
First Language
English
Primarily Uses
RMMZ

Latest Threads

Latest Posts

Latest Profile Posts

Jeżeli jeszcze nie subskrybujecie to byłoby nam bardzo miło.
1.png
Potrzebujemy 100 subów na niestandardowy URL.
Who wants to see my review of the worst star wars movie? This movie has all the excitement of being on Jury Duty of the most boring case ever about trade negotiations.
A lot to learn to make a game. Can I handle it?
I've been working on status effects since last thursday, and today I finished the core mechanic of Zombie, Teleport, Curse and Recall. Zombie and Curse are lacking a few things to make them complete atm. Teleport though is the "HAHA" spell for some of my mobs, but can "NOPE" at them with Recall.
I'm weird as there are a few game franchises I'll watch and read about, but have no interest in playing.

Forum statistics

Threads
115,158
Messages
1,087,724
Members
149,702
Latest member
Hidemitsu
Top