Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Couple of questions (XP)

These two questions have been floating in my head for a while, so I'm going to ask them.

1. When it comes to armors and accessories, if I have one or more element for resistance and an auto-state that inflicts a state with the same resistence(s), wouldn't the resistance scale stack; making it 1/4 (25%) instead of 1/2 (50%)?
2. I've seen this a lot in RMXP windowskins. In the middle of the border part of the windowskin, what are those four arrows for? I've never seen them used in any part of RMXP so I'm not sure.
 
I don't know about the first question but I can answer the second one. ^^ Those four arrows are the ones that move under a text conversation. This one:

untitled.png
 
Cannot answer about the arrows, but yes, resistances stack. Just tested this in the engine with a static damage wind-element skill and a character with 1) personal wind resistance, 2) a shield that increases wind resistance, and 3) a skill that grants a state with wind resistance.

The numbers were a tiny bit funky, though - the skill was set to do 160 damage, no variant factors whatsoever. With neither state nor shield, the character took 80 damage (as should be the case). With either wind shield or wind state on, but not both, the character took 40 damage. However, with both active (meaning all three wind resistances stacking), the character took 19 damage instead of 20. I'm a bit confused about that one.
 
EnderX":155nv6kj said:
Cannot answer about the arrows, but yes, resistances stack. Just tested this in the engine with a static damage wind-element skill and a character with 1) personal wind resistance, 2) a shield that increases wind resistance, and 3) a skill that grants a state with wind resistance.

The numbers were a tiny bit funky, though - the skill was set to do 160 damage, no variant factors whatsoever. With neither state nor shield, the character took 80 damage (as should be the case). With either wind shield or wind state on, but not both, the character took 40 damage. However, with both active (meaning all three wind resistances stacking), the character took 19 damage instead of 20. I'm a bit confused about that one.
The damage is a rounded number.
 

Ares

Member

The four arrows in the top right corner are automatically used when a window's bitmap is larger than the window itself. I didn't know that either, but you'll find out once you're learning to script.
I can't give you an example right now cause I don't have RPG maker on this pc.
 
Since I have another question now, I might as well put this topic to use.

I know how to change the default font type and size, but what the default font color?
I figure it might be something like:
f aboutont.default_color = $fontcolor = $defaultfontcolor = color(255, 255, 255, 255)
 

Ares

Member

To change the default color you should edit the following lines in the Window Base script:
[rgss]#--------------------------------------------------------------------------
# * Get Normal Text Color
#--------------------------------------------------------------------------
  def normal_color
    return Color.new(255, 255, 255, 255)
  end
[/rgss]

You can edit the four arguments (255 by default) to the amount of respectively red, green, blue and alpha (alpha is not neccesary) in your new color.

Or even better, you can replace the code above with this:
[rgss]#--------------------------------------------------------------------------
# * Get Normal Text Color
#--------------------------------------------------------------------------
  def normal_color
    return $game_system.default_color
  end
[/rgss]

and replace Game_System (assuming you didn't change anything in there) with this:
[rgss]#==============================================================================
# ** Game_System
#------------------------------------------------------------------------------
#  This class handles data surrounding the system. Backround music, etc.
#  is managed here as well. Refer to "$game_system" for the instance of
#  this class.
#==============================================================================
 
class Game_System
  #--------------------------------------------------------------------------
  # * Public Instance Variables
  #--------------------------------------------------------------------------
  attr_reader   :map_interpreter          # map event interpreter
  attr_reader   :battle_interpreter       # battle event interpreter
  attr_accessor :timer                    # timer
  attr_accessor :timer_working            # timer working flag
  attr_accessor :save_disabled            # save forbidden
  attr_accessor :menu_disabled            # menu forbidden
  attr_accessor :encounter_disabled       # encounter forbidden
  attr_accessor :message_position         # text option: positioning
  attr_accessor :message_frame            # text option: window frame
  attr_accessor :save_count               # save count
  attr_accessor :magic_number             # magic number
  attr_accessor :default_color            # default color
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    @map_interpreter = Interpreter.new(0, true)
    @battle_interpreter = Interpreter.new(0, false)
    @timer = 0
    @timer_working = false
    @save_disabled = false
    @menu_disabled = false
    @encounter_disabled = false
    @message_position = 2
    @message_frame = 0
    @save_count = 0
    @magic_number = 0
    @default_color = Color.new(255,255,255,255)
  end
  #--------------------------------------------------------------------------
  # * Play Background Music
  #     bgm : background music to be played
  #--------------------------------------------------------------------------
  def bgm_play(bgm)
    @playing_bgm = bgm
    if bgm != nil and bgm.name != ""
      Audio.bgm_play("Audio/BGM/" + bgm.name, bgm.volume, bgm.pitch)
    else
      Audio.bgm_stop
    end
    Graphics.frame_reset
  end
  #--------------------------------------------------------------------------
  # * Stop Background Music
  #--------------------------------------------------------------------------
  def bgm_stop
    Audio.bgm_stop
  end
  #--------------------------------------------------------------------------
  # * Fade Out Background Music
  #     time : fade-out time (in seconds)
  #--------------------------------------------------------------------------
  def bgm_fade(time)
    @playing_bgm = nil
    Audio.bgm_fade(time * 1000)
  end
  #--------------------------------------------------------------------------
  # * Background Music Memory
  #--------------------------------------------------------------------------
  def bgm_memorize
    @memorized_bgm = @playing_bgm
  end
  #--------------------------------------------------------------------------
  # * Restore Background Music
  #--------------------------------------------------------------------------
  def bgm_restore
    bgm_play(@memorized_bgm)
  end
  #--------------------------------------------------------------------------
  # * Play Background Sound
  #     bgs : background sound to be played
  #--------------------------------------------------------------------------
  def bgs_play(bgs)
    @playing_bgs = bgs
    if bgs != nil and bgs.name != ""
      Audio.bgs_play("Audio/BGS/" + bgs.name, bgs.volume, bgs.pitch)
    else
      Audio.bgs_stop
    end
    Graphics.frame_reset
  end
  #--------------------------------------------------------------------------
  # * Fade Out Background Sound
  #     time : fade-out time (in seconds)
  #--------------------------------------------------------------------------
  def bgs_fade(time)
    @playing_bgs = nil
    Audio.bgs_fade(time * 1000)
  end
  #--------------------------------------------------------------------------
  # * Background Sound Memory
  #--------------------------------------------------------------------------
  def bgs_memorize
    @memorized_bgs = @playing_bgs
  end
  #--------------------------------------------------------------------------
  # * Restore Background Sound
  #--------------------------------------------------------------------------
  def bgs_restore
    bgs_play(@memorized_bgs)
  end
  #--------------------------------------------------------------------------
  # * Play Music Effect
  #     me : music effect to be played
  #--------------------------------------------------------------------------
  def me_play(me)
    if me != nil and me.name != ""
      Audio.me_play("Audio/ME/" + me.name, me.volume, me.pitch)
    else
      Audio.me_stop
    end
    Graphics.frame_reset
  end
  #--------------------------------------------------------------------------
  # * Play Sound Effect
  #     se : sound effect to be played
  #--------------------------------------------------------------------------
  def se_play(se)
    if se != nil and se.name != ""
      Audio.se_play("Audio/SE/" + se.name, se.volume, se.pitch)
    end
  end
  #--------------------------------------------------------------------------
  # * Stop Sound Effect
  #--------------------------------------------------------------------------
  def se_stop
    Audio.se_stop
  end
  #--------------------------------------------------------------------------
  # * Get Playing Background Music
  #--------------------------------------------------------------------------
  def playing_bgm
    return @playing_bgm
  end
  #--------------------------------------------------------------------------
  # * Get Playing Background Sound
  #--------------------------------------------------------------------------
  def playing_bgs
    return @playing_bgs
  end
  #--------------------------------------------------------------------------
  # * Get Windowskin File Name
  #--------------------------------------------------------------------------
  def windowskin_name
    if @windowskin_name == nil
      return $data_system.windowskin_name
    else
      return @windowskin_name
    end
  end
  #--------------------------------------------------------------------------
  # * Set Windowskin File Name
  #     windowskin_name : new windowskin file name
  #--------------------------------------------------------------------------
  def windowskin_name=(windowskin_name)
    @windowskin_name = windowskin_name
  end
  #--------------------------------------------------------------------------
  # * Get Battle Background Music
  #--------------------------------------------------------------------------
  def battle_bgm
    if @battle_bgm == nil
      return $data_system.battle_bgm
    else
      return @battle_bgm
    end
  end
  #--------------------------------------------------------------------------
  # * Set Battle Background Music
  #     battle_bgm : new battle background music
  #--------------------------------------------------------------------------
  def battle_bgm=(battle_bgm)
    @battle_bgm = battle_bgm
  end
  #--------------------------------------------------------------------------
  # * Get Background Music for Battle Ending
  #--------------------------------------------------------------------------
  def battle_end_me
    if @battle_end_me == nil
      return $data_system.battle_end_me
    else
      return @battle_end_me
    end
  end
  #--------------------------------------------------------------------------
  # * Set Background Music for Battle Ending
  #     battle_end_me : new battle ending background music
  #--------------------------------------------------------------------------
  def battle_end_me=(battle_end_me)
    @battle_end_me = battle_end_me
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    # reduce timer by 1
    if @timer_working and @timer > 0
      @timer -= 1
    end
  end
end
 
[/rgss]

If you do it in the last way you can change the default color from within the game, using this script call command:
[rgss]$game_system.default_color = Color.new(red,blue,green,alpha)
[/rgss]
 
Let me explain the arrows a bit more in-depth, and why it'd be unclever to just get rid of them without a replacement for their functionality...

First of all, Ares had it basically right: Those arrows are displayed on a window which contents exceed it's width and height minus border space (which I think was 20px on each side for XP). Meaning, if you have a window with a width of 400, and contents with a width of 400, 40px will actually be not in the window. The Window class displays an arrow on the corresponding side (here: right) to indicate that.
Now, this isn't a purely superficial feature to debug scripted windows, on the contrary. Think Window_Selectable, which you can set to only display a certain number of items at the same time, using @window.height - this also triggers arrows on the top and bottom, depending on if you can still scroll in that direction, which is a vital indicator for your players, as while you're familiar of what items should be in what windows at which time, they are not and might as well miss somethign very important because they think what they see is all that's there.

As far as I'm aware, the area in the center of the arrows isn't used (however, of course, you can define a use for that yourself).
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top