Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - Fantasist

1
Electronic and Computer Section / Samsung Galaxy S3
June 03, 2012, 09:23:05 am
So who's planning to get one?
2
Welcome! / Life got real.
May 11, 2012, 06:30:11 pm
Howdy! Good morning, good afternoon, good evening!

So here I am again, letting you gals and guys know that I'm still alive :D "But wait", you ask. "Where have you been?" Well, long story short, I got a job. And being the introverted recluse I've been the last couple of years, being thrown into an environment where I am forced to interact with people on a daily basis is taking it's toll on me. Good news is, I'm discovering new things about me that I never even considered possible. For instance, it turns I am actually talkative. I'm faring MUCH better in a team (and the general public) than I ever thought I could.

The time before I got a job was one of the toughest times of my life. I was overwhelmed with self-doubt, a sense of worthlessness. The grim clouds of depression were always upon me. But it gave me a chance to introspect. I've realized that I was taking everything way too seriously. I stressed out a lot because I held on to trivial things. I resisted change, and thus a chance to make myself better, to grow as a person. I've even felt it, like I was somehow... "stuck". But when push came to shove, I managed to do just fine. I always avoided challenges, but I out-performed myself when I was forced into one. I experienced first hand how stress can be a good thing should we decide to work with it rather than against it. Life, in all it's glory, has forced me out of a bottleneck, and now I'm finally on the other side... 2012, I believe, doesn't signify the end of the world. It signifies the end of an era. And beyond lie the waves of great change. Even with all the shit that I'm having to deal with, life never looked so promising to me. And you guys are a part of inspiring that feeling.

Since I started to work, I realized that my time on Chaos Project has been very fruitful. I've learned a lot from you guys (a shoutout to you Blizzard, for being my inspiration! :) ), and I am not just talking about coding. I may have been inactive for a long time, and it'll probably be like this for a while, but I'll always be here in spirit. For me, Chaos Project isn't just an online forum. For me, it's an important part of my life and a part of who I am. So yeah. You guys are awesome!  :buddy:

BTW, Tino's (Subsonic_Noise) music has gotten me through some stressed out times. Pretty neat stuff, bro. I love your style :) Let's hope we hear more of KSCIAA in the future :D


PS: GOD, how I miss the smileys here!
:rockit: :dance: :w00t: :beer: :wong:
3
Chat / Bash Ignorance
November 22, 2011, 04:49:48 am
Quote from: BlizzardCasual gamers are basically idiots. And I don't even mean that in a bad way.

They are honestly just plain stupid, aren't they? Tell me about it. I remember years ago when I showed my friend Chaos Project Final Demo. He didn't even have an idea of what was going on, basically had no idea of what an RPG was. I thought the battle scene will be sure to impress him, so I showed him. He asked me: What? Where is the battle?" I said: "You see, you get turns. This is how you select your commands, and when you're done, damage is dealt, like so." He literally burst out laughing. "You call this battle? I was expecting something like Mortal Kombat."
Then there was this other guy. I showed him Chrono Trigger and he said: "So what, those little dolls are people? Seriously man, how can you play something like this? It doesn't make sense".
Then there was one more guy. He apparently completed both the Mass Effect games, but when I asked what alignment he had chosen, Paragon or Renegade, he was like "Um, what?" :facepalm:
The list goes on and on >_<

EDIT: They aren't necessarily stupid. I was letting out some steam, sorry about that :^_^':

Note: This topic was split off another one.
4
Do any of you have this keyboard? The MS Sidewinder X4? I've done a lot of research and decided this is as good as I can get for what I'm willing to spend. My only complaint is the nondetachable arm rest. I use that space on my desk for keeping other things. I'm still going to buy it, of course, unless any of you give me a good reason not to. I'm also curious about the longevity. If you have it, how long have you had it and how is it performing now? What's your over all impression on this keyboard?

EDIT: Right now, I'm using a white version of this keyboard. It served me for 7 years and now the 1 key on the numpad is showing slight signs of old age. God bless mechanical keyboards! xD
5
Well folks, hello! In my days working with RMXP, I have made several scripts for experimentation or for my own use, which I never posted here. Since I'm done with RGSS for now, I decided I will share them all here :D

Note that this is and will be an informal topic, and I don't plan on using the script submission format just yet. I just want to share all my work so that others can learn/adapt/improve upon them. When I feel like completing these scripts with final touches and documentation, I may post respective topics for each script.

One more note: this is not my complete collection. I have more scripts in my archives (like my version of a Message System, individual menu scenes for Status and Items, and others I don't even remember). I'll post them when I find them, okay?

Caution: These scripts were not meant to be released. Even if they were, they were not released because they were not tested extensively. So expect incompatibility issues, corrupted savegames or random problems if you plan on using these in your game. A simple rule of thumb is, scripts with script headers are less prone to problems. But in any case, some of these scripts will corrupt old save games, so be careful! Now enough talk, let's get down to the good stuff!



1. Dynamic Battle Help

This script makes better use of the help window during battle. This can be useful when special command windows are used instead of the command window in battle, where text is not displayed (like Icon commands, Ring commands, etc). This is inspired partly by Blizzard's Chaos Project and partly by my all-time favorite RPG: Chrono Trigger :D
Configuration instructions are in the script header.

Dynamic Battle Help: ShowHide

#=====================================================================================================================
# ** Dynamic Battle Help
#---------------------------------------------------------------------------------------------------------------------
# by Fantasist
# Version 1.0
# 16-Mar-2008
#---------------------------------------------------------------------------------------------------------------------
# Version History:
#
#   1.0 - First public version
#---------------------------------------------------------------------------------------------------------------------
# Description:
#       This script makes better use of the help window during battle. This can be useful
#     when special command windows are used instead of the command window in battle,
#     where text is not displayed (like Icon commands, Ring commands, etc).
#
#     Features:
#      - Displays every selectable command (Fight, Escape, Attack, Skill, Defend, Item)
#      - Can display differently than the actual command ("Use Item" when 'Item' is selected)
#      - Displays actions performed during battle (attacking, defending, skill casting, item using,
#           enemy fleeing and victory)
#      - Instead of just "Attack" or "Arshes attacks", you can chose to display the weapon name
#           ("Attack with Bronze Sword", "Arshes attacks with Bronze Sword"
#           And when no weapon is equipped: "Arshes attacks without weapon)
#      - During battle, the help window can use a solid colored background  instead of
#           the windowskin to make it look professional (the color and opacity are customizable)
#
#---------------------------------------------------------------------------------------------------------------------
# Compatibility:
#     20% chance of problems with other battle scripts.
#   Made to work with Unique Skill Commands addon from Tons and Addons.
#---------------------------------------------------------------------------------------------------------------------
# Installation: Place anywhere above 'Main' and below 'Scene Battle 4'.

# Configuration:

module FTSCFG
#============================================================
# Config Start
#============================================================

  # NOTE: Setting everything with "_Words" to 'nil' will use the default words you set in the database.
  #             Remember that this is the text displayed in the help window, not the command windows.
 
 
  # Party Command text (Fight, Escape window)
  DBH_Fight_Words = 'Engage opponents' # Text to display when 'Fight' is selected
  DBH_Escape_Words = 'Abscond battle'  # Text to display when 'Escape' is selected
 
  # Actor Command text (Attack, Skill, Defend, Item)
 
  DBH_Attack_Weapon = true # Whether to display "with <weapon>" / "without weapon"
 
  DBH_Attack_Words = nil # Text to display when 'Attack' is selected
  DBH_Skill_Words = nil # Text to display when 'Skill' is selected (Unique Skill Commands
                                       #  overrides this setting)
  DBH_Defend_Words = nil # Text to display when 'Defend' is selected
  DBH_Item_Words = nil # Text to display when 'Item' is selected
 
  DBH_Victory_Words = 'Victory!' # Text to display when battle is won
 
  # Help window tweaks
  DBH_Help_Always_Visible = false  # Whether the help window ALWAYS stays visible
  DBH_BG_Mod = false   # Whether a solid background is used instead of the windowskin
  DBH_BG_Color = Color.new(0, 0, 0, 128)  # Color of the solid background (applies for above)
                                                               #  Syntax: Color.new(RED, GREEN, BLUE, OPACITY)
 
#============================================================
# Config End
#============================================================
end
#---------------------------------------------------------------------------------------------------------------------
# Issues: None discovered yet.
#---------------------------------------------------------------------------------------------------------------------
# Credits: Fantasist, for making
# Thanks: Chaos Project (Game) for the inspiration
#---------------------------------------------------------------------------------------------------------------------
# Notes: If you have any problems, questions or suggestions, you can find me here:
#
#  www.quantumcore.forumotion.com
#  www.chaos-project.com/forums
#
#  Enjoy ^_^
#=====================================================================================================================

#=============================================================================
# ** Scene_Battle
#=============================================================================

class Scene_Battle
 
  # Part 1 - This disables the hiding of help window while chosing actions, to prevent flickering.
 
  alias fant_battle_help_mod_start_phase1 start_phase1
  def start_phase1
    @help_window.visible = true
    fant_battle_help_mod_start_phase1
  end
 
  alias fant_battle_help_mod_end_enemy_select end_enemy_select
  def end_enemy_select
    fant_battle_help_mod_end_enemy_select
    @help_window.visible = true
  end
 
  alias fant_battle_help_mod_end_skill_select end_skill_select
  def end_skill_select
    fant_battle_help_mod_end_skill_select
    @help_window.visible = true
  end
 
  alias fant_battle_help_mod_end_item_select end_item_select
  def end_item_select
    fant_battle_help_mod_end_item_select
    @help_window.visible = true
  end
 
  # Part 2 - This updates the help text accordingly when needed.
 
  alias fant_battle_help_mod_update_phase2 update_phase2
  def update_phase2
    txt = case @party_command_window.index
    when 0
      FTSCFG::DBH_Fight_Words ? FTSCFG::DBH_Fight_Words : (@party_command_window.commands[0] rescue 'Fight')
    when 1
      FTSCFG::DBH_Escape_Words ? FTSCFG::DBH_Escape_Words : (@party_command_window.commands[1] rescue 'Escape')
    end
    @help_window.set_text(txt, 1)
    fant_battle_help_mod_update_phase2
  end
 
  alias fant_battle_help_mod_update_phase3_basic_cmd update_phase3_basic_command
  def update_phase3_basic_command
    txt = case @actor_command_window.index
    when 0
      wpn = FTSCFG::DBH_Attack_Weapon ? (" with #{$data_weapons[@active_battler.weapon_id].name}" rescue
      ' without weapon') : ''
      ((FTSCFG::DBH_Attack_Words ? (FTSCFG::DBH_Attack_Words) : (@actor_command_window.commands[0] rescue
      'Attack')) + wpn)
    when 1
      if $tons_version && $game_system.UNIQUE_SKILL_COMMANDS
        (@actor_command_window.commands[1] rescue (FTSCFG::DBH_Skill_Words ? FTSCFG::DBH_Skill_Words : 'Skill'))
      else
        (FTSCFG::DBH_Skill_Words ? FTSCFG::DBH_Skill_Words : (@actor_command_window.commands[1] rescue 'Skill'))
      end
    when 2
      FTSCFG::DBH_Defend_Words ? FTSCFG::DBH_Defend_Words : (@actor_command_window.commands[2] rescue 'Defend')
    when 3
      FTSCFG::DBH_Item_Words ? FTSCFG::DBH_Item_Words : (@actor_command_window.commands[3] rescue 'Item')
    end
    @help_window.set_text(txt, 1)
    fant_battle_help_mod_update_phase3_basic_cmd
  end
 
  alias fant_battle_help_mod_start_phase5 start_phase5
  def start_phase5
    @help_window.set_text(FTSCFG::DBH_Victory_Words, 1)
    fant_battle_help_mod_start_phase5
  end
 
  alias fant_battle_help_mod_make_basic_action_result make_basic_action_result
  def make_basic_action_result
    fant_battle_help_mod_make_basic_action_result
    if @active_battler.current_action.basic == 0
      txt = "#{@active_battler.name} attacks" + ((@active_battler.is_a?(Game_Enemy) ||
      !FTSCFG::DBH_Attack_Weapon) ? '' :
      (" with #{$data_weapons[@active_battler.weapon_id].name}" rescue ' without weapon'))
      @help_window.set_text(txt, 1)
    elsif @active_battler.current_action.basic == 1
      @help_window.set_text("#{@active_battler.name} defends", 1)
    elsif @active_battler.is_a?(Game_Enemy) && @active_battler.current_action.basic == 2
      @help_window.set_text("#{@active_battler.name} fled", 1)
    end
  end
 
  alias fant_battle_help_mod_make_skill_action_result make_skill_action_result
  def make_skill_action_result
    fant_battle_help_mod_make_skill_action_result
    @help_window.set_text("#{@active_battler.name} performs #{@skill.name}", 1)
  end
 
  alias fant_battle_help_mod_make_item_action_result make_item_action_result
  def make_item_action_result
    fant_battle_help_mod_make_item_action_result
    @help_window.set_text("#{@active_battler.name} uses #{@item.name}", 1)
  end
 
end

#=============================================================================
# ** Window_Help
#=============================================================================

class Window_Help
 
  alias fant_battle_help_mod_help_win_init initialize
  def initialize
    fant_battle_help_mod_help_win_init
    if $scene.is_a?(Scene_Battle) && FTSCFG::DBH_BG_Mod
      self.y -= 8
      self.opacity = 0
      bmp = Bitmap.new(640-16, 32)
      bmp.fill_rect(0, 0, 640-16, 32, FTSCFG::DBH_BG_Color)
      @bg = Sprite.new
      @bg.x, @bg.y, @bg.z = self.x + 8, self.y + 16, self.z + 1
      @bg.bitmap = bmp
    end
  end
 
  def visible=(val)
    super(val)
    if $scene.is_a?(Scene_Battle) && !FTSCFG::DBH_BG_Mod
      val = FTSCFG::DBH_Help_Always_Visible unless val
      super(val)
    end
    if @bg
      val = FTSCFG::DBH_Help_Always_Visible unless val
      @bg.visible = val
    end
  end
 
  alias fant_battle_help_mod_help_win_dispose dispose
  def dispose
    fant_battle_help_mod_help_win_dispose
    if @bg != nil
      @bg.bitmap.dispose
      @bg.dispose
    end
  end
 
end

#=============================================================================
# ** Window_Command
#=============================================================================

class Window_Command
  attr_accessor :commands
end

#=============================================================================
# ** Window_PartyCommand
#=============================================================================
class Window_PartyCommand
 
  alias fant_battle_help_mod_win_party_init initialize
  def initialize
    fant_battle_help_mod_win_party_init
    self.y = 64
  end
 
end




2. Enhanced Equip Scene

Remember my script "Enhanced Shop Status"? I made this along similar lines: to replace the default equip scene of RMXP. The layout is inspired by RPG Advocate's mod, but I believe this is more efficient. At any rate, it's much more efficient than the crummy default equip scene ;)

Instructions:

Set ELEM_ICONS to "true" to enable icons for elemental change display. Name the icon files like "elem_<name of element as specified in the database>". (for the element "White Fire", the icon should be named "elem_White Fire").

Set STATUS_ICONS to "true" to enable icons for status change display. Name the icon files like "stat_<name of status as specified in the database>". (for the status "Sleep", the icon should be named "stat_Sleep").

Enhanced Equip Scene: ShowHide

#=============================================================================
# ** CMS
#=============================================================================

module CMS
 
  ELEM_ICONS = false
  STATUS_ICONS = false
 
end

#=============================================================================
# ** Window_Base
#=============================================================================

class Window_Base
 
  def up_color
    return Color.new(64, 255, 64)
  end
 
  def down_color
    return Color.new(255, 64, 64)
  end
 
end

#=============================================================================
# ** Game_Actor
#=============================================================================

class Game_Actor < Game_Battler
 
  def get_stats
    return [maxhp, maxsp, atk, pdef, mdef, str, dex, agi, int, eva]
  end
 
end

#==============================================================================
# ** Window_EquipLeft
#==============================================================================

class Window_EquipLeft < Window_Base
 
  attr_accessor :mode
  def initialize(actor)
    super(0, 64, 272, 416)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.contents.font.size = 22
    @actor, mode = actor, 0
    @new_stats = [nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil]
    refresh
  end
 
  def refresh
    self.contents.clear
    self.contents.blt(4, 0, RPG::Cache.character(@actor.character_name,
    @actor.character_hue), Rect.new(0, 0, 32, 32))
    draw_actor_name(@actor, 40, 0)
    draw_actor_level(@actor, 180, 0)
    (@new_stats.size - 1).times {|i| draw_actor_parameter(@actor, 4, 32 + i * 24, i)}
    old_stats = @actor.get_stats
    @new_stats.each_with_index {|stat, i| next unless stat.is_a?(Numeric)
    self.contents.font.color = system_color
    self.contents.draw_text(160,  32 + i * 24, 40, 24, '» »', 1)
    color = old_stats[i] > stat ? down_color : old_stats[i] < stat ? up_color : normal_color
    self.contents.font.color = color
    self.contents.draw_text(200, 32 + i * 24, 36, 24, stat.to_s, 2)}
    txt = @mode == 0 ? 'Elemental Affinity:' : 'Elemental Resistance:'
    self.contents.draw_text(4, 280, self.width - 32, 24, txt)
    txt = @mode == 0 ? 'Status Infliction:' : 'Status Resistance'
    self.contents.draw_text(4, 332, self.width - 32, 24, txt)
    draw_elemental_change(@new_stats[10])
    draw_status_change(@new_stats[10])
  end
 
  def set_new_parameters(array=nil)
    return if array == @new_stats
    if array == nil
      @new_stats = [nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil]
    else
      array.each_with_index {|nstat, i| next if nstat == @new_stats[i]
      @new_stats[i] = nstat}
    end
    refresh
  end
 
  def draw_elemental_change(item=nil)
    return if item == nil
    ary = []
    if item.is_a?(RPG::Weapon)
      item.element_set.each {|i| ary.push($data_system.elements[i])}
    else
      item.guard_element_set.each {|i| ary.push($data_system.elements[i])}
    end
    return unless ary.size > 0
    ary.delete_at(ary.size - 1) while ary.size > 8
    if CMS::ELEM_ICONS
      ary.each_with_index {|str, i| x = 4 + i * 28
      icon =  RPG::Cache.icon('elem_' + str)
      self.contents.blt(x, 308, icon, icon.rect)}
    else # Text
      self.contents.font.color, txt = system_color, ''
      ary.each_with_index {|str, i| txt += str; txt += ', ' unless i == ary.size - 1}
      self.contents.draw_text(4, 308, self.width - 32, 24, txt)
    end
  end
 
  def draw_status_change(item=nil)
    return if item == nil
    ary = []
    if item.is_a?(RPG::Weapon)
      item.plus_state_set.each {|i| ary.push($data_states[i].name)}
    else
      item.guard_state_set.each {|i| ary.push($data_states[i].name)}
    end
    return unless ary.size > 0
    ary.delete_at(ary.size - 1) while ary.size > 8
    if CMS::STATUS_ICONS
      ary.each_with_index {|str, i| x = 4 + i * 28
      icon =  RPG::Cache.icon('stat_' + str)
      self.contents.blt(x, 356, icon, icon.rect)}
    else # Text
      self.contents.font.color, txt = system_color, ''
      ary.each_with_index {|str, i| txt += str; txt += ', ' unless i == ary.size - 1}
      self.contents.draw_text(4, 356, self.width - 32, 24, txt)
    end
  end
 
  def draw_actor_parameter(actor, x, y, type)
    case type
    when 0
      txt, val = 'max '+$data_system.words.hp, actor.maxhp
    when 1
      txt, val = 'max '+$data_system.words.sp, actor.maxsp
    when 2
      txt, val = $data_system.words.atk, actor.atk
    when 3
      txt, val = $data_system.words.pdef, actor.pdef
    when 4
      txt, val = $data_system.words.mdef, actor.mdef
    when 5
      txt, val = $data_system.words.str, actor.str
    when 6
      txt, val = $data_system.words.dex, actor.dex
    when 7
      txt, val = $data_system.words.agi, actor.agi
    when 8
      txt, val = $data_system.words.int, actor.int
    when 9
      txt, val = 'Evasion', actor.eva
    end
    self.contents.font.color = system_color
    self.contents.draw_text(x, y, 120, 24, txt)
    self.contents.font.color = normal_color
    self.contents.draw_text(x + 120, y, 36, 24, val.to_s, 2)
  end
 
end

#==============================================================================
# ** Window_EquipItem
#==============================================================================

class Window_EquipItem < Window_Selectable
 
  def initialize(actor, equip_type)
    super(272, 256, 368, 224)
    @actor, @equip_type, @column_max = actor, equip_type, 1
    refresh
    self.active, self.index = false, -1
  end
 
  def item
    return @data[self.index]
  end
 
  def refresh
    if self.contents != nil
      self.contents.dispose
      self.contents = nil
    end
    @data = []
    if @equip_type == 0
      weapon_set = $data_classes[@actor.class_id].weapon_set
      for i in 1...$data_weapons.size
        if $game_party.weapon_number(i) > 0 && weapon_set.include?(i)
          @data.push($data_weapons[i])
        end
      end
    end
    if @equip_type != 0
      armor_set = $data_classes[@actor.class_id].armor_set
      for i in 1...$data_armors.size
        if $game_party.armor_number(i) > 0 && armor_set.include?(i)
          if $data_armors[i].kind == @equip_type-1
            @data.push($data_armors[i])
          end
        end
      end
    end
    @data.push(nil)
    @item_max = @data.size
    self.contents = Bitmap.new(width - 32, row_max * 32)
    for i in 0...@item_max-1
      draw_item(i)
    end
    h = @data.size - 1
    self.contents.draw_text(4, h * 32, self.width - 32, 32, '[Remove]')
  end
 
  def draw_item(index)
    item = @data[index]
    x = 4 + index % 2 * (288 + 32)
    y = index / 2 * 32
    case item
    when RPG::Weapon
      number = $game_party.weapon_number(item.id)
    when RPG::Armor
      number = $game_party.armor_number(item.id)
    end
    bitmap = RPG::Cache.icon(item.icon_name)
    self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24))
    self.contents.font.color = normal_color
    self.contents.draw_text(x + 28, y, 212, 32, item.name, 0)
    self.contents.draw_text(x + 240, y, 16, 32, ':', 1)
    self.contents.draw_text(x + 256, y, 24, 32, number.to_s, 2)
  end
 
  def update_help
    @help_window.set_text(self.item == nil ? '' : self.item.description)
  end
 
end

#==============================================================================
# ** Scene_Equip
#==============================================================================

class Scene_Equip
 
  def initialize(actor_index = 0, equip_index = 0)
    @actor_index, @equip_index = actor_index, equip_index
  end
 
  def main
    @actor = $game_party.actors[@actor_index]
    @help_window = Window_Help.new
    @left_window = Window_EquipLeft.new(@actor)
    @right_window = Window_EquipRight.new(@actor)
    @item_windows = []
    5.times {|i| @item_windows.push(Window_EquipItem.new(@actor, i))}
    @right_window.help_window = @help_window
    @item_windows.each {|win| win.help_window = @help_window}
    @right_window.index = @equip_index
    update_equip_type
    @left_window.set_new_parameters(nil)
    Graphics.transition
    loop do
      Graphics.update
      Input.update
      update
      break if $scene != self
    end
    Graphics.freeze
    @help_window.dispose
    @left_window.dispose
    @right_window.dispose
    @item_windows.each {|win| win.dispose}
  end
 
  def update
    @left_window.update
    @right_window.update
    @item_window.update
    if @right_window.active
      update_right
      return
    end
    if @item_window.active
      update_item
      return
    end
  end
 
  def update_right
    if Input.repeat?(Input::UP) || Input.repeat?(Input::DOWN)
      update_equip_type
      @left_window.refresh
    end
    if Input.trigger?(Input::B)
      $game_system.se_play($data_system.cancel_se)
      $scene = Scene_Menu.new(2)
      return
    end
    if Input.trigger?(Input::C)
      if @actor.equip_fix?(@right_window.index)
        $game_system.se_play($data_system.buzzer_se)
        return
      end
      $game_system.se_play($data_system.decision_se)
      @right_window.active = false
      @item_window.active = true
      @item_window.index = 0
      compare_stats
      return
    end
    if Input.trigger?(Input::R)
      $game_system.se_play($data_system.cursor_se)
      @actor_index += 1
      @actor_index %= $game_party.actors.size
      $scene = Scene_Equip.new(@actor_index, @right_window.index)
      return
    end
    if Input.trigger?(Input::L)
      $game_system.se_play($data_system.cursor_se)
      @actor_index += $game_party.actors.size - 1
      @actor_index %= $game_party.actors.size
      $scene = Scene_Equip.new(@actor_index, @right_window.index)
      return
    end
  end
 
  def update_item
    if Input.repeat?(Input::UP) || Input.repeat?(Input::DOWN) ||
      Input.repeat?(Input::L) || Input.repeat?(Input::R)
      compare_stats
    end
    if Input.trigger?(Input::B)
      $game_system.se_play($data_system.cancel_se)
      @right_window.active = true
      @item_window.active = false
      @item_window.index = -1
      @left_window.set_new_parameters(nil)
      return
    end
    if Input.trigger?(Input::C)
      $game_system.se_play($data_system.equip_se)
      item = @item_window.item
      @actor.equip(@right_window.index, item == nil ? 0 : item.id)
      @right_window.active = true
      @item_window.active = false
      @item_window.index = -1
      @right_window.refresh
      @item_window.refresh
      @left_window.set_new_parameters(nil)
      return
    end
  end
 
  def update_equip_type
    @item_windows.each {|win| win.visible = false}
    @item_windows[@right_window.index].visible = true
    @item_window = @item_windows[@right_window.index]
    @left_window.mode = @right_window.index == 0 ? 0 : 1
  end
 
  def compare_stats
    item1 = @right_window.item
    item2 = @item_window.item
    last_hp = @actor.hp
    last_sp = @actor.sp
    @actor.equip(@right_window.index, item2 == nil ? 0 : item2.id)
    new_stats = @actor.get_stats.clone
    new_stats.push(item2)
    @actor.equip(@right_window.index, item1 == nil ? 0 : item1.id)
    @actor.hp = last_hp
    @actor.sp = last_sp
    @left_window.set_new_parameters(new_stats)
  end
 
end




3. Ring Command

A rotating ring with pictures, can be used as a command window :D Instructions and settings found in the script. I actually made better versions, but I lost them in my archives... But this is functional :)

Ring Command: ShowHide

#============================================================================
# ** Ring Command
#------------------------------------------------------------------------------------------------------------------------
# by Fantasist
# Version 1.0
# 13-Mar-2008
#------------------------------------------------------------------------------------------------------------------------
# Version History:
#
#   1.0 - First functional version
#------------------------------------------------------------------------------------------------------------------------
# Description:
#   A rotating ring with pictures, can be used as a command window.
#------------------------------------------------------------------------------------------------------------------------
# Compatibility:
#   No compatibility issues
#------------------------------------------------------------------------------------------------------------------------
# Instructions/Configuration:
#
#   Scroll down a bit and you'll find 'Frames' and 'Depth'.
#   Frames - The speed of rotation. Larger numbers means slower movement.
#   Depth - The 'tilt' factor of the ring, or how elliptical the ring looks. 1 means a circle.
#               Larger numbers means more elliptical. Remember that the zooming of the icons
#               is not made to look real, but to fit the regular usage. If you use 1 for depth, the
#               zoom is disabled, to make th ring look like a circle.
#------------------------------------------------------------------------------------------------------------------------
# Issues: None
#------------------------------------------------------------------------------------------------------------------------
# Credits: Fantasist for making this
# Thanks: Chaos Project (Game) for inspiration
#------------------------------------------------------------------------------------------------------------------------
# Notes: Enjoy ^_^
#============================================================================


#=============================================================================
# ** Icon_Ring
#=============================================================================

class Icon_Ring < RPG::Sprite
 
  Icon_BG = 'IconBGCP'  # Background to be used behind all ring icons (optional)
  Icon_Disable = 'IconDisableCP'   # Icon overlay for 'disabled' options (optional, but there's no
                                                  # other way to show a disabled icon for now
 
  def initialize(item, disabled=false)
    super()
    @item = item
    self.bitmap = make_bmp(item, disabled)
    self.ox, self.oy = self.bitmap.width / 2, self.bitmap.height / 2
  end
 
  def make_bmp(item, disabled=false)
    bmp = RPG::Cache.icon(Icon_BG).clone rescue Bitmap.new(32, 32)
    # Draw item
    if item.is_a?(Numeric)
      bmp.draw_text(0, 0, bmp.width, bmp.height, item.to_s, 1)
    elsif item.is_a?(String)
      bmp.draw_text(0, 0, bmp.width, bmp.height, item, 1)
    elsif item.is_a?(Bitmap)
      bmp.blt(bmp.width/2 - item.rect.width/2, bmp.height/2 - item.rect.height/2, item, item.rect)
    end
    # Draw X
    disable if disabled
    bmp
  end
 
  def disable
    bmp = self.bitmap
    x = RPG::Cache.icon(Icon_Disable) rescue Bitmap.new(32, 32)
    bmp.blt(bmp.width/2 - x.rect.width/2, bmp.height/2 - x.rect.height/2, x, x.rect)
    self.bitmap = bmp
  end
 
  def enable
    self.bitmap = make_bmp(@item)
  end
 
end

#=============================================================================
# ** Ring_Command
#=============================================================================

class Ring_Command < Sprite
 
  Frames = 6 # Movement Speed. Larger number means slower movement
  Depth = 6 # Depth of the ring, meaning the 'tilt' factor.
 
  attr_reader :index
  attr_accessor :active
  attr_reader :radius
  attr_reader :cmds
  attr_reader :unit_angle
 
  #dummy values for window compatibility
  attr_accessor :windowskin, :contents, :stretch, :cursor_rect, :pause, :back_opacity, :contents_opacity
 
  def initialize(x=320, y=240, r=200, cmds=15, win_w=0, win_h=0)
    super()
    set_icons(cmds)
    @unit_angle = 360.0/@cmds.size
    @win_offset = [win_w/2, win_h]
    self.radius, self.x, self.y = r, x, y
    self.index = 0
    self.active = true
  end
 
  def set_icons(cmds)
    #dispose previous icons
    if @cmds != nil
      @cmds.each {|sp|
      sp.bitmap.dispose
      sp.dispose}
    end
    #make icons
    @cmds = []
    unless cmds.is_a?(Array)
      (1..cmds).each {|i| @cmds.push(Icon_Ring.new(i))}
    else
      cmds.each {|item| @cmds.push(Icon_Ring.new(item))}
    end
  end
 
  def set_items(ang=self.angle)
    @cmds.each_index {|i|
    @cmds[i].blink_off
    @cmds[i].x = self.x + self.radius * sin(ang + @unit_angle * i)
    @cmds[i].y = self.y + self.radius/Depth * cos(ang + @unit_angle * i)
    @cmds[i].z = self.z + @cmds[i].y
    unless Depth == 1
      zoom = 0.8 + 0.2 * (@cmds[i].y - (self.y-self.radius/Depth)).to_f / (2*self.radius/Depth)
      @cmds[i].zoom_x = @cmds[i].zoom_y = zoom
    end
    }
  end
 
  def move(dir=0)
    ang = (@unit_angle / Frames)
    Frames.times {
    self.angle += (dir == 0 ? ang : -ang)
    self.angle -= 360 if self.angle > 360.0
    self.angle += 360 if self.angle < -360.0
    set_items
    Graphics.update}
  end
 
  def update
    if self.active
      @cmds[@index].update
      @cmds[@index].blink_on
      if Input.repeat?(Input::RIGHT)
        $game_system.se_play($data_system.cursor_se)
        move(1)
        @index = (@index + 1) % @cmds.size
      elsif Input.repeat?(Input::LEFT)
        $game_system.se_play($data_system.cursor_se)
        move(0)
        @index = (@index - 1) % @cmds.size
      end
    end
  end
 
  def disable_item(index)
    @cmds[index].disable
  end
 
  def sin(val)
    Math.sin(Math::PI*val/180)
  end
 
  def cos(val)
    Math.cos(Math::PI*val/180)
  end
 
  def dispose
    super
    @cmds.each {|sp|
    sp.bitmap.dispose
    sp.dispose}
  end
 
  def visible=(val)
    super(val)
    @cmds.each {|sp| sp.visible = val}
  end
 
  def index=(i)
    @index = i
    self.angle = i * @unit_angle
    set_items
  end
 
  def radius=(r)
    @radius = r
    set_items
  end
 
  def cmds=(cmds)
    #dispose previous icons
    if @cmds != nil
      @cmds.each {|sp|
      sp.bitmap.dispose
      sp.dispose}
    end
    @cmds = cmds
    @unit_angle = 360.0/@cmds.size
    self.angle = 0
    self.index = 0
  end
   
 
  def x=(x)
    super(x+@win_offset[0])
    set_items
  end
 
  def y=(y)
    super(y+@win_offset[1])
    set_items
  end
 
end

Icons (necessary!): ShowHide

Put these icons in the Icons folder:

(Just an extra)
(rename to "IconBGCP")
(rename to "IconDisableCP")




3a. Ring Command Replacement for Battle Scene

And here is an addon that allows you to replace the command window in the battle scene :D

Battle Ring Command Addon: ShowHide

#============================================================================
# ** Ring Command Replacement for Battle Scene
#------------------------------------------------------------------------------------------------------------------------
# by Fantasist
# Version 1.0
# 13-Mar-2008
#------------------------------------------------------------------------------------------------------------------------
# Version History:
#
#   1.0 - First functional version
#------------------------------------------------------------------------------------------------------------------------
# Description:
#   Replaces the actor command windows with the Ring command. As an added feature,
#   the icon of the actor's weapon is used for the attack icon (sword, mace, etc). If no weapon is
#   equipped, the default icon is used. This is a feature from the game Chaos Project.
#   The icons can be configured.
#------------------------------------------------------------------------------------------------------------------------
# Compatibility:
#   No compatibility issues
#------------------------------------------------------------------------------------------------------------------------
# Instructions/Configuration:
#------------------------------------------------------------------------------------------------------------------------
# Issues: None
#------------------------------------------------------------------------------------------------------------------------
# Credits: Fantasist for making this
# Thanks: Chaos Project (Game) for inspiration
#------------------------------------------------------------------------------------------------------------------------
# Notes: Enjoy ^_^
#============================================================================

#=============================================================================
# ** Scene_Battle
#=============================================================================

class Scene_Battle
 
  Ring_Y = 160
  Ring_Radius = 64
 
  Fight = '001-Weapon01'
  Escape = '020-Accessory05'
 
  Attack = '001-Weapon01'
  Defend = '009-Shield01'
  Skill = '044-Skill01'
  Item = '032-Item01'
 
  alias fant_party_cmd_ring_start_phase1 start_phase1
  def start_phase1
    if @party_command_window.is_a?(Window_PartyCommand)
      @party_command_window.dispose
      fight = RPG::Cache.icon(Fight)
      escape = RPG::Cache.icon(Escape)
      @party_command_window = Ring_Command.new(320, 128, 64, [fight, escape])
    end
    if @actor_command_window.is_a?(Window_Command)
      @actor_command_window.dispose
      wpn = RPG::Cache.icon($data_weapons[@active_battler.weapon_id].icon_name) rescue
        RPG::Cache.icon(Attack)
      skl = RPG::Cache.icon(Skill)
      dfn = RPG::Cache.icon(Defend)
      itm = RPG::Cache.icon(Item)
      cmds = [wpn, skl, dfn, itm]
      @actor_command_window = Ring_Command.new(0, Ring_Y, Ring_Radius, cmds, 160, 80)
    @actor_command_window.visible = false
    end
    fant_party_cmd_ring_start_phase1
  end
 
  alias fant_weapon_icon_ring phase3_setup_command_window
  def phase3_setup_command_window
    @actor_command_window.visible = false
    wpn = RPG::Cache.icon($data_weapons[@active_battler.weapon_id].icon_name) rescue
      RPG::Cache.icon(Attack)
    @actor_command_window.cmds[0].bitmap.dispose
    @actor_command_window.cmds[0].dispose
    @actor_command_window.cmds[0] = Icon_Ring.new(wpn)
    fant_weapon_icon_ring
  end
 
end


Here's a demo using the ring command in battle with the dynamic battle help script. Though it's just the DBS, it looks a lot like CP battle system ;)
Demo (287.15 KB)



4. Repeat Battle Actions

Adds Repeat, Attack and Defend functions to Party Command Window. More info in script header. This is made for the default battle system. This will corrupt old save games!

Repeat Battle Actions: ShowHide

#============================================================================
# ** Repeat Battle Actions
#------------------------------------------------------------------------------------------------------------------------
# by Fantasist
# Version 1.1
# 17-Apr-2008
#------------------------------------------------------------------------------------------------------------------------
# Version History:
#
#   0.1 - First alpha version
#   0.2 - Added support for default action
#   0.3 - Added Status Window Mod (for default status screen)
#   0.4 - Added fail-safe actions
#   1.0 - Optimized code and added some options
#   1.1 - Fixed a bug in Status Config
#------------------------------------------------------------------------------------------------------------------------
# Description:
#     Adds Repeat, Attack and Defend functions to Party Command Window.
#   Repeat - Repeats previous actions
#   Attack - All actors attack
#   Defend - All actors defend
#
# Features:
#  - Make actors Repeat their previous actions, or make them all attack or defend
#  - Config addon for default status screen
#  - Memorize option in the status config saves the last action with the savefile, and is
#    globally remembered
#  - Fail-safe actions - performs default action if previous action can't be performed
#------------------------------------------------------------------------------------------------------------------------
# Compatibility:
#
#   Might not be compatible with other battle systems.
#------------------------------------------------------------------------------------------------------------------------
# Installation: Place this script anywhere above main and below Scene_Battle.
#
# Configuration:
#
#   Fail_Safe_Action: When using 'Repeat', if the action fails (not enough SP or no item to use),
#                             default action is performed.
#   Memorize_Atk_Dfn: Whether to remember 'Attack' or 'Defend' used from the auto-battle options.
#
class Scene_Battle
 
  Fail_Safe_Action = true
 
  Memorize_Atk_Dfn = false
 
end
#------------------------------------------------------------------------------------------------------------------------
# Issues: None
#------------------------------------------------------------------------------------------------------------------------
# Credits: Fantasist for making this
#------------------------------------------------------------------------------------------------------------------------
# Notes:
# If you have any questions, problems or suggestions, you can find me at:
#  - www.chaos-project.com
#  - www.quantumcore.forumotion.com
#
# Enjoy ^_^
#============================================================================

#==============================================================================
# ** Game_Battler
#==============================================================================

class Game_Battler
 
  attr_accessor :prior_action, :default_action, :memorize_action
 
  alias fant_auto_battle_game_battler_init initialize
  def initialize
    fant_auto_battle_game_battler_init
    @prior_action, @default_action = Game_BattleAction.new, Game_BattleAction.new
    @default_action.kind, @default_action.basic, @memorize_action = 0, 1, false
  end
 
  def current_action=(action)
    @current_action = action if action.is_a?(Game_BattleAction)
  end
 
end

#==============================================================================
# ** Scene_Battle
#==============================================================================

class Scene_Battle
 
  alias fant_auto_battle_scene_battle_main main
  def main
    $game_party.actors.each {|actor| actor.prior_action = actor.default_action.clone}
    fant_auto_battle_scene_battle_main
  end
 
  alias fant_auto_battle_scene_battle_upd_phase2 update_phase2
  def update_phase2
    if  Input.trigger?(Input::C) && @party_command_window.index == 2
      case @party_command_window.auto_index
      when 0
        $game_party.actors.each {|actor| actor.current_action = actor.prior_action.clone}
      when 1
        $game_party.actors.each {|actor| actor.current_action.kind = actor.current_action.basic = 0}
      when 2
        $game_party.actors.each {|actor| actor.current_action.kind, actor.current_action.basic = 0, 1}
      when 3
        if $easy_party_switcher && $easy_party_switcher >= 2.4 && BlizzCFG::BATTLE_SWITCH
          $game_system.se_play($data_system.decision_se)
          @spriteset.dispose
          $scene = Scene_PartySwitcher.new
          $scene.main
          $scene = self
          @spriteset = Spriteset_Battle.new
          15.times {@spriteset.update}
          @status_window.refresh
          Graphics.transition(0)
        end
      end
      start_phase4
    end
    fant_auto_battle_scene_battle_upd_phase2
  end
 
  alias fant_auto_battle_scene_battle_start_phase4 start_phase4
  def start_phase4
    fant_auto_battle_scene_battle_start_phase4
    $game_party.actors.each {|actor| prepare_action(actor)}
  end
 
  def prepare_action(actor)
    if @party_command_window.auto_index == 0 && !Memorize_Atk_Dfn
      actor.prior_action = actor.current_action.clone
      actor.default_action = actor.current_action.clone if actor.memorize_action
    end
    action = actor.current_action
    if Fail_Safe_Action && ((action.kind == 1 && !actor.skill_can_use?(action.skill_id)) ||
      (action.kind == 2 && !$game_party.item_can_use?(action.item_id)))
      actor.current_action = actor.default_action.clone
    end
  end
 
end

#==============================================================================
# ** Window_PartyCommand
#==============================================================================

class Window_PartyCommand < Window_Selectable
 
  attr_reader :auto_index, :auto_cmds
 
  def initialize
    super(0, 0, 640, 64)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.active = self.visible = false
    self.back_opacity, self.index = 160, 0
    @commands = ['Fight', 'Escape', 'Auto']
    @item_max = @column_max = 3
    @auto_index, @auto_cmds = 0, ['Repeat', 'Attack', 'Defend']
    if $easy_party_switcher && $easy_party_switcher >= 2.4 && BlizzCFG::BATTLE_SWITCH
      @auto_cmds.push('Switch')
    end
    draw_item(0, normal_color)
    draw_item(1, $game_temp.battle_can_escape ? normal_color : disabled_color)
    draw_item(2, normal_color)
  end
 
  def update
    super
    draw_item(2, normal_color) if Input.repeat?(Input::RIGHT) || Input.repeat?(Input::LEFT)
    if @index == 2
      if Input.repeat?(Input::UP)
        $game_system.se_play($data_system.cursor_se)
        @auto_index = (@auto_index - 1) % @auto_cmds.size
        draw_item(2, normal_color)
      elsif Input.repeat?(Input::DOWN)
        $game_system.se_play($data_system.cursor_se)
        @auto_index = (@auto_index + 1) % @auto_cmds.size
        draw_item(2, normal_color)
      end
    end
  end
 
  def draw_item(index, color)
    self.contents.font.color = color
    rect = Rect.new(index * 608 / @column_max, 0, 608 / @column_max, 32)
    self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
    font = self.contents.font.name.clone
    self.contents.font.name = 'Arial'
    self.contents.draw_text(rect, '↑                  ↓', 1) if index == 2 && @index == 2 # ˄˅↑↓
    self.contents.font.name = font
    txt = index == 2 ? @auto_cmds[@auto_index] : @commands[index]
    self.contents.draw_text(rect, txt, 1)
  end
 
  def update_cursor_rect
    self.cursor_rect.set(index * 608 / @column_max, 0, 608 / @column_max, 32)
  end
 
end

#==============================================================================
# ** Window_Status
#==============================================================================

class Window_Status < Window_Selectable
 
  X, Y, W, W2 = 320, 118, 128, 96
 
  def initialize(actor)
    super(0, 0, 640, 480)
    self.contents = Bitmap.new(width - 32, height - 32)
    @actor = actor
    @cmds = ['Attack', 'Defend', 'Memorize']
    if @actor.default_action.kind == 0 && @actor.default_action.basic == 0
      self.index = 0
    elsif @actor.default_action.kind == 0 && @actor.default_action.basic == 1
      self.index = 1
    end
    self.index = 2 if @actor.memorize_action
    refresh
  end
 
  def update_cursor_rect
    self.cursor_rect.set(X+W, Y, W2, 32)
  end
 
  def update
    super
    update_cursor_rect
    return if @index < 0
    if Input.repeat?(Input::RIGHT) || Input::repeat?(Input::C)
      $game_system.se_play($data_system.cursor_se)
      @index = (@index + 1) % @cmds.size
      self.contents.font.color = normal_color
      self.contents.fill_rect(X+W, Y, W2, 32, Color.new(0, 0, 0, 0))
      self.contents.font.color = crisis_color
      self.contents.draw_text(X+W, Y, W2, 32, @cmds[@index], 1)
      case @index
      when 0
        @actor.default_action.kind = @actor.default_action.basic = 0
        @actor.memorize_action = false
      when 1
        @actor.default_action.kind, @actor.default_action.basic = 0, 1
        @actor.memorize_action = false
      when 2
        @actor.memorize_action = true
      end
    end
    if Input.repeat?(Input::LEFT)
      $game_system.se_play($data_system.cursor_se)
      @index = (@index - 1) % @cmds.size
      self.contents.font.color = normal_color
      self.contents.fill_rect(X+W, Y, W2, 32, Color.new(0, 0, 0, 0))
      self.contents.font.color = crisis_color
      self.contents.draw_text(X+W, Y, W2, 32, @cmds[@index], 1)
      case @index
      when 0
        @actor.default_action.kind = @actor.default_action.basic = 0
        @actor.memorize_action = false
      when 1
        @actor.default_action.kind, @actor.default_action.basic = 0, 1
        @actor.memorize_action = false
      when 2
        @actor.memorize_action = true
      end
    end
    if self.active and @help_window != nil
      update_help
    end
  end
 
  def refresh
    self.contents.clear
    draw_actor_graphic(@actor, 40, 112)
    draw_actor_name(@actor, 4, 0)
    draw_actor_class(@actor, 4 + 144, 0)
    draw_actor_level(@actor, 96, 32)
    draw_actor_state(@actor, 96, 64)
    draw_actor_hp(@actor, 96, 112, 172)
    draw_actor_sp(@actor, 96, 144, 172)
    draw_actor_parameter(@actor, 96, 192, 0)
    draw_actor_parameter(@actor, 96, 224, 1)
    draw_actor_parameter(@actor, 96, 256, 2)
    draw_actor_parameter(@actor, 96, 304, 3)
    draw_actor_parameter(@actor, 96, 336, 4)
    draw_actor_parameter(@actor, 96, 368, 5)
    draw_actor_parameter(@actor, 96, 400, 6)
    self.contents.font.color = system_color
    self.contents.draw_text(320, 48, 80, 32, "EXP")
    self.contents.draw_text(320, 80, 80, 32, "NEXT")
    self.contents.font.color = normal_color
    self.contents.draw_text(320 + 80, 48, 84, 32, @actor.exp_s, 2)
    self.contents.draw_text(320 + 80, 80, 84, 32, @actor.next_rest_exp_s, 2)
    self.contents.font.color = system_color
    self.contents.draw_text(320, 160, 96, 32, "equipment")
    draw_item_name($data_weapons[@actor.weapon_id], 320 + 16, 208)
    draw_item_name($data_armors[@actor.armor1_id], 320 + 16, 256)
    draw_item_name($data_armors[@actor.armor2_id], 320 + 16, 304)
    draw_item_name($data_armors[@actor.armor3_id], 320 + 16, 352)
    draw_item_name($data_armors[@actor.armor4_id], 320 + 16, 400)
    self.contents.font.color = normal_color
    self.contents.draw_text(X, Y, W, 32, 'Battle Action:')
    self.contents.font.color = crisis_color
    self.contents.draw_text(X+W, Y, W2, 32, @cmds[@index], 1)
  end
  def dummy
    self.contents.font.color = system_color
    self.contents.draw_text(320, 112, 96, 32, $data_system.words.weapon)
    self.contents.draw_text(320, 176, 96, 32, $data_system.words.armor1)
    self.contents.draw_text(320, 240, 96, 32, $data_system.words.armor2)
    self.contents.draw_text(320, 304, 96, 32, $data_system.words.armor3)
    self.contents.draw_text(320, 368, 96, 32, $data_system.words.armor4)
    draw_item_name($data_weapons[@actor.weapon_id], 320 + 24, 144)
    draw_item_name($data_armors[@actor.armor1_id], 320 + 24, 208)
    draw_item_name($data_armors[@actor.armor2_id], 320 + 24, 272)
    draw_item_name($data_armors[@actor.armor3_id], 320 + 24, 336)
    draw_item_name($data_armors[@actor.armor4_id], 320 + 24, 400)
  end
 
end

#==============================================================================
# ** Scene_Status
#==============================================================================

class Scene_Status
 
  alias fant_auto_battle_scene_status_upd update
  def update
    @status_window.update
    fant_auto_battle_scene_status_upd
  end
 
end




5. Windowskin Viewer

This is a scene which gives detailed preview of windowskins. It automatically reads all the windowsking in your "Graphics/Windowskins" folder. This is only meant for debug purposes, but can be used anywhere and anytime. Call the scene with the script call:
$scene = Scene_Winskin.new


Windowskin Viewer: ShowHide

#============================================================================
# ** Windowskin Viewer
#----------------------------------------------------------------------------------------
# by Fantasist
# Version: Alpha-2
# Date: 21-Sep-2008
#----------------------------------------------------------------------------------------
# Version History:
#
#    - Alpha 1: First version
#    - Alpha 2: Complete Overhaul
#----------------------------------------------------------------------------------------
# Description:
#
#     This is a scene which gives detailed preview of all the windowskins in
#   the Graphics/Windowskins folder. This is only meant for debug purposes,
#   but can be used anywhere and anytime.
#----------------------------------------------------------------------------------------
# Compatibility:
#
#   Compatible with most other scripts.
#----------------------------------------------------------------------------------------
# Instructions/Configuration:
#
#    Just paste the script anywhere below Window_Selectable and above Main.
#   Call the scene by using the following line of script:
#               $scene = Scene_Winskin.new
#
#   To change the windowskin BG, press X (A key by default). Other
#   instructions are in the message window preview in the scene.
#----------------------------------------------------------------------------------------
# Issues:
#
#     None significant for now.
#----------------------------------------------------------------------------------------
# Credits and Thanks:
#
#   Fantasist, for making this.
#----------------------------------------------------------------------------------------
# Notes:
#
#     I'm too lazy right now :P
#============================================================================

#=============================================================================
# ** Scene_Winskin
#=============================================================================

class Scene_Winskin
 
  Excluded_Skins = ['Outlaw']
 
  def main
    @index = @hue = 0
    @wins, @sprites = [], []
    @names = [$data_system.windowskin_name.clone]
    dir = Dir.new('Graphics/Windowskins')
    dir.entries.each {|file| next unless file.include?('.png')
    @names.push(file); RPG::Cache.windowskin(file)}
    @names = (@names | @names) - Excluded_Skins
    # Background
    @win_bg = Window_SkinBG.new
    @wins.push(@win_bg)
    # Message Window
    @win_msg = Window_MessagePreview.new
    @wins.push(@win_msg)
    # Contents Window
    @win_cnts = Window_ContentsPreview.new
    @wins.push(@win_cnts)
    # Windowskin
    @skin = Sprite.new
    @skin.x, @skin.y, @skin.ox, @skin.oy, @skin.z = 320, 220, 96, 64, @win_bg.z + 10
    @sprites.push(@skin)
    # Battle Cursor
    @arrow = Sprite_BattleCursorPreview.new
    @arrow.z = 120
    @sprites.push(@arrow)
    refresh
    Graphics.transition
    loop {
      Graphics.update
      Input.update
      update
      break if $scene != self
    }
    Graphics.freeze
    @wins.each {|win| win.dispose if win}
    @sprites.each {|sp| sp.dispose if sp}
  end
 
  def refresh
    @skin.bitmap = RPG::Cache.windowskin(@names[@index])
    @win_bg.refresh(@names[@index])
  end
 
  def update
    @wins.each {|win| win.update if win}
    @sprites.each {|sp| sp.update if sp}
    if Input.trigger?(Input::B)
      $game_system.se_play($data_system.cancel_se)
      $scene = Scene_Map.new
    elsif Input.trigger?(Input::C)
      $game_system.se_play($data_system.cursor_se)
      $game_system.windowskin_name = @names[@index]
      @arrow.bitmap = RPG::Cache.windowskin(@names[@index])
      refresh
    end
    if Input.repeat?(Input::RIGHT)
      $game_system.se_play($data_system.cursor_se)
      @index = (@index + 1) % @names.size
      refresh
    elsif Input.repeat?(Input::LEFT)
      $game_system.se_play($data_system.cursor_se)
      @index = (@index - 1) % @names.size
      refresh
    end
    if Input.repeat?(Input::L)
      $game_system.se_play($data_system.cursor_se)
      @hue = (@hue + 36) % 360
      RPG::Cache.windowskin(@names[@index]).dispose
      RPG::Cache.windowskin(@names[@index])
      RPG::Cache.windowskin(@names[@index]).hue_change(@hue)
      @arrow.bitmap = RPG::Cache.windowskin(@names[@index])
      refresh
    elsif Input.repeat?(Input::R)
      $game_system.se_play($data_system.cursor_se)
      @hue = (@hue + 324) % 360
      RPG::Cache.windowskin(@names[@index]).dispose
      RPG::Cache.windowskin(@names[@index])
      RPG::Cache.windowskin(@names[@index]).hue_change(@hue)
      @arrow.bitmap = RPG::Cache.windowskin(@names[@index])
      refresh
    end
  end
 
end

#=============================================================================
# ** Window_SkinBG
#=============================================================================

class Window_SkinBG < Window_Selectable
 
  def initialize
    super(0, 0, 640, 480)
    self.contents = Bitmap.new(width-32, height-32)
    @cursor_width = 64
    @index = 0
    draw_skin_bg
  end
 
  def draw_skin_bg
    self.contents.fill_rect(320-16-96-1, 220-16-64-1, 194, 130,
    Color.new(rand(256), rand(256), rand(256)))
    self.contents.fill_rect(320-16-96, 220-16-64, 192, 128,
    Color.new(rand(256), rand(256), rand(256)))
  end
 
  def update_cursor_rect
    super
    x = 320 - @cursor_width / 2 - 16
    self.cursor_rect.set(x, 96, @cursor_width, 32)
  end
 
  def refresh(str)
    x = 320 - @cursor_width / 2 - 16
    self.contents.fill_rect(x, 96, @cursor_width, 32, Color.new(0, 0, 0, 0))
    @cursor_width = self.contents.text_size(str).width + 16
    x = 320 - @cursor_width / 2 - 16
    self.contents.draw_text(x, 96, @cursor_width, 32, str, 1)
  end
 
  def update
    super
    if Input.repeat?(Input::X)
      draw_skin_bg
    end
  end
 
end

#=============================================================================
# ** Window_MessagePreview
#=============================================================================

class Window_MessagePreview < Window_Base
 
  def initialize
    super(80, 304, 480, 160)
    self.contents = Bitmap.new(480-32, 160-32)
    self.pause = true
    @blink = false
    @count = 0
    draw_stuff
  end
 
  def draw_stuff
    self.contents.clear
    self.contents.draw_text(0, 0, contents.width, 32, 'Left/Right: Change skin')
    self.contents.draw_text(0, 0, contents.width, 32, 'L/R: Change hue', 2)
    self.contents.draw_text(0, 32, contents.width, 32, 'C: Preview/set skin')
    self.contents.draw_text(0, 32, contents.width, 32, 'X: Change skin BG', 2)
    self.contents.draw_text(0, 64, contents.width, 32, 'A: Change message opacity')
  end
 
  def update
    super
    if @blink
      self.opacity += 8 unless self.opacity >= 255
    else
      self.opacity -= 8 unless self.opacity <= 196
    end
    if Input.trigger?(Input::A)
      @blink = !@blink
    end
  end
 
end

#=============================================================================
# ** Window_ContentsPreview
#=============================================================================

class Window_ContentsPreview < Window_Base
 
  def initialize
    super(16, 16, 160, 160)
    self.contents = Bitmap.new(160, 160)
    self.ox = self.oy = 8
    self.contents.font.size = 28
    self.contents.draw_text(0, 0, 160, 160, 'Text', 1)
    @count = 0
  end
 
end

#=============================================================================
# ** Sprite_BattleCursor
#=============================================================================

class Sprite_BattleCursorPreview < Sprite
 
  def initialize
    @blink_count = 0
    @battler = Sprite.new
    bname = $game_party.actors.size >= 1 ? $game_party.actors[0].battler_name : nil
    bhue = $game_party.actors.size >= 1 ? $game_party.actors[0].battler_hue : nil
    if bname == nil && bhue == nil
      b = Bitmap.new(96, 128)
      b.fill_rect(0, 0, 96, 128, Color.new(0, 0, 0))
      b.fill_rect(1, 1, 94, 126, Color.new(255, 255, 255))
      @battler.bitmap = b
    elsif bname != nil && bhue == nil
      @battler.bitmap = RPG::Cache.battler(bname)
    else
      @battler.bitmap = RPG::Cache.battler(bname, bhue)
    end
    @battler.ox = @battler.bitmap.width / 2
    @battler.oy = @battler.bitmap.height
    super
    self.bitmap = RPG::Cache.windowskin($game_system.windowskin_name)
    self.x, self.y = 512, 256
    self.ox, self.oy = 16, 64
    update
  end
 
  def update
    @blink_count = (@blink_count + 1) % 8
    x_off = @blink_count < 4 ? 128 : 160
    self.src_rect.set(x_off, 96, 32, 32)
  end
 
  def bitmap=(b)
    super(b)
    x_off = @blink_count < 4 ? 128 : 160
    self.src_rect.set(x_off, 96, 32, 32)
  end
 
  def x=(val)
    super(val)
    @battler.x = val if @battler
  end
 
  def y=(val)
    super(val)
    @battler.y = val if @battler
  end
 
  def z=(val)
    super(val)
    @battler.z = val-1 if @battler
  end
 
  def dispose
    super
    @battler.dispose
  end
 
end




6. Battle Phase Prompter

This is not much of a script, just a debug snippet I made to help me analyze the DBS easily. This script shows the phases during battles. Holding CTRL will pause the battle (displays a window).
Set "BATTLE_PHASE_CHECK" to "true" to enable it. Set it to "$DEBUG" to enable it only during debugging.

Battle Phase Prompter: ShowHide

#============================================================================
# ** Battle Phase Prompter
#----------------------------------------------------------------------------------------
# by Fantasist
# Version: 1.0
# Date: 8-Nov-2008
#----------------------------------------------------------------------------------------
# Version History:
#
#   1.0 - First Version
#----------------------------------------------------------------------------------------
# Description:
#
#     This script shows the phases during battles. Holding CTRL will pause
#   the battle (displays a window).
#----------------------------------------------------------------------------------------
# Compatibility:
#
#     Intended to work with the DBS, might not work with other CMSes,
#   but that's highly unlikely.
#----------------------------------------------------------------------------------------
# Instructions/Configuration:
#
#     Set the following to true or false:
#
      BATTLE_PHASE_CHECK = false
#----------------------------------------------------------------------------------------
# Issues: None.
#----------------------------------------------------------------------------------------
# Credits and Thanks: None needed for something as simple as this.
#----------------------------------------------------------------------------------------
# Notes: This can be pretty useless or useful. It was useful for me :)
#============================================================================

#=============================================================================
# ** Scene_Battle
#=============================================================================

class Scene_Battle
 
  alias bphasemain main
  def main
    @bphase = -1
    @bps = Sprite.new
    @bps.z = 9999
    @bps.y = 64
    b = Bitmap.new(640, 48)
    b.font.size = 32
    b.font.bold = true
    @bps.bitmap = b
    set_bps
    bphasemain
    @bphase = nil
    if @bps
      @bps.bitmap.dispose if @bps.bitmap
      @bps.dispose
    end
  end
 
  alias bphaseupd update
  def update
    if @bphase != @phase
      @bphase = @phase
      p "Phase #{@bphase}" if Input.press?(Input::CTRL)
      set_bps
    end
    if @bps.opacity > 160
      @bps.opacity -= 4
    end
    bphaseupd
  end
 
  def set_bps
    b = @bps.bitmap
    b.clear
    b.font.color = Color.new(0, 0, 0)
    b.draw_text(0, 0, 638, 46, "Phase #{@bphase}", 1)
    b.draw_text(0, 2, 638, 46, "Phase #{@bphase}", 1)
    b.draw_text(2, 0, 638, 46, "Phase #{@bphase}", 1)
    b.draw_text(2, 2, 638, 46, "Phase #{@bphase}", 1)
    b.font.color = Color.new(255, 255, 255)
    b.draw_text(1, 1, 638, 46, "Phase #{@bphase}", 1)
    @bps.opacity = 255
  end
 
end






That's all for now, folks! More will come as I find them. Hope you enjoy these as much as i did :)
6
OK, I've been holding back for some time now, but I need help with this. Here's the deal:

I'm trying to implement the concept of "Stamina", where an actor has no HP or SP, but Stamina. All actions (Attack, using physical or non-physical skills, or getting hit while defending), use stamina. So there's no point for the regular "Attack" option in battle. I want everything to have a stamina cost. So I plan to stop using Game_Battler::attack_effect altogether. For this reason, I want to know the difference between attack_effect and skill_effect. What does attack_effect do that skill_effect doesn't already?

LONG VERSION: ShowHide
I'm trying to come up with some changes to the DBS and it starts with the concept of Stamina. Basically, an actor doesn't have HP or SP, but Stamina. Every action except "Do Nothing" and "Defend" take some points out of stamina. When stamina reaches zero, the actor "faints" or is KOed. Every action, be it a skill (Kamehameha), physical attack (Roundhouse Kick) or a combination of both (Going into KaioKen and delivering a punch) takes points out of stamina. Also, any damage taken is in terms of stamina, not HP.

Stamina itself is a derived stat. For ease of calculations, I've simply added HP and SP. So basically, "Max_Stamina = Max_HP + Max_SP". To achieve this effect and to simplify the process, I'm using HP as the base condition for consciousness, so that all the internal functions like "dead?" and hp0 will work.

Now, I have an equipment system in mind that resembles EQUAP. Basically, some skills are attached to weapons and equipping them will give you access to those skills. For example, you can use "Slash" with any kind of sword equipped.
Since I want every action to use stamina, I thought about completely removing normal attacking and associate a skill with each weapon. So when I select "Attack" in the battle menu, the "Slash" skill is executed and cuts points from stamina. In effect, the method Game_Battler::attack_effect is never used. For this reason...

I want to know the difference between Game_Battler::attack_effect and Game_Battler::skill_effect. So far, all I've noticed is that skill_effect does everything attack_effect does, except critical damage correction. Is this right, or is there anything more to it? Also, attack_effect simply uses attacker's ATK and defender's PDEF for damage calculation. It also adds attacker's STR into the mix:

      # Calculate basic damage
      atk = [attacker.atk - self.pdef / 2, 0].max
      self.damage = atk * (20 + attacker.str) / 20


But a skill configured with an attack factor (ATK_F in the database) does more or less the same thing:

      # Calculate power
      power = skill.power + user.atk * skill.atk_f / 100
      if power > 0
        power -= self.pdef * skill.pdef_f / 200
        power -= self.mdef * skill.mdef_f / 200
        power = power.lbind(0)
      end
      # Calculate rate
      rate = 20
      rate += (user.str * skill.str_f / 100)
      rate += (user.per * skill.dex_f / 100)
      rate += (user.agi * skill.agi_f / 100)
      rate += (user.qsn * skill.int_f / 100)
      # Calculate basic damage
      self.damage = power * rate / 20


skill_effect doesn't use ATK, STR and PDEF directly like attack_effect, but all of them are factored, in a much more controlled way if you ask me.

So basically, is it okay if I stop using attack_effect altogether? I can move the critical damage calculation into skill_effect with a condition checking if the skill is physical (ATK_F > 0). Can I do that?
7
Per-Actor Battle Position
Authors: Fantasist
Version: 1.0
Type: Battle Strategy Improvement
Key Term: Actor Add-on



Introduction

This script allows you a finer degree of control over the position during battle (i.e, the "Front", "Middle", "Rear" settings). You normally set positions to actor classes, not the actors themselves. With this script, you can decide the battle positions of individual actors. You can also change positions in-game.
By default, there are only 3 positions: Front, Middle and Rear. With this script, you can add as many positions as you want.


Features


  • Per-actor battle position
  • Changeable in-game
  • Possible to use more than 3 positions



Screenshots

N/A


Demo

N/A


Script

Place this script below "Game_Party".
Spoiler: ShowHide

#==============================================================================
# ** Per-Actor Battle Position
#------------------------------------------------------------------------------
# by Fantasist
# Version: 1.0
# Date: 16-Mar-2010
#------------------------------------------------------------------------------
# Version History:
#
#   1.0 - First version
#------------------------------------------------------------------------------
# Description:
#
#     This script allows you a finer degree of control over the position during
#   battle ("Front", "Middle", "Rear"). You normally set positions to actor
#   classes and not actors themselves. With this script, you can decide the
#   battle positions of individual actors. You can also change positions in-game.
#     By default, there are only 3 positions: Front, Middle and Rear. With this
#   script, you can add as many positions as you want.
#------------------------------------------------------------------------------
# Compatibility:
#
#    - Aliased Game_Actor::setup(actor_id)
#    - Rewritten Game_Party::random_target_actor(hp0)
#
#   Not tested extensively, but should work with most other scripts.
#------------------------------------------------------------------------------
# Instructions:
#
#   Place this script below "Game_Party".
#     Optionally, I suggest you configure the battle position in the database
#   anyway, despite using this script. This is because if an actor's position is
#   not configured, this script used the database setting for the actor's class.
#
#   To change an actor's position in-game, use the following script call:
#
#       $game_actors[<ACTOR_ID>].position = <POSITION>
#------------------------------------------------------------------------------
# Configuration:
#
#     Scroll down a bit for the configuration.
#
#   1. MAX_POSITION: The number of positions you will be using (Default: 3)
#
#   2. Look for:
#   #::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
#   # * CONFIG START
#   #::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
#   Then add more lines as needed. The format is:
#
#         when <ACTOR_ID> then <POSITION>
#------------------------------------------------------------------------------
# Regarding the value of Position:
#
#   POSITION takes the values from 1 to MAX_POSITION (Default: 1, 2 or 3)
#   The larger the number, the farther the position, so 1 is front and
#   MAX_POSITION if rear. During the config or setting position in-game, if you
#   set it to 0, the database position will be used. Every other out of range
#   value (like -1, -23, 100, 4, 5 for the default) will be corrected.
#------------------------------------------------------------------------------
# Issues:
#
#   None known.
#------------------------------------------------------------------------------
# Credits and Thanks:
#
#   Credits: Fantasist for making this.
#   Thanks: Zydragon and MeVII for requesting.
#------------------------------------------------------------------------------
# Notes:
#
#     If you have any questions, suggestions or comments, you can
#   find me (Fantasist) in the forums at:
#
#    - www.chaos-project.com
#
#   Enjoy ^_^
#==============================================================================

#==============================================================================
# ** Fantasist's Configuration Module
#==============================================================================
module FTSConfig
 
 MAX_POSITION = 3 # Maximum number of positions
 
 def self.per_actor_position(actor_id)
   position = case actor_id
   #::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
   # * CONFIG START
   #::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
   # when <actor_id> then <position>
   when 1 then 1
   when 2 then 1
   when 7 then 3
   when 8 then 2
   #::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
   # * CONFIG END
   #::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
   else
     0
   end
   return position
 end
end
#==============================================================================
# ** Game_Actor
#==============================================================================
class Game_Actor
 attr_reader :position
 #--------------------------------------------------------------------------
 # * Setup
 #--------------------------------------------------------------------------
 alias per_actor_pos_actor_setup setup
 def setup(actor_id)
   # Get actor position from config
   self.position = FTSConfig.per_actor_position(actor_id)
   per_actor_pos_actor_setup(actor_id) # Call everything else
 end
 #--------------------------------------------------------------------------
 # * Position=
 #--------------------------------------------------------------------------
 def position=(val)
   # If not configured, set default
   if val == 0
     actor = $data_actors[actor_id]
     actor_class = $data_classes[actor.class_id]
     # Correct the default (poaition starts with 0) to comply with
     # the new convention (starts with 1)
     val = $data_classes[@class_id].position + 1
   end
   # Correction
   val = FTSConfig::MAX_POSITION if val > FTSConfig::MAX_POSITION
   val = 1 if val < 0
   @position = val
 end
end
#==============================================================================
# ** Game_Party
#==============================================================================
class Game_Party
 #--------------------------------------------------------------------------
 # * Random Selection of Target Actor
 #--------------------------------------------------------------------------
 def random_target_actor(hp0 = false)
   roulette = []
   actors.each {|actor|
   next unless (!hp0 && actor.exist?) || (hp0 && actor.hp0?)
   position = actor.position
   # Larger the number (n), more to the front
   n = FTSConfig::MAX_POSITION + 2 - position
   n.times {roulette.push(actor)}
   }
   return nil if roulette.size == 0
   return roulette[rand(roulette.size)]
 end
end



Instructions

Place this script below "Game_Party".

Optionally, I suggest you configure the battle position in the database anyway, despite using this script. This is because if an actor's position is not configured, this script used the database setting for the actor's class.

To change an actor's position in-game, use the following script call:
$game_actors[<ACTOR_ID>].position = <POSITION>



Configuration


  • MAX_POSITION: The number of positions you will be using (Default: 3)
  • Look for:

#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# * CONFIG START
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::


Then add more lines as needed. The format is:
when <ACTOR_ID> then <POSITION>


Regarding the value of Position:

POSITION takes the values from 1 to MAX_POSITION (Default: 1, 2 or 3). The larger the number, the farther the position, so 1 is front and MAX_POSITION if rear.
During the config or setting position in-game, if you set it to 0, the database position will be used. Every other out of range value (like -1, -23, 100, 4, 5 for the default) will be corrected.


Compatibility

- Aliased Game_Actor::setup(actor_id)
- Rewritten Game_Party::random_target_actor(hp0)

Not tested extensively, but should work with most other scripts.


Credits and Thanks

Credits: Fantasist for making this.
Thanks: Zydragon and MeVII for requesting.


Author's Notes

Maybe a future version will feature a scene where you can set your battle positions without using script calls.

If you have any questions, suggestions or comments, you can find me (Fantasist) in the forums at:

- www.chaos-project.com

Enjoy ^_^
8
OLD TOPIC: ShowHide
That's right, I'm FINALLY getting a new PC! :w00t:
Actually, it's not the whole computer, it's just the CPU.

I haven't purchased it yet, and I can't purchase it till Monday due to unforeseen circumstances (darn! I was so psyched!). Here are the stats as I remember them (the guy wouldn't give me the quotation  :<_<: ):

Motherboard: Intel DG41RQ
Processor: Intel Core 2 Quad 8 Series (I think it's Q8400)
RAM: 4GB (2 + 2) Transcend (not sure about the model, probably DDR2, hopefully 800MHz)
HDD: 500GB Seagate (not sure about the details)
Graphics Card: GeForce 9 Series (was it 9400 or 9800? Not sure about this either)

OK. Now that all that's out of the way, here's the dilemma.

I was told that a Quad Core processor generates a lot of heat, so I should have a cabinet that has a fan which sits near to the processor (typically there's a "tunnel" connected to a fan on the inside of the cabinet). Is that true? Or is it okay to just have good ventilation (2 fans on the back)?

Oh! I almost forgot; are there any problems with the above configuration, or with any of the components? While I haven't payed the money yet, I still have the chance to make changes. Do any of you recommend any changes for the better?


OK. I got the PC. Before I install Windows, I wanted to refresh my partitioning strategies. So here are the key points:

HDD Space: 500GB

Main Usage:
- Family Usage: My parents need space for their documents, photos, E-Books and tiny videos. Estimate usage is not more than 40GB.
- My sister uses the PC for checking mail, chatting and listening to music.
- As for me, I have maintained generations of "Collections" which include software, images, music, videos (clips, not movies) and other stuff like that. It gets big, that's for sure. How big? Let's say 10GB before I backup again. I also play games ranging from 1MB to 12GB. I code, so I install the Visual Studio or similar suites. I will most likely install Photoshop.
- Misc: I normally don't store movies in my "Collection" but on a separate drive. I store TV Series along with the movies.

I've been doing all this with 80GB and I suddenly jumped to 500GB, so I can't seem to estimate my needs in the future. The drastic change in space will change everything: my backup frequency, my collection size, my movie collection...

All I know right now is that I'll put aside 40GB for system drive (I plan on moving the documents to a separate partition). <---- Wait, you decide this for me too. Any help is appreciated. Cause The sooner I settle this, the sooner I can install XP on my new comp and get to enjoy it :)
9
RMXP Script Database / [XP] Threat System v1.2
July 13, 2009, 12:40:40 pm
Threat System
Authors: Fantasist
Version: 1.2
Type: Enemy behavior enhancement
Key Term: Battle Add-on



Introduction

During battle, enemies will choose their targets based on their "threat" rather than randomly. The threat for an actor changes depending on what they do. For example, attacking raises threat and defending decreases threat.


Features


  • Players maintain "threat" and the enemies attack the most dangerous actors first
  • Offers a new aspect of control in battles
  • Configurable change in threat for attack, defend, skill and items
  • Configurable "Threat Chance" decides how often enemies choose actors based on their threat (leaving some randomness for those who prefer it)
  • An ignore list for enemies who use random actor selection
  • Temporarily disable the threat system by using a switch
  • A "threat-by-damage" mode where threat is calculated based on damage inflicted
  • Two ways of keeping track of threat: status window mod for DBS and threat window for other battle system mods



Screenshots

N/A


Demo

http://www.sendspace.com/file/rxrtfp


Script

Place this script anywhere above "Main" and below "Scene_Debug".

Spoiler: ShowHide

#==============================================================================
# ** Threat System
#------------------------------------------------------------------------------
# by Fantasist
# Version: 1.2
# Date: 23-Oct-2011
#------------------------------------------------------------------------------
# Version History:
#
#   1.0 - First version (13-July-2009)
#   1.1 - Fixed Force Action bug and added enemy-specific threat ignore (21-Oct-2011)
#   1.2 - Added disable by switch, threat by damage, fixed a display bug
#------------------------------------------------------------------------------
# Description:
#
#     During battle, enemies will choose their targets based on their "threat"
#   rather than randomly. The threat for an actor changes depending on what they
#   do. For example, attacking raises threat and defending decreases threat.
#------------------------------------------------------------------------------
# Compatibility:
#
#   Might be incompatible with other battle systems or battle addons.
#------------------------------------------------------------------------------
# Instructions:
#
#    Place this script anywhere above "Main" and below "Scene_Debug".
#------------------------------------------------------------------------------
# Configuration:
#
#     Scroll down a bit and you'll see the configuration.
#
#    ATTACK_THREAT: Threat to increase when actor attacks
#    DEFEND_THREAT: Threat to decrease when actor defends (read THREAT_BY_DAMAGE)
#    THREAT_CHANCE: The chance of enemies attacking based on threat
#    THREAT_SWITCH: Turn this ON to temporarily disable the threat system
# THREAT_BY_DAMAGE: When "true", an actor's threat increases by the damage
#                   caused to enemies. Enabling this ignores ATTACK_THREAT.
#                   When defending, actor's threat is divided by DEFEND_THREAT.
#   THREAT_DISPLAY: Display players' threats besides their name
#    THREAT_WINDOW: Whether to enable or disable threat window
#                   To enable it, set it to "true". If you want to set it's
#                   position and width, you can also set it to an array with
#                   it's X position, Y position and width (eg: [0, 64, 160]).
#     ENEMY_IGNORE: List of enemy IDs which ignore the threat system
#
#   Skill Threat Configuration:
#
#     Look for "SKILL THREAT CONFIG BEGIN" and follow the example.
#     In the given example:
#
#               when 57 then [10, -2]
#
#     the skill 57 (Cross Cut) increases user's threat by 10 and decreases the
#     rest of the party's threat by 2.
#
#   Item Threat Configuration:
#
#     Works exactly the same as skill threat configuration.
#------------------------------------------------------------------------------
# Credits:
#
#   Fantasist, for making this script
#   KCMike20, for requesting this script
#
# Thanks:
#
#   Blizzard, for helping me
#   winkio, for helping me
#   Jackolas, for pointing out a bug
#   yuhikaru, for fixing force action bug
#   Fenriswolf, for requesting enemy ignore list
#   Kagutsuchi, for requesting threat-by-damage feature
#------------------------------------------------------------------------------
# Notes:
#
#   If you have any problems, suggestions or comments, you can find me at:
#
#     forum.chaos-project.com
#
#   Enjoy ^_^
#==============================================================================

#==============================================================================
# ** ThreatConfig module
#------------------------------------------------------------------------------
#  Module for settings and configuration of the Threat system.
#==============================================================================

module ThreatConfig
  #--------------------------------------------------------------------------
  # * Config
  #--------------------------------------------------------------------------
  ATTACK_THREAT = 10 # Threat to increase when actor attacks
  DEFEND_THREAT = 10 # Threat to decrease when actor defends
  THREAT_CHANCE = 100 # The chance of enemies attacking based on threat
  THREAT_SWITCH = 25 # ID of switch which disables threat system when ON
  THREAT_BY_DAMAGE = true # Threat is increased based on damage caused
  THREAT_DISPLAY = true # Display player's threat besides their name
  THREAT_WINDOW = [480, 64, 160] # Whether to enable or disable threat window
  ENEMY_IGNORE = [] # List of enemy IDs which ignore the threat system
  #--------------------------------------------------------------------------
  # * Configure skill threats
  #--------------------------------------------------------------------------
  def self.get_skill_threat(skill_id)
    threat = case skill_id
    #========================================================================
    # SKILL THREAT CONFIG BEGIN
    #========================================================================
    when 57 then [5, -1] # Cross Cut
    when 61 then [5, -1] # Leg Sweep
    when 7 then [5, 0]   # Fire
    # when skill_ID then [ user_threat, party_threat ]
    #========================================================================
    # SKILL THREAT CONFIG END
    #========================================================================
    else false
    end
    return threat
  end
  #--------------------------------------------------------------------------
  # * Configure item threats
  #--------------------------------------------------------------------------
  def self.get_item_threat(item_id)
    threat = case item_id
    #========================================================================
    # ITEM THREAT CONFIG BEGIN
    #========================================================================
    when 1 then [2, -5] # Potion
    # when item_ID then [ user_threat, party_threat ]
    #========================================================================
    # ITEM THREAT CONFIG END
    #========================================================================
    else false
    end
    return threat
  end
  #--------------------------------------------------------------------------
  # * Configure enemy ignore IDs
  #--------------------------------------------------------------------------
 
end

#==============================================================================
# ** Game_Actor
#------------------------------------------------------------------------------
#  Added the threat attribute.
#==============================================================================

class Game_Actor
  #--------------------------------------------------------------------------
  # * Initialize threat attribute
  #--------------------------------------------------------------------------
  alias game_actor_threat_setup setup
  def setup(actor_id)
    @threat = 0
    game_actor_threat_setup(actor_id)
  end
  #--------------------------------------------------------------------------
  # * Get the threat attribute
  #--------------------------------------------------------------------------
  attr_reader :threat
  #--------------------------------------------------------------------------
  # * Set the threat attribute
  #--------------------------------------------------------------------------
  def threat=(val)
    val = 0 if val < 0
    @threat = val
  end
end

#==============================================================================
# ** Game_Party
#------------------------------------------------------------------------------
#  Modified random actor selection to select by threat.
#==============================================================================

class Game_Party
  #--------------------------------------------------------------------------
  # * Choose actor by threat
  #--------------------------------------------------------------------------
  alias choose_actor_threat_orig random_target_actor
  def random_target_actor(hp0 = false)
    if $game_switches[ThreatConfig::THREAT_SWITCH]
      return choose_actor_threat_orig(hp0)
    end
    if $scene.active_battler.is_a?(Game_Enemy) &&
      ThreatConfig::ENEMY_IGNORE.include?($scene.active_battler.id)
      return choose_actor_threat_orig(hp0)
    end
    if rand(100) >= ThreatConfig::THREAT_CHANCE
      return choose_actor_threat_orig(hp0)
    else
      return threat_target_actor(hp0)
    end
  end
  #--------------------------------------------------------------------------
  # * Calculate threat and choose actor
  #--------------------------------------------------------------------------
  def threat_target_actor(hp0=false)
    # Collect valid actors
    targets = []
    for actor in @actors
      next unless (!hp0 && actor.exist?) || (hp0 && actor.hp0?)
      targets.push(actor)
    end
    # Get actors with maximum threat
    targets.sort! {|a, b| b.threat - a.threat}
    targets = targets.find_all {|a| a.threat == targets[0].threat}
    # Choose random
    target = targets[rand(targets.size)]
    return target
  end
end

#==============================================================================
# ** Game_Battler
#------------------------------------------------------------------------------
#  Added attack and skill threat handling.
#==============================================================================

class Game_Battler
  #--------------------------------------------------------------------------
  # * Attack Threat
  #--------------------------------------------------------------------------
  alias attack_effect_threat attack_effect
  def attack_effect(attacker)
    result = attack_effect_threat(attacker)
    if attacker.is_a?(Game_Actor) && self.damage.is_a?(Numeric) && self.damage > 0
      if ThreatConfig::THREAT_BY_DAMAGE
        attacker.threat += self.damage
      else
        attacker.threat += ThreatConfig::ATTACK_THREAT
      end
    end
    return result
  end
  #--------------------------------------------------------------------------
  # * Skill Threat
  #--------------------------------------------------------------------------
  alias skill_effect_threat skill_effect
  def skill_effect(user, skill)
    result = skill_effect_threat(user, skill)
    threat = user.is_a?(Game_Actor) && ThreatConfig.get_skill_threat(skill.id)
    if threat && self.damage.is_a?(Numeric) && self.damage > 0
      user_threat, party_threat = threat[0], threat[1]
      for actor in $game_party.actors
        threat_plus = actor.id == user.id ? user_threat : party_threat
        actor.threat += threat_plus
      end
      if ThreatConfig::THREAT_BY_DAMAGE
        user.threat -= user_threat
        user.threat += self.damage
      end
    end
    return result
  end
end

#==============================================================================
# ** Scene_Battle
#------------------------------------------------------------------------------
#  Added defend and item threat handling and realtime target selection.
#==============================================================================

class Scene_Battle
  attr_reader :active_battler
  #--------------------------------------------------------------------------
  # * Defend Threat
  #--------------------------------------------------------------------------
  alias basic_action_threat_result make_basic_action_result
  def make_basic_action_result
    if @active_battler.current_action.basic == 1 && @active_battler.is_a?(Game_Actor)
      if ThreatConfig::THREAT_BY_DAMAGE
        @active_battler.threat /= ThreatConfig::DEFEND_THREAT
      else
        @active_battler.threat -= ThreatConfig::DEFEND_THREAT
      end
    end
    basic_action_threat_result
  end
  #--------------------------------------------------------------------------
  # * Item Threat
  #--------------------------------------------------------------------------
  alias item_action_threat_result make_item_action_result
  def make_item_action_result
    item_action_threat_result
    threat = @active_battler.is_a?(Game_Actor) && ThreatConfig.get_item_threat(@item.id)
    if threat
      user_threat, party_threat = threat[0], threat[1]
      for actor in $game_party.actors
        threat_plus = actor.id == @active_battler.id ? user_threat : party_threat
        actor.threat += threat_plus
      end
    end
  end
  #--------------------------------------------------------------------------
  # * Choose target actor in realtime
  #--------------------------------------------------------------------------
  alias update_phase4_step2_choose_actor_realtime update_phase4_step2
  def update_phase4_step2
    # Fore action fix by yuhikaru
    # If there is no force action this turn
    if $game_temp.forcing_battler == nil
      @active_battler.make_action if @active_battler.is_a?(Game_Enemy)
    end
    update_phase4_step2_choose_actor_realtime
  end
  #--------------------------------------------------------------------------
  # * Clear threats before battle
  #--------------------------------------------------------------------------
  alias clear_threats_battle_main main
  def main
    $game_party.actors.each {|actor| actor.threat = 0}
    clear_threats_battle_main
  end
end

if ThreatConfig::THREAT_DISPLAY
#==============================================================================
# ** Window_BattleStatus
#------------------------------------------------------------------------------
#  Modded to show threat beside actor's name.
#==============================================================================

class Window_BattleStatus
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  alias threat_display_refresh refresh
  def refresh
    threat_display_refresh
    for i in 0...$game_party.actors.size
      actor = $game_party.actors[i]
      next if actor.threat == 0
      actor_x = i * 160 + 4
      actor_x += self.contents.text_size(actor.name).width + 4
      self.contents.draw_text(actor_x, 0, 160, 32, "(#{actor.threat})")
    end
  end
end
end

if ThreatConfig::THREAT_WINDOW
#==============================================================================
# ** Window_Threat
#------------------------------------------------------------------------------
#  This window displays the threats of actors in the party.
#==============================================================================

class Window_Threat < Window_Base
  H = 18
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    a = ThreatConfig::THREAT_WINDOW
    if a.is_a?(Array)
      x, y, w = a[0], a[1], a[2]
    else
      x, y, w = 0, 64, 160
    end
    super(x, y, w, 32 + H + $game_party.actors.size * H)
    @threats = []
    $game_party.actors.each {|a| @threats.push(a.threat)}
    self.contents = Bitmap.new(w-32, self.height-32)
    self.contents.font.size = H
    self.contents.font.bold = H <= 22
    self.opacity = 160
    refresh
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    self.contents.draw_text(0, 0, self.width-32, H, 'Threats', 1)
    $game_party.actors.each_with_index {|a, i| y_off = H
    self.contents.draw_text(0, y_off + i*H, self.width-32, H, a.name)
    self.contents.draw_text(0, y_off + i*H, self.width-32, H, @threats[i].to_s, 2)}
  end
  #--------------------------------------------------------------------------
  # * Update
  #--------------------------------------------------------------------------
  def update
    flag = false
    $game_party.actors.each_with_index {|a, i|
    @threats[i] = a.threat if a.threat != @threats[i]
    flag = true}
    refresh if flag
  end
end

#==============================================================================
# ** Scene_Battle
#------------------------------------------------------------------------------
#  Modded to handle threat window.
#==============================================================================

class Scene_Battle
  #--------------------------------------------------------------------------
  # * Main Processing
  #--------------------------------------------------------------------------
  alias threat_win_init main
  def main
    @threat_win = Window_Threat.new
    threat_win_init
    @threat_win.dispose
  end
  #--------------------------------------------------------------------------
  # * Update
  #--------------------------------------------------------------------------
  alias threat_win_upd update
  def update
    @threat_win.update
    threat_win_upd
  end
end
end



Instructions

Look for the configuration section in the script and configure the following.


  • ATTACK_THREAT: Threat to increase when actor attacks
  • DEFEND_THREAT: Threat to decrease when actor defends
  • THREAT_CHANCE: The chance of enemies attacking based on threat
  • THREAT_DISPLAY: Display players' threats besides their name
  • THREAT_WINDOW: Whether to enable or disable threat window. To enable it, set it to "true". If you want to set it's position and width, you can also set it to an array with it's X position, Y position and width (eg: [0, 64, 160]).
  • ENEMY_IGNORE: List of enemy IDs which ignore the threat system


Skill Threat Configuration:

  Look for "SKILL THREAT CONFIG BEGIN" and follow the example. In the given example:
when 57 then [10, -2]


the skill 57 (Cross Cut) increases user's threat by 10 and decreases the rest of the party's threat by 2.

Item Threat Configuration:

  Works exactly the same as skill threat configuration.


Compatibility

Might be incompatible with other battle systems or battle addons.


Credits and Thanks

Credit Fantasist (me) for making this.


  • Fantasist, for making this script
  • KCMike20, for requesting this script
  • Blizzard, for helping me
  • winkio, for helping me
  • Jackolas, for pointing out a bug
  • yukiharu for fixing force action bug
  • Fenriswolf for requesting enemy ignore list
  • Kagutsuchi, for requesting threat-by-damage feature



Author's Notes

If you have any problems, suggestions or comments, you can find me at:

  forum.chaos-project.com

Enjoy ^_^
10
Most of you must be familiar with how we can define setting and getting attributes in a class:


class Foo

   def initialize(val=0)
      @var = val
   end

   def var
      return @var
   end

   def var=(val)
      val = [[0, val].max, 100].min # Binding the value
      @var = val
   end

end


I would like to do the same in a Python class. What is the syntax for defining the "var=(val)" method in Python?
11
So here it is. After some tinkering with FL Studio this is what I came up with. I know it's too short and could do with better editing, but I couldn't resist posting it here :shifty: . I feel the tunes are a bit dull, I'll have to improve on that.

http://www.sendspace.com/file/tdv8y1 (1.29 MB, 1:25 minutes)

So what do you guys think?

Rules: This is for evaluation only and should not be used anywhere. You can store it for listening only.
12
Animation Sheet Maker
Authors: Fantasist, www.66rpg.com
Version: 1.0
Type: Resource Utility
Key Term: Game Utility



Introduction

This script can read image files from a folder and compile them into an animation sheet for use with RMXP and RMVX.


Features


  • Easy to use.
  • Handles transparency.
  • Saves a lot of time while making animations.



Screenshots

N/A


Download

http://www.sendspace.com/file/6rq31f (924 KB)


Script

Put the script at the very top of all the scripts.
Spoiler: ShowHide

#==============================================================================
# ** Animation Sheet Maker
#------------------------------------------------------------------------------
# by Fantasist
# Version: 1.0
# Date: 11-Mar-2009
#------------------------------------------------------------------------------
# Version History:
#
#   1.0 - First version
#------------------------------------------------------------------------------
# Description:
#
#     This script can read image files from a folder and compile them into an
#   animation sheet for use with RMXP/RMVX.
#------------------------------------------------------------------------------
# Compatibility:
#
#   Needs file writing permissions to save the temporary and output files.
#------------------------------------------------------------------------------
# Instructions:
#
#    - Put all the frames of one animation in a folder and paste it in the
#      program's directory.
#    - Include the names of the folders in quotes in the "Config.txt" file.
#    - Run "MakeAnimSheet.exe" and wait.
#
#   NOTE: The contents of Config.txt will be directly loaded, so do not make
#         errors of any sort. Include the folder names in the "List" array.
#
#   Example:
#
#         List = [ 'Animation1', 'folder2', 'anim' ]
#------------------------------------------------------------------------------
# Issues:
#
#     If this script is used with RMXP, there is a chance of the game freezing
#   with a "Script is hanging" error. Use this with RMVX to avoid the problem.
#------------------------------------------------------------------------------
# Credits and Thanks:
#
#   Fantasist - For making this.
#   www.66rpg.com - For the PNG output script.
#   Viviatus - For requesting this.
#------------------------------------------------------------------------------
# Notes:
#
#     You should find the program where you found this script. It is
#   recommended that you use the program, since it is minimal and prevents a
#   possible crash (when used in RMXP).
#
#   If you have any questions, suggestions or comments, you can find me at:
#
#    - www.chaos-project.com
#    - www.quantumcore.forumotion.com
#
#   Enjoy ^_^
#==============================================================================
#==============================================================================
#               本脚本出自www.66rpg.com,转载请注明。
#==============================================================================
=begin
==============================================================================
                        Bitmap to PNG By 轮回者
==============================================================================

对Bitmap对象直接使用

bitmap_obj.make_png(name[, path])

name:保存文件名
path:保存路径

感谢66、夏娜、金圭子的提醒和帮助!
   
==============================================================================
=end

module Zlib
  class Png_File < GzipWriter
    #--------------------------------------------------------------------------
    # ● 主处理
    #--------------------------------------------------------------------------
    def make_png(bitmap_Fx,mode)
      @mode = mode
      @bitmap_Fx = bitmap_Fx
      self.write(make_header)
      self.write(make_ihdr)
      self.write(make_idat)
      self.write(make_iend)
    end
    #--------------------------------------------------------------------------
    # ● PNG文件头数据块
    #--------------------------------------------------------------------------
    def make_header
      return [0x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a].pack("C*")
    end
    #--------------------------------------------------------------------------
    # ● PNG文件情报头数据块(IHDR)
    #--------------------------------------------------------------------------
    def make_ihdr
      ih_size = [13].pack("N")
      ih_sign = "IHDR"
      ih_width = [@bitmap_Fx.width].pack("N")
      ih_height = [@bitmap_Fx.height].pack("N")
      ih_bit_depth = [8].pack("C")
      ih_color_type = [6].pack("C")
      ih_compression_method = [0].pack("C")
      ih_filter_method = [0].pack("C")
      ih_interlace_method = [0].pack("C")
      string = ih_sign + ih_width + ih_height + ih_bit_depth + ih_color_type +
               ih_compression_method + ih_filter_method + ih_interlace_method
      ih_crc = [Zlib.crc32(string)].pack("N")
      return ih_size + string + ih_crc
    end
    #--------------------------------------------------------------------------
    # ● 生成图像数据(IDAT)
    #--------------------------------------------------------------------------
    def make_idat
      header = "\x49\x44\x41\x54"
      case @mode # 请54~
      when 1
        data = make_bitmap_data#1
      else
        data = make_bitmap_data
      end
      data = Zlib::Deflate.deflate(data, 8)
      crc = [Zlib.crc32(header + data)].pack("N")
      size = [data.length].pack("N")
      return size + header + data + crc
    end
    #--------------------------------------------------------------------------
    # ● 从Bitmap对象中生成图像数据 mode 1(请54~)
    #--------------------------------------------------------------------------
    def make_bitmap_data1
      w = @bitmap_Fx.width
      h = @bitmap_Fx.height
      data = []
      for y in 0...h
        data.push(0)
        for x in 0...w
          color = @bitmap_Fx.get_pixel(x, y)
          red = color.red
          green = color.green
          blue = color.blue
          alpha = color.alpha
          data.push(red)
          data.push(green)
          data.push(blue)
          data.push(alpha)
        end
      end
      return data.pack("C*")
    end
    #--------------------------------------------------------------------------
    # ● 从Bitmap对象中生成图像数据 mode 0
    #--------------------------------------------------------------------------
    def make_bitmap_data
      gz = Zlib::GzipWriter.open('hoge.gz')
      t_Fx = 0
      w = @bitmap_Fx.width
      h = @bitmap_Fx.height
      data = []
      for y in 0...h
        data.push(0)
        for x in 0...w
          t_Fx += 1
          if t_Fx % 10000 == 0
            Graphics.update
          end
          if t_Fx % 100000 == 0
            s = data.pack("C*")
            gz.write(s)
            data.clear
            #GC.start
          end
          color = @bitmap_Fx.get_pixel(x, y)
          red = color.red
          green = color.green
          blue = color.blue
          alpha = color.alpha
          data.push(red)
          data.push(green)
          data.push(blue)
          data.push(alpha)
        end
      end
      s = data.pack("C*")
      gz.write(s)
      gz.close   
      data.clear
      gz = Zlib::GzipReader.open('hoge.gz')
      data = gz.read
      gz.close
      File.delete('hoge.gz')
      return data
    end
    #--------------------------------------------------------------------------
    # ● PNG文件尾数据块(IEND)
    #--------------------------------------------------------------------------
    def make_iend
      ie_size = [0].pack("N")
      ie_sign = "IEND"
      ie_crc = [Zlib.crc32(ie_sign)].pack("N")
      return ie_size + ie_sign + ie_crc
    end
  end
end
#==============================================================================
# ■ Bitmap
#------------------------------------------------------------------------------
#  关联到Bitmap。
#==============================================================================
class Bitmap
  #--------------------------------------------------------------------------
  # ● 关联
  #--------------------------------------------------------------------------
  def make_png(name="like", path="",mode=0)
    make_dir(path) if path != ""
    Zlib::Png_File.open("temp.gz") {|gz|
      gz.make_png(self,mode)
    }
    Zlib::GzipReader.open("temp.gz") {|gz|
      $read = gz.read
    }
    f = File.open(path + name + ".png","wb")
    f.write($read)
    f.close
    File.delete('temp.gz')
    end
  #--------------------------------------------------------------------------
  # ● 生成保存路径
  #--------------------------------------------------------------------------
  def make_dir(path)
    dir = path.split("/")
    for i in 0...dir.size
      unless dir == "."
        add_dir = dir[0..i].join("/")
        begin
          Dir.mkdir(add_dir)
        rescue
        end
      end
    end
  end
end
#==============================================================================
#               本脚本出自www.66rpg.com,转载请注明。
#==============================================================================
#==============================================================================
# ** AnimSheetMaker
#==============================================================================
module AnimSheetMaker
  module_function
  #--------------------------------------------------------------------------
  # * Define constants
  #--------------------------------------------------------------------------
  SCREEN_WIDTH = 544
  SCREEN_HEIGHT = 416
  FRAME_SIZE = 192
  #--------------------------------------------------------------------------
  # * Make a sprite and center it
  #--------------------------------------------------------------------------
  @sprite = Sprite.new
  @sprite.x = SCREEN_WIDTH / 2
  @sprite.y = SCREEN_HEIGHT / 2
  #--------------------------------------------------------------------------
  # * Make Sheet
  #--------------------------------------------------------------------------
  def make_sheet(foldername)
    # Collect the files to be processed
    files = []
    Dir.foreach(foldername) {|filename|
    files.push(filename) if File.extname(filename).downcase == '.png'}
    # Make the sheet
    sheet_width = (files.size > 6 ? 5 : files.size) * FRAME_SIZE
    sheet_height = (files.size / 5 + 1) * FRAME_SIZE
    sheet = Bitmap.new(sheet_width, sheet_height)
    # Load each frame
    files.each_with_index {|filename, i|
    frame = Bitmap.new("#{foldername}/#{filename}")
    # Display current image
    set_sprite(frame)
    # Calculate frame offset and paste it on the sheet
    x = (i % 5) * FRAME_SIZE
    y = (i / 5) * FRAME_SIZE
    sheet.blt(x, y, frame, Rect.new(0, 0, FRAME_SIZE, FRAME_SIZE))
    # Dispose frame from memory
    frame.dispose}
    # Display current image
    set_sprite(sheet)
    # Output the sheet
    dirs = foldername.split('/')
    sheet.make_png(dirs[dirs.size - 1])
  end
  #--------------------------------------------------------------------------
  # * Set Sprite
  #--------------------------------------------------------------------------
  def set_sprite(bitmap=nil)
    @sprite.bitmap = bitmap
    return if bitmap.nil?
    # Center the image
    @sprite.ox = bitmap.width / 2
    @sprite.oy = bitmap.height / 2
    # Reduce size if width is larger than screen width
    if bitmap.width > SCREEN_WIDTH
      @sprite.zoom_x = SCREEN_WIDTH.to_f / bitmap.width
    end
    # Reduce size if height is larger than screen height
    if bitmap.height > SCREEN_HEIGHT
      @sprite.zoom_y = SCREEN_HEIGHT.to_f / bitmap.height
    end
    # Apply the lowest zoom (to maintain aspect ratio)
    if @sprite.zoom_x < @sprite.zoom_y
      @sprite.zoom_y = @sprite.zoom_x
    else
      @sprite.zoom_x = @sprite.zoom_y
    end
    # Update the screen
    Graphics.update
  end
  #--------------------------------------------------------------------------
  # * Load Config
  #--------------------------------------------------------------------------
  def load_config
    # Load the configuration file
    IO.readlines('Config.txt').each {|s| eval(s)}
  end
  #--------------------------------------------------------------------------
  # * Run the process
  #--------------------------------------------------------------------------
  # Load list of sheets to make
  start_time = Time.now
  load_config
  # Make the sheets
  List.each {|foldername| make_sheet(foldername)}
  # Shut down
  print "Completed in #{Time.now - start_time} seconds."
  exit
end



Instructions


  • Put all the frames of one animation in a folder and paste it in the program's directory.
  • Include the names of the folders in quotes in the "Config.txt" file.
  • Run "MakeAnimSheet.exe" and wait.


NOTE: The contents of Config.txt will be directly loaded, so do not make errors of any sort. Include the folder names in the "List" array.

Example:
               List = [ 'Animation1', 'folder2', 'anim' ]


Compatibility

Needs file writing permissions to save the temporary and output files.


Credits and Thanks


  • Fantasist - For making this.
  • www.66rpg.com - For the PNG output script.
  • Viviatus - For requesting this.



Author's Notes

You should find the program where you found this script. It is recommended that you use the program, since it is minimal and prevents a possible crash (when this script is used in RMXP).

If you have any questions, suggestions or comments, you can find me at:

- www.chaos-project.com
- www.quantumcore.forumotion.com

Enjoy ^_^
13
Current considerations







What I'm looking for



  • Free and/or open-source. Anything that I don't have to pay for using or distributing/selling the games I make with it.
  • Object oriented.
  • Preferably multi-platform. Games I make should be playable in Linux OSes especially.





Information I gathered during my search


Note: I'm not necessarily supporting and/or agreeing with the information below.






Note: I will most likely settle for Pygame, but if you have anything to say, please do so :)
14
RMXP Script Database / [XP] Missing File Logger
March 01, 2009, 12:44:38 pm
Missing File Logger
Authors: Fantasist
Version: 1.0
Type: Game Debug Utility
Key Term: Game Utility



Introduction

This script prevents the game from crashing due to missing files. It also maintains a list of missing files. It can create a text file listing all the lissing files, the latest time they were used and the number of times they were used. It can also check for all the missing files. It any files are found, they are removed from the list.


Features


  • Creates and maintains a dynamic list of missing resources, both graphics and audio.
  • Prevents the game from crashing due to missing files.
  • If any of the missing files are found, they are removed from the list.
  • You don't have to look through the log; all files will be sorted properly.
  • No repetitions: instead, the number of times the file was used will be displayed.
  • Date and time when a missing resource was last used will be stored.
  • Rescue bitmap which lets you know that a graphic is missing.



Screenshots

Not really needed.


Demo

http://www.sendspace.com/file/z8a1lt


Script

Place this script anywhere above "Main". I recommend you place it on top of all scripts.
Spoiler: ShowHide

#==============================================================================
# ** Missing File Logger
#------------------------------------------------------------------------------
# by Fantasist
# Version: 1.0
# Date: 1-Mar-2009
#------------------------------------------------------------------------------
# Version History:
#
#   1.0 - First version
#------------------------------------------------------------------------------
# Description:
#
#     This script prevents the game from crashing due to missing files. It also
#   maintains a list of missing files. It can create a text file listing all
#   the lissing files, the latest time they were used and the number of times
#   they were used. It can also check for all the missing files. It any files
#   are found, they are removed from the list.
#------------------------------------------------------------------------------
# Compatibility:
#
#     Should be compatible with almost everything.
#------------------------------------------------------------------------------
# Instructions:
#
#     Place this script anywhere above "Main". I recommend you place it on top
#   of all scripts.
#
#   You can save the collected data by using the following code:
#               FTSConfig.save_missing_file_data
#
#   You can create a readable log file by using the following code:
#               FTSConfig.write_missing_file_data
#
#   You can check if any of the missing files are found by using:
#               FTSConfig.check_missing_files
#------------------------------------------------------------------------------
# Configuration:
#
#     Scroll down a bit for the configuration.
#
#   RESCUE_BITMAP(true/false): Whether an X is shown in place of a missing file.
#   SAVE_FREQUENCY_TYPE(0/1):
#     0: Saves the data to a file when the game exits. (FOLLOW EXTRA STEPS!!)
#     1: Saves the data to a file each time a missing resource is used.
#
#   Extra Steps:
#     Go to "Main". Erase the last line ("end") and paste the following code:
=begin
#===========Start copying from here===========
ensure
  FTSConfig.save_missing_file_data
  FTSConfig.write_missing_file_data
end
#=====================END=====================
=end
#
#   NOTE:
#
#   The data will be saved when:
#    - You close the game normally.
#    - You use Alt+F4 to close the game.
#    - The game crashes but an but some error message is displayed.
#
#   The data will NOT be saved when:
#    - You close the game by using the "End Task" command from the Task Manager
#------------------------------------------------------------------------------
# Issues:
#
#   None.
#------------------------------------------------------------------------------
# Credits and Thanks:
#
#   Credits: Fantasist for making this.
#------------------------------------------------------------------------------
# Notes:
#
#     If you have any questions, suggestions or comments, you can
#   find me (Fantasist) at:
#
#    - www.chaos-project.com
#    - www.quantumcore.forumotion.com
#
#   Enjoy ^_^
#==============================================================================

#==============================================================================
# ** FTSConfig
#==============================================================================

module FTSConfig
 
  #::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  # * CONFIG BEGIN
  #::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  RESCUE_BITMAP = true
  SAVE_FREQUENCY_TYPE = 0
  #::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  # * CONFIG END
  #::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
 
  #--------------------------------------------------------------------------
  # * Load Missing File Data
  #--------------------------------------------------------------------------
  def self.load_missing_file_data
    if @missing_file_data == nil
      @missing_file_data = {}
    else
      f = File.open('Data/Missing File Data.rxdata', 'r')
      @missing_file_data = Marshal.load(f)
      f.close
    end
    self.check_missing_files
  end
  #--------------------------------------------------------------------------
  # * Save Missing File Data
  #--------------------------------------------------------------------------
  def self.save_missing_file_data
    f = File.open('Data/Missing File Data.rxdata', 'w')
    Marshal.dump(@missing_file_data, f)
    f.close
  end
  #--------------------------------------------------------------------------
  # * Check Missing Files
  #--------------------------------------------------------------------------
  def self.check_missing_files
    @missing_file_data.each_key do |key|
      @missing_file_data.delete(key) if FileTest.exist?(key)
    end
  end
  #--------------------------------------------------------------------------
  # * Log Missing File
  #--------------------------------------------------------------------------
  def self.log_missing_file(key)
    time = Time.now.strftime("%b-%d-%Y, %I:%M:%S")
    if @missing_file_data[key] == nil
      @missing_file_data[key] = [time, 1]
    else
      used_times = @missing_file_data[key][1]
      @missing_file_data[key] = [time, used_times + 1]
    end
  end
  #--------------------------------------------------------------------------
  # * Write Missing File Data
  #--------------------------------------------------------------------------
  def self.write_missing_file_data
    f = File.open('Missing File Log.txt', 'w')
    if @missing_file_data.empty?
      f.write('No files are missing.')
    else
      @missing_file_data.sort.each {|key, data| time, used = data[0], data[1]
      f.write("#{time} [#{used}]: #{key}\n")}
    end
    f.close
  end
  #--------------------------------------------------------------------------
  # * Load Missing File Data on Startup
  #--------------------------------------------------------------------------
  self.load_missing_file_data
end

#==============================================================================
# ** RPG::Cache
#==============================================================================

module RPG::Cache
  class << self
    #--------------------------------------------------------------------------
    # * Aliases
    #--------------------------------------------------------------------------
    alias fts_mfl_cache_load_bitmap load_bitmap
    #--------------------------------------------------------------------------
    # * Load Bitmap
    #--------------------------------------------------------------------------
    def load_bitmap(folder_name, filename, hue = 0)
      fts_mfl_cache_load_bitmap(folder_name, filename, hue)
    rescue
      FTSConfig.log_missing_file(folder_name + filename)
      if FTSConfig::SAVE_FREQUENCY_TYPE == 1
        FTSConfig.save_missing_file_data
      end
      return rescue_bitmap
    end
    #--------------------------------------------------------------------------
    # * Rescue Bitmap
    #--------------------------------------------------------------------------
    def rescue_bitmap
      if @cache['rescue_bitmap'] == nil || @cache['rescue_bitmap'].disposed?
        b = Bitmap.new(24, 24)
        if FTSConfig::RESCUE_BITMAP
          b.fill_rect(b.rect, Color.new(255, 255, 255))
          b.width.times {|i|
          b.set_pixel(i, i, Color.new(255, 0, 0))
          b.set_pixel(i, b.height-i, Color.new(255, 0, 0))}
        end
        @cache['rescue_bitmap'] = b
      end
      return @cache['rescue_bitmap']
    end
  end
end

#==============================================================================
# ** Audio
#==============================================================================

module Audio
  class << self
    #--------------------------------------------------------------------------
    # * Aliases
    #--------------------------------------------------------------------------
    alias fts_mfl_audio_bgm_play bgm_play
    alias fts_mfl_audio_bgs_play bgs_play
    alias fts_mfl_audio_me_play me_play
    alias fts_mfl_audio_se_play se_play
    #--------------------------------------------------------------------------
    # * Play Background Music
    #--------------------------------------------------------------------------
    def bgm_play(filename, volume=100, pitch=100)
      fts_mfl_audio_bgm_play(filename, volume, pitch)
    rescue
      FTSConfig.log_missing_file(filename)
    end
    #--------------------------------------------------------------------------
    # * Play Background Sound
    #--------------------------------------------------------------------------
    def bgs_play(filename, volume=100, pitch=100)
      fts_mfl_audio_bgs_play(filename, volume, pitch)
    rescue
      FTSConfig.log_missing_file(filename)
    end
    #--------------------------------------------------------------------------
    # * Play Play Music Effect
    #--------------------------------------------------------------------------
    def me_play(filename, volume=100, pitch=100)
      fts_mfl_audio_me_play(filename, volume, pitch)
    rescue
      FTSConfig.log_missing_file(filename)
    end
    #--------------------------------------------------------------------------
    # * Play Sound Effect
    #--------------------------------------------------------------------------
    def se_play(filename, volume=100, pitch=100)
      fts_mfl_audio_se_play(filename, volume, pitch)
    rescue
      FTSConfig.log_missing_file(filename)
    end
  end
end



Instructions

You can save the collected data by using the following code:
FTSConfig.save_missing_file_data


You can create a readable log file by using the following code:
FTSConfig.write_missing_file_data


You can check if any of the missing files are found by using:
FTSConfig.check_missing_files


Remember to mod "Main" if you set the "SAVE_FREQUENCY_TYPE" setting to 0. Even if it is 1, there's no harm in applying this mod.

Instructions to mod "Main":

Go to "Main". Erase the last line ("end") and paste the following code:

#===========Start copying from here===========
ensure
  FTSConfig.save_missing_file_data
  FTSConfig.write_missing_file_data if $DEBUG
end


If you set the SAVE_FREQUENCY_TYPE to 0:

The data will be saved when:

  • You close the game normally.
  • You use Alt+F4 to close the game.
  • The game crashes but an but some error message is displayed.


The data will NOT be saved when:

  • You close the game by using the "End Task" command from the Task Manager



Compatibility

Should be compatible with almost everything.


Credits and Thanks


  • Fantasist, for making this.



Author's Notes

If you have any questions, suggestions or comments, you can find me (Fantasist) at:



Enjoy ^_^
15
Welcome! / Taking a break from RMXP
February 06, 2009, 10:33:26 am
About time too. If I don't, things will go downhill real fast. I have a few script requests to complete and after that, POOF! I won't come even close to RMXP anytime soon. I really need a break. I decided to channel that time towards music making. I found comfort with that: no goals, no worries, no multiple things to take care of. Just one thing in mind at a time, and it's really rewarding. I'll probably get back after a couple of months or maybe a year, I really have no idea.

Of course, this doesn't mean I'll leave CP, I instinctively visit this site when I'm bored. I won't be taking any requests or participate in anything much. I'll just linger around.

So that's it. To everyone who I promised scripting help, sorry I delayed things. I'll end everything by this weekend, the next Saturday at most.
16
Everytime I close a window, this damn error shows up and explorer.exe restarts. Sometimes, some explorer processes won't get terminated, they're still there in the task manager consuming memory.



I don't even know where to start. Of course, it might have something to do with an improper uninstall of Visual Studio, maybe, but it's driving me crazy. :argh:
17
Basically what the title says. Anything is appreciated, from graphics issues, layout issues, functionality, visibility, ease of use and of course, lag.

Things to remember while judging:
- That weird orb thing is the actual intended ring command, I'm using the command window temporarily.
- The graphics are still experimental, but those might be what i'll be using with some improvements. Mistakes like the green vertical stripes will be taken care of.
- The windowskin is pretty weird (with the metallic frame and the glass cursor...) sorry about that, I'll fix it asap.
- About the lag. Since this is still in development, the code is not optimized. If there isn't much lag, that's well and good. If it's too bad, then I'll have to look into it
- Thanks for taking the time, I appreciate it :)

Here's the encrypted demo (704 KB):

http://www.sendspace.com/file/3onz7z

And screenshots to spark interest:





18
RMXP Script Database / [XP][VX] Key Simulator
December 11, 2008, 01:55:28 pm
Key Simulator
Authors: Fantasist
Version: 0.1
Type: Low-level Functionality Addon
Key Term: Game Utility



Introduction

This script can simulate the pressing of the keyboard and mouse keys. You can use this, for example, to switch to fullscreen by simulating the ALT and ENTER keys.


Features


  • Simulates the most common keyboard and mouse keys.
  • More of a development tool than a script.



Screenshots

n/a


Demo

Place this piece of code just below this script and you're game goes fullscreen on start. If you still want a demo, I'll put it up, but remember, respect my laziness O:)
Fullscreen Snippet: ShowHide

VK.down(VK::ALT) # ALT down
VK.down(VK::ENTER) # ENTER down
VK.up(VK::ENTER) # ENTER up
VK.up(VK::ALT) # ALT up



Script

Place it in the very first slot. If you don't like that, you can paste this virtually anywhere before main.
Spoiler: ShowHide

#==============================================================================
# ** Key Simulator
#------------------------------------------------------------------------------
# by Fantasist
# Version: 0.1
# Date: 11-Dec-2008
#------------------------------------------------------------------------------
# Version History:
#
#   0.1 - First version
#------------------------------------------------------------------------------
# Description:
#
#     This script can simulate the pressing of the keyboard and mouse keys.
#   You can use this, for example, to switch to fullscreen by simulating the
#   ALT and ENTER keys.
#------------------------------------------------------------------------------
# Compatibility:
#
#     Should be compatible with almost everything.
#     Might not be compatible with similar scripts.
#------------------------------------------------------------------------------
# Instructions:
#
#     This script can simulate most of the common keyboard and mouse presses.
#   You can simulate three things: "key down" (press), "key up" (release) and
#   "trigger key" (press and release)
#
#   Syntax:
#             VK.down(VIRTUAL_KEY)
#             VK.up(VIRTUAL_KEY)
#             VK.trigger(VIRTUAL_KEY)
#
#   where VIRTUAL_KEY is the constant representing the required key.
#   For the exact name of the constant, scroll down and find the required key.
#
#   Number keys work a little different. For the number n, VIRTUAL_KEY is:#
#              NUM[n]
#   So 2, 6 and 0 are NUM[2], NUM[6], NUM[0] respectively.
#   Note that this is only the case with the number keys above the letter keys.
#   Numpad keys have individual constants. Numpad 4 is NUMPAD4
#
#   Example: Simulating "Alt + Enter"
#
#     Scroll down to find the constants for alt and enter keys. They are ALT
#   and ENTER respectively. Now, we need to simulate "alt down", "enter down",
#   "enter up", "alt up". The following code does that:
#
#             VK.down(VK::ALT) # ALT down
#             VK.down(VK::ENTER) # ENTER down
#             VK.up(VK::ENTER) # ENTER up
#             VK.up(VK::ALT) # ALT up
#
#------------------------------------------------------------------------------
# Issues:
#
#     I have very limited experience in this area, so I don't know what some
#   keys are (for example the OEM keys and such). The constants here are used
#   directly from the microsoft MSDN page regarding virtual keys.
#------------------------------------------------------------------------------
# Credits and Thanks:
#
#   Credits: Fantasist for making this.
#   Thanks: Memor-X for requesting this.
#------------------------------------------------------------------------------
# Notes:
#
#     If you have any questions, suggestions or comments, you can
#   find me (Fantasist) at:
#
#    - www.chaos-project.com
#    - www.quantumcore.forumotion.com
#
#   Enjoy ^_^
#==============================================================================

#==============================================================================
# ** module VK (Virtual Keys)
#==============================================================================

module VK
 
  V_KEYBD = Win32API.new 'user32.dll', 'keybd_event', ['i', 'i', 'l', 'l'], 'v'
 
  def self.down(vk)
    V_KEYBD.call(vk, 0, 0, 0)
  end
 
  def self.up(vk)
    V_KEYBD.call(vk, 0, 2, 0)
  end
 
  def self.trigger(vk)
    V_KEYBD.call(vk, 0, 0, 0)
    V_KEYBD.call(vk, 0, 2, 0)
  end
 
  LBUTTON = 0x01 # Left mouse button
  RBUTTON = 0x02 # Right mouse button
  CANCEL = 0X03 # Control-break processing
  MBUTTON = 0x04 # Middle mouse button (Three-button mouse)
  XBUTTON1 = 0x05 # Windows 2000/XP: X1 mouse button
  XBUTTON2 = 0x06 # Windows 2000/XP: X2 mouse button
  BACK = 0x08 # BACKSPACE key
  TAB = 0x09 # TAB key
  CLEAR = 0x0C # CLEAR key
  ENTER = 0x0D # ENTER key
  SHIFT = 0x10 # SHIFT key
  CONTROL = 0x11 # CTRL key
  ALT = 0x12 # ALT key
  PAUSE = 0x13 # PAUSE key
  CAPITAL = 0x14 # CAPS LOCK key
  ESCAPE = 0x1B # ESC key
  SPACE = 0x20 # SPACEBAR
  PRIOR = 0x21 # PAGE UP key
  NEXT = 0x22 # PAGE DOWN key
  END_ = 0x23 # END key
  HOME = 0x24 # HOME key
  LEFT = 0x25 # LEFT ARROW key
  UP = 0x26 # UP ARROW key
  RIGHT = 0x27 # RIGHT ARROW key
  DOWN = 0x28 # DOWN ARROW key
  SELECT = 0x29 # SELECT key
  PRINT = 0x2A # PRINT key
  EXECUTE = 0x2B # EXECUTE key
  SNAPSHOT = 0x2C # PRINT SCREEN key
  INSERT = 0x2D # INS key
  DELETE = 0x2E # DEL key
  HELP = 0x2F # HELP key
  NUM = [0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39]
  A = 0x41 # A key
  B = 0x42 # B key
  C = 0x43 # C key
  D = 0x44 # D key
  E = 0x45 # E key
  F = 0x46 # F key
  G = 0x47 # G key
  H = 0x48 # H key
  I = 0x49 # I key
  J = 0x4A # J key
  K = 0x4B # K key
  L = 0x4C # L key
  M = 0x4D # M key
  N = 0x4E # N key
  O = 0x4F # O key
  P = 0x50 # P key
  Q = 0x51 # Q key
  R = 0x52 # R key
  S = 0x53 # S key
  T = 0x54 # T key
  U = 0x55 # U key
  V = 0x56 # V key
  W = 0x57 # W key
  X = 0x58 # X key
  Y = 0x59 # Y key
  Z = 0x5A # Z key
  LWIN = 0x5B # Left Windows key (Microsoft Natural keyboard)
  RWIN = 0x5C # Right Windows key (Natural keyboard)
  APPS = 0x5D # Applications key (Natural keyboard)
  SLEEP = 0x5F # Computer Sleep key
  NUMPAD0 = 0x60 # Numeric keypad 0 key
  NUMPAD1 = 0x61 # Numeric keypad 1 key
  NUMPAD2 = 0x62 # Numeric keypad 2 key
  NUMPAD3 = 0x63 # Numeric keypad 3 key
  NUMPAD4 = 0x64 # Numeric keypad 4 key
  NUMPAD5 = 0x65 # Numeric keypad 5 key
  NUMPAD6 = 0x66 # Numeric keypad 6 key
  NUMPAD7 = 0x67 # Numeric keypad 7 key
  NUMPAD8 = 0x68 # Numeric keypad 8 key
  NUMPAD9 = 0x69 # Numeric keypad 9 key
  MULTIPLY = 0x6A # Multiply key
  ADD = 0x6B # Add key
  SEPARATOR = 0x6C # Separator key
  SUBTRACT = 0x6D # Subtract key
  DECIMAL = 0x6E # Decimal key
  DIVIDE = 0x6F # Divide key
  F1 = 0x70 # F1 key
  F2 = 0x71 # F2 key
  F3 = 0x72 # F3 key
  F4 = 0x73 # F4 key
  F5 = 0x74 # F5 key
  F6 = 0x75 # F6 key
  F7 = 0x76 # F7 key
  F8 = 0x77 # F8 key
  F9 = 0x78 # F9 key
  F10 = 0x79 # F10 key
  F11 = 0x7A # F11 key
  F12 = 0x7B # F12 key
  F13 = 0x7C # F13 key
  F14 = 0x7D # F14 key
  F15 = 0x7E # F15 key
  F16 = 0x7F # F16 key
  NUMLOCK = 0x90 # NUM LOCK key
  SCROLL = 0x91 # SCROLL LOCK key
  LSHIFT = 0xA0 # Left SHIFT key
  RSHIFT = 0xA1 # Right SHIFT key
  LCONTROL = 0xA2 # Left CONTROL key
  RCONTROL = 0xA3 # Right CONTROL key
  LMENU = 0xA4 # Left MENU key
  RMENU = 0xA5 # Right MENU key
  BROWSER_BACK = 0xA6 # Windows 2000/XP: Browser Back key
  BROWSER_FORWARD = 0xA7 # Windows 2000/XP: Browser Forward key
  BROWSER_REFRESH = 0xA8 # Windows 2000/XP: Browser Refresh key
  BROWSER_STOP = 0xA9 # Windows 2000/XP: Browser Stop key
  BROWSER_SEARCH = 0xAA # Windows 2000/XP: Browser Search key
  BROWSER_FAVORITES = 0xAB # Windows 2000/XP: Browser Favorites key
  BROWSER_HOME = 0xAC # Windows 2000/XP: Browser Start and Home key
  VOLUME_MUTE = 0xAD # Windows 2000/XP: Volume Mute key
  VOLUME_DOWN = 0xAE # Windows 2000/XP: Volume Down key
  VOLUME_UP = 0xAF # Windows 2000/XP: Volume Up key
  MEDIA_NEXT_TRACK = 0xB0 # Windows 2000/XP: Next Track key
  MEDIA_PREV_TRACK = 0xB1 # Windows 2000/XP: Previous Track key
  MEDIA_STOP = 0xB2 # Windows 2000/XP: Stop Media key
  MEDIA_PLAY_PAUSE = 0xB3 # Windows 2000/XP: Play/Pause Media key
  LAUNCH_MAIL = 0xB4 # Windows 2000/XP: Start Mail key
  LAUNCH_MEDIA_SELECT = 0xB5 # Windows 2000/XP: Select Media key
  LAUNCH_APP1 = 0xB6 # Windows 2000/XP: Start Application 1 key
  LAUNCH_APP2 = 0xB7 # Windows 2000/XP: Start Application 2 key
  OEM_1 = 0xBA # Used for miscellaneous characters; it can vary by keyboard.
  #Windows 2000/XP: For the US standard keyboard, the ';:' key
  OEM_PLUS = 0xBB # Windows 2000/XP: For any country/region, the '+' key
  OEM_COMMA = 0xBC # Windows 2000/XP: For any country/region, the ',' key
  OEM_MINUS = 0xBD # Windows 2000/XP: For any country/region, the '-' key
  OEM_PERIOD = 0xBE # Windows 2000/XP: For any country/region, the '.' key
  OEM_2 = 0xBF # Used for miscellaneous characters; it can vary by keyboard.
  #Windows 2000/XP: For the US standard keyboard, the '/?' key
  OEM_3 = 0xC0 # Used for miscellaneous characters; it can vary by keyboard.
  #Windows 2000/XP: For the US standard keyboard, the '`~' key
  OEM_4 = 0xDB # Used for miscellaneous characters; it can vary by keyboard.
  #Windows 2000/XP: For the US standard keyboard, the '[{' key
  OEM_5 = 0xDC # Used for miscellaneous characters; it can vary by keyboard.
  #Windows 2000/XP: For the US standard keyboard, the '\|' key
  OEM_6 = 0xDD # Used for miscellaneous characters; it can vary by keyboard.
  #Windows 2000/XP: For the US standard keyboard, the ']}' key
  OEM_7 = 0xDE # Used for miscellaneous characters; it can vary by keyboard.
  #Windows 2000/XP: For the US standard keyboard, the 'single-quote/double-quote' key
  OEM_8 = 0xDF # Used for miscellaneous characters; it can vary by keyboard.
  OEM_102 = 0xE2 # Windows 2000/XP: Either the angle bracket key or the backslash key on the RT 102-key keyboard
  PROCESSKEY = 0xE5 # Windows 95/98/Me, Windows NT 4.0, Windows 2000/XP: IME PROCESS key
  PLAY = 0xFA # Play key
  ZOOM = 0xFB # Zoom key
  OEM_CLEAR = 0xFE # Clear key
 
end



Instructions

This script can simulate most of the common keyboard and mouse presses. You can simulate three things:
"key down" (press), "key up" (release) and "trigger key" (press and release). The syntaxes respectively are:

VK.down(VIRTUAL_KEY)
VK.up(VIRTUAL_KEY)
VK.trigger(VIRTUAL_KEY)

where VIRTUAL_KEY is the constant representing the required key.
For the exact name of the constant, check the script.
Number keys work a little different. For the number n, VIRTUAL_KEY is:
NUM[n]

So 2, 6 and 0 are "NUM[2]", "NUM[6]", "NUM[0]" respectively.
Note that this is only the case with the number keys above the letter keys. Numpad keys have individual constants. So the constant for Numpad 4 is NUMPAD4

Example: Simulating "Alt + Enter"

     Scroll down to find the constants for alt and enter keys. They are ALT
   and ENTER respectively. Now, we need to simulate "alt down", "enter down",
   "enter up", "alt up". The following code does that:

VK.down(VK::ALT) # ALT down
VK.down(VK::ENTER) # ENTER down
VK.up(VK::ENTER) # ENTER up
VK.up(VK::ALT) # ALT up



Compatibility

Should be compatible with almost everything. Might not be compatible with similar scripts.


Credits and Thanks

Credits: Fantasist for making this.
Thanks: Memor-X for requesting this.


Author's Notes

If you have any questions, suggestions or comments, you can find me (Fantasist) at:

    - www.chaos-project.com
    - www.quantumcore.forumotion.com

Enjoy ^_^
19
I need those merged ultimate interior and exterior tilesets. I know they're out there, I remember downloading them long ago. If there are demos with the passabilities set, it'd be MUCH better. Can anyone help please?
20
General Discussion / [RESOLVED]Visual Studio 2008 Dilema
November 29, 2008, 12:32:30 pm
Here's the deal. I'm upgrading to VS2008 from VS2005. I don't really have any experience but I dug around and it seems VS2008 is better. Now, as a budding computer engineer, what should I go for? I mean Visual Basic, Visual C++, Visual C#, etc. My idea is Visual C# (since Bliz mentioned it's easy). If I want to go for that, do I have to download everything or will Visual C# Express alone will do?

Bah, enough with the confusion >.< I want to learn some Visual <whatever> which will be most benificial (in terms of saving time b/c of easiness or knowing a more common or accepted language) and I want the minimal possible installation. Also I'm open to going aginst the minimal rule if it's worth it. I have limited HDD space in my laptop and I want to get the best deal. Just guide me :)

EDIT:

I've decided to go for Visual C# Express. I just needed a professional opinion and I got it from Bliz :)
21
My game involves some serious space art and instead of ripping off wallpapers and the like, I want to learn to make space scenes with photoshop. Here's my first attempt:


I know the star field is awful, but the planet was my priority. The texture I used for the planet couldv'e been a lot better, but whatever. Comments, suggestions and tricks are appreciated :)
22
I need the Ruby code for the following pseudo-code.


def bind(variable_pointer, min, max)
  if given_var < min
    given_var = min
  elsif given_var > max
    given_var = max
  end
end


Intended application:


a = 1000
b = 1

bind(a, 200, 800)
p a # Output => 800

bind(b, 200, 800)
p b # Output => 200


Any tips? :)
23
Video Games / Any good DBZ 3D game for the PC?
November 14, 2008, 05:26:27 am
Seriously, Isn't there ANY good DBZ 3D fighting game for the PC? I've tried Mugen which is far from 3D, but that's not at all enough. If someone knows anything, could you please tell me?
24
RMXP Script Database / [XP] Tiling wallpapers for windows
November 10, 2008, 08:55:01 am
Tiling wallpapers for windows
Authors: Fantasist
Version: 1.1
Type: Graphic Modification
Key Term: Misc Add-on



Introduction

The window background can be tiled in RMXP, but it's normally stretched. This small scriptlet reads the filename of the skin for a tile flag and decides whether to tile or stretch the wallpaper.


Features


  • Tile or stretch the wallpaper depending upon the windowskin filename
  • Customizable tile flag in the filename



Screenshots

Name of the windowskin file is "Clipboard1":


Name of the windowskin file is "Clipboard1 [TILE]:


Don't blame me for the horrible example please ^_^'


Demo

Come on, tell me you aren't that lazy :P


Script

Paste this script above "Main" and below "Window_Base". Paste this BELOW any default scripts you're using any.
Spoiler: ShowHide

class Window_Base
 
  TILE_FLAG = "[TILE]"
  # Wallpaper will be tiled if this word is found
  # in the windowskin's filename.
 
  alias fts_tilebgm_skin windowskin=
  def windowskin=(bmp)
    fts_tilebgm_skin(bmp)
    if @windowskin_name
      self.stretch = !@windowskin_name.downcase.include?(TILE_FLAG.downcase)
    end
  end
 
end



Instructions

You can set the TILE_FLAG to any word you want. The wallpaper will be tiled if this word is found in the windowskin filename. The default is "[TILE]", so here are some examples:

Skin1 [TILE]
Skin1[TILE]
Skin[tile]1
[tIlE]Skin1
asdsd[tiLE]asdjfc

Remember that the alphabets are not case-sensitive, meaning [tile], [TILE], [TIle], all of them will work.


Compatibility

Should be compatible with almost everything :)


Credits and Thanks


  • I can't possibly demand credit for something like this ^_^'



Author's Notes

This isn't much of a script. This whole "script", is in essence the "stretch" property of the in-built "Window" class. Here's a quote from the RMXP help file:
Quotestretch
The wallpaper display method. If TRUE, stretches the wallpaper graphic; if FALSE, tiles it. The default value is TRUE.

25
Resource Requests / VX to XP Conversion Help
November 09, 2008, 07:30:44 am
I'm trying to make an RMVX RTP for RMXP (VX resources converted for use in RMXP). Audio is piece of cake, I just had to move them. Most of the graphics are done too, but obviously, I haven't converted charsets, tilesets and autotiles. Does anyone know any tools which can split PNG images without messing up their transparency? I've tried some software but they either only work with BMPs and JPGs, or they can't output to PNG.

Here's a list of what I completed and what I need:

Audio

- BGS
- BGM
- ME
- SE

Graphics

- Animations
- Autotiles
- Battlebacks
- Battlers
- Characters
- Fogs
- Gameovers
- Icons
- Panoramas
- Tilesets
- Titles
- Transitions
- Windowskins

Legend:
Green - Done
Red - Not done

After I split the images, I need to work out each charset. I could also use a tool which can automate the charset conversion. I think all of this is possible through Photoshop scripts, but I have no idea about them. I'd appreciate some support :)
26
I recently got a 4GB JetFlash pen drive. I gave it to a friend and god knows what he did, it's not working right.

Symptoms:
When I plug the drive, the LED glows. The drive appears in My Computer. But when I try to access it, it says "Please insert disk into drive". I've tried double-clicking the icon and typing the drive letter in the address bar. Nothing worked. I can't even format it cause when I try to, it says the same thing: insert disk into drive.

Is there any way I can recover it?
27
Resource Database / Fantasist's Resource(s)
October 28, 2008, 01:43:39 am
I'm not much of a spriter or anything but I make stuff sometimes.

Here's a windowskin I made for my game, QC Glass:
Spoiler: ShowHide


Some screenshots:



There's a little bit of color in the wallpaper, so you can try changing the hue to get other colors like orange, green, or anything. The negative is that the reflection on the top of the wallpaper gets a bit blurry when used on big windows like the menu status screen. Anyway, enjoy ^_^



QC Glass 2. I made the reflection straight, so the problem with big windows is gone. I've reduced the brightness of the reflection, so visibility is better. I've changed the hue of the battle cursor to pure blue (instead of cyan) so that hue changes can be precise (no more pink cursors for red skin). Here it is:
Spoiler: ShowHide


Terms of Use:
You can edit and/or use these resources in commercial or non-commercial games for free, provided credit is given to me (Fantasist).



Chaos Project and Hyperion Windowskin Series

I am very excited about the development of ARC. It made me realize once more what a great community this is, and how much I've learned over the many years I've been here. I felt I had to contribute something to the community, especially to the ARC project. So I sat down and finished a windowskin idea I had for ages. I present to you: The Chaos Project and Hyperion windowskin sets:

Chaos Project Windowskin Set: ShowHide

Download Chaos Project Windowskin Set

Hyperion Windowskin Set: ShowHide

Download Hyperion Windowskin Set
Download Old Version

I spent 7 hours straight on those, though I admit a lot of time was wasted in experimenting to see what looked good. I'm pretty satisfied with the results. I used Blizzard's Jewel graphic he used in the forum themes, because my main aim with these was to remind us of Chaos Project :)
And in case you were wondering about the names, they refer to:
Chaos Project: This forum
Hyperion: Nemesis's Flagship in the game "Legend of Lexima IV: Chaos Project"

These windowskins are under the following license:
Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0)
Basically:
- Attribution
- Share Alike
All conditions are waived for the developers of the ARC project.



I have been working on a few edits to the default battle system and it includes basic animated battlers. To test the system, I made edits to the Arshes charset to make some poses. I ended up with these:
Battle Poses: ShowHide
Attack:

On Hit:

Idle:

Item:

Skill:

Unresized standing pose


They aren't much, but I really hope more of these kind of battlers were made, you kow. I mean, truly front view battlers, so people can make something like this:
Screenshot: ShowHide


These are more to inspire similar work than actually being usable.
28
Electronic and Computer Section / RM Launch XP
October 17, 2008, 05:34:26 am
Some or most of you must've used the Resources Converter with Project Launcher made by Bodom-Child. Here's a screenshot:


I managed to make a similar one of my own. I present to you, the RM Launch XP, a quick launch tool for RMXP. Here's a screenshot:



The only set back with is that you need to have .NET Framework to run this tool. If you know a way I can make it truly stand-alone, please let me know.

DOWNLOAD
29
It came as a bit of a surprise for me, but I can actually go for a good graphics card right now :)
My desktop PC is a bit old, so I don't know if it supports PCI Express cards (most likely, it won't). My vendor told me that if he takes a look at my motherboard, he can tell which type I can use (AGP or PCI). I want to go for a 256MB card. Since I can't afford this much money anytime soon again, I want to make sure I get the best out of what I spend. So assuming my motherboard doesn't support PCI graphics cards, I need some advice on what I should go for.

The sooner the better btw, cause I can't wait :woot:

EDIT: I've done some digging and I'm sure I found the best card for my old motherboard.

Card Details
30
We have UNIX Shell Programing in our syllabus and the PCs in the lab are not very... accessible. So I need an emulator to practice Shell commands. If it can emulate a client, it's all the more better. Any directions?