Recent posts

Pages 1 2 3 4 ... 10
11
Tutorial Requests / Re: [XPA] How can I show a pre...
Last post by KK20 - March 24, 2021, 03:27:54 am
My Tilemap rewrite handles a bit differently than vanilla's, so a couple tweaks are needed.

First, locate this section of the script and add the following line I mark:
    @tilemap.map_data = map.data
    @tilemap.priorities = map.priorities # <<<<<<<<<<<<<<<<<<<<< THIS ONE HERE
    @tilemap.ox = map.display_x / 4 + 176
    @tilemap.oy = map.display_y / 4 + 148
And in the update method further below, you need to change it to draw
@tilemap.draw if @tilemap != nil
12
Tutorial Requests / Re: [XPA] How can I show a pre...
Last post by SolarisSpell - March 23, 2021, 05:48:10 pm
Thanks

I was asking in case it was something simple and maybe I could be able to insert it by myself

This is the script:
#Save System

class Window_File < Window_Selectable

  #------------------------
  # ● initialize
  #--------------------------------------------------------------------------
  def initialize()
    super(0, 64, 320, 416)
    self.contents = Bitmap.new(width - 32, 99 * 32)
#    self.contents.font.name = $fontface
#    self.contents.font.size = $fontsize
    index = $game_temp.last_file_index == nil ? 0 : $game_temp.last_file_index
    self.index = index
    @item_max = 99
    refresh
  end
 
  #--------------------------------------------------------------------------
  # ● refresh the window
  #--------------------------------------------------------------------------
  def refresh
    time_stamp = Time.at(0)
    for i in 0...99
      filename = "Save#{i + 1}.rxdata"
      self.contents.draw_text(1, i * 32, 32, 32, " "+(i + 1).to_s, 1)
      if FileTest.exist?(filename)
        file = File.open(filename, "rb")
        read_save_data(file)
        file.close
        case (@game_variables[14]) #Naming the chapter of the game
        when 0
          @texto = "Chapter 1"
        when 1
          @texto = "Chapter 2"
      #and so on...
      end
     
      # Draw the name with other color when playing in higher difficulty
      self.contents.font.color = arriba_color if @game_switches[150]
      self.contents.draw_text(1, i * 32, 32, 32, " "+(i + 1).to_s, 1) if @game_switches[150]
      self.contents.draw_text(30, i * 32, 284, 32, " "+@texto.to_s)
      self.contents.font.color = normal_color
     
      end
    end
  end
 
  def read_save_data(file)
    characters = Marshal.load(file)
    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)
  end
end

#==============================================================================
# ■ Window_FileStatus
#------------------------------------------------------------------------------
#  This window shows the status of the currently selected save file
#==============================================================================

class Window_FileStatus < Window_Base

  #--------------------------------------------------------------------------
  # ● initialize
  #--------------------------------------------------------------------------
  def initialize(save_window)
    super(320, 64, 320, 416)
    self.contents = Bitmap.new(width - 32, height - 32)
#    self.contents.font.name = $fontface
#    self.contents.font.size = $fontsize
    @save_window = save_window
    @index = @save_window.index
    rect = Rect.new(x + 16, y + (height - 32) / 2 + 16, width - 32, (height - 32) / 2)
    @viewport = Viewport.new(rect)
    @viewport.z = z + 10
    refresh
  end
 
  #--------------------------------------------------------------------------
  # ● dispose the map and the window
  #--------------------------------------------------------------------------
  def dispose
    tilemap_dispose
    @viewport.dispose
    super
  end
 
  #--------------------------------------------------------------------------
  # ● refresh the window
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    tilemap_dispose
    filename = "Save#{@index + 1}.rxdata"
    return unless FileTest.exist?(filename)
    file = File.open(filename, "r")
    Marshal.load(file)
    frame_count = Marshal.load(file)
    for i in 0...6
      Marshal.load(file)
    end
    party = Marshal.load(file)
    Marshal.load(file)
    map = Marshal.load(file)
    for i in 0...party.actors.size
      actor = party.actors[i]
      x = i % 2 * 144 + 4
      y = i / 2 * 64
      draw_actor_name(actor, x + 50, y)
      draw_actor_level(actor, x + 50, y + 24)
      draw_actor_graphic(actor, x + 10, y + 55)

      bitmap = RPG::Cache.character(actor.character_name, actor.character_hue)
      cw = bitmap.width / 4
      ch = bitmap.height / 4
      src_rect = Rect.new(0, 0, cw, ch)
      self.contents.blt((x+10) - cw / 2, (y+55) - ch, bitmap, src_rect)
      #self.contents.blt(x,y+5, bitmap, src_rect)
    end
    total_sec = frame_count / Graphics.frame_rate
    hour = total_sec / 60 / 60
    min = total_sec / 60 % 60
    sec = total_sec % 60
    text = sprintf("%02d:%02d:%02d", hour, min, sec)
    map_name = load_data("Data/MapInfos.rxdata")[map.map_id].name
    self.contents.font.color = system_color
    self.contents.draw_text(4, 128, 150, 32, "Played time:")
    self.contents.draw_text(4, 160, 50, 32, "Area:")
    self.contents.font.color = normal_color
    self.contents.draw_text(155, 128, 140, 32, " "+text)
    self.contents.draw_text(60, 160, 230, 32, map_name)
    @tilemap = Tilemap.new(@viewport)
    @tilemap.tileset = RPG::Cache.tileset(map.tileset_name)
    for i in 0..6
      autotile_name = map.autotile_names[i]
      @tilemap.autotiles[i] = RPG::Cache.autotile(autotile_name)
    end
    @tilemap.map_data = map.data
    @tilemap.ox = map.display_x / 4 + 176
    @tilemap.oy = map.display_y / 4 + 148
  end
 
  #--------------------------------------------------------------------------
  # ● tilemap_dispose
  #--------------------------------------------------------------------------
  def tilemap_dispose
    unless @tilemap == nil
      @tilemap.tileset.dispose
      for i in 0..6
        @tilemap.autotiles[i].dispose
      end
      @tilemap.dispose
      @tilemap = nil
    end
  end
 
  #--------------------------------------------------------------------------
  # ● update
  #--------------------------------------------------------------------------
  def update
    @tilemap.update if @tilemap != nil
    if @index != @save_window.index
      @index = @save_window.index
      refresh
    end
    super
  end
end

#==============================================================================
# ■ Scene_File
#------------------------------------------------------------------------------
#  Base scene for load and save menus.
#==============================================================================

class Scene_File

  #--------------------------------------------------------------------------
  # ● initialize the scene
  #--------------------------------------------------------------------------
  def initialize(help_text)
    @help_text = help_text
  end
 
  #--------------------------------------------------------------------------
  # ● main
  #--------------------------------------------------------------------------
  def main
    @pic = Sprite.new
    #if $game_variables[98] == nil
    #@pic.bitmap = Bitmap.new("Graphics/Pictures/Menú.jpg")
    #else
    # 
    #case ($game_variables[98])
    #when 0
    #  @pic.bitmap = Bitmap.new("Graphics/Pictures/Menú.jpg")
    #when 1
    #  @pic.bitmap = Bitmap.new("Graphics/Pictures/LidantorFondo.jpg")
    #end
    #
    #end
    @help_window = Window_Help.new
    @help_window.back_opacity = 160
    @help_window.set_text(@help_text, 1)
    @file_window = Window_File.new
    @file_window.back_opacity = 160
    @status_window = Window_FileStatus.new(@file_window)
    @status_window.back_opacity = 160
    @com = Window_Command.new(96, [" Yes", " No"])
    @com.back_opacity = 160
    @com.index = 1
    @com.x = 272
    @com.y = 192
    @com.z = 1000
    @com.visible = false
    @com.active = false
    Graphics.transition
    loop do
      Graphics.update
      Input.update
      update
      if $scene != self
        break
      end
    end
    Graphics.freeze
    @help_window.dispose
    @file_window.dispose
    @status_window.dispose
  end
 
  #--------------------------------------------------------------------------
  # ● update
  #--------------------------------------------------------------------------
  def update
    @help_window.update
    @file_window.update
    @status_window.update
    @com.update
    if @com.visible
       @help_window.set_text("Overwrite?",1)
       update_com
       return
    end
    if Input.trigger?(Input::C)
      decision
      $game_temp.last_file_index = @file_index
      return
    end
    if Input.trigger?(Input::B)
      cancel
      return
    end
  end
  #--------------------------------------------------------------------------
  # ● return the selected file's name
  #--------------------------------------------------------------------------
  def filename
    return "Save#{@file_window.index + 1}.rxdata"
  end

  def update_com
   if Input.trigger?(Input::C)
     $game_system.se_play($data_system.decision_se)
     case @com.index
     when 0
       write_save_data
       @com.active = false
       @com.visible = false
       @file_window.active = true
       @help_window.set_text("Choose where to save",1)
     when 1
       @com.active = false
       @com.visible = false
       @file_window.active = true
       @help_window.set_text("Choose where to save",1)
     end
   end
   if Input.trigger?(Input::B)
     $game_system.se_play($data_system.cancel_se)
     @com.active = false
     @com.visible = false
     @file_window.active = true
     @help_window.set_text("Choose where to save",1)
   end
 end

end

#==============================================================================
# ■ Scene_Save
#------------------------------------------------------------------------------
#  Save menu
#==============================================================================

class Scene_Save < Scene_File
 
  #--------------------------------------------------------------------------
  # ● initialize the save menu
  #--------------------------------------------------------------------------
  def initialize
    super("Choose where to save")
  end
  #--------------------------------------------------------------------------
  # ● decision key pressed
  #--------------------------------------------------------------------------
  def decision
    $game_system.se_play($data_system.decision_se)
    #file = File.open(filename, "wb")
    #write_save_data(file)
    #file.close
    check
  end
 
  #--------------------------------------------------------------------------
  # ● cancel key pressed
  #--------------------------------------------------------------------------
  def cancel
    $game_system.se_play($data_system.cancel_se)
    if $game_temp.save_calling
      $game_temp.save_calling = false
      if $game_system.on_map == true #WorldMap
        $game_system.map_coords = [$game_variables[226], $game_variables[227]]
        $scene = Scene_World_Map.new
        return
      else
        $scene = Scene_Map.new
        return
      end
    end
    $scene = Scene_Menu.new(1)
  end

  #--------------------------------------------------------------------------
  # ● save the current data into the selected file
  #--------------------------------------------------------------------------
  def write_save_data
    $game_system.se_play($data_system.save_se)
    file = File.open(filename, "wb")
    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)
    file.close
    if $game_temp.save_calling
      $game_temp.save_calling = false
      if $game_system.on_map == true #WorldMap
        $game_system.map_coords = [$game_variables[226], $game_variables[227]]
        $scene = Scene_World_Map.new
        return
      else
        $scene = Scene_Map.new
        return
      end
    end
    $scene = Scene_Menu.new(1)
  end
 
  def check
    if FileTest.exist? ("Save#{@file_window.index + 1}.rxdata")
      @com.visible = true
      @com.active = true
      @file_window.active = false
    else
      write_save_data
    end
  end
end

#==============================================================================
# ■ Scene_Load
#------------------------------------------------------------------------------
#  Load menu
#==============================================================================

class Scene_Load < Scene_File
 
  #--------------------------------------------------------------------------
  # ● initialize the menu
  #--------------------------------------------------------------------------
  def initialize
  @pic = Sprite.new

  #if $game_variables[98] == nil
  #@pic.bitmap = Bitmap.new("Graphics/Pictures/Menú.jpg")
  #else
  # 
  #case ($game_variables[98])
  #when 0
  #  @pic.bitmap = Bitmap.new("Graphics/Pictures/Menú.jpg")
  #when 1
  #  @pic.bitmap = Bitmap.new("Graphics/Pictures/LidantorFondo.jpg")
  #else
  #  @pic.bitmap = Bitmap.new("Graphics/Pictures/Menú.jpg")
  #end
  #
  #end
 
  $game_temp = Game_Temp.new
  $game_temp.last_file_index = 0
  latest_time = Time.at(0)
  for i in 0..99
    filename = "Save#{i + 1}.rxdata"
    if FileTest.exist?(filename)
      file = File.open(filename, "r")
      if file.mtime > latest_time
        latest_time = file.mtime
        $game_temp.last_file_index = i
      end
      file.close
    end
  end
  super("Choose file to load")
end

  #--------------------------------------------------------------------------
  # ● decision key pressed
  #--------------------------------------------------------------------------
  def decision
    unless FileTest.exist?(filename)
      $game_system.se_play($data_system.buzzer_se)
      return
    end
    $game_system.se_play($data_system.load_se)
    file = File.open(filename, "rb")
    read_save_data(file)
    file.close
    $game_system.bgm_play($game_system.playing_bgm)
    $game_system.bgs_play($game_system.playing_bgs)
    $game_map.update
    $scene = Scene_Map.new
  end

  #--------------------------------------------------------------------------
  # ● cancel key pressed
  #--------------------------------------------------------------------------
  def cancel
    $game_system.se_play($data_system.cancel_se)
    $scene = Scene_Title.new
  end
  #--------------------------------------------------------------------------
  # ● load the selected file
  #--------------------------------------------------------------------------
  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)
    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

I have prepared a demo to show it:
Save System Demo


In normal RPG Maker XP, it shows where you saved with a little preview:
Spoiler: ShowHide


But, in my project, after updating to XPA, it doesn't show that map preview:
Spoiler: ShowHide



I wanted to know if it is possible to make it work again or if this isn't possible with XPA

Thanks
13
Tutorial Requests / Re: [XPA] How can I show a pre...
Last post by KK20 - March 23, 2021, 11:29:47 am
Please mention what these scripts are as I cannot help you without looking at the code itself.
14
Tutorial Requests / [XPA] How can I show a preview...
Last post by SolarisSpell - March 23, 2021, 10:08:25 am
Hi

I'd like to ask how can you show a preview of a map with RPG Maker XPA

I have two scripts that do this. One is a save system that, when selecting which file to load, shows where you were when you saved your game. The other one, is a teleport script that allows you to select where do you want to teleport and shows in a window the map you are selecting.

But after upgrading to XP Ace, both scripts still works, but shows nothing. Where the preview of the map used to be, now is just nothing.

I wanted to ask which code should I use to show the preview of a different map, so I can implement it in these scripts again.

Thanks
15
New Projects / [RMXP] Shortest Game Ever
Last post by MarkHest - March 19, 2021, 09:36:00 pm
SHORTEST GAME EVER
By MarkHest
Created 2021/03/20



LORE
Spoiler: ShowHide
For centuries RPG Games have been filled with endless battles, a long adventure, long boss battles and an exciting story...
...
...
...
LET'S SKIP ALL THAT AND JUST COMPLETE THE GAME RIGHT AWAY. Screw all the hard work and countless hours you need to get through. Let's just beat the game as soon as possible!




Characters
Spoiler: ShowHide
  • One character...
  • One journey...
  • One destiny...
  • ...
  • ...
  • ...
  • AND ONE BUTTON PRESS!




Credits:
Spoiler: ShowHide
RGSS Team from the RPG Maker XP makers.
MarkHest for making the game.




Download link:
Click to get download link from MEGA!


16
Tutorial Database / Re: [XP] RMXPAce -- Using the ...
Last post by SolarisSpell - March 19, 2021, 12:16:35 pm
I must say, this is some kind of unthinkable witchcraft, and it is amazing.

I'm having a lot of little problems after implementing it, but I'm fighting to make it compatible with my project. I'm sure it will be worth it.

So, great job
17
General Discussion / Re: Anyone interested in RPG M...
Last post by SolarisSpell - March 16, 2021, 03:12:36 am
That's good to know.

I'm enjoying using RPG Maker XP and I think the result is turning to be good (I know, is my game, so it could be terrible and I would love it...). Maybe I should say that the game is better than what I though I could do.
18
General Discussion / Re: Anyone interested in RPG M...
Last post by KK20 - March 15, 2021, 02:31:59 pm
Very rarely does anyone view the forums. We've migrated over to the Discord server for general conversations and programming help. The website is basically up for archival purposes.

To the topic at hand, no one really cares what engine you use as long as the game made with it is good. Yes, XP is old, but it's not like people have an instant instinct that, because you're not using MV/MZ, your game is inherently bad. We have a user, Jaiden, who is currently making a commercial game with XP that looks better than most Steam shovelware out there. I've had several people contact me for commercialized usage of XP Ace.

Just know that because you're using a dated engine that a lot of options are limited and/or require extensive programming to incorporate.
19
General Discussion / Anyone interested in RPG Maker...
Last post by SolarisSpell - March 15, 2021, 06:23:12 am
So... this is my forth topic and only one has received an answer, so I wanted to ask to avoid just spamming the forum talking with none.

Is anyone interested in RPG Maker XP projects? I know it's a very old engine, so is understandable if it has been forgotten.

You always feel passionate about showing your game to other people, but probably its time has already past. Also, my project won't be in English in it's first version, so I think none will be interested in trying it here. But I'm optimistic, so here I am asking.

^_^
20
RMXP Script Database / Re: [XP] Selwyn's Passability ...
Last post by SolarisSpell - March 12, 2021, 04:42:59 pm
Nice.

I tried to post the script with some format, but hadn't seen that template.
I updated my post
Pages 1 2 3 4 ... 10