Map Screenshot

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,841
First Language
English
Last edited by a moderator:

ze1

Veteran
Veteran
Joined
Apr 19, 2012
Messages
32
Reaction score
4
Primarily Uses
Any chance of the dll being updated so that the script would be able to take a mapshot of a big map? I wanted to take one of my world map, so that I can make it visible to the player, but I always get a memory error. =(

I'm trying to reduce the map scale to see if it'd help decreasing the map size. I'm using the Mapshot_Scale constant. However, the effect is always weird. It seems that instead of changing the map scale, it takes a mapshot of part of the map (usually only floor or water). But I've just reread your post and I realized it probably wouldn't work since Ruby doesn't like big images. =(
 
Last edited by a moderator:

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,841
First Language
English
Unfortunately I didn't write the dll and the author mentioned some issues with it so you will probably have to use the slow ruby exporter if the nice fast dll code doesn't work.

Looking at how map scaling is implemented...it's actually kind of pointless cause it first generates the original map and then scales it down. And ruby's complaining about not being able to create the original map in the first place.
 
Last edited by a moderator:

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,841
First Language
English
I have looked at this script again and have found why the thing crashes on large maps


1: the entire image is created first and stored in memory.


2: The PNG writer currently writes out one chunk.


Consider a 500x500 map.


Each tile is 32 pixels in width and height, so the size of your image is 16000x16000. That's 256 million pixels. At 4Bpp, that requires a gig of memory.


So from (1), we're storing a gig of data in memory. Not a problem for modern computers these days, but still an issue.


From (2), since it's writing it out as a single chunk, it's trying to allocate a gig of memory as a byte-string of null bytes. Ruby does not seem to like this and crashes as a result.


I am not sure how to best address this issue.


A good solution would be to draw the map one chunk at a time (for example, 20 rows at a time) and write it out. This allows me to control the amount of memory required to store the image, and since PNG natively support multiple IDAT chunks, that would work fine.


However, that means I would have to integrate the PNG writer with the map saver, rather than sending an image to the PNG writer. I'll probably go with just writing out chunks, so it doesn't crash.


If anyone would like to update the PNG writer that would be great, since I'd have to first look up how to deal with the pointer to the data section so that I can start at the correct segment of data...
 
Last edited by a moderator:

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,841
First Language
English
Script has been updated to use the GDI+ interface.


It is faster than manually building a PNG file and supports more image formats.


Most windows machines should have that library so there is no need to download additional dll's anymore.


It still does not work for very large maps, however...
 
Last edited by a moderator:

seita

Donn_M
Veteran
Joined
Feb 6, 2013
Messages
2,254
Reaction score
611
First Language
English
Primarily Uses
I'm getting an error and my map isn't exactly huge. The dimensions are 60 x 50.

This is the error I get when I try F6 screenshot:

error.JPG
 
Last edited by a moderator:

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,841
First Language
English
Might be a script conflict verify that it works stand-alone.
 

seita

Donn_M
Veteran
Joined
Feb 6, 2013
Messages
2,254
Reaction score
611
First Language
English
Primarily Uses
wow very interesting. I have many scripts that seem like they would conflict with yours, but it was Victors diagonal movement script:

http://victorscripts.wordpress.com/rpg-maker-vx-ace/utility-scripts/diagonal-movement/

#==============================================================================
# ** Victor Engine - Diagonal Movement
#------------------------------------------------------------------------------
# Author : Victor Sant
#
# Version History:
# v 1.00 - 2011.12.23 > First release
# v 1.01 - 2011.12.30 > Fixed sync with vehicle
# v 1.02 - 2012.01.01 > New comment tags
# v 1.03 - 2012.01.04 > Compatibility with Character Control
# v 1.04 - 2012.01.04 > Compatibility with Follower Control
# v 1.05 - 2012.05.29 > Compatibility with Pixel Movement
# v 1.06 - 2012.07.25 > Fixed Compatibility with Visual Equip and
# > Character Control
# v 1.07 - 2012.07.30 > Fixed diagonal movement speed
# v 1.08 - 2012.08.04 > Added option for fixing blocked movement
# v 1.09 - 2013.01.24 > Fixed issue with pixel movement and VE_DIAGONAL_FIX
#------------------------------------------------------------------------------
# This script allows to set diagonal movement for the player and events.
# This feature is opitional for events. It's possible to have different
# graphic for the diagonal movement
#------------------------------------------------------------------------------
# Compatibility
# Requires the script 'Victor Engine - Basic Module' v 1.16 or higher
# If used with 'Victor Engine - Multi Frames' place this bellow it.
# If used with 'Victor Engine - Pixel Movement' place this bellow it.
# If used with 'Victor Engine - Visual Equip' place this bellow it.
#
# * Alias methods (Default)
# class Game_CharacterBase
# def init_public_members
# def move_straight(d, turn_ok = true)
# def move_diagonal(horz, vert)
#
# class Game_Character < Game_CharacterBase
# def move_random
# def move_toward_character(character)
# def move_away_from_character(character)
# def turn_toward_character(character)
# def turn_away_from_character(character)
# def move_forward
#
# class Game_Event < Game_Character
# def clear_page_settings
# def setup_page_settings
#
# class Game_Player < Game_Character
# def initialize
# def move_by_input
#
# class Game_Vehicle < Game_Character
# def sync_with_player
#
# class Sprite_Character < Sprite_Base
# def graphic_changed?
# def update_src_rect
#
# * Alias methods (Basic Module)
# class Game_Character < Game_CharacterBase
# def move_toward_position(x, y)
#
# class Game_Interpreter
# def comment_call
#
#------------------------------------------------------------------------------
# Instructions:
# To instal the script, open you script editor and paste this script on
# a new section bellow the Materials section. This script must also
# be bellow the scripts 'Victor Engine - Basic' and
# 'Victor Engine - Multi Frames'.
#
#------------------------------------------------------------------------------
# Comment calls note tags:
# Tags to be used in events comment box, works like a script call.
#
#
#
# These tags allows to turn the diagonal on or off for the player.
#
#
#
# These tags allows to turn the diagonal on or off for events.
# i : event ID
#
#------------------------------------------------------------------------------
# Comment boxes note tags:
# Tags to be used on events Comment boxes. They're different from the
# comment call, they're called always the even refresh.
#
#
# This tag allows the diagonal move for events if VE_DIAGONAL_EVENTS = false
# It enables the diagonal move only for the page where the comment
# is located
#
#
# This tag disable the diagonal move for events if VE_DIAGONAL_EVENTS = true
# It disable the diagonal move only for the page where the comment
# is located
#
#------------------------------------------------------------------------------
# Additional instructions:
#
# To add custom graphic for diagonal movement, you must have a graphic
# with the sufix set on VE_DIAGONAL_SUFIX added to it's name, by default
# this sufix is "[diag]", so you must have a file named "CharName[diag]"
# for a chaset named "CharName". If the diagonal file doesn't exist, it
# will use the normal graphic.
#
#==============================================================================

#==============================================================================
# ** Victor Engine
#------------------------------------------------------------------------------
# Setting module for the Victor Engine
#==============================================================================

module Victor_Engine
#--------------------------------------------------------------------------
# * Diagonal graphic sufix
# Sufix added to the names of diagonal movement graphics.
#--------------------------------------------------------------------------
VE_DIAGONAL_SUFIX = "[diag]"
#--------------------------------------------------------------------------
# * Set diagonal movement for events
# If true, automatically all events will have diagonal movement
# If false, you must add the diagonal movement manually by adding the
# comment tag for diagonal move on it.
#--------------------------------------------------------------------------
VE_DIAGONAL_EVENTS = false
#--------------------------------------------------------------------------
# * Fix blocked diagonal movement
# If true, when the diagonal movement is blocked, then the character
# moves straight to the direction not blocked.
#--------------------------------------------------------------------------
VE_DIAGONAL_FIX = false
#--------------------------------------------------------------------------
# * required
# This method checks for the existance of the basic module and other
# VE scripts required for this script to work, don't edit this
#--------------------------------------------------------------------------
def self.required(name, req, version, type = nil)
if !$imported[:ve_basic_module]
msg = "The script '%s' requires the script\n"
msg += "'VE - Basic Module' v%s or higher above it to work properly\n"
msg += "Go to http://victorscripts.wordpress.com/ to download this script."
msgbox(sprintf(msg, self.script_name(name), version))
exit
else
self.required_script(name, req, version, type)
end
end
#--------------------------------------------------------------------------
# * script_name
# Get the script name base on the imported value, don't edit this
#--------------------------------------------------------------------------
def self.script_name(name, ext = "VE")
name = name.to_s.gsub("_", " ").upcase.split
name.collect! {|char| char == ext ? "#{char} -" : char.capitalize }
name.join(" ")
end
end

$imported ||= {}
$imported[:ve_diagonal_move] = 1.09
Victor_Engine.required:)ve_diagonal_move, :ve_basic_module, 1.16, :above)
Victor_Engine.required:)ve_diagonal_move, :ve_character_control, 1.10, :bellow)

#==============================================================================
# ** Game_CharacterBase
#------------------------------------------------------------------------------
# This class deals with characters. Common to all characters, stores basic
# data, such as coordinates and graphics. It's used as a superclass of the
# Game_Character class.
#==============================================================================

class Game_CharacterBase
#--------------------------------------------------------------------------
# * Public Instance Variables
#--------------------------------------------------------------------------
attr_reader :diagonal
#--------------------------------------------------------------------------
# * Alias method: init_public_members
#--------------------------------------------------------------------------
alias :init_public_members_ve_diagonal_move :init_public_members
def init_public_members
init_public_members_ve_diagonal_move
@diagonal = 0
end
#--------------------------------------------------------------------------
# * Alias method: move_straight
#--------------------------------------------------------------------------
alias :move_straight_ve_diagonal_move :move_straight
def move_straight(d, turn_ok = true)
@diagonal = 0
move_straight_ve_diagonal_move(d, turn_ok)
end
#--------------------------------------------------------------------------
# * Alias method: move_diagonal
#--------------------------------------------------------------------------
alias :move_diagonal_ve_diagonal_move :move_diagonal
def move_diagonal(horz, vert)
@diagonal = 1 if diagonal_enabled? && horz == 4 && vert == 2
@diagonal = 3 if diagonal_enabled? && horz == 6 && vert == 2
@diagonal = 7 if diagonal_enabled? && horz == 4 && vert == 8
@diagonal = 9 if diagonal_enabled? && horz == 6 && vert == 8
move_diagonal_ve_diagonal_move(horz, vert)
diagonal_direction if diagonal_enabled?
end
#--------------------------------------------------------------------------
# * Alias method: distance_per_frame
#--------------------------------------------------------------------------
alias :distance_per_frame_ve_diagonal_move :distance_per_frame
def distance_per_frame
distance = distance_per_frame_ve_diagonal_move
diagonal? ? distance / Math.sqrt(2) : distance
end
#--------------------------------------------------------------------------
# * New method: diagonal_enabled?
#--------------------------------------------------------------------------
def diagonal_enabled?
@diagonal_enabled
end
#--------------------------------------------------------------------------
# * New method: diagonal?
#--------------------------------------------------------------------------
def diagonal?
@diagonal && @diagonal != 0
end
end

#==============================================================================
# ** Game_Character
#------------------------------------------------------------------------------
# This class deals with characters. It's used as a superclass of the
# Game_Player and Game_Event classes.
#==============================================================================

class Game_Character < Game_CharacterBase
#--------------------------------------------------------------------------
# * Alias method: move_random
#--------------------------------------------------------------------------
alias :move_random_ve_diagonal_move :move_random
def move_random
if diagonal_enabled? && rand(2) == 0
horz = [4, 6].random
vert = [2, 8].random
move_diagonal(horz, vert)
else
move_random_ve_diagonal_move
end
end
#--------------------------------------------------------------------------
# * Alias method: move_toward_character
#--------------------------------------------------------------------------
alias :move_toward_character_ve_diagonal_move :move_toward_character
def move_toward_character(character)
sx = distance_x_from(character.x)
sy = distance_y_from(character.y)
horz = sx > 0 ? 4 : 6
vert = sy > 0 ? 8 : 2
if diagonal_enabled? && sx != 0 && sy != 0 &&
diagonal_passable?(x, y, horz, vert)
move_diagonal(horz, vert)
else
move_toward_character_ve_diagonal_move(character)
end
end
#--------------------------------------------------------------------------
# * New method: move_toward_position
#--------------------------------------------------------------------------
alias :move_toward_position_ve_diagonal_move :move_toward_position
def move_toward_position(x, y)
sx = distance_x_from(x)
sy = distance_y_from(y)
horz = sx > 0 ? 4 : 6
vert = sy > 0 ? 8 : 2
if diagonal_enabled? && sx != 0 && sy != 0 &&
diagonal_passable?(x, y, horz, vert)
move_diagonal(horz, vert)
else
move_toward_position_ve_diagonal_move(x, y)
end
end
#--------------------------------------------------------------------------
# * Alias method: move_away_from_character
#--------------------------------------------------------------------------
alias :move_away_from_character_ve_diagonal_move :move_away_from_character
def move_away_from_character(character)
sx = distance_x_from(character.x)
sy = distance_y_from(character.y)
horz = sx > 0 ? 6 : 4
vert = sy > 0 ? 2 : 8
if diagonal_enabled? && sx != 0 && sy != 0 &&
diagonal_passable?(x, y, horz, vert)
move_diagonal(horz, vert)
else
move_away_from_character_ve_diagonal_move(character)
end
end
#--------------------------------------------------------------------------
# * Alias method: turn_toward_character
#--------------------------------------------------------------------------
alias :turn_toward_character_ve_diagonal_move :turn_toward_character
def turn_toward_character(character)
sx = distance_x_from(character.x)
sy = distance_y_from(character.y)
if diagonal_enabled? && sx != 0 && sy != 0
@diagonal = 1 if sx > 0 && sy < 0
@diagonal = 3 if sx < 0 && sy < 0
@diagonal = 7 if sx > 0 && sy > 0
@diagonal = 9 if sx < 0 && sy > 0
diagonal_direction
else
@diagonal = 0
turn_toward_character_ve_diagonal_move(character)
end
end
#--------------------------------------------------------------------------
# * Alias method: turn_away_from_character
#--------------------------------------------------------------------------
alias :turn_away_from_character_ve_diagonal_move :turn_away_from_character
def turn_away_from_character(character)
sx = distance_x_from(character.x)
sy = distance_y_from(character.y)
if diagonal_enabled? && sx != 0 && sy != 0
@diagonal = 1 if sx < 0 && sy > 0
@diagonal = 3 if sx > 0 && sy > 0
@diagonal = 7 if sx < 0 && sy < 0
@diagonal = 9 if sx > 0 && sy < 0
diagonal_direction
else
@diagonal = 0
turn_away_from_character_ve_diagonal_move(character)
end
end
#--------------------------------------------------------------------------
# * Alias method: update_move_straight
#--------------------------------------------------------------------------
alias :update_move_straight_ve_diagonal_move :update_move_straight if $imported[:ve_pixel_movement]
def update_move_straight
update_move_straight_ve_diagonal_move
diagonal_move_fix_pixel(@move_value[ :D ].first) if player? && @move_value
end
#--------------------------------------------------------------------------
# * Alias method: update_move_diagonal
#--------------------------------------------------------------------------
alias :update_move_diagonal_ve_diagonal_move :update_move_diagonal if $imported[:ve_pixel_movement]
def update_move_diagonal
update_move_diagonal_ve_diagonal_move
if player? && @move_value
d = 1 if @move_value[ :D ] == [4, 2]
d = 3 if @move_value[ :D ] == [6, 2]
d = 7 if @move_value[ :D ] == [4, 8]
d = 9 if @move_value[ :D ] == [6, 8]
diagonal_move_fix_pixel(d)
end
end
#--------------------------------------------------------------------------
# * Alias method: move_forward
#--------------------------------------------------------------------------
alias :move_forward_ve_diagonal_move :move_forward
def move_forward
if diagonal?
diagonal_movement(@diagonal)
diagonal_move_fix(@diagonal) if need_fix?
else
move_forward_ve_diagonal_move
end
end
#--------------------------------------------------------------------------
# * New method: need_fix?
#--------------------------------------------------------------------------
def need_fix?
(!moving? && !$imported[:ve_pixel_movement]) && VE_DIAGONAL_FIX
end
#--------------------------------------------------------------------------
# * New method: diagonal_movement
#--------------------------------------------------------------------------
def diagonal_movement(d)
case d
when 1 then move_diagonal(4, 2)
when 3 then move_diagonal(6, 2)
when 7 then move_diagonal(4, 8)
when 9 then move_diagonal(6, 8)
end
end
#--------------------------------------------------------------------------
# * New method: diagonal_move_fix
#--------------------------------------------------------------------------
def diagonal_move_fix(d)
@diagonal = nil
case d
when 1 then move_straight(4); move_straight(2) if !moving?
when 3 then move_straight(6); move_straight(2) if !moving?
when 7 then move_straight(4); move_straight(8) if !moving?
when 9 then move_straight(6); move_straight(8) if !moving?
end
end
#--------------------------------------------------------------------------
# * New method: set_diagonal_direction
#--------------------------------------------------------------------------
def diagonal_direction
set_direction(2) if @diagonal == 1
set_direction(4) if @diagonal == 7
set_direction(6) if @diagonal == 3
set_direction(8) if @diagonal == 9
end
#--------------------------------------------------------------------------
# * New method: diagonal_move_fix
#--------------------------------------------------------------------------
def diagonal_move_fix_pixel(d)
case d
when 1 then perform_move_fix_pixel(4, 2)
when 3 then perform_move_fix_pixel(6, 2)
when 7 then perform_move_fix_pixel(4, 8)
when 9 then perform_move_fix_pixel(6, 8)
end
end
#--------------------------------------------------------------------------
# * New method: diagonal_move_fix
#--------------------------------------------------------------------------
def perform_move_fix_pixel(horz, vert)
return if @moved || moving?
@move_value = nil
@diagonal = nil
set_direction(horz) if passable?(@x, @y, horz) && !@moved
move_straight_pixel(horz) if passable?(@x, @y, horz) && !@moved
set_direction(vert) if passable?(@x, @y, vert) && !@moved
move_straight_pixel(vert) if passable?(@x, @y, vert) && !@moved
end
end

#==============================================================================
# ** Game_Event
#------------------------------------------------------------------------------
# This class deals with events. It handles functions including event page
# switching via condition determinants, and running parallel process events.
# It's used within the Game_Map class.
#==============================================================================

class Game_Event < Game_Character
#--------------------------------------------------------------------------
# * Alias method: clear_page_settings
#--------------------------------------------------------------------------
alias :clear_page_settings_ve_diagonal_move :clear_page_settings
def clear_page_settings
clear_page_settings_ve_diagonal_move
@diagonal_enabled = false
end
#--------------------------------------------------------------------------
# * Alias method: setup_page_settings
#--------------------------------------------------------------------------
alias :setup_page_settings_ve_diagonal_move :setup_page_settings
def setup_page_settings
setup_page_settings_ve_diagonal_move
@diagonal_enabled = VE_DIAGONAL_EVENTS || note =~ //i
@diagonal_enabled = false if note =~ //i
end
end

#==============================================================================
# ** Game_Player
#------------------------------------------------------------------------------
# This class handles maps. It includes event starting determinants and map
# scrolling functions. The instance of this class is referenced by $game_map.
#==============================================================================

class Game_Player < Game_Character
#--------------------------------------------------------------------------
# * Alias method: initialize
#--------------------------------------------------------------------------
alias :initialize_ve_diagonal_move :initialize
def initialize
initialize_ve_diagonal_move
diagonal_on
end
#--------------------------------------------------------------------------
# * Alias method: move_by_input
#--------------------------------------------------------------------------
alias :move_by_input_ve_diagonal_move :move_by_input
def move_by_input
return if !movable? || $game_map.interpreter.running?
if diagonal_enabled? && Input.dir8 > 0 && Input.dir8 % 2 != 0
diagonal_movement(Input.dir8)
diagonal_move_fix(Input.dir8) if need_fix?
else
move_by_input_ve_diagonal_move
end
end
#--------------------------------------------------------------------------
# * New method: diagonal_on
#--------------------------------------------------------------------------
def diagonal_on
@diagonal_enabled = true
@followers.diagonal_on
end
#--------------------------------------------------------------------------
# * New method: diagonal_off
#--------------------------------------------------------------------------
def diagonal_off
@diagonal_enabled = false
@followers.diagonal_off
end
end

#==============================================================================
# ** Game_Follower
#------------------------------------------------------------------------------
# This class handles the followers. Followers are the actors of the party
# that follows the leader in a line. It's used within the Game_Followers class.
#==============================================================================

class Game_Follower < Game_Character
#--------------------------------------------------------------------------
# * Alias method: distance_per_frame
#--------------------------------------------------------------------------
alias :distance_per_frame_ve_diagonal_move :distance_per_frame
def distance_per_frame
distance = 2 ** real_move_speed / 256.0
$game_player.diagonal? ? distance / Math.sqrt(2) : distance
end
#--------------------------------------------------------------------------
# * New method: diagonal_on
#--------------------------------------------------------------------------
def diagonal_on
@diagonal_enabled = true
end
#--------------------------------------------------------------------------
# * New method: diagonal_off
#--------------------------------------------------------------------------
def diagonal_off
@diagonal_enabled = false
end
end

#==============================================================================
# ** Game_Followers
#------------------------------------------------------------------------------
# This class handles the followers. It's a wrapper for the built-in class
# "Array." It's used within the Game_Player class.
#==============================================================================

class Game_Followers
#--------------------------------------------------------------------------
# * New method: diagonal_on
#--------------------------------------------------------------------------
def diagonal_on
each {|follower| follower.diagonal_on }
end
#--------------------------------------------------------------------------
# * New method: diagonal_off
#--------------------------------------------------------------------------
def diagonal_off
each {|follower| follower.diagonal_off }
end
end

#==============================================================================
# ** Game_Vehicle
#------------------------------------------------------------------------------
# Esta classe gerencia veículos. Se não houver veículos no mapa atual, a
# coordenada é definida como (-1,-1).
# Esta classe é usada internamente pela classe Game_Map.
#==============================================================================

class Game_Vehicle < Game_Character
#--------------------------------------------------------------------------
# * Alias method: sync_with_player
#--------------------------------------------------------------------------
alias :sync_with_player_ve_diagonal_move :sync_with_player
def sync_with_player
sync_with_player_ve_diagonal_move
@diagonal = $game_player.diagonal
diagonal_direction
end
end

#==============================================================================
# ** Sprite_Character
#------------------------------------------------------------------------------
# This sprite is used to display characters. It observes a instance of the
# Game_Character class and automatically changes sprite conditions.
#==============================================================================

class Sprite_Character < Sprite_Base
#--------------------------------------------------------------------------
# * Alias method: graphic_changed?
#--------------------------------------------------------------------------
alias :graphic_changed_ve_diagonal_move :graphic_changed?
def graphic_changed?
graphic_changed_ve_diagonal_move ||
@diagonal != @character.diagonal
end
#--------------------------------------------------------------------------
# * New method: update_character_info
#--------------------------------------------------------------------------
alias :update_character_info_ve_diagonal_move :update_character_info
def update_character_info
update_character_info_ve_diagonal_move
@diagonal = @character.diagonal
end
#--------------------------------------------------------------------------
# * Alias method: update_src_rect
#--------------------------------------------------------------------------
alias :update_src_rect_ve_diagonal_move :update_src_rect
def update_src_rect
if @tile_id == 0 && @character.diagonal?
update_diagonal_src_rect
else
update_src_rect_ve_diagonal_move
end
end
#--------------------------------------------------------------------------
# * Overwrite method: set_character_diagonal_bitmap
#--------------------------------------------------------------------------
alias :set_bitmap_name_ve_diagonal_move :set_bitmap_name
def set_bitmap_name
name = @character_name + ($imported[:ve_visual_equip] ? "" : diagonal_sufix)
character_exist?(name) ? name : set_bitmap_name_ve_diagonal_move
end
#--------------------------------------------------------------------------
# * New method: diagonal_sufix
#--------------------------------------------------------------------------
def diagonal_sufix
@character.diagonal? ? VE_DIAGONAL_SUFIX : ""
end
#--------------------------------------------------------------------------
# * New method: update_diagonal_src_rect
#--------------------------------------------------------------------------
def update_diagonal_src_rect
dir = 0 if @diagonal == 1
dir = 1 if @diagonal == 7
dir = 2 if @diagonal == 3
dir = 3 if @diagonal == 9
index = @character.character_index
if $imported[:ve_multi_frames] && @character_name[/\[F(\d+)\]/i]
pattern = @character.pattern
else
pattern = @character.pattern < 3 ? @character.pattern : 1
end
sx = (index % 4 * @character.frames + pattern) * @cw
sy = (index / 4 * 4 + dir) * @ch
self.src_rect.set(sx, sy, @cw, @ch)
end
end

#==============================================================================
# ** Game_Interpreter
#------------------------------------------------------------------------------
# An interpreter for executing event commands. This class is used within the
# Game_Map, Game_Troop, and Game_Event classes.
#==============================================================================

class Game_Interpreter
#--------------------------------------------------------------------------
# * Alias method: comment_call
#--------------------------------------------------------------------------
alias :comment_call_ve_diagonal_move :comment_call
def comment_call
call_change_actor_diagonal
call_change_event_diagonal
comment_call_ve_diagonal_move
end
#--------------------------------------------------------------------------
# * New method: call_change_actor_diagonal
#--------------------------------------------------------------------------
def call_change_actor_diagonal
if note =~ //i
$game_player.diagonal_off if $1.upcase == "OFF"
$game_player.diagonal_on if $1.upcase == "ON"
end
end
#--------------------------------------------------------------------------
# * New method: call_change_event_diagonal
#--------------------------------------------------------------------------
def call_change_event_diagonal
if note =~ //i
$game_map.events[$1.to_i].diagonal_off if $2.upcase == "OFF"
$game_map.events[$1.to_i].diagonal_on if $2.upcase == "ON"
end
end
end
edit: just to clarify, I was deleting scripts three at a time. Once I found a batch, I started over with a fresh copy and deleted those one at a time, this is the only one I deleted for the F6 function to work.
 
Last edited by a moderator:

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,841
First Language
English
I have updated the script to support my region overlay and my passage overlay


Here's how it looks with both options enabled





Configure each overlay image separately in their own scripts.

wow very interesting. I have many scripts that seem like they would conflict with yours, but it was Victors diagonal movement script:


http://victorscripts.wordpress.com/rpg-maker-vx-ace/utility-scripts/diagonal-movement/


edit: just to clarify, I was deleting scripts three at a time. Once I found a batch, I started over with a fresh copy and deleted those one at a time, this is the only one I deleted for the F6 function to work.
Even with diagonal movement, I can take screenshots and mapshots just fine.


Maybe there is another script that is reserving F6?
 
Last edited by a moderator:

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
39,971
Reaction score
13,604
First Language
English
Primarily Uses
RMMV
Found a bug. Not using any of the overlays, just the base Mapshot script.

If I do a script call like this when I'm on map 20:

[1,2,3,4,5].each do |map| ms = Map_Saver.new(map) ms.mapshotendit gives me a single copy of map 20, not the ones I have listed. (Well, it gives me 5 copies, but each one overwrites the last)This is because Map_Saver.new(id) is what accepts the map id, but it doesn't save it or do anything with it.

The mapshot method calls redraw but doesn't pass any arguments, and redraw defaults the map id to $game_map.map_id.

I fixed it by making the initialize method put id into @map_id, and making redraw default the map_id to @map_id.

Also, if I have two maps that have the same display name, it overwrites one with the other. I added in the map id to the file name to make sure that didn't happen.

Great script - MUCH faster than I remember the old XP map screenshot taker to be!

Edit: the Passage Overlay and Region Overlay scripts also assume you're using the current map.
 
Last edited by a moderator:

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,290
Reaction score
11,700
First Language
English
Primarily Uses
RMVXA
I'm having problems with the link for the main script.  Both here and on your site all I get is an endless "connecting", it never seems to actually get there. The links for the add-ons work fine.

EDIT

Now working.  Perhaps it was something to do with my browser.
 
Last edited by a moderator:

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,290
Reaction score
11,700
First Language
English
Primarily Uses
RMVXA
I finally got round to trying out this script, and the first couple were just what I'd hope they'd be.  However, when I do a mapshot of an area with terrain damage, this is what comes up, instead of the usual green smear:

">http://

Is there anything to be done so that it shows up more like in-game?

Thanks.
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,290
Reaction score
11,700
First Language
English
Primarily Uses
RMVXA
Like in many games, I used the green smear from the A2 tab to indicate which were the 'poisoned' bits of floor.  They show up as the brown area.  The red shows the tile which has terrain damage.
 
Last edited by a moderator:

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,841
First Language
English
In the configuration there is an option called "Highlight_Damage = true"


Set that to false. The highlight is drawn over the tile and is half-transparent so it blends in with the tile, creating the brown color.
 
Last edited by a moderator:

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,290
Reaction score
11,700
First Language
English
Primarily Uses
RMVXA
Thanks very much
 

HeroUltraOmega

UltraNoob
Member
Joined
Nov 1, 2013
Messages
6
Reaction score
0
First Language
English
Primarily Uses
This is supposed to go under Materials in scripts, am I correct? Because I can't get this to work for some reason. Also this is the first script I'm ever using and don't have any others installed.

EDIt: I'm a dumb dumb, realized I need to actually be in game to use it.
 
Last edited by a moderator:

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,841
First Language
English
The script allows you to take pictures of your map when you playtest and hit F6 or F7.


How are you using it and what do you expect it to do?
 
Last edited by a moderator:

HeroUltraOmega

UltraNoob
Member
Joined
Nov 1, 2013
Messages
6
Reaction score
0
First Language
English
Primarily Uses
I was being dumb and didn't realize that I had to be in-game to be able to take the mapshots, I eventually found out how to work it.
 

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,841
First Language
English
Looking at the description above, I actually didn't specify that you should be in the game. That might be causing some confusion.
 
Last edited by a moderator:

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Dama wrote on akoniti's profile.
Hi
Thanks for your review.
I was checking the trailer for details and as the woman shut the door at the exact moment the song I was hearing said "you slim the door" and I couldn't resist to add it there. :D And I used this idea one more time on another scene.
Just doing some tileset tinkering again...
rux
Someone please help me make my game.
I need someone to volunteer, I am on my knees man.
I made my own pizza. First critique, more chicken next time.

Forum statistics

Threads
104,690
Messages
1,008,144
Members
136,182
Latest member
kingmart420
Top