Jump to content


Photo

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


  • Please log in to reply
432 replies to this topic

#1 Mr. Bubble

Mr. Bubble

    Makes stuff.

  • Global Moderators
  • 740 posts
  • LocationPortland, Oregon
  • Primarily UsesRMVX Ace

User's Awards

     

Posted 13 March 2012 - 10:52 AM

Feel free to ask any questions here that you feel do not warrant its own thread.

#2 Hendrik

Hendrik

    Member

  • Early Adopter
  • 18 posts
  • Primarily UsesRMVX Ace
  • First LanguageGerman

Posted 13 March 2012 - 02:27 PM

Will i be able using the net library in rgss3?

#3 Solstice

Solstice

    Newbie

  • Early Adopter
  • 3 posts
  • Primarily UsesRMVX Ace
  • First LanguageEnglish

Posted 14 March 2012 - 09:35 PM

is it possible to use a sprite sheet, that uses 4 frames instead of 3 for animations

#4 Dr.Yami

Dr.Yami

    I'm M :3

  • Members
  • 253 posts
  • LocationVietnam
  • Primarily UsesRMVX Ace
  • First LanguageVietnamese

Posted 19 March 2012 - 04:58 AM

is it possible to use a sprite sheet, that uses 4 frames instead of 3 for animations

Here ~
http://victorscripts...s/multi-frames/

G9cCg.png

Support

Spoiler


#5 Kread-EX

Kread-EX

    You're all bakas

  • Members
  • 598 posts
  • Primarily UsesRMVX Ace
  • First LanguageFrench

Posted 19 March 2012 - 05:03 AM

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.

#6 Lemony

Lemony

    Advanced Member

  • Resource Staff
  • 178 posts
  • Primarily UsesRMVX Ace

Posted 19 March 2012 - 05:39 AM

Is it still possible to call functions from a custom dll? I just tested it and gives an error.

Edited by Lemony, 19 March 2012 - 06:21 AM.


#7 Kread-EX

Kread-EX

    You're all bakas

  • Members
  • 598 posts
  • Primarily UsesRMVX Ace
  • First LanguageFrench

Posted 19 March 2012 - 11:12 AM

Depending of the function, you may need to pack and/or unpack binary data.

#8 Mihel

Mihel

    Advanced Member

  • Early Adopter+
  • 178 posts
  • Primarily UsesN/A

Posted 28 March 2012 - 02:55 AM

In the long run, is it more efficent to use text_color(n) or Color.new(n, n, n, n)?

#9 Kread-EX

Kread-EX

    You're all bakas

  • Members
  • 598 posts
  • Primarily UsesRMVX Ace
  • First LanguageFrench

Posted 28 March 2012 - 04:44 AM

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.

#10 Mihel

Mihel

    Advanced Member

  • Early Adopter+
  • 178 posts
  • Primarily UsesN/A

Posted 28 March 2012 - 05:09 AM

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.

#11 Kread-EX

Kread-EX

    You're all bakas

  • Members
  • 598 posts
  • Primarily UsesRMVX Ace
  • First LanguageFrench

Posted 28 March 2012 - 05:48 AM

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.

#12 Velex

Velex

    Advanced Member

  • Members
  • 63 posts
  • LocationNew Paltz
  • Primarily UsesRMVX Ace
  • First LanguageEnglish

Posted 29 March 2012 - 04:12 PM

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).
>Rail to Rail to>

#13 Mihel

Mihel

    Advanced Member

  • Early Adopter+
  • 178 posts
  • Primarily UsesN/A

Posted 29 March 2012 - 06:28 PM

Just open it with notepad.

#14 Velex

Velex

    Advanced Member

  • Members
  • 63 posts
  • LocationNew Paltz
  • Primarily UsesRMVX Ace
  • First LanguageEnglish

Posted 29 March 2012 - 09:47 PM

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

#15 Space Lizard

Space Lizard

    Newbie

  • Early Adopter
  • 1 posts
  • LocationSPAAACE
  • Primarily UsesRMVX
  • First LanguageEnglish

Posted 01 April 2012 - 07:07 PM

In RMVX Ace, is there a code snippet I can use to change the opacity of the "shadow" squares? Thanks.
The Reconstruction - Completed 2009
I Miss the Sunrise - Episode 4 Coming Soon

#16 Kread-EX

Kread-EX

    You're all bakas

  • Members
  • 598 posts
  • Primarily UsesRMVX Ace
  • First LanguageFrench

Posted 03 April 2012 - 05:44 AM

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.

#17 Zeriab

Zeriab

    Huggins!

  • Members
  • 94 posts
  • Primarily UsesRMXP

Posted 03 April 2012 - 11:02 AM

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?
Posted Image

#18 Kenen

Kenen

    Advanced Member

  • Member+
  • 35 posts
  • LocationPhiladelphia
  • Primarily UsesRMVX Ace
  • First LanguageEnglish

Posted 03 April 2012 - 07:53 PM

Something I'm having trouble with: changing the font color of part of a string that Window_BattleLog spits out.

#--------------------------------------------------------------------------
# * 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:

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.

#19 Kread-EX

Kread-EX

    You're all bakas

  • Members
  • 598 posts
  • Primarily UsesRMVX Ace
  • First LanguageFrench

Posted 04 April 2012 - 03:46 AM

You'll have to use a color escape character. Replace the line by something like this:
add_text(subject.name + "\\C[n]" + item.message1)
n being the color number (determined by your windowskin).

#20 Kenen

Kenen

    Advanced Member

  • Member+
  • 35 posts
  • LocationPhiladelphia
  • Primarily UsesRMVX Ace
  • First LanguageEnglish

Posted 04 April 2012 - 11:05 AM

Thank you!




1 user(s) are reading this topic

1 members, 0 guests, 0 anonymous users