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

So, I've been working on my custom menus and making a few graphical changes for my game and have run into a snag. Nothing major, but I would love to be able to place the little arrow that appears at the bottom center of a message box to the right rather than have it centered. I have looked all through the scripts but I can't find where it is drawn or anything. I may not even be able to change it, but I hope I can. I've attached a screen capture to this post for further clarification (please excuse the stupid test dialog lol.)

View attachment 59
You can't. You'll have to use a Sprite instead of a Window to do that. As, create a picture for your message and display it with event commands while keeping a transparent box.

Or you can also recode completely the Window class too. Up to you.
RMVXAce question:

After having worked with RMVX, I'm used to the convention of the unit (HP/MP) being displayed after the number (so, for example, 50 HP). However, once I began toying around with RMVXAce and ran a battle simulation, it didn't work as I wished it to.

For example, under Vocab, the following line appears:

37. ActorRecovery = "%s recovered %s %s!"

The output, for example, was that "X recovered HP 50!" For me, this is completely unacceptable. I tried running it as it worked in VX, (37. ActorRecovery = "%1$s recovered %3$s %2$s!"), but I got an error message. How can I switch the syntax order?

(And I apologize in advance if the question's already been answered or if this belongs elsewhere.)
@vampireshark haven't tested it, but try this.



Code:
class Game_ActionResult
  #--------------------------------------------------------------------------
  # * Get Text for HP Damage
  #--------------------------------------------------------------------------
  def hp_damage_text
	if @hp_drain > 0
	  fmt = @battler.actor? ? Vocab::ActorDrain : Vocab::EnemyDrain
	  sprintf(fmt, @battler.name, @hp_drain, Vocab::hp)
	elsif @hp_damage > 0
	  fmt = @battler.actor? ? Vocab::ActorDamage : Vocab::EnemyDamage
	  sprintf(fmt, @battler.name, @hp_damage)
	elsif @hp_damage < 0
	  fmt = @battler.actor? ? Vocab::ActorRecovery : Vocab::EnemyRecovery
	  sprintf(fmt, @battler.name, -hp_damage, Vocab::hp)
	else
	  fmt = @battler.actor? ? Vocab::ActorNoDamage : Vocab::EnemyNoDamage
	  sprintf(fmt, @battler.name)
	end
  end
  #--------------------------------------------------------------------------
  # * Get Text for MP Damage
  #--------------------------------------------------------------------------
  def mp_damage_text
	if @mp_drain > 0
	  fmt = @battler.actor? ? Vocab::ActorDrain : Vocab::EnemyDrain
	  sprintf(fmt, @battler.name, @mp_drain, Vocab::mp)
	elsif @mp_damage > 0
	  fmt = @battler.actor? ? Vocab::ActorLoss : Vocab::EnemyLoss
	  sprintf(fmt, @battler.name, @mp_damage, Vocab::mp)
	elsif @mp_damage < 0
	  fmt = @battler.actor? ? Vocab::ActorRecovery : Vocab::EnemyRecovery
	  sprintf(fmt, @battler.name, -@mp_damage, Vocab::mp)
	else
	  ""
	end
  end
end
Mihel: Works perfectly! Thanks.
What's the best way of performing an action when a new map is loaded? Adding code to Game_Map::setup(map_id) works, but there's no easy way to access your scene or spriteset from the Game_Map class as far as I can tell. Is there something in Scene_Map or Spriteset_Map that I can use instead?

(Note that in particular I do NOT just want to listen to scene changes, because I don't want my code to run when the player returns from the menu screen, and transferring from one map to another doesn't change the active scene.)
The thing is, Game_Map is not always setup during Scene_Map so trying to access the spriteset during setup can cause issue. If you need the code to only run upon map construction Scene_Map isn't an option either. You'll probably have to divide the work and handle it both within Game_Map and Spriteset_Map.
The thing is, Game_Map is not always setup during Scene_Map so trying to access the spriteset during setup can cause issue. If you need the code to only run upon map construction Scene_Map isn't an option either. You'll probably have to divide the work and handle it both within Game_Map and Spriteset_Map.
Hm... that makes sense. The solution I came up with is pretty ugly:



Code:
$mymodule_spriteset = nil
class Game_Map
  alias mymodule_game_map_setup setup
  def setup(map_id)
	mymodule_game_map_setup(map_id)
	if !$mymodule_spriteset.nil?
	  $mymodule_spriteset.do_awesome_things
	end
  end
end


class Spriteset_Map
  alias mymodule_spriteset_map_initialize initialize
  def initialize
	mymodule_spriteset_map_initialize
	$mymodule_spriteset = self
  end

  alias mymodule_spriteset_map_dispose dispose
  def dispose
	$mymodule_spriteset = nil
	mymodule_spriteset_map_dispose
  end
  def do_awesome_things
	 # Awesome things occur here.
  end
end
Nonetheless, it seems to work reliably, and since I don't add any instance variables to Game_Map it doesn't break save/load behavior. The extra global makes me sad inside though. Does that look like a reasonable way of doing it, or is there a bug lurking?
I don't understand why you need to use Game_Map in this case. In your example, you can just stick everything in Spriteset_Map and get rid of both the Game_Map#setup alias and the global variables.

You previously mentioned that you wanted your code to only run once when the map is created. But the spriteset is disposed upon scene changes which means what you did with it will need to be done again.

If you could tell me what those 'awesome things' are, I'll be able to understand better.
Hi,

I would like if it's possible to replace the default TP/HP/MP bar with something like this :

guage.png


I am using Yanfly battle script.

EDIT : I've found what I wanted, for people who are interest, here is the link > http://www.rpgmakervxace.net/topic/928-kms-generic-gauge/
RMVXAce question: Is there a quick way to change the RegionID of a square dynamically? Say, Tile X,Y has region ID 2, but I want to change it to 5 during gameplay.
Do enemies accumulate/use TP by default or do I need to use/write a script for that feature?
I was wondering, when should I define a module rather than a class ?

Are there drawbacks in using modules ?
Do enemies accumulate/use TP by default or do I need to use/write a script for that feature?
Ennemies use TP by default, if I am not wrong.
I was wondering, when should I define a module rather than a class ?

Are there drawbacks in using modules ?
So, modules have two major uses:

1. They act as a namespace, i.e., a way to group methods and constants to avoid naming clashes. This is typically how modules are used in RM scripts.

2. The implement mixin functionality. I almost never see this used in the context of RPG Maker, but it is great for larger systems.

In case you unfamiliar with the concept of a mixin, here is an article that explains it in more depth than I would here. It is an alternative to inheritance (side not: inheritance is often used incorrectly as a way to use methods from one class in another class. This is not the intent of inheritance.)

http://juixe.com/tec...mixins-in-ruby/
I actually don't know if I should make a thread for this or not... So if I should-- let me know and i will. Here goes:

Okay here's the issue. I am using tankentai Sideview battle system (version 3.3b if that matters) and it came with the "experimental kaduki script" setup by Mr.Bubble.

It works fine for my game, but I've noticed that whenever ANY state is afflicted on a character it changes the character's battle animation back to the left-facing walking animation.

And since I'm using the kaduki battle sprites... This is rather irritating, especially when you have states such as "auto-life" on some characters the ENTIRE battle. so...

I wanted to know how to fix this so that STATES (unless added to a list) didn't change the animation... and the ones I could add to a list would instead use the "critical" animation.

The one that looks like they're low on health, you know? I would appreciate the help here...

I'm trying to get a playable demo of my game released soon and this is one of the things I would like to fix by then.
I actually don't know if I should make a thread for this or not... So if I should-- let me know and i will. Here goes:

Okay here's the issue. I am using tankentai Sideview battle system (version 3.3b if that matters) and it came with the "experimental kaduki script" setup by Mr.Bubble.
I have to ask: where are people constantly finding these old versions of Tankentai? 3.3 is close to three years old. The latest version is 3.4e.
I have to ask: where are people constantly finding these old versions of Tankentai? 3.3 is close to three years old. The latest version is 3.4e.
Yeah... I started this project at least over a year ago. and that's the kind I downloaded... do you know if what I'm talking about can be done?
Okay. I figured out a non-script related way to do what I was attempting to do... for the most part. So i no longer need assistance with this issue. Thanks.
Please refrain from double posting within 72 hours. Please use the edit button instead. Thanks.

Original thread: https://forums.rpgmakerweb.com/threads/ruby-rgssx-questions-that-dont-deserve-their-own-thread.150/