Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Near's Personality Engine with Fable Effect
#1
Near's Personality Engine with Fable Effect
by ProneAccident
May 13 2005

This is a locked, single-post thread from Creation Asylum. Archived here to prevent its loss.
No support is given. If you are the owner of the thread, please contact administration.


Okay, So in the Personality Engine Game has a Fable effect, where your appearence changes based on how good/evil you are. I decided release it incase people wanted to use it.


The Syntax
(these can be changed to your liking, see below)
integrity= good/evil alignment
power= fame


to add:
Code:
$pe.actors[1].integrity +=  Amount
$pe.actors[1].power += Amount

to subtract:
Code:
$pe.actors[1].integrity -=  Amount
$pe.actors[1].power -= Amount


these go into call scripts in events to increase/decrease each
variable.


The Script

First, in Scene_Map add this line:
Code:
$pe.fable_effect

after this:
Code:
def update

   loop do
     $game_map.update
     $game_system.map_interpreter.update
     $game_player.update


Point 1 - So then you replace the Personality Engine script with the one provided below. In the script, you can choose which appearences you want for each level of alignment at the begining of the script.


NONFAMOUS is the starting characterset.
FAMOUSNEUTRAL is when he is more well known, but still neutral
GOODLEVELONE is well known, and somewhat good
GOODLEVELTWO is well known, Mostly Good
GOODLEVELTHREE is well known, Completely Good
BADLEVELONE is well known, Somewhat Bad
BADLEVELTWO is well known, Mostly Bad
BADLEVELTHREE is well known, Completely Bad


Point 2 - You can have it so it only takes effect when a switch is on by going to line 195 and following said instructions.

Point 3 - You can change the Variables which determine the Fame and Good/Evil Alignment by going to line 199 and following those instruchtions. The Defaults are:
Power = Fame
Integrity = Good/Evil Alignment.


New PE script, replace the old one if you have it:
Code:
#===========================================================
# â–  Personality Engine
#------------------------------------------------------------------------------
#     By Near Fantastica
#     Fable Effect: First Draft and edit by AcedentProne, scripted Near Fantastica
#     12/04/05
#     Version 3
#------------------------------------------------------------------------------
#     The Personality Engine handles character personalities interactions and emotions...
#     Add to the Sterotype names to add more characters to the Personality Model
#
#
#     The Character Sets for the fable effect
#-----------------------------------------------------------------------------
NONFAMOUS = "107-Civilian07" #Looks best when Chosen Default is the same
FAMOUSNEUTRAL = "001-Fighter01" #When known
GOODLEVELONE = "011-Lancer03"  #When Somewhat good
GOODLEVELTWO = "027-Cleric03"  #When Mostly Good
GOODLEVELTHREE = "042-King01" #Completely Good
BADLEVELONE = "013-Warrior01" #Somewhat Bad
BADLEVELTWO = "014-Warrior02" #Mostly Bad
BADLEVELTHREE = "097-Monster11" #Completely Bad
#---------------------------------------------------------------------------
#     Intrinsic Variables 0 to 100
#
# Integrity – This variable is close to the common use of the term. Actors with high Integrity
# always keep their word, never tell lies, and never reveal secrets. Actors with low Integrity
# break their promises, lie and reveal secrets.
#
# Virtue – This is the degree to which an actor takes other actors’ needs and desires into
# account when making decisions. Actors with high virtue make choices based on
# what’s best for other actors, themselves included. Actors with low Virtue are selfish,
# self-centered and egotistical. They always place their own interests ahead of others considerations.
#
# Power – This variable represents the ability to wreak physical, financial, or social injury
# upon others. Actors with lots of Power have the capacity to do harm, but not necessarily
# the motivation.
#
# Intelligence – this variable represents the ability to make correct decisions. Actors with
# high Intelligence often make the most efficacious and pragmatic choices. Actors with low
# Intelligence often make incorrect judgments.
#
# Attractiveness – This variable represents an Actor’s physical appearance. A female Actor
# with high Attractiveness is pretty; a male Actor with high Attractiveness is handsome.
#
#     Volatility Variables 0 to 100
#
# Adrenaline – Think of this variable as “the speed with which adrenaline pours
# into the bloodstream.� It controls the rate of change of Anger/Fear. High values
# describe an Actor who angers or runs quickly.
#
# Manic Depressive – Actors with high levels of this variable soar to peaks of joy or plunge
# to depths every time they look at the mail; controls Joy/Sadness.
#
# Sensuality – This variable controls the rate of change of Arousal/ Disgust. An Actor with
# high value of Sensuality is readily aroused and easily disgusted.
#
#      Mood Variables 100 to -100
#
# Anger/Fear – Positive values denote anger; negative values denote fear.
#
# Joy/Sadness – Positive values denote joy; negative values denote sadness.
#
# Arousal/Disgust – This paring counterbalances arousal, normally thought of in its
# sexual manifestation, with disgust, normally associated with smell and taste. In this case,
# however, arousal is used to indicate any heightened sensuality. Licking your lips
# before digging into a meal constitutes arousal.
#
#     Accordance Variables 100 to -100
#
# Accord Integrity – This variable is close to what is known as gullibility; its negative sense would
# be close to suspiciousness.
#
# Accord Virtue – This variable represents the willingness to see the good in other people.
# An actor with high levels of Accord Virtue would be more sympathetic and not respond
# harshly to another Actor’s evil actions.
#
# Accord Power – This variable might be call timidity. An Actor with high Accord Power
# overestimates the power of others. An Actor with low Accord Power underestimates the
# dangers of any social situation.
#
# Accord Intelligence – No simple English term adequately captures this concept. An Actor
# with high Accord Intelligence more readily defers to others’ judgments, thinking them wise.
# An Actor with negative values of Accord Intelligence thinks everybody else is stupid and
# rejects their suggestions.
#
# Accord Attractive – this variable also has no ready translation into English. Behaviorally, an
# Actor with high values Accord Attractive sees everybody else as beautiful. This variable
# makes more sense in terms of self-image, in which case you might call its negative value
# vanity. Accord Attractive might also translate into something like lust.
#
#     Relationship Variables 100 to -100
#
# Per Integrity – This variable is very close to what is known as trust. An actor who has high
# Per Integrity for another acts on the belief that the second Actor will honor his promises,
# keep secrets and not tell lies.
#
# Per Virtue – This variable represents the Virtue of one Actor as perceived by another, Per
# Virtue towards another substitutes for Virtue in oneself. In other words, one person’s Per Virtue
# for another operates in exactly the same way he would behave if he had similar amounts of
# Virtue. Indeed, it might be best to add Virtue and Per Virtue together in calculations.
#
# Per Power – This variable indicates the relationship engendered by Power; it’s close
# to fear. High values of Per Power induce an Actor to defer to the judgment and carry out
# the wishes of the powerful one. An actor with little Per Power toward another is less inclined
# to carry out the second Actor’s wishes. However, true fear is more precisely a combination
# of Per Power and Per Virtue. In other words, an Actor doesn’t fear another unless he perceives
# the second Actor to be powerful and amoral.
#
# Per Intelligence – This variable represents one Actor’s perception of another’s Intelligence;
# it’s close to the concept of respect. Although respect can also represent high perceived Virtue
# or even high perceived power. An Actor with high Per Intelligence for another defers to the
# other’s judgment more readily. An Actor with low Per Intelligence for another doesn’t give
# much weight to the other’s recommendations and wishes.
#
# Per Attractive – This variable indicates the degree to which an Actor perceives another as
# attractive. This value might be heightened by Per Virtue, and vice versa.
class Personality_Engine
#--------------------------------------------------------------------------
attr_accessor :actors
attr_accessor :npc
#--------------------------------------------------------------------------
def initialize
  @map_infos = nil
  @actors = {}
  @npc = {}
  setup
end
#--------------------------------------------------------------------------
def setup
  # Set Starting Map
  map_id = $game_map.map_id
  # Setup Actors Personality
  for i in 1...$data_actors.size
    @actors[i] = Personalities.new
    @actors[i].character = $data_actors[i]
  end
  # Setup Events Personality
  @map_infos = load_data("Data/MapInfos.rxdata")
  for key in @map_infos.keys
    $game_map.setup(key)
    for i in $game_map.map.events.keys
      # key is map_id and event_id
      npc_key = [$game_map.map_id, $game_map.map.events[i].id]
      @npc[npc_key] = Personalities.new
      @npc[npc_key].map_id = $game_map.map_id
      @npc[npc_key].character = $game_map.map.events[i]
      setup_event_sterotype(npc_key, @npc[npc_key].character.name)
    end
  end
  # Setup Relationship Variables
  setup_relationship_variables(@npc)
  setup_relationship_variables(@actors)
  # Return to Starting Map
  $game_map.setup(map_id)
end
#--------------------------------------------------------------------------
def get_key(event_id, map_id = $game_map.map_id)
  return [map_id, event_id]
end
#--------------------------------------------------------------------------
def get_pre_key(type, type_id, map_id = $game_map.map_id)
  if type == "Event"
    return [type, [map_id, type_id]]
  else
    return [type, type_id]
  end
end
#--------------------------------------------------------------------------
def setup_relationship_variables(character)
  for x in character.keys
    for y in @npc.keys
      key = ["Event", y]
      character[x].per_integrity[key] = 0
      character[x].per_virtue[key] = 0
      character[x].per_power[key] = 0
      character[x].per_intelligence[key] = 0
      character[x].per_attractive[key] = 0
    end
    for y in @actors.keys
      key = ["Actor", y]
      character[x].per_integrity[key] = 0
      character[x].per_virtue[key] = 0
      character[x].per_power[key] = 0
      character[x].per_intelligence[key] = 0
      character[x].per_attractive[key] = 0
    end
  end
end
#------------------------------------------------------------------------------------
#Fable Effect
#The ablility to change based on your actions
#-------------------------------------------------------------------------------------
def fable_effect #Change these to become different things
   #Uncomment (delete the #'s) these next 3 lines to allow this to only take place when a switch is on, Default Switch is 1.
   #if $game_switches[1] == false
    # return
  # end
   if @actors[1].power >= 50  #Change this variable to your Fame Variable Choice.  
     #Change 50 to change at what number or greater does the Fame Variable have to be for the
     #Fable effect to take effect
     case @actors[1].integrity  #Change this variable to your Good/Bad Alignment Variable Choice
     when 0...10
       if $game_party.actors[0].character_name != BADLEVELTHREE
       $game_party.actors[0].set_graphic(BADLEVELTHREE, $game_party.actors[0].character_hue, nil, nil)
       $game_player.refresh
     end
     when 11...25
       if $game_party.actors[0].character_name != BADLEVELTWO
       $game_party.actors[0].set_graphic(BADLEVELTWO, $game_party.actors[0].character_hue, nil, nil)
       $game_player.refresh
     end
     when 26...49
       if $game_party.actors[0].character_name != BADLEVELONE
       $game_party.actors[0].set_graphic(BADLEVELONE, $game_party.actors[0].character_hue, nil, nil)
       $game_player.refresh
     end
     when 50
       if $game_party.actors[0].character_name != FAMOUSNEUTRAL
       $game_party.actors[0].set_graphic(FAMOUSNEUTRAL, $game_party.actors[0].character_hue, nil, nil)
       $game_player.refresh
     end
     when 51...74
       if $game_party.actors[0].character_name != GOODLEVELONE
       $game_party.actors[0].set_graphic(GOODLEVELONE, $game_party.actors[0].character_hue, nil, nil)
       $game_player.refresh
     end
     when 75...89
       if $game_party.actors[0].character_name != GOODLEVELTWO
       $game_party.actors[0].set_graphic(GOODLEVELTWO, $game_party.actors[0].character_hue, nil, nil)
       $game_player.refresh
     end
     when 90...100
       if $game_party.actors[0].character_name != GOODLEVELTHREE
       $game_party.actors[0].set_graphic(GOODLEVELTHREE, $game_party.actors[0].character_hue, nil, nil)
       $game_player.refresh
     end
     end
   else
     if $game_party.actors[0].character_name != NONFAMOUS
       $game_party.actors[0].set_graphic(NONFAMOUS, $game_party.actors[0].character_hue, nil, nil)
       $game_player.refresh
     end
   end
end
#--------------------------------------------------------------------------
def update
  # On Frame Update
  if Graphics.frame_count % Graphics.frame_rate == 0
    # Balance the NPC Anger_Fear, Joy_Sadness, Arousal_Disgust variables
    for i in $game_map.map.events.keys
      npc_key = [$game_map.map_id, $game_map.map.events[i].id]
      adrenaline = 100 - @npc[npc_key].adrenaline
      manic_depressive = 100 - @npc[npc_key].manic_depressive
      sensuality = 100 - @npc[npc_key].sensuality
      if @npc[npc_key].anger_fear > 0
        @npc[npc_key].anger_fear -= 1
      else
        @npc[npc_key].anger_fear += 1
      end
      if @npc[npc_key].joy_sadness > 0
        @npc[npc_key].joy_sadness -= 1
      else
        @npc[npc_key].joy_sadness +=1
      end
      if @npc[npc_key].arousal_disgust > 0
        @npc[npc_key].arousal_disgust -= 1
      else
        @npc[npc_key].arousal_disgust += 1
      end
    end
  end
  # Balance the Actors Anger_Fear, Joy_Sadness, Arousal_Disgust variables
  for i in 1...$data_actors.size
    adrenaline = 100 - @actors[i].adrenaline
    manic_depressive = 100 - @actors[i].manic_depressive
    sensuality = 100 - @actors[i].sensuality
    if @actors[i].anger_fear > 0
      @actors[i].anger_fear -= 1
    else
      @actors[i].anger_fear += 1
    end
    if @actors[i].joy_sadness > 0
      @actors[i].joy_sadness -= 1
    else
      @actors[i].joy_sadness += 1
    end
    if @actors[i].arousal_disgust > 0
      @actors[i].arousal_disgust -= 1
    else
      @actors[i].arousal_disgust += 1
    end
  end
end
#--------------------------------------------------------------------------
def level_up(actor_id)
  @actors[actor_id].integrity += 1
  @actors[actor_id].virtue += 1
  @actors[actor_id].power += 1
  @actors[actor_id].intelligence += 1
  @actors[actor_id].attractiveness += 1
end
#--------------------------------------------------------------------------
def setup_event_sterotype(npc_key,name)
  # Add More NPC Sterotypes
  case name
  when "Warrior"
    #Intrinsic Variables 0 to 100
    @npc[npc_key].integrity = 50
    @npc[npc_key].virtue = 80
    @npc[npc_key].power = 70
    @npc[npc_key].intelligence = 50
    @npc[npc_key].attractiveness = 40
    #Volatility Variables 0 to 100
    @npc[npc_key].adrenaline = 70
    @npc[npc_key].manic_depressive = 0
    @npc[npc_key].sensuality = 0
    #Accordance Variables 100 to -100
    @npc[npc_key].accord_integrity = 0
    @npc[npc_key].accord_virtue = -70
    @npc[npc_key].accord_power = -70
    @npc[npc_key].accord_intelligence = 0
    @npc[npc_key].accord_attractive = 0
  when "Thief"
    #Intrinsic Variables 0 to 100
    @npc[npc_key].integrity = 10
    @npc[npc_key].virtue = 10
    @npc[npc_key].power = 20
    @npc[npc_key].intelligence = 60
    @npc[npc_key].attractiveness = 50
    #Volatility Variables 0 to 100
    @npc[npc_key].adrenaline = 80
    @npc[npc_key].manic_depressive = 0
    @npc[npc_key].sensuality = 0
    #Accordance Variables 100 to -100
    @npc[npc_key].accord_integrity = -30
    @npc[npc_key].accord_virtue = 50
    @npc[npc_key].accord_power = -80
    @npc[npc_key].accord_intelligence = -50
    @npc[npc_key].accord_attractive = 0
  when "Hunter"
    #Intrinsic Variables 0 to 100
    @npc[npc_key].integrity = 50
    @npc[npc_key].virtue = 60
    @npc[npc_key].power = 50
    @npc[npc_key].intelligence = 50
    @npc[npc_key].attractiveness = 50
    #Volatility Variables 0 to 100
    @npc[npc_key].adrenaline = 30
    @npc[npc_key].manic_depressive = 0
    @npc[npc_key].sensuality = 0
    #Accordance Variables 100 to -100
    @npc[npc_key].accord_integrity = 0
    @npc[npc_key].accord_virtue = -80
    @npc[npc_key].accord_power = -20
    @npc[npc_key].accord_intelligence = -20
    @npc[npc_key].accord_attractive = 0
  when "Trader"
    #Intrinsic Variables 0 to 100
    @npc[npc_key].integrity = 10
    @npc[npc_key].virtue = 40
    @npc[npc_key].power = 10
    @npc[npc_key].intelligence = 60
    @npc[npc_key].attractiveness = 50
    #Volatility Variables 0 to 100
    @npc[npc_key].adrenaline = 80
    @npc[npc_key].manic_depressive = 0
    @npc[npc_key].sensuality = 0
    #Accordance Variables 100 to -100
    @npc[npc_key].accord_integrity = -60
    @npc[npc_key].accord_virtue = 30
    @npc[npc_key].accord_power = 70
    @npc[npc_key].accord_intelligence = -10
    @npc[npc_key].accord_attractive = 0
  when "Grappler"
    #Intrinsic Variables 0 to 100
    @npc[npc_key].integrity = 10
    @npc[npc_key].virtue = 10
    @npc[npc_key].power = 40
    @npc[npc_key].intelligence = 10
    @npc[npc_key].attractiveness = 50
    #Volatility Variables 0 to 100
    @npc[npc_key].adrenaline = 80
    @npc[npc_key].manic_depressive = 0
    @npc[npc_key].sensuality = 0
    #Accordance Variables 100 to -100
    @npc[npc_key].accord_integrity = 0
    @npc[npc_key].accord_virtue = 50
    @npc[npc_key].accord_power = -50
    @npc[npc_key].accord_intelligence = -50
    @npc[npc_key].accord_attractive = 0
  when "Soldier"
    #Intrinsic Variables 0 to 100
    @npc[npc_key].integrity = 10
    @npc[npc_key].virtue = 100
    @npc[npc_key].power = 90
    @npc[npc_key].intelligence = 50
    @npc[npc_key].attractiveness = 50
    #Volatility Variables 0 to 100
    @npc[npc_key].adrenaline = 20
    @npc[npc_key].manic_depressive = 0
    @npc[npc_key].sensuality = 0
    #Accordance Variables 100 to -100
    @npc[npc_key].accord_integrity = 10
    @npc[npc_key].accord_virtue = -80
    @npc[npc_key].accord_power = -50
    @npc[npc_key].accord_intelligence = 30
    @npc[npc_key].accord_attractive = 0
  when "Civilian"
    #Intrinsic Variables 0 to 100
    @npc[npc_key].integrity = 10
    @npc[npc_key].virtue = 40
    @npc[npc_key].power = 10
    @npc[npc_key].intelligence = 40
    @npc[npc_key].attractiveness = 50
    #Volatility Variables 0 to 100
    @npc[npc_key].adrenaline = 50
    @npc[npc_key].manic_depressive = 0
    @npc[npc_key].sensuality = 0
    #Accordance Variables 100 to -100
    @npc[npc_key].accord_integrity = 40
    @npc[npc_key].accord_virtue = 10
    @npc[npc_key].accord_power = 80
    @npc[npc_key].accord_intelligence = 80
    @npc[npc_key].accord_attractive = 0
  when "Noble"
    #Intrinsic Variables 0 to 100
    @npc[npc_key].integrity = 10
    @npc[npc_key].virtue = 10
    @npc[npc_key].power = 50
    @npc[npc_key].intelligence = 40
    @npc[npc_key].attractiveness = 60
    #Volatility Variables 0 to 100
    @npc[npc_key].adrenaline = 50
    @npc[npc_key].manic_depressive = 0
    @npc[npc_key].sensuality = 0
    #Accordance Variables 100 to -100
    @npc[npc_key].accord_integrity = 50
    @npc[npc_key].accord_virtue = 40
    @npc[npc_key].accord_power = -10
    @npc[npc_key].accord_intelligence = -60
    @npc[npc_key].accord_attractive = 0
  when "Bartender"
    #Intrinsic Variables 0 to 100
    @npc[npc_key].integrity = 10
    @npc[npc_key].virtue = 10
    @npc[npc_key].power = 30
    @npc[npc_key].intelligence = 50
    @npc[npc_key].attractiveness = 50
    #Volatility Variables 0 to 100
    @npc[npc_key].adrenaline = 40
    @npc[npc_key].manic_depressive = 0
    @npc[npc_key].sensuality = 0
    #Accordance Variables 100 to -100
    @npc[npc_key].accord_integrity = 20
    @npc[npc_key].accord_virtue = 20
    @npc[npc_key].accord_power = 30
    @npc[npc_key].accord_intelligence = -10
    @npc[npc_key].accord_attractive = 0
  when "Farmer"
    #Intrinsic Variables 0 to 100
    @npc[npc_key].integrity = 20
    @npc[npc_key].virtue = 50
    @npc[npc_key].power = 10
    @npc[npc_key].intelligence = 40
    @npc[npc_key].attractiveness = 50
    #Volatility Variables 0 to 100
    @npc[npc_key].adrenaline = 70
    @npc[npc_key].manic_depressive = 0
    @npc[npc_key].sensuality = 0
    #Accordance Variables 100 to -100
    @npc[npc_key].accord_integrity = 60
    @npc[npc_key].accord_virtue = 50
    @npc[npc_key].accord_power = 80
    @npc[npc_key].accord_intelligence = 30
    @npc[npc_key].accord_attractive = 0
  when "Storekeeper"
    #Intrinsic Variables 0 to 100
    @npc[npc_key].integrity = 30
    @npc[npc_key].virtue = 40
    @npc[npc_key].power = 30
    @npc[npc_key].intelligence = 50
    @npc[npc_key].attractiveness = 50
    #Volatility Variables 0 to 100
    @npc[npc_key].adrenaline = 30
    @npc[npc_key].manic_depressive = 0
    @npc[npc_key].sensuality = 0
    #Accordance Variables 100 to -100
    @npc[npc_key].accord_integrity = -20
    @npc[npc_key].accord_virtue = 30
    @npc[npc_key].accord_power = 40
    @npc[npc_key].accord_intelligence = -10
    @npc[npc_key].accord_attractive = 0
  end
end
end

#===========================================================
class Personalities
#--------------------------------------------------------------------------
attr_accessor :map_id
attr_accessor :character
attr_accessor :alignment
attr_accessor :integrity
attr_accessor :virtue
attr_accessor :power
attr_accessor :intelligence
attr_accessor :attractiveness
attr_accessor :anger_fear
attr_accessor :joy_sadness
attr_accessor :arousal_disgust
attr_accessor :adrenaline
attr_accessor :manic_depressive
attr_accessor :sensuality
attr_accessor :accord_integrity
attr_accessor :accord_virtue
attr_accessor :accord_power
attr_accessor :accord_intelligence
attr_accessor :accord_attractive
attr_accessor :per_integrity
attr_accessor :per_virtue
attr_accessor :per_power
attr_accessor :per_intelligence
attr_accessor :per_attractive
#--------------------------------------------------------------------------
def initialize
  # NPC Index
  @map_id = 0
  @character = nil
  @alignment = 0
  # Intrinsic Variables Set with NPC Sterotypes and Actors Set 10%
  @integrity = 10
  @virtue = 10
  @power = 10
  @intelligence = 10
  @attractiveness = 10
  # Volatility Variables Set with NPC Sterotypes
  @adrenaline = 0
  @manic_depressive = 0
  @sensuality = 0
  # Mood Variables Set at 0 %
  @anger_fear = 0
  @joy_sadness = 0
  @arousal_disgust = 0
  # Accordance Variables Set with NPC Sterotypes
  @accord_integrity = 0
  @accord_virtue = 0
  @accord_power = 0
  @accord_intelligence = 0
  @accord_attractive = 0
  # Relationship Variables Set at 0 % for all characters
  @per_integrity = {}
  @per_virtue = {}
  @per_power = {}
  @per_intelligence = {}
  @per_attractive = {}
end
end

#===========================================================
class Scene_Title
#--------------------------------------------------------------------------
alias pe_scene_title_command_new_game command_new_game
#--------------------------------------------------------------------------
def command_new_game
  pe_scene_title_command_new_game
  $pe = Personality_Engine.new
end
end

#========================================================
class Scene_Load
def read_save_data(file)
characters = Marshal.load(file)
Graphics.frame_count = Marshal.load(file)
$game_system        = Marshal.load(file)
$game_switches      = Marshal.load(file)
$game_variables     = Marshal.load(file)
$game_self_switches = Marshal.load(file)
$game_screen        = Marshal.load(file)
$game_actors        = Marshal.load(file)
$game_party         = Marshal.load(file)
$game_troop         = Marshal.load(file)
$game_map             = Marshal.load(file)
$game_player           = Marshal.load(file)
$personality_engine  = Marshal.load(file)
if $game_system.magic_number != $data_system.magic_number
   $game_map.setup($game_map.map_id)
   $game_player.center($game_player.x, $game_player.y)
end
$game_party.refresh
end
end

#=======================================================
class Scene_Save
def write_save_data(file)
characters = []
for i in 0...$game_party.actors.size
   actor = $game_party.actors[i]
   characters.push([actor.character_name, actor.character_hue])
end
Marshal.dump(characters, file)
Marshal.dump(Graphics.frame_count, file)
$game_system.save_count += 1
$game_system.magic_number = $data_system.magic_number
Marshal.dump($game_system, file)
Marshal.dump($game_switches, file)
Marshal.dump($game_variables, file)
Marshal.dump($game_self_switches, file)
Marshal.dump($game_screen, file)
Marshal.dump($game_actors, file)
Marshal.dump($game_party, file)
Marshal.dump($game_troop, file)
Marshal.dump($game_map, file)
Marshal.dump($game_player, file)
Marshal.dump($personality_engine,file)
end
end

#===========================================================
class Game_Map
#--------------------------------------------------------------------------
attr_accessor :map
end
}


Possibly Related Threads…
Thread Author Replies Views Last Post
  Personality Engine Near_Fantastica 0 1,987 03-10-2005, 01:00 PM
Last Post: Near_Fantastica
  Mining Engine and Smithing Engine Near Fantastica 0 1,828 01-20-2004, 01:00 PM
Last Post: Near Fantastica



Users browsing this thread: