Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - Agckuu Coceg

1
Mission completed. GT, LiTTleDRAgo.
2


Guys, I'm absolutely contraindicated to be lazy and I'm still have time.
3
While being on a small part-time work related to RMXP as a game designer, I encountered with a small problem, which is slightly slowed down the development process. I'm used Blizz-ABS as a combat system, but for the original concept it's need to use a script associated with a maps wrap - the use of "map-linker" scripts like Continuous Maps aren't suitable.

Spoiler: ShowHide

#--------------------------------------------------------------------------
#  Game_Temp (edit)
#      Script to check for "_wrap" in the map name.
#--------------------------------------------------------------------------
class Game_Temp

  attr_reader    :map_infos
  attr_reader    :outside_array

  alias wrap_original_game_temp_initialize initialize

  def initialize
    wrap_original_game_temp_initialize
    @map_infos = load_data("Data/MapInfos.rxdata")
    @outside_array=Array.new
    for key in @map_infos.keys
      @outside_array[key]=@map_infos[key].name.include?("_wrap")
    end
    for key in @map_infos.keys
      @map_infos[key] = @map_infos[key].name
      @map_infos[key].delete!("_wrap")
    end
  end

end

#--------------------------------------------------------------------------
#  Game_Map
#--------------------------------------------------------------------------
class Game_Map

  attr_accessor :wrap

  alias wrap_original_game_map_scroll_left scroll_left
  alias wrap_original_game_map_scroll_right scroll_right
  alias wrap_original_game_map_scroll_up scroll_up
  alias wrap_original_game_map_scroll_down scroll_down

# Left
  def scroll_left(distance)
    unless $game_temp.outside_array[$game_map.map_id]
      wrap_original_game_map_scroll_left(distance)
    else
      @display_x = [@display_x - distance].max
    end
  end

# Right
  def scroll_right(distance)
    unless $game_temp.outside_array[$game_map.map_id]
      wrap_original_game_map_scroll_right(distance)
    else
      @display_x = [@display_x + distance].min
    end
  end

# Top
  def scroll_up(distance)
    unless $game_temp.outside_array[$game_map.map_id]
      wrap_original_game_map_scroll_up(distance)
    else
      @display_y = [@display_y - distance].max
    end
  end

# Bottom
  def scroll_down(distance)
    unless $game_temp.outside_array[$game_map.map_id]
      wrap_original_game_map_scroll_down(distance)
    else
      @display_y = [@display_y + distance].min
   end
  end

end

#--------------------------------------------------------------------------
# Game_Player
#--------------------------------------------------------------------------
class Game_Player

  alias wrap_original_game_player_center center

  def center(x, y)
    unless $game_temp.outside_array[$game_map.map_id]
      wrap_original_game_player_center(x, y)
    else
      max_x = ($game_map.width + 20) * 128
      max_y = ($game_map.height + 15) * 128
      $game_map.display_x = [-20 * 128, [x * 128 - CENTER_X, max_x].min].max
      $game_map.display_y = [-15 * 128, [y * 128 - CENTER_Y, max_y].min].max
    end
  end

end

#--------------------------------------------------------------------------
# Check_Coordinates
#--------------------------------------------------------------------------
class Check_Coordinates

#------------------------------------------------------------------------
# Handles left edge
#------------------------------------------------------------------------
  def refresh_left
    unless $game_temp.outside_array[$game_map.map_id]
    else
      if $game_player.real_x == 0
        if Input.press?(Input::LEFT)
          def $game_player.passable?(x, y, d)
            return true
          end
          @left_trigger = true
        end
      end
    end
  end
 
#------------------------------------------------------------------------
# Handles right edge
#------------------------------------------------------------------------
  def refresh_right
    unless $game_temp.outside_array[$game_map.map_id]
    else
      @map_width_max = ($game_map.width - 1) * 128
      if $game_player.real_x == @map_width_max
        if Input.press?(Input::RIGHT)
          def $game_player.passable?(x, y, d)
            return true
          end
          @right_trigger = true
        end
      end
    end
  end

#------------------------------------------------------------------------
# Handles top edge
#------------------------------------------------------------------------
  def refresh_top
    unless $game_temp.outside_array[$game_map.map_id]
    else
      if $game_player.real_y == 0
        if Input.press?(Input::UP)
          def $game_player.passable?(x, y, d)
            return true
          end
          @top_trigger = true
        end
      end
    end
  end

#------------------------------------------------------------------------
# Handles bottom edge
#------------------------------------------------------------------------
  def refresh_bottom
    unless $game_temp.outside_array[$game_map.map_id]
    else
      @map_height_max = ($game_map.height - 1) * 128
      if $game_player.real_y == @map_height_max
        if Input.press?(Input::DOWN)
          def $game_player.passable?(x, y, d)
            return true
          end
          @bottom_trigger = true
        end
      end
    end
  end

#------------------------------------------------------------------------
# Left teleport
#------------------------------------------------------------------------
  def left_trigger
    if @left_trigger == true
      if $game_player.real_x == -128
        $game_player.moveto(($game_map.width - 1), $game_player.y)
        def $game_player.passable?(x, y, d)
          new_x = x + (d == 6 ? 1 : d == 4 ? -1 : 0)
          new_y = y + (d == 2 ? 1 : d == 8 ? -1 : 0)
          unless $game_map.valid?(new_x, new_y)
            return false
          end
          if $DEBUG and Input.press?(Input::CTRL)
            return true
          end
          super
        end
        @left_trigger = false
      end
    end
  end

#------------------------------------------------------------------------
# Right teleport
#------------------------------------------------------------------------
  def right_trigger
    if @right_trigger == true
      if $game_player.real_x == ($game_map.width * 128)
        $game_player.moveto(0, $game_player.y)
        def $game_player.passable?(x, y, d)
          new_x = x + (d == 6 ? 1 : d == 4 ? -1 : 0)
          new_y = y + (d == 2 ? 1 : d == 8 ? -1 : 0)
          unless $game_map.valid?(new_x, new_y)
            return false
          end
          if $DEBUG and Input.press?(Input::CTRL)
            return true
          end
          super
        end
        @right_trigger = false
      end
    end
  end

#------------------------------------------------------------------------
# Top teleport
#------------------------------------------------------------------------
  def top_trigger
    if @top_trigger == true
      if $game_player.real_y == -128
        $game_player.moveto($game_player.x, ($game_map.height - 1))
        def $game_player.passable?(x, y, d)
          new_x = x + (d == 6 ? 1 : d == 4 ? -1 : 0)
          new_y = y + (d == 2 ? 1 : d == 8 ? -1 : 0)
          unless $game_map.valid?(new_x, new_y)
            return false
          end
          if $DEBUG and Input.press?(Input::CTRL)
            return true
          end
          super
        end
        @top_trigger = false
      end
    end
  end

#------------------------------------------------------------------------
# Bottom teleport
#------------------------------------------------------------------------
  def bottom_trigger
    if @bottom_trigger == true
      if $game_player.real_y == ($game_map.height * 128)
        $game_player.moveto($game_player.x, 0)
        def $game_player.passable?(x, y, d)
          new_x = x + (d == 6 ? 1 : d == 4 ? -1 : 0)
          new_y = y + (d == 2 ? 1 : d == 8 ? -1 : 0)
          unless $game_map.valid?(new_x, new_y)
            return false
          end
          if $DEBUG and Input.press?(Input::CTRL)
            return true
          end
          super
        end
        @bottom_trigger = false
      end
    end
  end

end

#--------------------------------------------------------------------------
# Sprite_Duplicate
#--------------------------------------------------------------------------
class Sprite_Duplicate < RPG::Sprite

  attr_accessor :character # @character is the original event
 
  def initialize(viewport, character = nil, x = 0, y = 0)
    @x = x
    @y = y
    super(viewport)
    @character = character
    @z=@character.screen_z
    update
  end

  def update
    super
    if @tile_id != @character.tile_id or
      @character_name != @character.character_name or
      @character_hue != @character.character_hue
        @tile_id = @character.tile_id
        @character_name = @character.character_name
        @character_hue = @character.character_hue
        if @tile_id >= 384
          self.bitmap = RPG::Cache.tile($game_map.tileset_name, @tile_id, @character.character_hue)
          self.src_rect.set(0, 0, 32, 32)
          self.ox = 16
          self.oy = 32
        else
          self.bitmap = RPG::Cache.character(@character.character_name, @character.character_hue)
          @cw = bitmap.width / 4
          @ch = bitmap.height / 4
          self.ox = @cw / 2
          self.oy = @ch
        end
    end
    self.visible = (not @character.transparent)
    if @tile_id == 0
      sx = @character.pattern * @cw
      sy = (@character.direction - 2) / 2 * @ch
      self.src_rect.set(sx, sy, @cw, @ch)
    end
    # The coordinates of the duplicate event sprite. They are relative to the original event,
    # so the duplicates will move and act as the original does; except the z coordinate,
    # as when the original sprite would be of range, the duplicate would not appear.
    self.x = @character.screen_x + @x
    self.y = @character.screen_y + @y
    self.z = @z
    self.opacity = @character.opacity
    self.blend_type = @character.blend_type
    self.bush_depth = @character.bush_depth
    if @character.animation_id != 0
      animation = $data_animations[@character.animation_id]
      animation(animation, true)
      @character.animation_id = 0
    end
  end

end

#--------------------------------------------------------------------------
# Sprite_Character
#--------------------------------------------------------------------------
class Sprite_Character < RPG::Sprite

  alias wrap_original_sprite_character_initialize initialize
  alias wrap_original_sprite_character_update update

  def initialize(viewport, character = nil)
    unless $game_temp.outside_array[$game_map.map_id]
      wrap_original_sprite_character_initialize(viewport, character)
    else
      @character = character
      super(viewport)
      if $game_map.wrap == nil
        $game_map.wrap = []
      end
      # 8 duplicates are created, stored in the $game_map.wrap array
      if character.is_a?(Game_Event)
        $game_map.wrap.push(Sprite_Duplicate.new(viewport, character, (-$game_map.width * 32), 0))
        $game_map.wrap.push(Sprite_Duplicate.new(viewport, character, 0, (-$game_map.height * 32)))
        $game_map.wrap.push(Sprite_Duplicate.new(viewport, character, ($game_map.width * 32), 0))
        $game_map.wrap.push(Sprite_Duplicate.new(viewport, character, 0, ($game_map.height * 32)))
        $game_map.wrap.push(Sprite_Duplicate.new(viewport, character, (-$game_map.width * 32), (-$game_map.height * 32)))
        $game_map.wrap.push(Sprite_Duplicate.new(viewport, character, ($game_map.width * 32), ($game_map.height * 32)))
        $game_map.wrap.push(Sprite_Duplicate.new(viewport, character, (-$game_map.width * 32), ($game_map.height * 32)))
        $game_map.wrap.push(Sprite_Duplicate.new(viewport, character, ($game_map.width * 32), (-$game_map.height * 32)))
      end
      wrap_original_sprite_character_initialize(viewport, @character)
    end
  end

#------------------------------------------------------------------------
# Updates each sprite in the $game_map.wrap array
#------------------------------------------------------------------------
  def update
    unless $game_temp.outside_array[$game_map.map_id]
      wrap_original_sprite_character_update
    else
      wrap_original_sprite_character_update
      if $game_map.wrap != [] and character.is_a?(Game_Player)
        for duplicate in $game_map.wrap
          if duplicate != nil
            duplicate.update
          end
        end
      end
    end
  end

end

#--------------------------------------------------------------------------
# Spriteset_Map
#--------------------------------------------------------------------------

class Spriteset_Map

  alias wrap_original_spriteset_map_initialize initialize

  def initialize
    $game_map.wrap=nil
    wrap_original_spriteset_map_initialize
  end
 
end

#--------------------------------------------------------------------------
# Scene_Save edit
# Prevent save errors
#--------------------------------------------------------------------------
class Scene_Save < Scene_File

  alias wrap_original_scene_save_write_save_data write_save_data

  def write_save_data(file)
    $game_map.wrap = nil
    wrap_original_scene_save_write_save_data(file)
  end
 
end

#--------------------------------------------------------------------------
# Scene Map
#--------------------------------------------------------------------------
class Scene_Map

  $coordinate_check = Check_Coordinates.new
 
  alias wrap_original_scene_map_update update
 
  def update
    unless $game_temp.outside_array[$game_map.map_id]
      wrap_original_scene_map_update
    else
      $coordinate_check.refresh_left
      $coordinate_check.refresh_right
      $coordinate_check.refresh_top
      $coordinate_check.refresh_bottom
      $coordinate_check.left_trigger
      $coordinate_check.right_trigger
      $coordinate_check.top_trigger
      $coordinate_check.bottom_trigger
      wrap_original_scene_map_update
    end
  end
end



However, its compatibility with BABS isn't too good, but other similar scripts for RMXP with the needed effect simply isn't find.

Description of problems:

1) The scrolling of wrapped map isn't going on the standard way - when player approaches to the end of the map, camera centered on the player and showing a necessary part of the map in the window, but after the transfer to the other end of map camera sharply fast scrolls to the standard RMXP mode at this positions.
2) Sprite_Character class isn't good on compatibility - displaying of enemy sprites on the visible screen-part of the wrapped map doesn't happen - they appear only after the transfer to the other end of the map.

Other problems associated with the scripting part wasn't detected. That script is located above the BABS.
4
Everything would be fine if it were not a problem that bothers me personally (or rather, all who live in my country). My fuckin' provider don't let me enter to the sites, based on the some social engines, and that's including blogspot-sites too. So can you at least put the text of script separately on the forum, please?
5
New Projects / Re: [Stencyl] Kim Nyan Il
December 25, 2011, 10:45:50 am
Oh, what the...  :rofl: It's really need to continue that in other genre. Like a... this?

But collisions is some kind of wrong.
6
ARC Reactor Engine / Re: Current Development Build
December 20, 2011, 04:17:49 pm
Many errors with disposes of sprites on the start after the intro... But it works. IT WORKS.
7
Event System Troubleshooting / Re: Evented menu issue
December 20, 2011, 03:04:11 pm
You use a Blizz-ABS. It's can't support normal controls of RMXP even if you turn off it, so you need to redesign the controls like this in conditional branches.

QuoteInput.press?(Input::Key['Your Key'])

Put that on the "script" in conditional branches, and it works.

And... That menu, that you have done, isn't good and have many mistakes in eventing code. You need to simple the design of this.
9
RMXP Script Database / Re: [XP] Blizz-ABS
May 16, 2011, 01:39:10 pm
Quote from: Scorpion on May 15, 2011, 03:03:20 pm
$game_actors[ACTOR_ID].skill_hotkeys[BUTTON_NUMBER] = SKILL_ID
$game_actors[ACTOR_ID].item_hotkeys[BUTTON_NUMBER] = ITEM_ID


You can make an initial setup in the game and you can make a parallel process common event that handles additional assignment during the game if you want.


Origato, Blizz Scorpion.
10
RMXP Script Database / Re: [XP] Blizz-ABS
May 15, 2011, 09:55:26 am
Began to look seriously Blizz-ABS, and here I am faced with a problem in implementation.

Attaching skills and items to hotkeys can only manually through Scene_Hotkey. But the problem is that I originally tidy up the possibility of any calling menus in the project, and I need to automate it. Is there any scriptlet to implement the automatic attachment of a skill or items to hotkeys?
11
ARC Reactor Engine / Re: Compression
May 06, 2011, 09:19:33 am
Quote from: MetalRenard on May 06, 2011, 09:17:35 am
Wait a mo, you plan on making money from this?


Ehem, why not.
12
Run Time Package / Re: Run Time Package
May 04, 2011, 01:13:44 pm
I apologize for my manner of being slowpoke, because during that time has passed several events that distracted me from work. But now everything is normal, so I present to you a fully edited by height early charsets, as well as the design of a new villager.

Early: ShowHide








Villager-05: ShowHide


QuoteMost games allow you to play an intro immediately followed by an endless loop.  If you want an example, take Super Mario Galaxy 2.  In this video, the intro starts at 0:22, then the loop starts at 0:37, then the loop restarts at 2:03, 3:27, etc:


Hm... I'm too think that's a nice idea.
13
Run Time Package / Re: Run Time Package
April 26, 2011, 03:15:35 am
Quote from: Blizzard on April 25, 2011, 01:32:37 pm
This one:

Quote from: Agckuu Coceg on April 17, 2011, 04:03:08 pm
Quote from: ForeverZer0 on April 17, 2011, 01:14:56 pm
That looks very good. My only nitpick is the head seems to have more saturation than the body.


Accepted.

Spoiler: ShowHide



You should check the first one as well.


Yes, I'm checked that already. If I have time today, I rework this.
14
Run Time Package / Re: Run Time Package
April 21, 2011, 11:41:28 am
Quote from: Blizzard on April 21, 2011, 10:58:55 am
Then your other sprite has inconsistent heights.


Damn. What sprite you use for that comparision?
15
Run Time Package / Re: Run Time Package
April 21, 2011, 10:45:05 am
Quote from: Blizzard on April 21, 2011, 10:18:02 am
:facepalmx:

Take a look at this picture:

Spoiler: ShowHide


The sprites in the first and the last row is 1 pixel smaller than, but the sprites in the second and the third row are both 2 pixels smaller.
In a game it looks totally weird that, when you turn a character to the side, he shrinks by a pixel.


That's a fucking mystic, cause height comparision is clear.


16
Run Time Package / Re: Run Time Package
April 21, 2011, 09:37:43 am
Quote from: Blizzard on April 21, 2011, 04:08:39 am
Better, but you forgot the left and right sprites again. xD


Nope, but I'm forgot some edits to that.

Villager-03: ShowHide


And other sprites here too. I'm did both versions, so enjoy.

Villager-04-1: ShowHide

Villager-04-2: ShowHide
17
Run Time Package / Re: Run Time Package
April 21, 2011, 03:07:26 am
Quote from: Blizzard on April 21, 2011, 02:27:33 am
Quote from: Agckuu Coceg on April 21, 2011, 02:11:48 am
So I lined them. IMO they should be lower. Because to do everything bodies like a copies with same height is  unreal, right  :shifty:?


I agree on that, but then the body should be smaller, not just the hair pushed down into their heads. This makes them look like they have some sort of flat head illness compared to the other sprites. You should take off a line of pixels off the legs and the torso rather than two lines off the forehead.


Okay, I reworked this with your references.

Villager-03: ShowHide


But do you think about the sprite #4, and what version you like more?
18
Run Time Package / Re: Run Time Package
April 21, 2011, 02:11:48 am
Quote from: Blizzard on April 20, 2011, 07:13:39 am
@Agckuu Coceg: Yeah, but it looks weird because the hair is a lot lower than on the other sprites.


So I lined them. IMO they should be lower. Because to do everything bodies like a copies with same height is  unreal, right  :shifty:?

Okay, time for new work.

Villager-04 Part: ShowHide


And meet the thing that you cannot see in the RTP before.
Villager-04 Part: ShowHide


Cause we think about political correctness.  :police:
19
Run Time Package / Re: Run Time Package
April 20, 2011, 03:29:19 am
Quote from: Blizzard on April 20, 2011, 03:27:39 am
Lol, you did it the other way around. You lowered the hair of the left/right sprites. xD


Just as planned. It's all about height.
20
Run Time Package / Re: Run Time Package
April 20, 2011, 03:00:58 am
Quote from: Blizzard on April 20, 2011, 02:34:50 am

Though, it would be good if we don't copy all the sprites from the RMXP RTP.


Heh, this is not a copy. Part from that spirte, part from this sprite, editing with new templates size, recoloring... This is how frankens roll. ^_____^

QuoteEDIT: I think the hair of the up and down directions is a bit too low. In comparison with other sprites, it's off by 2 or 3 pixels.


I'm check this.

P.S. Reworked.
Spoiler: ShowHide