Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

How can I convert this from RGSS2 to RGSS?

I've looked at this script: http://www.arpgmaker.com/viewtopic.php?f=11&t=64358

...and I tried it out on RMVX and thought that it was really neat. All I need to ask is how can I make the script usable in RMXP? I don't know much about scripting very well, and I don't know where to start. I've searched everywhere in the forums, and tried finding several request topics for it, but I haven't found anything. I really want to use this script for my RPG Maker games, but I can't really use VX for it. Please let me know, thank you.
 
I'm not a scripter either, but from what i know parts from this script will have to be rewritten because rgss and rgss2 use different classes and methods. It's not a small script so it'll take some work. You'll have to find yourself a scripter who is willing to rewrite this for you.
 
I think you don't have to.
Put this script above Game_Temp:
Code:
<span style="color:#000080; font-style:italic;">=begin

<span style="color:#000080; font-style:italic;">class Win32API

<span style="color:#000080; font-style:italic;">  class << self

<span style="color:#000080; font-style:italic;">   unless defined?(debug_new)

<span style="color:#000080; font-style:italic;">    alias debug_new new

<span style="color:#000080; font-style:italic;">   end

<span style="color:#000080; font-style:italic;">   def new(*args)

<span style="color:#000080; font-style:italic;">    File.open("winapi.txt","ab"){|f| f.write("new(#{args[0]},#{args[1]})\r\n") }

<span style="color:#000080; font-style:italic;">    b=debug_new(*args)

<span style="color:#000080; font-style:italic;">    b.setDllName(args[0],args[1])

<span style="color:#000080; font-style:italic;">    return b

<span style="color:#000080; font-style:italic;">   end

<span style="color:#000080; font-style:italic;">  end

<span style="color:#000080; font-style:italic;"> unless defined?(debug_call)

<span style="color:#000080; font-style:italic;">  alias debug_call call

<span style="color:#000080; font-style:italic;"> end

<span style="color:#000080; font-style:italic;"> def setDllName(a,b)

<span style="color:#000080; font-style:italic;">    @w32dll=a

<span style="color:#000080; font-style:italic;">    @w32name=b

<span style="color:#000080; font-style:italic;"> end

<span style="color:#000080; font-style:italic;"> def call(*args)

<span style="color:#000080; font-style:italic;">   if @w32name!="GetAsyncKeyState"

<span style="color:#000080; font-style:italic;">    File.open("winapi.txt","ab"){|f| 

<span style="color:#000080; font-style:italic;">       f.write("call(#{@w32dll},#{@w32name},#{args.inspect})\r\n") 

<span style="color:#000080; font-style:italic;">    }

<span style="color:#000080; font-style:italic;">   end

<span style="color:#000080; font-style:italic;">   debug_call(*args)

<span style="color:#000080; font-style:italic;"> end

<span style="color:#000080; font-style:italic;">end

<span style="color:#000080; font-style:italic;">class Bitmap

<span style="color:#000080; font-style:italic;">  class << self

<span style="color:#000080; font-style:italic;">   unless defined?(debug_new)

<span style="color:#000080; font-style:italic;">    alias debug_new new

<span style="color:#000080; font-style:italic;">   end

<span style="color:#000080; font-style:italic;">   def new(*args)

<span style="color:#000080; font-style:italic;">    if args.length==1

<span style="color:#000080; font-style:italic;">     File.open("winapib.txt","ab"){|f| f.write("new(#{args[0]})\r\n") }

<span style="color:#000080; font-style:italic;">    end

<span style="color:#000080; font-style:italic;">    debug_new(*args)

<span style="color:#000080; font-style:italic;">   end

<span style="color:#000080; font-style:italic;">  end

<span style="color:#000080; font-style:italic;">end

<span style="color:#000080; font-style:italic;"> 

<span style="color:#000080; font-style:italic;">alias debug_load_data load_data

<span style="color:#000080; font-style:italic;">def load_data(*args)

<span style="color:#000080; font-style:italic;"> File.open("winapif.txt","ab"){|f| f.write("load(#{args[0]})\r\n") }

<span style="color:#000080; font-style:italic;"> debug_load_data(*args)

<span style="color:#000080; font-style:italic;">end

<span style="color:#000080; font-style:italic;">=end

 

 

class Hangup < Exception; end

if $DEBUG

  $TEST=true

end

if $TEST

  $DEBUG=true

end

$scene=nil

if Font.respond_to?(:default_shadow)

 Font.default_shadow=false

end

Graphics.frame_rate=40

if false

p (Tilemap.instance_methods-Kernel.instance_methods-Object.instance_methods).sort

# no changes

p (Plane.instance_methods-Kernel.instance_methods-Object.instance_methods).sort

# no changes

p (Viewport.instance_methods-Kernel.instance_methods-Object.instance_methods).sort

p (Bitmap.instance_methods-Kernel.instance_methods-Object.instance_methods).sort

# openness(=)

p (Window.instance_methods-Kernel.instance_methods-Object.instance_methods).sort

p (Sprite.instance_methods-Kernel.instance_methods-Object.instance_methods).sort

end

module RPG

  class Animation

    def initialize

      @id = 0

      @name = ""

      @animation_name = ""

      @animation_hue = 0

      @position = 1

      @frame_max = 1

      @frames = [RPG::Animation::Frame.new]

      @timings = []

    end

    attr_accessor :id

    attr_accessor :name

    attr_accessor :animation_name

    attr_accessor :animation_hue

    attr_accessor :position

    attr_accessor :frame_max

    attr_accessor :frames

    attr_accessor :timings

  end

end

module RPG

  class Animation

    class Frame

      def initialize

        @cell_max = 0

        @cell_data = Table.new(0, 0)

      end

      attr_accessor :cell_max

      attr_accessor :cell_data

    end

  end

end

module RPG

  class Animation

    class Timing

      def initialize

        @frame = 0

        @se = RPG::AudioFile.new("", 80)

        @flash_scope = 0

        @flash_color = Color.new(255,255,255,255)

        @flash_duration = 5

        @condition = 0

      end

      attr_accessor :frame

      attr_accessor :se

      attr_accessor :flash_scope

      attr_accessor :flash_color

      attr_accessor :flash_duration

      attr_accessor :condition

    end

  end

end

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

module RPG

  class Tileset

    def initialize

      @id = 0

      @name = ""

      @tileset_name = ""

      @autotile_names = [""]*7

      @panorama_name = ""

      @panorama_hue = 0

      @fog_name = ""

      @fog_hue = 0

      @fog_opacity = 64

      @fog_blend_type = 0

      @fog_zoom = 200

      @fog_sx = 0

      @fog_sy = 0

      @battleback_name = ""

      @passages = Table.new(384)

      @priorities = Table.new(384)

      @priorities[0] = 5

      @terrain_tags = Table.new(384)

    end

    attr_accessor :id

    attr_accessor :name

    attr_accessor :tileset_name

    attr_accessor :autotile_names

    attr_accessor :panorama_name

    attr_accessor :panorama_hue

    attr_accessor :fog_name

    attr_accessor :fog_hue

    attr_accessor :fog_opacity

    attr_accessor :fog_blend_type

    attr_accessor :fog_zoom

    attr_accessor :fog_sx

    attr_accessor :fog_sy

    attr_accessor :battleback_name

    attr_accessor :passages

    attr_accessor :priorities

    attr_accessor :terrain_tags

  end

end

module RPG

  class CommonEvent

    def initialize

      @id = 0

      @name = ""

      @trigger = 0

      @switch_id = 1

      @list = [RPG::EventCommand.new]

    end

    attr_accessor :id

    attr_accessor :name

    attr_accessor :trigger

    attr_accessor :switch_id

    attr_accessor :list

  end

end

module RPG

  class Map

    def initialize(width, height)

      @tileset_id = 1

      @width = width

      @height = height

      @autoplay_bgm = false

      @bgm = RPG::AudioFile.new

      @autoplay_bgs = false

      @bgs = RPG::AudioFile.new("", 80)

      @encounter_list = []

      @encounter_step = 30

      @data = Table.new(width, height, 3)

      @events = {}

    end

    attr_accessor :tileset_id

    attr_accessor :width

    attr_accessor :height

    attr_accessor :autoplay_bgm

    attr_accessor :bgm

    attr_accessor :autoplay_bgs

    attr_accessor :bgs

    attr_accessor :encounter_list

    attr_accessor :encounter_step

    attr_accessor :data

    attr_accessor :events

  end

end

module RPG

  class MapInfo

    def initialize

      @name = ""

      @parent_id = 0

      @order = 0

      @expanded = false

      @scroll_x = 0

      @scroll_y = 0

    end

    attr_accessor :name

    attr_accessor :parent_id

    attr_accessor :order

    attr_accessor :expanded

    attr_accessor :scroll_x

    attr_accessor :scroll_y

  end

end

module RPG

  class Event

    def initialize(x, y)

      @id = 0

      @name = ""

      @x = x

      @y = y

      @pages = [RPG::Event::Page.new]

    end

    attr_accessor :id

    attr_accessor :name

    attr_accessor :x

    attr_accessor :y

    attr_accessor :pages

  end

end

module RPG

  class Event

    class Page

      def initialize

        @condition = RPG::Event::Page::Condition.new

        @graphic = RPG::Event::Page::Graphic.new

        @move_type = 0

        @move_speed = 3

        @move_frequency = 3

        @move_route = RPG::MoveRoute.new

        @walk_anime = true

        @step_anime = false

        @direction_fix = false

        @through = false

        @always_on_top = false

        @trigger = 0

        @list = [RPG::EventCommand.new]

      end

      attr_accessor :condition

      attr_accessor :graphic

      attr_accessor :move_type

      attr_accessor :move_speed

      attr_accessor :move_frequency

      attr_accessor :move_route

      attr_accessor :walk_anime

      attr_accessor :step_anime

      attr_accessor :direction_fix

      attr_accessor :through

      attr_accessor :always_on_top

      attr_accessor :trigger

      attr_accessor :list

    end

  end

end

module RPG

  class Event

    class Page

      class Condition

        def initialize

          @switch1_valid = false

          @switch2_valid = false

          @variable_valid = false

          @self_switch_valid = false

          @switch1_id = 1

          @switch2_id = 1

          @variable_id = 1

          @variable_value = 0

          @self_switch_ch = "A"

        end

        attr_accessor :switch1_valid

        attr_accessor :switch2_valid

        attr_accessor :variable_valid

        attr_accessor :self_switch_valid

        attr_accessor :switch1_id

        attr_accessor :switch2_id

        attr_accessor :variable_id

        attr_accessor :variable_value

        attr_accessor :self_switch_ch

      end

    end

  end

end

module RPG

  class Event

    class Page

      class Graphic

        def initialize

          @tile_id = 0

          @character_name = ""

          @character_hue = 0

          @direction = 2

          @pattern = 0

          @opacity = 255

          @blend_type = 0

        end

        attr_accessor :tile_id

        attr_accessor :character_name

        attr_accessor :character_hue

        attr_accessor :direction

        attr_accessor :pattern

        attr_accessor :opacity

        attr_accessor :blend_type

      end

    end

  end

end

module RPG

  class EventCommand

    def initialize(code = 0, indent = 0, parameters = [])

      @code = code

      @indent = indent

      @parameters = parameters

    end

    attr_accessor :code

    attr_accessor :indent

    attr_accessor :parameters

  end

end

module RPG

  class MoveRoute

    def initialize

      @repeat = true

      @skippable = false

      @list = [RPG::MoveCommand.new]

    end

    attr_accessor :repeat

    attr_accessor :skippable

    attr_accessor :list

  end

end

module RPG

  class MoveCommand

    def initialize(code = 0, parameters = [])

      @code = code

      @parameters = parameters

    end

    attr_accessor :code

    attr_accessor :parameters

  end

end

module RPG

  class System

    class Words

      def initialize

        @gold = ""

        @hp = ""

        @sp = ""

        @str = ""

        @dex = ""

        @agi = ""

        @int = ""

        @atk = ""

        @pdef = ""

        @mdef = ""

        @weapon = ""

        @armor1 = ""

        @armor2 = ""

        @armor3 = ""

        @armor4 = ""

        @attack = ""

        @skill = ""

        @guard = ""

        @item = ""

        @equip = ""

      end

      attr_accessor :gold

      attr_accessor :hp

      attr_accessor :sp

      attr_accessor :str

      attr_accessor :dex

      attr_accessor :agi

      attr_accessor :int

      attr_accessor :atk

      attr_accessor :pdef

      attr_accessor :mdef

      attr_accessor :weapon

      attr_accessor :armor1

      attr_accessor :armor2

      attr_accessor :armor3

      attr_accessor :armor4

      attr_accessor :attack

      attr_accessor :skill

      attr_accessor :guard

      attr_accessor :item

      attr_accessor :equip

    end

  end

end

module RPG

  class System

    class TestBattler

      def initialize

        @actor_id = 1

        @level = 1

        @weapon_id = 0

        @armor1_id = 0

        @armor2_id = 0

        @armor3_id = 0

        @armor4_id = 0

      end

      attr_accessor :actor_id

      attr_accessor :level

      attr_accessor :weapon_id

      attr_accessor :armor1_id

      attr_accessor :armor2_id

      attr_accessor :armor3_id

      attr_accessor :armor4_id

    end

  end

end

module RPG

  class AudioFile

    def initialize(name = "", volume = 100, pitch = 100)

      @name = name

      @volume = volume

      @pitch = pitch

    end

    #def play

    #end

    attr_accessor :name

    attr_accessor :volume

    attr_accessor :pitch

  end

end

 
This is the RGSS2 compatibility Script
This Script is not mine.
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top