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 - KK20

31
Entertainment / RPG Maker Memes
October 13, 2015, 04:02:54 pm
Topic is self explanatory. Find images, throw some Impact font in there, and meme it up.

Spoilers please.

Spoiler: ShowHide

Spoiler: ShowHide

NPCs be like...: ShowHide

Typical RM Project: ShowHide
32
I've looked up some number of posts regarding anything about a ViewSonic VX2250wm-LED (or any monitors in general) that constantly lose the input signal but regain it 4-5 seconds later. I took a look at the online manual (the monitor came with my computer) and there's nothing that mentions a couple of the issues I have now and had in the past. Also note that this problem happens randomly with various frequencies; sometimes it happens once and is good the rest of the day, other times it happens in rapid succession and makes the monitor useless.

A lot of people point to the fact that it might be the graphics card. I'm using two monitors for my setup, both of which are connected to the graphics card. One port has only a DVI output while the second has a DVI and VGA. Both monitors are using DVI (the other monitor uses a DVI-to-HDMI cable). These are things I've done that repeated the same problem:

  • Swapped the DVI output ports each monitor used

  • Got a different DVI cable from my family's computer

  • Tried using VGA instead


So my obvious conclusion is that it's not the graphics card (which I figured since this problem only affects one of the monitors). Don't think I have a warranty since I didn't buy it (remember that my computer was sold to me from a family friend who was giving away his old parts). Any other advice you might have for me would be appreciated before I consider buying a new monitor and/or breaking inside it to see what could be wrong.
33
General Discussion / RPG Maker MV
August 07, 2015, 05:10:42 pm
http://www.rpgmakerweb.com/products/programs/rpg-maker-mv

Big things to note:

  • JavaScript and HTML5 -- no longer Ruby

  • HIDDEN CLASSES ARE NO MORE!!!!!

  • Multi-platform (Mac gets love)

  • Touch input for mobile devices

  • Front and side-view battles

  • The return multi-layer mapping

  • Import plugins instead of copy-pasting scripts

  • 816x624 resolution (higher is possible with plugin -- 1920x1080 confirmed), 48x48 instead of 32x32 as default graphic size

  • Event searching

  • Possible pixel movement built-in?



Discuss.

I'd be willing to pick this up and give it a whirl.
34
Easy Script Importer/Exporter
Authors: KK20
Version: 4.0
Type: Scripts2Files
Key Term: Scripting Tool



Introduction

Ever wanted to export your RPG Maker scripts to .rb files, make changes to them in another text editor, and then import them back into your project? Look no further, fellow scripters.
ESIE is easy to use!



Features


  • Plug-n-use (not play--this does nothing for your game itself) with minimal configuration

  • Export your scripts to .rb files; what you do with them now is not my problem

  • New to Version 4.0: Organize your scripts by putting them in subfolders!

  • Did you use another text editor? Well import your changes back into RPG Maker!

  • Playtest your game without having to re-import your scripts every time. Use your favorite text editor, save changes to the script's file, and playtest!

  • Automatically adjusts to whatever version of RPG Maker you are using; no hassles~

  • ...and you can disable it too if you want...:(




Screenshots

OLD - Version 1.0
Large GIF: ShowHide

Demonstrating Playtest feature:
Spoiler: ShowHide



Demo

None


Script

Spoiler: ShowHide

=begin
================================================================================
Easy Script Importer-Exporter                                       Version 4.0
by KK20                                                             Jul 18 2018
--------------------------------------------------------------------------------

[ Introduction ]++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  Ever wanted to export your RPG Maker scripts to .rb files, make changes to
  them in another text editor, and then import them back into your project?
  Look no further, fellow scripters. ESIE is easy to use!
 
[ Instructions ]++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  Place this script at the top of your script list to ensure it runs first.
  Make any changes to the configuration variables below if desired.
  Run your game and a message box will prompt success and close the game.
 
  If exporting, you can find the folder containing a bunch of .rb files in your
  project folder. A new file called "!script_order.csv" will tell this script
  in what order to import your script files back into RPG Maker. As such, you
  can create new .rb files and include its filename into "!script_order.csv"
  without ever having to open RPG Maker!
 
  If importing, please close your project (DO NOT SAVE IT) and re-open it.
 
  ** As of Version 4.0, subfolders are now possible!
 
  - Script names that start with the character defined in FOLDER_INDICATOR will
    be subfolders within your exported scripts folder.
  - You can specify the depth of subfolders by increasing the number
    FOLDER_INDICATOR characters.
  - Any scripts below the subfolder will be placed within it.
  - A script name that only consists of FOLDER_INDICATOR characters indicates
    "closing" that subfolder; scripts below will now be placed in the previous
    (i.e. its parent's) subfolder.
  - You may reuse a folder name multiple times. You can have subfolders named
    after script authors and keep their scripts grouped together without
    disrupting your script order (and potentially crashing your project).
 
  Here's an example assuming FOLDER_INDICATOR is set to '@' :
 
  Project Script List       Project Directory
 
                            Scripts_Export_Folder/
  EarlyScript               ├ EarlyScript.rb
  @Base Scripts             ├ Base Scripts/
  @@Game Classes            │ ├ Game Classes/
  Game_Temp                 │ │ ├ Game_Temp.rb
  Game_System               │ │ └ Game_System.rb
  @@Sprite Classes          │ └ Sprite Classes/
  Sprite_Character          │   └ Sprite_Character
  @Custom Scripts           ├ Custom Scripts/
  MyScript                  │ └ MyScript.rb
  @                         │
  Main                      └ Main.rb
 
[ Compatibility ]+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  This script already has methods to ensure it will run properly on any RPG
  Maker version. This script does not rely on nor makes changes to any existing
  scripts, so it is 100% compatible with anything.
 
[ Credits ]+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  KK20 - made this script
  GubiD - referenced his VXA Script Import/Export
  FiXato and HIRATA Yasuyuki - referenced VX/VXA Script Exporter
  ForeverZer0 - suggesting and using Win32API to read .ini file

================================================================================
=end

#******************************************************************************
# B E G I N   C O N F I G U R A T I O N
#******************************************************************************
#------------------------------------------------------------------------------
# Set the script's mode. Will export the scripts, import the scripts, or do
# absolutely nothing.
#       ACCEPTED VALUES:
#       0 = Disable (pretends like this script doesn't even exist)
#       1 = Export
#       2 = Import
#       3 = Playtest (import scripts from folder to playtest game; does not
#                     replace or create a 'Scripts.r_data' file)
#------------------------------------------------------------------------------
IMPORT_EXPORT_MODE = 1
#------------------------------------------------------------------------------
# Folder name where scripts are imported from and exported to
#------------------------------------------------------------------------------
FOLDER_NAME = "Scripts"
#------------------------------------------------------------------------------
# Character positioned at the start of a script name to indicate a subfolder.
# All scripts (or other subfolders) below it will be placed within this folder.
# This must only be a one character string.
#------------------------------------------------------------------------------
FOLDER_INDICATOR = '@'
#------------------------------------------------------------------------------
# This tag will be added to the end of a script name in the CSV file for any
# scripts that do not have code in them. This tag will be removed when imported
# back into the project. Note that this does not apply to scripts with no name.
#------------------------------------------------------------------------------
BLANK_SCRIPT_TAG = '~blank'
#------------------------------------------------------------------------------
# When exporting, if the folder FOLDER_NAME already exists, it will create
# another folder of the same name along with an ID. This will make sure you do
# not overwrite the changes you made to your scripts accidentally. If false,
# it will erase all the files in the folder prior to exporting.
# Useless for importing.
#------------------------------------------------------------------------------
MAKE_EXPORT_COPIES = true
#------------------------------------------------------------------------------
# Creates a duplicate of the Scripts.r_data file to ensure you don't break your
# project. The duplicate will be placed in the Data folder as "Copy - Scripts".
# Useless for exporting.
#------------------------------------------------------------------------------
CREATE_SCRIPTS_COPY = true
#------------------------------------------------------------------------------
# If true, converts any instances of tab characters (\t) into two spaces. This
# is extremely helpful if writing code from an external editor and moving it
# back into RPG Maker where tab characters are instantly treated as two spaces.
#------------------------------------------------------------------------------
TABS_TO_SPACES = true
#******************************************************************************
# E N D   C O N F I G U R A T I O N
#******************************************************************************
#------------------------------------------------------------------------------
if IMPORT_EXPORT_MODE != 0

  RGSS = (RUBY_VERSION == "1.9.2" ? 3 : defined?(Hangup) ? 1 : 2)
 
  if RGSS == 3
    def p(*args)
      msgbox_p *args
    end
  end
 
  # From GubiD's script
  # These characters cannot be used as folder/file names. Any of your script
  # names that use the characters on the left will be replaced with the right.
  INVALID_CHAR_REPLACE = {
    '\\'=> '&',
    '/' => '&',
    ':' => ';',
    '*' => '°',
    '?' => '!',
    '<' => '«',
    '>' => '»',
    '|' => '¦',
    '"' => '\''
  }
 
  unless FOLDER_INDICATOR.is_a?(String) && FOLDER_INDICATOR.size == 1
    raise "FOLDER_INDICATOR needs to be 1 character long!"
  end
 
  def mkdir_p(list)
    path = ''
    list.each do |dirname|
      Dir.mkdir(path + dirname) unless File.exists?(path + dirname)
      path += "#{dirname}/"
    end
  end
 
  def traceback_report
    backtrace = $!.backtrace.clone
    backtrace.each{ |bt|
      bt.sub!(/{(\d+)}/) {"[#{$1}]#{$RGSS_SCRIPTS[$1.to_i][1]}"}
    }
    return $!.message + "\n\n" + backtrace.join("\n")
  end
 
  def raise_traceback_error
    if $!.message.size >= 900
      File.open('traceback.log', 'w') { |f| f.write($!) }
      raise 'Traceback is too big. Output in traceback.log'
    else
      raise
    end
  end
#-[ B E G I N ]-----------------------------------------------------------------
  # Get project's script file
  ini = Win32API.new('kernel32', 'GetPrivateProfileString','PPPPLP', 'L')
  scripts_filename = "\0" * 256
  ini.call('Game', 'Scripts', '', scripts_filename, 256, '.\\Game.ini')
  scripts_filename.delete!("\0")
 
  counter = 0
  # Exporting?
  if IMPORT_EXPORT_MODE == 1
    folder_name = FOLDER_NAME
    if File.exists?(FOLDER_NAME)
      # Keep a history of exports? Or only one folder?
      if MAKE_EXPORT_COPIES
        i = 1
        i += 1 while File.exists?("#{FOLDER_NAME}_#{i}")
        Dir.mkdir("#{FOLDER_NAME}_#{i}")
        folder_name = "#{FOLDER_NAME}_#{i}"
      else
        Dir['Scripts/*'].each { |file| File.delete(file) }
      end
    else
      Dir.mkdir(FOLDER_NAME) unless File.exists?(FOLDER_NAME)
    end
    # Create script order list
    script_order = File.open("#{folder_name}/!script_order.csv", 'w')
    script_names = {}
    folder_tree = [folder_name]
    current_subfolder_level = 0
    # Load the raw script data
    scripts = load_data(scripts_filename)
    scripts.each_index do |index|
      # skip ESIE
      next if index == 0
      script = scripts[index]
      id, name, code = script
      next if id.nil?
     
      # if this is a subfolder script name
      subfolder_level, subfolder_name = name.scan(/^(#{FOLDER_INDICATOR}+)(.*)/).flatten
      if subfolder_level
        # Replace invalid filename characters with valid characters
        subfolder_level = subfolder_level.size
        subfolder_name.split('').map{ |chr| INVALID_CHAR_REPLACE[chr] || chr }.join
       
        case subfolder_level <=> current_subfolder_level
        when -1
          (current_subfolder_level - subfolder_level).times do |n|
            folder_tree.pop
            current_subfolder_level -= 1
          end
          if subfolder_name.empty?
            folder_tree.pop
            current_subfolder_level -= 1
          else
            folder_tree[-1] = subfolder_name
          end
         
        when 0
          if subfolder_name.empty?
            folder_tree.pop
            current_subfolder_level -= 1
          else
            folder_tree[-1] = subfolder_name
          end
         
        when 1
          if subfolder_level - current_subfolder_level != 1
            raise "Invalid sublevel for folder!\n" +
                  "Expected: #{FOLDER_INDICATOR * (current_subfolder_level + 1)}#{subfolder_name}\n" +
                  "Received: #{name}"
          end
          raise "Branching subfolder needs a name!" if subfolder_name.empty?
          folder_tree << subfolder_name
          current_subfolder_level += 1
        end
        mkdir_p(folder_tree)
        script_order.write("#{name}\n")
        # no need to continue further with this script, so go to next
        next
      end
     
      # Replace invalid filename characters with valid characters
      name = name.split('').map{ |chr| INVALID_CHAR_REPLACE[chr] || chr }.join
      # Convert script data to readable format
      code = Zlib::Inflate.inflate(code)
      code.gsub!(/\t/) {'  '} if TABS_TO_SPACES

      if code.empty?
        name += BLANK_SCRIPT_TAG unless name.empty?
        script_order.write("#{name}\n")
        next
      end

      name = 'no_script_name' if name.empty?
      if script_names.key?(name)
        script_names[name] += 1
        name = "#{name}~@#{script_names[name]}"
      else
        script_names[name] = 0
      end
      # Output script to file
      script_order.write("#{name}\n")
      dir_path = folder_tree.join('/')
      File.open("#{dir_path}/#{name}.rb", 'wb') { |f| f.write(code) }
      counter += 1
    end
    script_order.close
    p "#{counter} files successfully exported to folder '#{folder_name}'"
    exit
  end
  # If importing or play-testing
  if IMPORT_EXPORT_MODE >= 2
    folder_tree = [FOLDER_NAME]
    counter = 1
    # If strictly importing, we want to replace the data directly in the scripts
    # data file. Otherwise, just override the scripts global variable.
    if IMPORT_EXPORT_MODE == 2
      scripts_file = File.open(scripts_filename, 'rb')
      import_obj = Marshal.load(scripts_file)
    else
      import_obj = $RGSS_SCRIPTS
    end
    # If strictly importing, create a copy of the scripts file in case something
    # goes wrong with the import.
    if IMPORT_EXPORT_MODE == 2 && CREATE_SCRIPTS_COPY
      base_name = File.basename(scripts_filename)
      dir_name = File.dirname(scripts_filename)
      copy = File.open(dir_name + "/Copy - " + base_name, 'wb')
      Marshal.dump(import_obj, copy)
      copy.close
    end
    # Load each script file
    File.open("#{FOLDER_NAME}/!script_order.csv", 'r') do |list|
      list = list.read.split("\n")
      list.each do |filename|
        code = ''
        script_name = filename.gsub(/(.*?)(?:~@\d+)?$/) {$1}
        # Is this a subfolder?
        level, subfolder = script_name.scan(/^(#{FOLDER_INDICATOR}+)(.*)/).flatten
        if level
          level = level.size
          case level <=> (folder_tree.size - 1)
          when -1
            (folder_tree.size - 1 - level).times { |n| folder_tree.pop }
            if subfolder.empty?
              folder_tree.pop
            else
              folder_tree[-1] = subfolder
            end
          when 0
            if subfolder.empty?
              folder_tree.pop
            else
              folder_tree[-1] = subfolder
            end
          when 1
            if level - (folder_tree.size - 1) != 1
              raise "Invalid sublevel for folder!\n" +
                    "Expected: #{FOLDER_INDICATOR * (folder_tree.size)}#{subfolder}\n" +
                    "Received: #{script_name}"
            end
            raise "Branching subfolder needs a name!" if subfolder.empty?
            folder_tree << subfolder
          end
         
        elsif script_name.empty? || script_name[/#{BLANK_SCRIPT_TAG}$/]
          script_name = script_name.chomp("#{BLANK_SCRIPT_TAG}")
          code = ''
        else # script file
          dir_path = folder_tree.join('/')
          code = File.open("#{dir_path}/#{filename}.rb", 'r') { |f| f.read }
          code.gsub!(/\t/) {'  '} if TABS_TO_SPACES
        end
        # If strictly importing, compress script. Otherwise, keep script in
        # readable format.
        if IMPORT_EXPORT_MODE == 2
          z = Zlib::Deflate.new(6)
          data = z.deflate(code, Zlib::FINISH)
        else
          data = code
        end
        # If strictly importing, replaces entries in the scripts file data with
        # the newly-compressed imported scripts. Otherwise, replace entries in
        # $RGSS_SCRIPTS with imported scripts.
        import_obj[counter] = [counter]
        import_obj[counter][1] = script_name
        import_obj[counter][IMPORT_EXPORT_MODE] = data
        counter += 1
      end
    end
    # Dump imported file data to a new Scripts file and close the program.
    if IMPORT_EXPORT_MODE == 2
      data = File.open(scripts_filename, 'wb')
      Marshal.dump(import_obj[0, counter], data)
      data.close
      p "#{counter-1} files successfully imported. Please close your RPG Maker " +
      "now without saving it. Re-open your project to find the scripts imported."
      exit
    else
      # Run the project from here, eval-ing everything
      ($RGSS_SCRIPTS.size - counter).times { |n| $RGSS_SCRIPTS.pop }
      $RGSS_SCRIPTS.each_with_index do |script, i|
        next if i == 0
        begin
          eval(script[3], nil, script[1])
        rescue ScriptError
          raise ScriptError.new($!.message)
        rescue
          $!.message.sub!($!.message, traceback_report)
          raise_traceback_error
        end
      end
      exit
    end
  end
#------------------------------------------------------------------------------
end # if IMPORT_EXPORT_MODE != 0



Instructions

It is all explained in the script. For a quick reference, here's the subfolder instructions:

  ** As of Version 4.0, subfolders are now possible!
 
  - Script names that start with the character defined in FOLDER_INDICATOR will
    be subfolders within your exported scripts folder.
  - You can specify the depth of subfolders by increasing the number
    FOLDER_INDICATOR characters.
  - Any scripts below the subfolder will be placed within it.
  - A script name that only consists of FOLDER_INDICATOR characters indicates
    "closing" that subfolder; scripts below will now be placed in the previous
    (i.e. its parent's) subfolder.
  - You may reuse a folder name multiple times. You can have subfolders named
    after script authors and keep their scripts grouped together without
    disrupting your script order (and potentially crashing your project).
 
  Here's an example assuming FOLDER_INDICATOR is set to '@' :
 
  Project Script List       Project Directory
 
                            Scripts_Export_Folder/
  EarlyScript               ├ EarlyScript.rb
  @Base Scripts             ├ Base Scripts/
  @@Game Classes            │ ├ Game Classes/
  Game_Temp                 │ │ ├ Game_Temp.rb
  Game_System               │ │ └ Game_System.rb
  @@Sprite Classes          │ └ Sprite Classes/
  Sprite_Character          │   └ Sprite_Character
  @Custom Scripts           ├ Custom Scripts/
  MyScript                  │ └ MyScript.rb
  @                         │
  Main                      └ Main.rb




Compatibility

This script already has methods to ensure it will run properly on any RPG Maker version. This script does not rely on nor makes changes to any existing scripts, so it is 100% compatible with anything.


Credits and Thanks


  • KK20 - made this script

  • GubiD - referenced his VXA Script Import/Export

  • FiXato and HIRATA Yasuyuki - referenced VX/VXA Script Exporter

  • ForeverZer0 - suggesting and using Win32API to read .ini file




Author's Notes

I didn't test this in VX cuz I don't have it. Anyone care to test that for me?
Now I can has version control for my Advance Wars Engine.
35
New Projects / [Construct 2] fLuX - School Project
April 05, 2015, 04:23:25 am
WIP first post.

fLuX is a maze navigation game where the player guides a curious polygon through various landscapes. Along the way, the player must avoid various obstacles, cross over manipulating platforms, and even shift colors to get through in one piece. This was created entirely in the free version of the engine Construct 2 for a Game Design class in college.

The game offers 30 levels (and maybe one extra challenge in the end if I have the time), infinite lives, slippery controls, and countless swearing (by you of course).

Early Development Phase video:

Credits:

Music
from http://www.newgrounds.com/
Window by Andrea364
Alnitak by Tokolos
Sunset Garden by AbstractEclipse

Backgrounds
from http://desktopwallpapershd.org/
Polyscape Sunset
Polygon Mountains
blue

SoundFX
from http://www.freesound.org/
Another magic wand spell tinkle by Timbre
Magical Fizzlerz 1 by jobro
compactor2 by PhreaKsAccount
Game Start by plasterbrain
36
Entertainment / RPG Maker in Anime
April 03, 2015, 09:48:19 pm
http://www.crunchyroll.com/the-pet-girl-of-sakurasou/episode-2-i-drew-a-picture-612925
13:44

Screenshot: ShowHide


I wonder what scripts they used for this shitty VXAce game ( ͡° ͜ʖ ͡°)

Credits to soulshaker3 for finding this.
37
RMXP Script Database / [XP] Locking Pictures
February 09, 2015, 07:42:24 pm
Locking Pictures
Authors: KK20
Version: 1.0
Type: Picture Add-on
Key Term: Environment Add-on



Introduction

When using the 'Show Picture' event command, pictures are always displayed as if stuck to the screen. No matter how much the player moves around, they can never escape the clutches of the picture.

With this script, you can "lock" pictures into place. As the screen moves, the picture will move along with it, eventually sliding off-screen.


Features


  • Lock pictures into place! They won't follow you around anymore.

  • Need them unlocked again? No problem.

  • Plug-n-play; very easy to use




Screenshots

Spoiler: ShowHide



Demo

None


Script

Spoiler: ShowHide

=begin
================================================================================
Locking Pictures                                                    Ver 1.0
by KK20                                                             Feb 9 2015
________________________________________________________________________________
[ Introduction ]

When using the 'Show Picture' event command, pictures are always displayed as
if stuck to the screen. No matter how much the player moves around, they can
never escape the clutches of the picture.

With this script, you can "lock" pictures into place. As the screen moves, the
picture will move along with it, eventually sliding off-screen.

________________________________________________________________________________
[ Instructions ]

Place script below Scene_Debug, above Main (you know the drill by now).

To lock a picture in its place, use a 'Script' event command and put:
                        lock_picture(ID)
where ID is the picture number you want to lock into place. Alternatively, you
can omit the (ID) altogether, like so:
                        lock_picture
When using 'Show Picture' or 'Move Picture', the last picture ID you used will
now be locked. It's mainly just for convenience.

To unlock the picture, use:
                        unlock_picture(ID)
Again, you can omit the (ID) as this will unlock the last picture modified.

________________________________________________________________________________
[ Compatibility ]

Should be none. Aliases Game_Picture methods for optimal compatibility.

________________________________________________________________________________
[ Credits ]

KK20 - for the script

================================================================================
=end

#=============================================================================
# ** Interpreter
#=============================================================================
class Interpreter
  #--------------------------------------------------------------------------
  # * Show Picture
  #--------------------------------------------------------------------------
  alias remember_last_picture_id_show command_231
  def command_231
    # Get picture number
    @last_pic_number = @parameters[0] + ($game_temp.in_battle ? 50 : 0)
    return remember_last_picture_id_show
  end
  #--------------------------------------------------------------------------
  # * Move Picture
  #--------------------------------------------------------------------------
  alias remember_last_picture_id_move command_232
  def command_232
    # Get picture number
    @last_pic_number = @parameters[0] + ($game_temp.in_battle ? 50 : 0)
    return remember_last_picture_id_move
  end
  #--------------------------------------------------------------------------
  # * Lock Picture
  # - Locks the picture at ID in place. The picture can now move off screen.
  #--------------------------------------------------------------------------
  def lock_picture(id = @last_pic_number)
    return false if id.nil?
    $game_screen.pictures[id].lock = true
    return true
  end
  #--------------------------------------------------------------------------
  # * Unlock Picture
  # - Unlocks the picture at ID. The picture now moves with the player/screen.
  #--------------------------------------------------------------------------
  def unlock_picture(id = @last_pic_number)
    return if id.nil?
    $game_screen.pictures[id].lock = false
    return true
  end
end
#=============================================================================
# ** Game_Picture
#=============================================================================
class Game_Picture
  attr_accessor :lock
  #--------------------------------------------------------------------------
  # * Set Lock
  # - Locks/Unlocks the picture
  #--------------------------------------------------------------------------
  def lock=(lock)
    @lock = lock
    if lock
      @base_x = @x
      @base_y = @y
    end
  end
  #--------------------------------------------------------------------------
  # * Show Picture
  # - Sets base coordinates if the picture was set to lock prior to showing
  #--------------------------------------------------------------------------
  alias new_showtarget_if_locked show
  def show(name, origin, x, y, zoom_x, zoom_y, opacity, blend_type)
    new_showtarget_if_locked(name, origin, x, y, zoom_x, zoom_y, opacity, blend_type)
    if @lock
      @base_x = @x
      @base_y = @y
    end
  end
  #--------------------------------------------------------------------------
  # * Move Picture
  # - Sets new target location if picture is locked
  #--------------------------------------------------------------------------
  alias new_movetarget_if_locked move
  def move(duration, origin, x, y, zoom_x, zoom_y, opacity, blend_type)
    new_movetarget_if_locked(duration, origin, x, y, zoom_x, zoom_y, opacity, blend_type)
    if @lock
      @target_x = x.to_f - $game_map.display_x / 4
      @target_y = y.to_f - $game_map.display_y / 4
    end
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  alias lock_and_unlock_picture update
  def update
    # If 'Move Picture' is in effect on a locked picture
    fix_position = @duration >= 1 && @lock
    # Call alias
    lock_and_unlock_picture
    # 'Move Picture' needs to move base coordinates, not actual
    if fix_position
      d = @duration + 1
      @base_x = (@base_x * (d - 1) + @target_x) / d
      @base_y = (@base_y * (d - 1) + @target_y) / d
    end
    # Modify actual coordinates if locked
    if @lock
      @x = @base_x - $game_map.display_x / 4
      @y = @base_y - $game_map.display_y / 4
    end
  end
end




Instructions

In script.
Commands are
lock_picture(ID)
unlock_picture(ID)



Compatibility

Should be none at all. There are very few scripts that modify Game_Picture, so you should be good to go. If you by chance do have a script that makes changes to Game_Pictures, place this script below it.


Credits and Thanks


  • KK20 - for the script




Author's Notes

Remember to unlock your pictures, especially if reusing an ID on the same map.
38
RMXP Script Database / [XP] XP Ace Tilemap
November 02, 2014, 05:53:24 am
XP Ace Tilemap
Authors: KK20
Version: 0.42
Type: Tilemap Rewrite
Key Term: Game Utility



Introduction

In light of recent discoveries regarding the usage of RGSS3 in RPG Maker XP games, many users were left with a dilemma in choosing which Tilemap rewrite to use due to the vast differences between RGSS1's and RGSS3's Tilemap classes that would cause complications in this transition. I aimed to find the best Tilemap rewrite and decided that I would have to make my own. Like every other Tilemap rewrite before it, this implementation is in no ways perfect, boasting PROs and CONs.

This script is intended to be used for RPG Maker XP games using the RGSS3 library (unofficially coined RPG Maker XP Ace); however, it is entirely compatible with RPG Maker XP games in the RGSS1 library.

This work is protected by the following license:
Quote
Creative Commons - Attribution-NonCommercial-ShareAlike 3.0 Unported
( http://creativecommons.org/licenses/by-nc-sa/3.0/ )

You are free:

to Share - to copy, distribute and transmit the work
to Remix - to adapt the work

Under the following conditions:

Attribution. You must attribute the work in the manner specified by the author or licensor (but not in any way that suggests that they endorse you or your use of the work).

Noncommercial. You may not use this work for commercial purposes.

Share alike. If you alter, transform, or build upon this work, you may distribute the resulting work only under the same or similar license to this one.

- For any reuse or distribution, you must make clear to others the license terms of this work. The best way to do this is with a link to this web page.

- Any of the above conditions can be waived if you get permission from the copyright holder.

- Nothing in this license impairs or restricts the author's moral rights.



Features

About the script:

  • XP and XPA (RGSS1 and RGSS3) compatible

  • Define your own custom resolution

  • Maps that are smaller than the game resolution are automatically centered

  • Drawing methods written in C-language, which has faster pixel-by-pixel operations than Ruby


Add-ons:

  • Customize frame rate animation and define unique patterns for your autotiles

  • Remove unnecessary priority layers to boost frames-per-second (FPS)

  • Extend the default RPG::Weather class to fit larger screens, or not

  • Transition graphics now adjust to whatever resolution you use (640x480 transition graphics on a 800x600 game window? No problem!)

  • more to add later...




Screenshots

None


Demo

None


Script

Includes script, DLL, and source code for the DLL:
v0.42 *NEW*
v0.41
v0.4
v0.36


Instructions


  • Place the script in 'XPA_Tilemap.rb' below the default scripts but above Main

  • Move 'XPA_Tilemap.dll' into your project folder (same directory as 'Game.exe')

  • Configure values at the start of the script




Compatibility

The script is still in its infancy. Thorough testing has not been conducted. Posting your observations would be greatly appreciated.
Users have reported Screen Flash to not work in their XPA games which I have yet to reproduce. It is unclear if my Tilemap script is causing the incompatibility or its the change in logic in RGSS3.

Transitions for larger resolutions are not supported as of yet, but a default fade-in/out exists. Consider using a transitions script.
I still have not thoroughly tested v0.3+ in XP so please advise that there may be potential bugs.

Screen Tone changes can lower the FPS of your game if using a larger resolution. This is further amplified if your tone uses a Gray value greater than 0. Tone changes are an expensive post-processing operation. Remember that RGSS was designed with 640x480 in mind--performance was built around that size.

Most scripts were designed with a resolution of 640x480 in mind. Here are a collection of fixes to address some of the more popular scripts like Blizz-ABS. You will need to replace all instances of SCREEN with SCREEN_RESOLUTION.


Credits and Thanks


  • KK20 - Author of this script and DLL

  • Blizzard - Tester and providing bug fixes

  • LiTTleDRAgo - Tester, bug fixer, and reusing code from his edits to Custom Resolution

  • Zexion - Tester and morale support

  • ForeverZer0 - Reusing code from his Custom Resolution script, found here:
                    http://forum.chaos-project.com/index.php/topic,7814.0.html




Author's Notes

Known Bugs:

  • Graphics.snap_to_bitmap behaves oddly in 640x480 resolution and doubling/halving the window size. Fix is to find unless XPACE && SCREEN_RESOLUTION != [640, 480] and remove && SCREEN_RESOLUTION != [640, 480]

  • When walking down and quickly opening the menu (assuming default project), you may see the tiles suddenly shift



I would appreciate it if you, the user, would be able to test this script for compatibility issues. This is a side-project of mine that I would like to see evolve over time. If you have any suggestions as well, post them.

Things currently planned:

  • Zooming in (but not zooming out) Not sure on this one yet...

  • Fullscreen for XP games

  • Transitions for larger resolutions


39
Academics / What class should I take?
October 20, 2014, 09:21:56 pm
Registering for my last semester of classes for the Spring and am torn as to what I should take. I'm mainly asking what you think is more beneficial for me in the future like when it comes to getting and having a job.

Data Security and Encryption Techniques: System security and encryption. Current issues in security, encryption and privacy of computer based systems.
- It's not a particular interest of mine, but if it's mostly algorithms, I'm game for it.

Web Programming and Data Managemet: Various techniques for developing Web-based database applications using software engineering methodology. Introduce concept and architecture of Web servers, Web database design techniques, client/server side programming, and Web applications tools and techniques.
- Supposedly difficult but the professor is one of the better ones. Never really had an eye in this stuff but it does sound useful to know. Friend wants to take it with me.

Introduction to Game Design and Production: Current and future technologies and market trends in game design and production. Game technologies, basic building tools for games and the process of game design, development and production.
- Basically "How to use Unity 101" from what I've heard. This is super easy to pass and takes probably no effort from me at all.

All classes listed above meet once a week in the night.

The other classes I'm taking are Earth History (stupid Geology general education stuff), Computer Graphics (sounds interesting), and Software Testing (easy class). I'm also hoping I can find some kind of internship to do during this time as well, if that factors in anything. What do you think?  :hm:
40
I've been wanting to get a desktop for quite some time now. My only problem with computers is that I know little to nothing about good specs. Anyways, this guy is my best-friend's half-brother. He upgrades his computer every year and is willing to sell his previous one to me.
Quote
Processor = 6 core AMD Phenom II x6 1055T Motherboard = ASUS M4A89GTD PRO /USB3
16 GB Patriot Memory
Thermaltake TR2-600W PSU
Cooler Master HAF gaming case

1 60gb SSD Drive (root)
1 500gb Drive (data)
1 2TB Drive (storage)

1 DVD Burner

I put in a normal Radeon HD 6700 video card... I took my high end card out when i bought my new system... he can upgrade if he wants however its probably good enough for whatever he is doing.

He's saying $450 (thinks it was $1300 when he got it).

I'm in no need for a gaming computer, but it'd be nice to be able to have the graphics card capable of running some of the modern ones at least. I'm also not the type of guy who likes to have the latest and greatest either (as my old-ass phone is evidence of that), so something that can last me the next 4 years or so is fine.

I'm just wondering what you guys think and if you have any suggestions.
41
RPG Maker Scripts / DLL in Separate Process?
July 09, 2014, 10:56:35 pm
So I was reading this thread that Drago showed us.
http://www.hbgames.org/forums/viewtopic.php?t=71126

And some people mentioned "why not use a DLL instead of an EXE?" From my understanding, this application forces the RMXP game to always be in the foreground (doesn't freeze when the player clicks on something else outside of the game's window). The EXE runs in a separate process and regularly checks if the game window is in focus or not.

My question is how do you even get a DLL to do this? From my understanding, you can't have a DLL run in a separate process. So I have no idea what those people were talking about. Anyone care to enlighten me?
42
Chat / Premeditated Murder Video...Seriously?
May 25, 2014, 01:13:02 am
http://www.theblaze.com/stories/2014/05/24/extreme-caution-this-frightening-youtube-video-may-be-the-manifesto-of-santa-barbara-mass-slayer/

For some reason, I cannot take this guy seriously at all. In fact, I laughed so hard at his blinded fantasy. He sounds like such a spoiled brat who spent waaaaay too much time reading comic books and watch cartoons.
Is this seriously the face of murders these days?

Also dat chuckle
43
Entertainment / Pretend You're Xyzzy
May 17, 2014, 03:27:30 pm
Recently, Zexion and I have been playing this online card game (title). The website is here: http://pyx-1.socialgamer.net/game.jsp

If you have heard of the game Cards Against Humanity, you'll feel right at home. For those that have no idea what that is (and haven't yet bothered to Google it), it's a dirtier version of Apples to Apples (don't tell me you have to Google that too...). Players are each given 10 cards with phrases or words on them ranging from innocent things like "Santa Claus" to more vulgar stuff like "A big, black dick". Every turn, one person is the Card Czar; he/she draws a different card that can be a question or a sentence filled with blanks. The other players select a card(s) that best fit the topic at hand. The Card Czar then chooses which card they think is the best and gives a point to the person who played it. The Card Czar is then passed along in a clockwise order.

The great thing about this game is the absurd combinations. You can get some pretty witty responses to downright ridiculous.
NSFW: ShowHide

In this image, I was the Card Czar and Zexion played the winning card (in blue). Words cannot express how hard I laughed at this.

So I'm writing this in hopes that I'll be recruiting some CP-ers to play with us. We recommend that you get on the Skype group so that joining together will be much easier. Meanwhile, with the rest of this thread, I hope to post pictures of good plays. Hope some of you can join :)
44
General Discussion / Disabling ALT+Enter Discussion
January 16, 2014, 04:03:24 pm
Current Conclusion:

In Main, right under the line that says begin, paste this:

 # Disable ALT+Enter
 reghotkey = Win32API.new('user32', 'RegisterHotKey', 'LIII', 'I')
 reghotkey.call(0, 1, 1, 0x0D)

If you are using the script that puts the game into fullscreen by simulating an ALT+Enter keypress, make sure that is placed before this.




People have been asking for ways to disable the player's ability to press ALT+Enter to go into (or get out of) fullscreen-mode for years now. I am unsure if there really is a "fix-all" for this, but I have taken action to see if perhaps there is.

I found a DLL made by Cremno that can disable ALT+Enter.
Spoiler: ShowHide

Get the DLL here: http://www.mediafire.com/download/ffr36fml1cua73r/NoF12.dll
Put the file into a blank test project.

Replace Main with this:

begin
 # Disable ALT+Enter
 noaltenter = Win32API.new('NoF12', 'NoAltEnter', 'L', nil)
 noaltenter.call(1)
 # Prepare for transition
 Graphics.freeze
 # Make scene object (title screen)
 $scene = Scene_Title.new
 # Call main method as long as $scene is effective
 while $scene != nil
   $scene.main
 end
 # Fade out
 Graphics.transition(20)
rescue Errno::ENOENT
 # Supplement Errno::ENOENT exception
 # If unable to open file, display message and end
 filename = $!.message.sub("No such file or directory - ", "")
 print("Unable to find file #{filename}.")
end

Now testplay and see if you can get into fullscreen.





Coming from this post, I believed to have found a solution.
My Discovery and Trial Tests: ShowHide

You can copy this script and replace Main with it. The change is only the first few lines. Try this out in a new project.

begin
 # Disable ALT+Enter
 reghotkey = Win32API.new('user32', 'RegisterHotKey', 'LIII', 'I')
 result = reghotkey.call(0, 1, 0x4001, 0x0D)
 if result != 0 then print 'RegisterHotKey successfully completed' end
 # Prepare for transition
 Graphics.freeze
 # Make scene object (title screen)
 $scene = Scene_Title.new
 # Call main method as long as $scene is effective
 while $scene != nil
   $scene.main
 end
 # Fade out
 Graphics.transition(20)
rescue Errno::ENOENT
 # Supplement Errno::ENOENT exception
 # If unable to open file, display message and end
 filename = $!.message.sub("No such file or directory - ", "")
 print("Unable to find file #{filename}.")
end

If the method was successful, you should have a message window pop-up to confirm that. Try using ALT+Enter and see if it does anything. If you cannot toggle between fullscreen and windowed mode, insert this little snippet in just above Main:

class Scene_Map
 alias check_for_alt_enter update
 def update
   if Input.trigger?(Input::ALT) && Input.trigger?(Input::C)
     $game_system.se_play($data_system.decision_se)
   end
   check_for_alt_enter
 end
end

Try pressing ALT+Enter and ALT+C (or whatever is your confirm button). If you pressed these buttons at the same time, you should hear the beep for ALT+C but not for ALT+Enter.

Now try running another game with this one still open. Can you ALT+Enter into fullscreen? I couldn't, not until I closed this game's window first.





However, LiTTleDRAgo reported that this method did not work for him. To help with this investigation, I would like you, the users, to help me out. Please try the two methods above and report whether or not ALT+Enter was disabled. Also, please provide your OS and keyboard model. For me, I have tested this only on a NV59 Gateway laptop with the built-in keyboard running on Windows 7.
45
Introducing C+=, the official programming language for feminists!
https://bitbucket.org/FeministSoftwareFoundation/c-plus-equality

Spoiler: ShowHide

:rofl: x infinity

I guess this topic could go under Entertainment as well, but hey, maybe we can evaluate the practicality of this language.

Even though I can already predict what would be said.
46
RMXP Script Database / [XP] Custom Prices
November 25, 2013, 05:53:22 pm
Custom Prices
Authors: KK20
Version: 1.1
Type: Shop Add-On
Key Term: Custom Shop System



Introduction

RPG Maker only allows items to have one set of prices. The sell price of items is half the price set in the database. With this script, you can modify the prices of items, weapons, and armors to whatever you want. The change is only temporary, so you can have shops sell certain items at unique prices. You can also change the sell price to anything. Make an item cost a high amount, but make it unavailable to sell. Have shops buy specific kinds of items. The choice is up to you!

I made this script because I figured it was simple enough to do and I couldn't find another script that did anything like this.


Features


  • Define new purchase prices for your items, weapons, and armors

  • Use a custom sell price rather than the default "half of item's price"

  • Changes are temporary--reverts prices back to database prices when you close the shop (v1.0)

  • Changes are permanent--carry over in saved games. Only change back when you let them (v1.1)

  • Configure default prices for your items, giving them unique buy/sell prices (v1.1)




Screenshots

None


Demo

None


Script

Spoiler: ShowHide

=begin
===============================================================================
Custom Prices                                                     Version 1.1
by KK20                                                           Aug.23.2016
===============================================================================
_______________________________________________________________________________
+ Introduction

RPG Maker only allows items to have one set of prices. The sell price of items
is half the price set in the database. With this script, you can modify the
prices of items, weapons, and armors to whatever you want. The change is only
temporary, so you can have shops sell certain items at unique prices. You can
also change the sell price to anything. Make an item cost a high amount, but
make it unavailable to sell. Have shops buy specific kinds of items. The
choice is up to you!
_______________________________________________________________________________
+ Instructions

Place this script below the default scripts and above Main, as usual. If you
have any custom save scripts or those that do not alias the "initialize"
method of Game_System, place this script below those.

In the configuration below, you can set the default buy and sell prices for
any of the items. These will ignore the database prices. Instructions are near
the configuration.

To change the prices of items whenever in game, use one of these script calls:

        price(TYPE, ID, BUY_PRICE)
        price(TYPE, ID, BUY_PRICE, SELL_PRICE)
       
  where TYPE can be 0 (Item), 1 (Weapon), or 2 (Armor)
        ID refers to the item's ID in the database
        BUY_PRICE is the new price of the item
        SELL_PRICE is the new sell price of the item
        SELL_PRICE is optional. If you do not put a sell price, items will
          default to being half the BUY_PRICE.
 
  If you ever need to reset the price changes, use the script call:
 
        reset_prices

  It is a good idea to call this method if you only want to change the prices
  of items temporarily, e.g. different shops sell items for various amounts or
  buy specific items only.
       
  -------------     
  Examples:
  -------------
 
  price(0, 1, 300)              # Potion prices: BUY = 300, SELL = 150
  price(1, 1, 5000, 100)        # Bronze Sword prices: BUY = 5000, SELL = 100
  price(2, 25, 9001, 0)         # Ring of Strength prices: BUY = 9001, SELL = Can't sell
_______________________________________________________________________________   
+ Notes

It is recommended to use "price" script calls just before the 'Shop Processing'
command or any other custom shop scripts you may be using.

This script may be compatible with some Custom Shop Systems. The more complex
the script, the less likely.

Changed item prices are permanent until you call "reset_prices" or change them
again with "price" script calls. Any changed prices will be saved in the save
files and be reloaded upon opening the save file.

The biggest change is handling the item's price as a new type of class called
"ItemPrice" rather than as a straight integer. Precautions were made to ensure
that the correct values are used at the appropriate times, but I cannot
guarantee that it is flawless; many of the changes address special cases in the
default RMXP scripts. I only hope that other scripters stuck to these common
practices.

Items that cannot be sold to shops need to have a SELL PRICE of 0.
_______________________________________________________________________________
+ Credits
 
KK20 - for writing the script
firevenge007 - requester

===============================================================================
=end

module CustomPricesConfig
  #------------------------------------------------------------------------
  # Set the default prices of items. The game will use these values instead
  # of the database values as the item's DEFAULT buy and sell prices. Items
  # that do not have a configuration below will use the database prices.
  #
  # Configuration:
  #   when ID then [BUY_PRICE, SELL_PRICE]
  #------------------------------------------------------------------------
  def self.prices(type, id)
    #:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:
    #                                                 START CONFIGURATION
    #:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:
    case type.to_s
    when "RPG::Item"
      case id
      #::::::::::::::::::::::::::::
      when 1 then [200, 75]    # Potion
      when 2 then [500, 300]   # High Potion
      #::::::::::::::::::::::::::::
      end
    when "RPG::Weapon"
      case id
      #::::::::::::::::::::::::::::
      when 1 then [500, 200]   # Bronze Sword
      when 2 then [2500, 1000] # Iron Sword
      #::::::::::::::::::::::::::::
      end
    when "RPG::Armor"
      case id
      #::::::::::::::::::::::::::::
      when 1 then [400, 150]   # Bronze Shield
      when 2 then [2500, 0]    # Iron Shield
      #::::::::::::::::::::::::::::
      end
    end
    #:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:
    #                                                   END CONFIGURATION
    #:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:
  end
end

#==============================================================================
# ** ItemPrice
#------------------------------------------------------------------------------
#  New class for handling custom item prices. Two element array that will be
#  treated as an Integer whenever possible.
#==============================================================================
class ItemPrice
  attr_accessor :prices # [buy_price, sell_price]
 
  def initialize(buy, sell)
    @prices = [buy, sell]
  end

  # Special case: item.price / 2
  # Must consider the sell price instead
  def /(num)
    # If dividing the price by two, must be triggering sell
    num == 2 ? @prices[1] : @prices[0] / num
  end
 
  # Special case: item.price == 0
  # Must consider the sell price instead
  def ==(num)
    num == 0 ? @prices[1] == 0 : @prices[0] == num
  end
 
  def method_missing(name, *args, &block)
    # Special case: item.price > 0
    # Must consider the sell price instead
    if name.id2name == ">" && args[0] == 0
      @prices[1].send(name, *args, &block)
    else
      # Treat the method call like an Integer as much as possible
      @prices[0].send(name, *args, &block)
    end
  end

  def buy_price;  @prices[0]; end
  def sell_price; @prices[1]; end
  def to_s;  @prices[0].to_s; end
 
end
#==============================================================================
# ** Interpreter
#------------------------------------------------------------------------------
#  This interpreter runs event commands. This class is used within the
#  Game_System class and the Game_Event class.
#==============================================================================
class Interpreter
  #--------------------------------------------------------------------------
  # * Set new item prices; save the original prices
  #--------------------------------------------------------------------------
  def price(type, id, buyp, sellp=buyp/2)
    case type
    when 0 # RPG::Item
      # Store the default price of the item, if haven't already
      unless $game_system.original_prices.has_key?($data_items[id])
        $game_system.original_prices[$data_items[id]] = $data_items[id].price
      end
      # Set the item's new price
      $data_items[id].price = ItemPrice.new(buyp, sellp)
      # Store this change so that it gets saved in game
      $game_system.changed_prices[$data_items[id]] = $data_items[id].price
    when 1 # RPG::Weapon
      unless $game_system.original_prices.has_key?($data_weapons[id])
        $game_system.original_prices[$data_weapons[id]] = $data_weapons[id].price
      end
      $data_weapons[id].price = ItemPrice.new(buyp, sellp)
      $game_system.changed_prices[$data_weapons[id]] = $data_weapons[id].price
    when 2 # RPG::Armor
      unless $game_system.original_prices.has_key?($data_armors[id])
        $game_system.original_prices[$data_armors[id]] = $data_armors[id].price
      end
      $data_armors[id].price = ItemPrice.new(buyp, sellp)
      $game_system.changed_prices[$data_armors[id]] = $data_armors[id].price
    else
      return false
    end
    return true
  end
  #--------------------------------------------------------------------------
  # * Revert items back to their original database/configured prices
  #--------------------------------------------------------------------------
  def reset_prices
    $game_system.original_prices.each_pair{|item, price|
      case item.class.to_s
      when "RPG::Item"   then $data_items[item.id].price   = price
      when "RPG::Weapon" then $data_weapons[item.id].price = price
      when "RPG::Armor"  then $data_armors[item.id].price  = price
      end
    }
    $game_system.original_prices.clear
    $game_system.changed_prices.clear
  end
end
#==============================================================================
# ** Game_System
#------------------------------------------------------------------------------
#  This class handles data surrounding the system. Backround music, etc.
#  is managed here as well. Refer to "$game_system" for the instance of
#  this class.
#==============================================================================
class Game_System
  attr_accessor :original_prices, :changed_prices
  #--------------------------------------------------------------------------
  # * Initialize hash for memorizing base prices
  #--------------------------------------------------------------------------
  alias init_changed_item_prices initialize
  def initialize
    init_changed_item_prices
    @original_prices = {}
    @changed_prices = {}
    set_configured_prices
  end
  #--------------------------------------------------------------------------
  # * Initialize prices based on user's configuration
  #--------------------------------------------------------------------------
  def set_configured_prices
    return if @configured_prices_set
    $data_items.each_index{|index|
      next if index == 0
      item = $data_items[index]
      prices = CustomPricesConfig.prices(item.class, item.id)
      next if prices.nil?
      $data_items[index].price = ItemPrice.new(*prices)
    }
    $data_weapons.each_index{|index|
      next if index == 0
      item = $data_weapons[index]
      prices = CustomPricesConfig.prices(item.class, item.id)
      next if prices.nil?
      $data_weapons[index].price = ItemPrice.new(*prices)
    }
    $data_armors.each_index{|index|
      next if index == 0
      item = $data_armors[index]
      prices = CustomPricesConfig.prices(item.class, item.id)
      next if prices.nil?
      $data_armors[index].price = ItemPrice.new(*prices)
    }
    @configured_prices_set = true
  end
  #--------------------------------------------------------------------------
  # * Restore changed prices from saved game
  #--------------------------------------------------------------------------
  def restore_changed_prices
    @changed_prices.each_key{|item|
      case item.class.to_s
      when "RPG::Item"   then $data_items[item.id].price   = item.price
      when "RPG::Weapon" then $data_weapons[item.id].price = item.price
      when "RPG::Armor"  then $data_armors[item.id].price  = item.price
      end
    }
  end
 
end
#==============================================================================
# ** Scene_Load
#------------------------------------------------------------------------------
#  This class performs load screen processing.
#==============================================================================
class Scene_Load < Scene_File
  # Ensure that the script can work with saved games
  alias create_changed_prices read_save_data
  def read_save_data(file)
    create_changed_prices(file)
    $game_system.changed_prices ||= {}
    $game_system.original_prices ||= {}
    $game_system.set_configured_prices
    $game_system.restore_changed_prices
  end
end

Version 1.0


Instructions

In script. Script calls are

price(TYPE, ID, BUY_PRICE)
price(TYPE, ID, BUY_PRICE, SELL_PRICE)
reset_prices



Compatibility

May be compatible with some Custom Shop Systems. The more exotic, the less likely.
Should work fine with most other scripts.


Credits and Thanks


  • KK20 - for script

  • firevenge007 - for requesting




Author's Notes

Want to make a list of scripts this is/isn't compatible with? Post your results!
47
Entertainment / RWBY
November 15, 2013, 05:29:22 pm
I wonder why I forgot to mention this and how no one has said a word about it.

http://roosterteeth.com/archive/?id=8345

Questionable at times, but those action sequences are hella awesome to watch. And you will probably enjoy it more if you're into animu.
48
...what would you want to see?

I'm continuing this conversation off of the Shout Box and into its own thread. Reason being that I was able to convince my members to write a proposal to persuade Enterbrain to make another installment.

So to get you in the mood, assume you have the chance to talk with the lead developers and overall decision-makers. What can you say to persuade them to improve the series? Mainly to make the program more widely known and accepted as a good modern game-making engine.

I would really like them to make the program target the mobile audience as well. Perhaps include the default front-view and ATB battle systems and have the player choose. I'd also like the hidden classes, like the Tilemap class, to be accessible to us programmers. And return to the XP tilesets (everything is a square in VX/A).

Throw me some ideas or issues/bugs you may have. :)
49
I may have some more questions regarding this class I am taking right now, so I'll be making a thread just to make sure.

Anyways, my friend discovered in the course text a possible error. It says that the regular expression for a legal floating-point constant in Pascal is as follows:

(ε|+|-)(0|d*).(0|d*)

ε = null character
d = 0..9
The text says this ensures that a number exists on both the left and right sides of the decimal point. But how can that be?

If I choose ε and d* in both instances and set them to have zero repetitions, that would leave me with only the decimal point (from what I saw, this caused an error in Pascal).

Thus, I proposed this:

(ε|+|-)((d+.d*)|(d*.d+))

This ensures that we have at least one digit on the left or right sides of the decimal, right? Is there a better way to do this?
50
RPG Maker Scripts / Changing Screen Resolutions
June 04, 2013, 02:34:16 am
Looking into ForeverZer0's Custom Resolution script, it came to my attention that putting the game into fullscreen will cause some errors (as it has been pointed out a few times in the thread itself). I have recently started looking at Win32API to see if there were any particular solutions to this problem. The first idea I had was to loop through EnumDisplaySettings and see if the user supports the resolution configured in the script. If so, upon pressing Alt + Enter (alias through Input.update), the function ChangeDisplaySettings would be called. But doing this interrupts RMXP's fullscreen or something...the screen freezes, but it still takes input (after pressing the arrow keys and switching back to window mode, my character was at a different location). Perhaps I'm not using the correct settings, I need to experiment more I guess. Do you know why?

Another idea I had was not to change the resolution at all, but either stretch the window or draw a black border around the game ('Center Image' and 'Maintain Aspect Ratio' I presume), but I haven't played with that yet. I could also make it so that Alt + Enter is disabled and just make fullscreen be called with, say, F5 instead.

Just curious for any ideas, suggestions, feedback, or knowledge on this whole subject.

EDIT: Also, what is it that causes windows to change the resolution when it's active, but minimizing said window reverts to the original screen resolution?
51
RMXP Script Database / [XP] Timed Choices
June 01, 2013, 09:27:29 pm
Timed Choices
Authors: KK20
Version: 1.01
Type: Message Add-on
Key Term: Message Add-on



Introduction

You know the 'Show Choices' command that you can put in your events? Ever wanted to make it where the user is timed to make a decision? Look no further! This relatively small and simple script will do just that for you.


Features


  • 'Show Choices' can be timed for the player

  • Makes a nice little window to display the time remaining

  • Want to request some features? Post them here!




Screenshots

Spoiler: ShowHide



Demo

None.


Script

Spoiler: ShowHide

#=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
# Timed Choices                                                       Ver 1.01
#   by KK20                                                          [03/06/13]
#=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
# [ Description ]
# RPG Maker is built with a 'Show Choices' command, giving players a list of
# items to choose from. This script will throw in a timer element, limiting
# players with the amount of time they have to make a decision. Should the timer
# hit zero, the last item highlighted will be selected.
#
# [ Instructions ]
# Place below default scripts and any scripts that modify messages.
# There is very little to configure below.
#
# For events, use the script call
#
#    $game_system.choices_timer = frames
#
# replacing frames with an integer value. The timer counts down in frames. If
# your game is running at 40 frames per second, a value of 400 is equivalent to
# 10 seconds.
#
# The timer will carry on over to the next time choices are given. Thus, if you
# always want the player to have a fresh 5 seconds every time he/she is given
# choices, you will need to use the above script call every time before every
# 'Show Choices' command.
#
# If you wish to disable the timer, use the above script call but set it equal
# to -1.
#
# [ Tips ]
# Should you ever want to store the current timer, you can use this script call:
#
#     $game_variables[id] = $game_system.choices_timer
#
# replacing 'id' with the game variable you wish to use. You can then do
#
#     $game_system.choices_timer = $game_variables[id]
#
# to set the timer back.
#
# [ Compatibility ]
# - Fix for CCoa UMS v1.80 has been made as of v1.01
#
# Be wary of scripts that modify how messages are displayed.
# Aliases Window_Message class methods to ensure best compatibility.
#
# [ Credits ]
# KK20 - For script
#=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
#                       C O N F I G U R A T I O N
#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
# Determines position of timer window. 0 for left, 1 for center, 2 for right.
POSITION = 0
#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
#                   E N D   C O N F I G U R A T I O N
#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
#==============================================================================
# ** Window_Message
#------------------------------------------------------------------------------
#  This message window is used to display text.
#==============================================================================

class Window_Message < Window_Selectable
  attr_reader :choice_window # Ccoa UMS fix
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  alias init_choices_timer_window initialize
  def initialize
    init_choices_timer_window
    @timer_window = Window_ChoicesTimer.new(self)
  end
  #--------------------------------------------------------------------------
  # * Dispose
  #--------------------------------------------------------------------------
  alias dispose_timer_window dispose
  def dispose
    dispose_timer_window
    @timer_window.dispose
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  alias update_rest_of_msg_window update
  def update
    @timer_window.adjust_position(self.x,self.y)
    @timer_window.update
    # If choices displayed and timer has hit zero
    if $game_temp.choice_max > 0 and $game_system.choices_timer == 0
      super
      # Revert timer back to -1
      $game_system.choices_timer = -1
      # Force decision based on current item highlighted
      $game_system.se_play($data_system.decision_se)
      # Ccoa UMS fix
      var = defined?(Window_Choice) ? @choice_window.index : self.index
      $game_temp.choice_proc.call(var)
      terminate_message
      return
    end
    # Alias update method
    update_rest_of_msg_window
  end
end

#==============================================================================
# ** Game_System
#------------------------------------------------------------------------------
#  Adds another variable @choices_timer
#==============================================================================
class Game_System
  attr_accessor :choices_timer
  alias init_choices_timer initialize
  def initialize
    @choices_timer = -1
    init_choices_timer
  end
end

#==============================================================================
# ** Window_ChoicesTimer
#------------------------------------------------------------------------------
#  This window displays the amount of time the player has left to make a choice.
#==============================================================================
class Window_ChoicesTimer < Window_Base
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize(msgwin)
    # Basic initialization variables
    super(0, 0, 64, 48)
    self.contents = Bitmap.new(self.width-32, self.height-32)
    self.visible = false
    self.z = 9998
    @fade_in = false
    @fade_out = false
    self.active = false
    # Assign message window
    self.message_window = msgwin
  end
  #--------------------------------------------------------------------------
  # * Assign message window and make appropriate movements to timer box
  #--------------------------------------------------------------------------
  def message_window=(msgwin)
    @message_window = msgwin
    adjust_position(msgwin.x,msgwin.y)
  end
  #--------------------------------------------------------------------------
  # * Moves the timer box
  #--------------------------------------------------------------------------
  def adjust_position(x,y)
    case POSITION
    when 1 then x = x + (width / 2) - 32
    when 2 then x = x + width - 64
    end
    if y <= 48
      y += height
    else
      y -= 48
    end
    return if [self.x,self.y] == [x,y]
    self.x, self.y = x,y
  end
  #--------------------------------------------------------------------------
  # * Update
  #--------------------------------------------------------------------------
  def update
    super
    # If window is fading in
    if @fade_in
      self.contents_opacity += 24
      if self.contents_opacity == 255
        @fade_in = false
      end
      return
    end
    # If the timer window needs to be displayed, prepare to display it
    if !self.visible and $game_temp.message_text != nil and
    $game_temp.choice_max > 0 and $game_system.choices_timer > 0
      # CCoa UMS fix
      if defined?(Window_Choice)
        return unless @message_window.choice_window.visible
      end
      @fade_in = true
      self.visible = true
      self.contents_opacity = 0
      self.opacity = 255
      self.back_opacity = 160
      # Draw timer
      self.contents.clear
      self.contents.font.size = 16
      sec = $game_system.choices_timer / Graphics.frame_rate
      min = sec / 60
      time = sprintf("%02d:%02d", min, sec)
      self.contents.draw_text(0,-15,self.width,self.height,time)
      return
    end
    # If no longer making choice, fade out window
    if $game_temp.choice_max == 0
      @fade_out = true
      self.opacity -= 48
      self.contents_opacity -= 48
      if self.opacity == 0
        self.visible = false
        @fade_out = false
      end
      return
    end
    # If window is visible, count down timer and draw it to window
    if self.visible
      self.contents.clear
      self.contents.font.size = 16
      sec = $game_system.choices_timer / Graphics.frame_rate
      min = sec / 60
      time = sprintf("%02d:%02d", min, sec)
      self.contents.draw_text(0,-15,self.width,self.height,time)
      $game_system.choices_timer -= 1
    end
  end
end



Instructions

Explained all in the script. Main script call is
$game_system.choices_timer = frames



Compatibility

- Fix for Ccoa's UMS v1.80 has been made as of v1.01
Might be incompatible with message systems (e.g. Ccoa, Hermes). This script should always be placed under those scripts. I aliased three methods in Window_Message so it should work most of the time. If you're not using any fancy messaging scripts, this should fit like a glove.


Credits and Thanks


  • KK20 - For realizing that he couldn't find a similar script to this despite having seen one before and getting off his lazy ass to write one himself




Author's Notes

Think a certain feature would be nice? Post away!
Current Ideas: ShowHide


  • Apply a timer to 'Input Number'

  • If timer runs out, perform a specific action rather than auto-selecting highlighted option

  • Give the timer window more configurations


52
Got one of those 'cannot convert nil into string' errors while walking around, specifically, running left and then pressing down. Another user was on the screen. Occurred in Cherrygrove City.

EDIT: 'RGSS2 Player has stopped working.' ;___;

EDIT 2: Decided to just make this an overall bug report thread.
53
I've been working on a script recently that makes equipment items unique--rather than saying you have 2 Bronze Swords, you have 1 Bronze Sword (A) and 1 Bronze Sword (B). My intention is to create other add-ons to this system, but right now I'm just getting the basic idea down. My main focus has been making this script compatible with just about anything.

Currently I have it where new items are pushed to the end of $data_weapons/armors. I've got a whole sorting system and some method rewrites and what-not. The biggest trouble I have with, right now, is knowing when the equip no longer exists in the game (it's not equipped, not in inventory, not stored somewhere, etc.).

One solution I came up with is just let the item stay in the array forever. But now I don't know if this will become a huge issue. I have to save the $data_weapons/armors into the save files now--that's a lot of data isn't it? Especially how every equip is a new instance and such...

I'm currently running out of time typing this up. Be back later.
54
RPG Maker XP Ace
Use the VXA Engine in your XP games!
Originally created by Terv

1. Introduction


In the following I am going to explain to you how to use the engine of VX Ace (RGSS301.dll + Game.exe) in combination with your XP games. A number of benefits include:

  • Faster Language: The new Ruby Version 1.9.2 is about 5 times faster than ancient 1.8.1 and will give your game an enormous performance boost, especially if you're an avid eventer.
  • Hyperliquid rendering: The XP engine is well-known for its stuttering scrolling and the associated screen tearing (graphics being cut). However, after you have seen how beautifully soft and silky smooth your game looks with the new engine, you're never going back.
  • Improved font rendering: The VX and VX Ace engine implemented an improved font rendering which makes your text look more refined and a pleasure to read.
  • Improved Framerate: While XP's standard frame rate is recommended at 40fps, VX Ace defaults to 60fps. Your game has never looked smoother!
  • New VXA Functionalities: If you're a scripter, you now have access to some new methods (check the Help File). Want the game to scale in size with the window (like RM2003)? VXA has your back.


2. Required Files and Licences


Even though you can get all the files freely from the Ace RTP (RGSS301.dll) and any game (Game.exe), you officially need a valid VX Ace Maker licence in order to use them in your own game. A trial licence is in no way inferior to a bought one. You can't tell whether the creator of an XP game using the Ace engine had or has a valid licence or not from looking at it.

You can download the package here. It includes the required scripts, DLL, and Game.exe file.
Version 2.34 *NEW*
Version 2.33
Version 2.32
Version 2.3
Version 2.22
Version 2.1
Version 2.0

PhoenixFire was kind enough to provide a working demo along with a few resources and converted (on-going process!) scripts: Download (note that this is an older project using version 1.5)
Quote from: PhoenixFire on June 22, 2014, 11:56:58 pm
  • I've included RTP resources from the XP RTP, as well as some customized versions of the character battlers, and, som eof the resources in Heretics' Collection of Art and Scripts. You should either switch these out to what you would like, or, give due credit to them
  • If you do end up using this demo as a base for your game, please make sure you give credit where it is due. As of right this second, credit goes to Terv for the conversion kit, and Heretic for some of the resources. If you would like, it would be great to give me credit for assembling it all for you. Also, in time, I will start building some of thee compatible scripts into this demo, and at that point, I would ask to be included in the credits as well. Of course, you are always capable of simply making the kit work for yourself, in which case you owe me no credit whatsoever =p

REGARDING COMMERCIAL USE

XPA Tilemap is protected under Creative Commons - Attribution-NonCommercial-ShareAlike 3.0 Unported. However, This does not mean that you may not use this for commercial purposes. Please contact me, KK20, to establish an agreement. I mainly put this license to keep track of who is using this project and get some recognition for the hundreds of hours I've spent maintaining it.
Don't worry, I'm very fair ;)

3. Step-by-step instructions


  • 3.1 Insert the Engine

Create a new XP project and use this as you're following along. DO NOT USE AN EXISTING PROJECT AND RISK CORRUPTING YOUR GAME.
Copy the game folder files Game.exe and RGSS301.dll from the kit and move them into your game folder.
Copy the folder Fonts into your game folder. Game.exe always checks whether these font files are present if they're not already installed on the system. It's irrelevant whether they are used in your game at all.
Open your Game.ini and notice what is written behind Library=. Rename the RGSS301.dll accordingly to match this (its usually RGSS102E.dll or RGSS104E.dll).
Note to v1.05 (Steam version) users: People reported having issues with the above after saving changes to their game where the DLL file is replaced with original RGSS104.dll file. You will currently need to replace the DLL file every time. Ickh has created a simple executable that will bypass this issue. You can go to this post for more information. :)


  • 3.2 Paste Scripts

The package includes a Script.rxdata file. Replace your project's Script.rxdata in the Data folder.
This file includes all the essential scripts necessary for your game, including missing RPG Modules, an RTP loader, a Tilemap rewrite, a Window class rewrite, and more.

Why a Tilemap rewrite?
The Tilemap class is unalterably compiled in the RGSS DLL and its task is to read map files and build maps as we know them. Since VX and Ace are using a different mapping system--and thus a different Tilemap class--you need a replacement that knows how to deal with your XP maps.

XP Ace Tilemap, written by myself, KK20, is the recommended and supported choice. It was designed specifically for this project unlike other rewrites. It is also the only one receiving updates. You could replace the rewrite with another, provided you are fully aware of what you are doing. Here is a list of others:
Spoiler: ShowHide


Name
WhiteFlute [Recommended]
me(tm) [Recommended]
ForeverZer0 [Recommended]
The King [Recommended]
poccil
SephirothSpawn
RTH
Pros
Extremely stable, rather efficient
Fluid rendering and highly stable, also at higher resolutions
Great performance, especially at higher resolutions
Very liquid rendering, many additional features
Decent for small and mid-size maps
Absolutely fluid and stable rendering
Okay for small maps
Cons
May require small edits to Tilesets and scripts
Incompatible with smooth scrolling scripts
Occasional display bugs
High RAM consumption, possibly long map loading times
Micro stutters on large maps
Requires SDK Part I+II and parts of MACL Complete, Bugs
Heavy stutters on large maps


*If you're using Sephiroth's rewrite please note that SDK and MACL have to be above the tilemap script.



  • 3.3 Optional: Encrypt Project


Download the VX Ace trial and install it. Create a new project, delete all files in your new Ace project folder without closing the maker, then paste all XP game files into the Ace game folder. Now select File -> Compress Game Data... -> (Create Encrypted Archive) OK. An self-extracting archive will then be created, containing a .rgss3a file instead of Data and Graphics folders.
Keep in mind that the rgss3a encryption has been cracked and released 5th of June 2012.

As an alternative, you can package your game as a single executable using Engima Virtual Box, as explained here: Single Executable for RPG Maker.
Note that this is a generally poor solution to use if going commercial. You should look into a custom encryption implementation instead.


4. Credits


KK20 - Taking ownership of the project and providing numerous script support
Blizzard, LiTTleDRAgo - Scripting and bug fixing support
Dargor - XP->VX tutorial at hbgames.org
PhoenixFire - Demo project and converted scripts
Terv - For the original topic
56
Tutorials / [BABS] Exploding Objects
December 09, 2012, 05:21:31 pm
Blizz-ABS: Exploding Objects
Author: KK20




Introduction

Don't you know how in some games there are boxes (usually loaded with TNT or explosives of the like) that explode when damaged? Well how about using that feature in Blizz-ABS? Perhaps this can make some interesting games where, instead of using all your resources to take down a group of monsters, you only have to destroy this object to take them all out.



Step-By-Step Instructions

1.) Create a new skill in the RMXP project. Make this skill have the scope to attack 'All Enemies'. Also, adjust its damage and make its SP cost 0. Be sure that this skill does do damage. If, after defenses are calculated, the damage is 0 for all surrounding targets, the explosion animation will not play.

Open up the Blizz-ABS configuration and go to the Skills tab. Make it so that this new skill is a 'Direct/Shockwave' and define its range. Leave everything else alone.

2.) We must create a group to represent these exploding objects. Within the Blizz-ABS configuration application, go to Alignment Groups. Change the maximum to add a new group (go ahead and name it if you would like). Check the box to make it 'Lifeless'. Then, put 'Actors' and 'Enemies' as its enemies. Doing this will cause the explosion to damage these groups only. Thus, if you want to make a chain-reaction of explosions, make this group see itself as an enemy.

When you are done with that, be sure to edit the 'Actors' and 'Enemies' groups to see this new object as 'Fully Neutral'. That way, your allies and enemies won't focus on attacking these exploding objects.
Group Setup: ShowHide




3.) Copy this script and add it below the Blizz-ABS scripts:
Spoiler: ShowHide

class Map_Battler < Game_Character
 
  def use_skill(skill, forced = false, after_death = false)
    # remove last hpdamage and spdamage values
    @battler.hpdamage = @battler.spdamage = 0
    # if can use the skill
    if skill_can_use?(skill.id, forced, after_death)
      # get combo id
      combo_id = BlizzABS::Skills.combo(skill.id)
      # if combo id is valid and not currently in a combo
      if combo_id != 0 && @combo == nil
        # create combo
        @combo = BlizzABS::Combo.new(combo_id, self)
        # return used
        return true
      end
      # set last action
      @battler.last_action = ["skill", false]
      # execute skill
      result = $BlizzABS.skillitem_process(self, skill)
      # effectiveness
      effective = (result || charging? && !charged?)
      # if used or charging up and about to discharge
      if result
        # set frame penalty
        set_action(self.skill_penalty(skill.id))
        # skill consumption effect
        skill_consumption(skill)
        # call common event
        common_event_call(skill)
        # set usage animation
        set_usage_animation(skill)
        # set sprite animation
        set_sprite_animation(BlizzABS::SPRSkill, skill_sprites?, skill)
        # set up user damage display if necessary
        user_damage_display
        # reset action
        self.reset_action
      # if discharged
      elsif charging? && charged?
        # reset action
        self.reset_action
      end
      # effective
      return effective
    end
    # not used
    return false
  end
 
  alias call_babs_orig_use_skill use_skill
  def use_skill(skill, forced = false, after_death = false)
    if skill.is_a?(RPG::Skill)
      call_babs_orig_use_skill(skill, forced, after_death)
    else
      call_babs_orig_use_skill($data_skills[skill], forced, after_death)
    end
  end
 
  def skill_can_use?(id, forced = false, after_death = false)
    if (forced)
      # If low SP, incapacitated, or silent and non-physical, can't use
      return $data_skills[id].sp_cost <= @battler.sp && (!@battler.dead? || after_death)
         ($data_skills[id].atk_f != 0 || @battler.restriction != 1)
    end
    return @battler.skill_can_use?(id)
  end
end



4.) Create a dummy-enemy in your database. This enemy gives no EXP and items. Define its stats accordingly (i.e. give it low evasion and agility and high attack).

When creating this enemy on the map, give it a Name
\e[id1] \g[id2]
where id1 is the ID of your dummy-enemy in the database and id2 is the ID of the new group we created. Set its graphic to your exploding box.

For the Event Commands, use a 'Script' call and put in the following:

e = $game_map.events[@SELF]
e.use_skill(ID, true, true)
replacing ID with the exploding skill's ID in the database.
Event Setup: ShowHide
 


And that's all there is to it! Have fun~
Special thanks to Sin86 for requesting and suggesting I put this up.
57
RMXP Script Database / [XP] Target Anyone
December 09, 2012, 02:21:35 am
Target Anyone
Authors: KK20
Version: 1.02
Type: Unique Skills
Key Term: Battle Add-on



Introduction

This small script allows the player to make single target scopes reverse its intended target. In other words, you can now choose to Heal or cast Fire on a monster or one of your allies.

Yes, you can make enemies undead and attack them with Heal. Likewise, you can create armor that absorbs fire and cast Fire on your allies.


Features


  • Player can choose to attack an enemy or an ally with skills that target One Actor/One Enemy

  • ...that's pretty much it.




Screenshots

None--Can't really screenshot this.


Demo

None


Script

Below the default scripts and above Main.
If wishing to test for compatibility with another battle system, place this below it.
Spoiler: ShowHide

=begin
===============================================================================
Target Anyone Scope
Version 1.02
9/4/2013
By KK20
===============================================================================
-[ Introduction ]-
This small script allows the player to make single target scopes reverse its
intended target. In other words, you can now choose to Heal a monster or one
of your allies.

-[ Instructions ]-
1.) Scroll down to the configurations and locate Constant TARGET_ANYONE_TAG.
    Change the string associated with it if you like.
2.) Create a new element in the Database. Name this new element the same as you
    have TARGET_ANYONE_TAG assigned to.
3.) Apply this new element to skills or items that you wish to have this
    effect.

    ~ NOTE: The effect will only work if you set the scope to "One Enemy"
            or "One Ally".

-[ Compatibility ]-
* This script was made with the default battle system in mind. Custom battle
  scripts will most likely not work with this script without edits.
* Not tested with SDK
* Changes made to Game_Actor, Game_Battler, and Scene_Battle

===============================================================================
Credits:
KK20 - Writing this script
Charlie Fleed - For the idea
Heretic86 - Requesting and bug fixing/finding
===============================================================================
=end

#===========#
# Configure #
#===========#

# The element ID's name that allows the user to target any one battler
TARGET_ANYONE_TAG = "Target Any"

#===============#
# End Configure #
#===============#

#-------------------------------------------------------------------------
# Class Game Actor
#-------------------------------------------------------------------------
class Game_Actor < Game_Battler
 attr_accessor :changed_scope
 
 alias call_init_again initialize
 def initialize(actor_id)
   @changed_scope = false
   call_init_again(actor_id)
 end
 
 def clear
   super
   @changed_scope = false
   @target_type = nil
 end  
 
end

#-------------------------------------------------------------------------
# Class Game Battler
#-------------------------------------------------------------------------
class Game_Battler
 #--------------------------------------------------------------------------
 # * Calculating Element Correction
 #     element_set : element
 #--------------------------------------------------------------------------
 def elements_correct(element_set)
    element_set = element_set.clone
   # Remove any Excluded Elements from the element_set arg array
   for i in element_set
     if i == $data_system.elements.index(TARGET_ANYONE_TAG)        
       element_set.delete(i)
     end
   end      
   # If not an element
   if element_set == []
     # Return 100
     return 100
   end
   # Return the weakest object among the elements given
   # * "element_rate" method is defined by Game_Actor and Game_Enemy classes,
   #    which inherit from this class.
   weakest = -100
   for i in element_set
     # Element with the Highest Rate means it is the Weakest          
     weakest = [weakest, self.element_rate(i)].max
   end
   return weakest
 end
end

#-------------------------------------------------------------------------
# Class Scene Battle
#-------------------------------------------------------------------------
class Scene_Battle
 #--------------------------------------------------------------------------
 # * Frame Update (actor command phase : skill selection)
 #--------------------------------------------------------------------------
 def update_phase3_skill_select
   # Make skill window visible
   @skill_window.visible = true
   # Update skill window
   @skill_window.update
   # If B button was pressed
   if Input.trigger?(Input::B)
     # Play cancel SE
     $game_system.se_play($data_system.cancel_se)
     # End skill selection
     end_skill_select
     return
   end
   # If C button was pressed
   if Input.trigger?(Input::C)
     # Get currently selected data on the skill window
     @skill = @skill_window.skill
     # If it can't be used
     if @skill == nil or not @active_battler.skill_can_use?(@skill.id)
       # Play buzzer SE
       $game_system.se_play($data_system.buzzer_se)
       return
     end
     # Play decision SE
     $game_system.se_play($data_system.decision_se)
     # Set action
     @active_battler.current_action.skill_id = @skill.id
     # Make skill window invisible
     @skill_window.visible = false
     # If effect scope is single enemy or single ally and can target anyone
     if @skill.element_set.include?($data_system.elements.index(TARGET_ANYONE_TAG)) and
     (@skill.scope == 1 or @skill.scope == 3)
       # Define starting position of the arrow
       @orig_scope = @skill.scope
       start_enemy_select if @skill.scope == 1
       start_actor_select if @skill.scope == 3
       @any_target = true
     elsif @skill.scope == 1  
       # Start enemy selection
       start_enemy_select
     # If effect scope is single ally
     elsif @skill.scope == 3 or @skill.scope == 5
       # Start actor selection
       start_actor_select
     # If effect scope is not single
     else
       # End skill selection
       end_skill_select
       # Go to command input for next actor
       phase3_next_actor
     end
     return
   end
 end
 #--------------------------------------------------------------------------
 # * Frame Update (actor command phase : item selection)
 #--------------------------------------------------------------------------
 def update_phase3_item_select
   # Make item window visible
   @item_window.visible = true
   # Update item window
   @item_window.update
   # If B button was pressed
   if Input.trigger?(Input::B)
     # Play cancel SE
     $game_system.se_play($data_system.cancel_se)
     # End item selection
     end_item_select
     return
   end
   # If C button was pressed
   if Input.trigger?(Input::C)
     # Get currently selected data on the item window
     @item = @item_window.item
     # If it can't be used
     unless $game_party.item_can_use?(@item.id)
       # Play buzzer SE
       $game_system.se_play($data_system.buzzer_se)
       return
     end
     # Play decision SE
     $game_system.se_play($data_system.decision_se)
     # Set action
     @active_battler.current_action.item_id = @item.id
     # Make item window invisible
     @item_window.visible = false
     # If effect scope is single enemy or single ally and can target anyone
     if @item.element_set.include?($data_system.elements.index(TARGET_ANYONE_TAG)) and
     (@item.scope == 1 or @item.scope == 3)
       # Define starting position of the arrow
       @orig_scope = @item.scope
       start_enemy_select if @item.scope == 1
       start_actor_select if @item.scope == 3
       @any_target = true
     # If effect scope is single enemy
     elsif @item.scope == 1  
       # Start enemy selection
       start_enemy_select
     # If effect scope is single ally
     elsif @item.scope == 3 or @item.scope == 5
       # Start actor selection
       start_actor_select
     # If effect scope is not single
     else
       # End item selection
       end_item_select
       # Go to command input for next actor
       phase3_next_actor
     end
     return
   end
 end
 #--------------------------------------------------------------------------
 # * Frame Updat (actor command phase : enemy selection)
 #--------------------------------------------------------------------------
 def update_phase3_enemy_select
   # Update enemy arrow
   @enemy_arrow.update
   # If this skill/item can target anyone
   if @any_target == true
     # If player pressed the key to change targets
     if Input.trigger?(Input::DOWN)
       # Play decision SE
       $game_system.se_play($data_system.cursor_se)
       # Initialize actor select, end enemy select
       end_enemy_select
       start_actor_select
       @active_battler.changed_scope = !@active_battler.changed_scope
       # Stop processing
       return
     end
   end
   # If B button was pressed
   if Input.trigger?(Input::B)
     # Play cancel SE
     $game_system.se_play($data_system.cancel_se)
     # End enemy selection
     end_enemy_select
     @active_battler.changed_scope = false      
     @any_target = false
     return
   end
   # If C button was pressed
   if Input.trigger?(Input::C)
     # Play decision SE
     $game_system.se_play($data_system.decision_se)
     # Set action
     @active_battler.current_action.target_index = @enemy_arrow.index
     # End enemy selection
     end_enemy_select
     # If skill window is showing
     if @skill_window != nil
       # End skill selection
       end_skill_select
     end
     # If item window is showing
     if @item_window != nil
       # End item selection
       end_item_select
     end
     @any_target = false
     # Go to command input for next actor
     phase3_next_actor
   end
 end
 #--------------------------------------------------------------------------
 # * Frame Update (actor command phase : actor selection)
 #--------------------------------------------------------------------------
 def update_phase3_actor_select
   # Update actor arrow
   @actor_arrow.update
   # If this skill/item can target anyone
   if @any_target == true
     # If player pressed the key to change targets
     if Input.trigger?(Input::UP)
       # Play decision SE
       $game_system.se_play($data_system.cursor_se)
       # Initialize actor select, end enemy select
       end_actor_select
       start_enemy_select
       @active_battler.changed_scope = !@active_battler.changed_scope
       # Stop processing
       return
     end
   end
   # If B button was pressed
   if Input.trigger?(Input::B)
     # Play cancel SE
     $game_system.se_play($data_system.cancel_se)
     # End actor selection
     end_actor_select
     @active_battler.changed_scope = false      
     @any_target = false
     return
   end
   # If C button was pressed
   if Input.trigger?(Input::C)
     # Play decision SE
     $game_system.se_play($data_system.decision_se)
     # Set action
     @active_battler.current_action.target_index = @actor_arrow.index
     # End actor selection
     end_actor_select
     # If skill window is showing
     if @skill_window != nil
       # End skill selection
       end_skill_select
     end
     # If item window is showing
     if @item_window != nil
       # End item selection
       end_item_select
     end
     @any_target = false
     # Go to command input for next actor
     phase3_next_actor
   end
 end
 #--------------------------------------------------------------------------
 # * Set Targeted Battler for Skill or Item
 #     scope : effect scope for skill or item
 #--------------------------------------------------------------------------
 alias modded_scopes_change_targets set_target_battlers
 def set_target_battlers(scope)
   # If the actor has changed the scope of the skill/item
   if @active_battler.is_a?(Game_Actor) and @active_battler.changed_scope
     # Reset the variable
     @active_battler.changed_scope = false
     # Determine targets
     case scope
     when 1 # single ally
       index = @active_battler.current_action.target_index
       @target_battlers.push($game_party.smooth_target_actor(index))
     when 3 # single enemy
       index = @active_battler.current_action.target_index
       @target_battlers.push($game_troop.smooth_target_enemy(index))
     end
   else
     # Call original method
     modded_scopes_change_targets(scope)
   end
 end
 #--------------------------------------------------------------------------
 # * Battle Ends
 #     result : results (0:win 1:lose 2:escape)
 #--------------------------------------------------------------------------
 alias reset_changed_scopes battle_end
 def battle_end(result)
   # Reset all the actors' changed_scope variable
   for actor in $game_party.actors
     actor.changed_scope = false
   end
   # Call alias
   reset_changed_scopes(result)
 end
end



Instructions

It should all be there in the script, right near the beginning of it.
To change scopes/target, use the UP and DOWN arrow keys.


Compatibility

Made with the default battle system in mind. Probably won't work with custom battle systems.
Not tested with SDK.
Modifies methods in Game_Battler, Game_Actor, and Scene_Battle.


Credits and Thanks


  • KK20 - Creator

  • Charlie Fleed - For the idea on how to implement this

  • Heretic86 - Requesting, fixing a couple of bugs, and encouraging me to database it




Author's Notes

Note that this only works for actors and not for enemies. In other words, the enemy is not programmed to heal your allies or attack its troop.
58
RMXP Script Database / [XP] Advance Wars Engine
November 20, 2012, 08:51:57 pm
Advance Wars Engine
Authors: KK20
Version: 0.1b
Type: Engine
Key Term: Misc System



Introduction

I wouldn't expect a large majority of you to know what the game Advance Wars is, so I might as well explain it briefly. Developed by Intelligent Systems (whom also did Fire Emblem, a game you should probably all be familiar with), Advance Wars is a turn-based strategy game of 2-4 players. Players control their own armies of tanks, battleships, and jet fighters to take down their opponents. Players also choose a Commanding Officer who has special abilities and skills to aid in combat (one CO can heal his units while another prefers using air units than sea units). There are a number of maps for players to choose from as well as a Campaign mode that pits the player to complete a number of objectives to a storyline.

This project/script will provide you with the necessary tools to create your own Advance Wars game (or just play a quick game with friends if you're not interested in making your own--the demo provides enough maps, units, and COs to play with).


Features


  • Comes packed with the basic essentials for any typical Advance Wars game.

  • Open Source--Write your own add-ons or edit the existing code.

  • More to come...




Screenshots

Videos of progress:
Gameplay Test #1
Update #6
Channel

Screenshots (OLD): ShowHide

CO Select Screen


Fog of War


User Interface stuff


Grit's Rocket attack range



Script
-GitHub Repository-
https://github.com/tcrane20/AdvanceWarsEngine

-Official Releases-
Version
v0.1b


Instructions

Instructions are located in the ReadMe.txt and UserManual.pdf files.


Compatibility

This engine is a complete backhand to RPG Maker XP. Of course any scripts meant for actual RPGs in mind will not work here at all. I don't see why you would even need to add any outside scripts to this engine anyways.


Credits and Thanks


  • KK20 - Project Leader

  • Blizzard - Multiple Inputs script and how to write errors to text files

  • game_guy - Manipulate comment lines in events and screenshot script

  • ForeverZer0 - Advanced Weather script and console debugging tool

  • GubiD - References to GTBS script

  • Selwyn - Window Class rewrite

  • Cogwheel - Audio MP3 Loop script (possibly be substituted for another script)

  • DerVVulfman - Mouse Input script

  • Legacy - High Priority script

  • Nintendo & Intelligent Systems - For creating the Advance Wars series and using their sprites and audio




Author's Notes

Spoiler: ShowHide

So why are you doing this?

Simple: I love this game. What? Not good enough of a reason?

For some of you RPG Maker XP users, you may have heard of a script called GubiD's Tactical Battle System. It was mentioned that an Advance Wars add-on would be created. Upon returning to the RMXP community, he replied that such a thing was already possible to make with the heavy use of events. I shook my head at this comment--there are WAY too many variables and factors you have to consider, so much so that eventing it would be a nightmare.

There have also been a few Advance Wars engines created, one of which is open-source (but in Java...my enemy) and another which allowed users to create their own campaigns, units, and CO's with a simple GUI. However, none of these felt like a true Advance Wars recreate, not to mention some had bugs, graphical errors, and (worst of all) I would not be able to change any of it.

I also started this project around the time I joined this website. I found it as a test of my Ruby scripting knowledge I've accumulated over the years. Plus, the feeling of doing something from scratch to completion is a great sensation.


What do you plan on doing?

Right now, I'm still in the "get everything finished so that I can release some kind of demo as soon as possible" mode. The engine has seen some changes:

  • Battle calculations have been changed

  • CO's have been modified

  • Friendlier user interface


But I also plan on trying to add as many features as possible of the original Advance Wars into the engine (some animations, AI, Campaign, Map Maker, and possibly online matches). I probably will include more features if this project gets further in the design process, but as of now, I just want a working game going.


Anything I can do to help?

As of now, I am doing all of this solo.

When the time comes around, I'd sure like some Testers. Throughout my scripting process, I have always come upon some small bugs that were difficult to find and reproduce, so many hands would be appreciated.

If you are super knowledgeable with Ruby scripting (and possibly RMX-OS when I get that far), I may require a couple Programmers.

Knowledgeable with the series in general? I'd love to hear some feedback, suggestions, and ideas. I'd love to do a few rounds with you as well (but as of now the only way I can play with others is through TeamViewer...trust issues ya know?)

Quote from: KK20 on November 29, 2012, 01:59:53 am
I want to add that I'm kinda looking for spriters or anyone good with making graphics if you want to make the default systems look nicer/better. I'm not desperate, but if you like this project and feel you want to help make it look its best, I'd appreciate it ;) (otherwise, everyone will just have to love my amateur spriting).

Also, if you would like to make a logo for the project, go for it. The only program I've ever needed to used is Paint, so my experience with graphics is pretty much zero. Again, I'm not desperate, but if you would like to support, please <3


Since I am not currently looking to make a standalone game, I'm not in the need of composers or writers.
59
My dad works at/runs a pipe-fitting company. It manufactures and ships its products to clients. But we don't care about that right now...this is the programming board after all.

Anyways, here's one example of one of the types of pipes he sells.
Spoiler: ShowHide
Note that this is only a shape. We can have pipes that fit nicely in the palm of your hand to straining your back to lift one up.

My dad wanted me to create some kind of program that allows him to input numbers at specific areas on the prints (you can see that with all the arrows pointing everywhere). Also, I need to be able to write text vertically (aka rotate it 90 degrees; you can see the rectangles on the right where I'd write it at). Essentially the program can do this:

>> What shape do you want?
>> What size?
>> What material? (upon selection, fills in the data areas with the default numbers)
>> Allows editting the numbers (and possibly drawing on the print, depends if this is easy)
>> Print
>> Ask to save the design

Visual Basic sounds like the best solution so far (mainly because of all that UI you can get). But I'm not sure if this is the right thing to do nor do I know how I'm going to implement this yet. I'm still trying to understand what he means by editting the print, but it sounds like he wants to be able to draw lines or something on it. Looking for any suggestions or ideas. Thanks.
60
I'm currently taking this class right now and am slowly not seeing why I need to know this stuff. This was brought up in a conversation within my Facebook group (Video Game Design Club).
Spoiler: ShowHide
Quote from: Melol vectors...my 131 teacher refuses to let me use those. They looked easier to use than linked lists and such with pointers.

Quote from: Person A131 has a purpose, which is to teach you about the most common data structures and their strengths and weaknesses. Off the top of my head, I believe you can use vector to implement all of them, but letting you do it that way would defeat the purpose of the class. In the real world though, vector is pretty much the uber-structure, because it's stored as an array. If your CPU has a pipeline (and pretty much all of them do), then locality of reference* beats the lower time complexity** of the other structures for certain operations almost every time.

* unless you do something stupid like make a vector of pointers, because then you're optimizing for cache misses.

** That's actually not entirely true, since big-O is supposed to take the hardware architecture into consideration, but most most of the time we do it wrong.

Quote from: MeSo 131 is practically "Here's information that you will never have to use in your future careers"? Wow, no wonder I'm bored in that class.

Quote from: Person BYou will use everything in 131, over and over again.
For job interviews, you will be expected to know everything which is taught in 131.


According to Person A, vectors can replace most of the material I'm learning right now and is used more often in career work. So why must I know how to use Linked Lists and the such? I guess knowing how they work is okay, but to know how to use them? Seems like wasted time to me. (And yes, while I may be a helpful Ruby scripter around here, I'm still much a beginner when it comes to theory and how things work, especially since I've only been using C++ for 3-4 months now)