Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
AutoSelfParameters [Add-on]
#1
AutoSelfParameters
Version: 1

Introduction
This is an add-on to the Self Parameters script [VX], [XP]. This is pretty similar to my autoswitcher script. Basically, you get to set initial values of information for certain events, which would be set up when your project starts.

Features
  • Tag an event from a certain map with information.

Screenshots
No screenshots.

Demo
No demo.

Script
Code:
=begin
????????????????????????????????????????????????????????????????????????????????
? AutoSelfParameters                                                           ?
? by PK8                                                                       ?
? November 2nd, 2009                                                           ?
? http://rmvxp.com                                                             ?
????????????????????????????????????????????????????????????????????????????????
? ? Table of Contents                                                          ?
? ?? Author's Notes                - Line 14?16                                ?
? ?? Introduction & Description    - Line 18,19                                ?
? ?? Features                      - Line 21?23                                ?
? ?? This aliases the following... - Line 25,26                                ?
????????????????????????????????????????????????????????????????????????????????
? ? Author's Notes                                                             ?
? I wanted to give the users of my Self Parameters script an easy way to set   ?
? params for multiple events at the start of the game so here it is.           ?
????????????????????????????????????????????????????????????????????????????????
? ? Introduction & Description                                                 ?
? This script sets initial values of information about certain events.         ?
????????????????????????????????????????????????????????????????????????????????
? ? Features                                                                   ?
? ? Set initial values of information about certain events at the start of the ?
?   game.                                                                      ?
????????????????????????????????????????????????????????????????????????????????
? ? This aliases the following...                                              ?
? initialize          - Game_SelfPaameters                                     ?
????????????????????????????????????????????????????????????????????????????????
=end

#===============================================================================??
# ** AutoSelfParameters Customization!
#===============================================================================??
class PK8
  ASP_Parameters = {} # Do not touch.
  
  # ASP_Parameters[[map_id, event_id, id]] = value
  ASP_Parameters[[1, 1, 'gender']] = 'male'
  ASP_Parameters[[1, 1, 'likes']] = 'cooking'
  
  ASP_Parameters[[1, 2, 'gender']] = 'male'
  ASP_Parameters[[1, 2, 'likes']] = 'farming'
  
  ASP_Parameters[[1, 3, 'gender']] = 'male'
  ASP_Parameters[[1, 3, 'likes']] = 'gardening'
  
  ASP_Parameters[[1, 4, 'gender']] = 'female'
  ASP_Parameters[[1, 4, 'likes']] = 'hunting'
end

#==============================================================================
# ** Game_SelfParameters
#------------------------------------------------------------------------------
#  This class handles self switches. It's a wrapper for the built-in class
# "Hash." The instance of this class is referenced by $game_self_parameters.
#==============================================================================

class Game_SelfParameters
  #--------------------------------------------------------------------------
  # * Alias Listings
  #--------------------------------------------------------------------------
  alias_method :pk8_autoselfparameters_initialize, :initialize
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    pk8_autoselfparameters_initialize
    PK8::ASP_Parameters.each_pair { | k, v | @data[k] = v }
  end
end

Instructions
Instructions are in the script.

FAQ
Awaiting question.

Compatibility
It aliases Game_SelfParameters' initialize method.

Credits and Thanks
Credit me. :3

Author's Notes
Eh... it's an easy way to set up the information of events. d:3

Terms and Conditions
Exclusive to RMVXP.
Reply }




Users browsing this thread: