Main Menu
  • Welcome to The RPG Maker Resource Kit.

Variable List

Started by Sthrattoff, May 15, 2007, 05:29:35 AM

0 Members and 1 Guest are viewing this topic.

Sthrattoff

Hi everybody!
Do you mind if we should make a list of variable used in standard RGSS?
It WILL help many beginner scripter.

As a start, I'll enlist some...


$game_variables[variable_id] #connect to event-system variables
$game_switches[switch_id] # connect to event-system switch
$game_party.actors[actor_id] # connect to current party member (the one you played)


Any donation will be appreciated... Thanx
Symphony of Alderra : Memoirs of Life

Storyline : 200% (Overimaginatives)
Scripting : 100% (At last...)
Eventing  : 100%
Mapping   : 0.125%

Season In The Abyss

Here're some :)
$game_map.events # Events
$game_map.map_id # current map id
$game_party.gold # gold
$game_party.actors[0].name # hero's name

modern algebra

I'm a little confused as to this. This is a little strange. I'd probably be more thorough for one member to do it.
Anyway, here are a few

$data_troops[troop id] # database troops
$data_troops[troop id].members[member index]
$data_system
(for most datas, there's a game too)
$game_system
$game_temp
$game_self_switches[Map ID, Event ID, Whichever one it is ("A","B","C","D")]
$game_screen


Meh, I don't know how common it is to use such things, but meh, that is kind of why I'm not sure what I am supposed to be listing...

Sthrattoff

Additional:

$game_party.actors[actor_id].maxhp #Party's max HP
$game_party.actors[actor_id].maxsp #Party's max SP
$game_party.actors[actor_id].hp #Party's current HP
$game_party.actors[actor_id].sp #Party's current SP
Symphony of Alderra : Memoirs of Life

Storyline : 200% (Overimaginatives)
Scripting : 100% (At last...)
Eventing  : 100%
Mapping   : 0.125%

Zeriab

The help file already contains a lot of this information.
At least special version I got. Just look under Advanced Scripting in Introduction to Scripting

Sthrattoff

No, no...
It's just a list of pre-defined variables on RGSS, not the tute.
Can you give some?
Symphony of Alderra : Memoirs of Life

Storyline : 200% (Overimaginatives)
Scripting : 100% (At last...)
Eventing  : 100%
Mapping   : 0.125%

Zeriab

A pic from the help file.
There's also a similar page for Game Objects.

You can see what they are instances of and then it's just to click on the links to go to the other place in the help file where the rest stands ^_^
You can for example click on RPG::System and you come to a page explaining which functions there are and what they do ^_^
Much quicker and better than a static list in my opinion.

[spoiler=RPG::System (Definition from help file)]module RPG
  class System
    def initialize
      @magic_number = 0
      @party_members = [1]
      @elements = [nil, ""]
      @switches = [nil, ""]
      @variables = [nil, ""]
      @windowskin_name = ""
      @title_name = ""
      @gameover_name = ""
      @battle_transition = ""
      @title_bgm = RPG::AudioFile.new
      @battle_bgm = RPG::AudioFile.new
      @battle_end_me = RPG::AudioFile.new
      @gameover_me = RPG::AudioFile.new
      @cursor_se = RPG::AudioFile.new("", 80)
      @decision_se = RPG::AudioFile.new("", 80)
      @cancel_se = RPG::AudioFile.new("", 80)
      @buzzer_se = RPG::AudioFile.new("", 80)
      @equip_se = RPG::AudioFile.new("", 80)
      @shop_se = RPG::AudioFile.new("", 80)
      @save_se = RPG::AudioFile.new("", 80)
      @load_se = RPG::AudioFile.new("", 80)
      @battle_start_se = RPG::AudioFile.new("", 80)
      @escape_se = RPG::AudioFile.new("", 80)
      @actor_collapse_se = RPG::AudioFile.new("", 80)
      @enemy_collapse_se = RPG::AudioFile.new("", 80)
      @words = RPG::System::Words.new
      @test_battlers = []
      @test_troop_id = 1
      @start_map_id = 1
      @start_x = 0
      @start_y = 0
      @battleback_name = ""
      @battler_name = ""
      @battler_hue = 0
      @edit_map_id = 1
    end
    attr_accessor :magic_number
    attr_accessor :party_members
    attr_accessor :elements
    attr_accessor :switches
    attr_accessor :variables
    attr_accessor :windowskin_name
    attr_accessor :title_name
    attr_accessor :gameover_name
    attr_accessor :battle_transition
    attr_accessor :title_bgm
    attr_accessor :battle_bgm
    attr_accessor :battle_end_me
    attr_accessor :gameover_me
    attr_accessor :cursor_se
    attr_accessor :decision_se
    attr_accessor :cancel_se
    attr_accessor :buzzer_se
    attr_accessor :equip_se
    attr_accessor :shop_se
    attr_accessor :save_se
    attr_accessor :load_se
    attr_accessor :battle_start_se
    attr_accessor :escape_se
    attr_accessor :actor_collapse_se
    attr_accessor :enemy_collapse_se
    attr_accessor :words
    attr_accessor :test_battlers
    attr_accessor :test_troop_id
    attr_accessor :start_map_id
    attr_accessor :start_x
    attr_accessor :start_y
    attr_accessor :battleback_name
    attr_accessor :battler_name
    attr_accessor :battler_hue
    attr_accessor :edit_map_id
  end
end
[/spoiler]