#==============================================================================
# Faalco - Font Options
#------------------------------------------------------------------------------
# Com esse script você pode fazer modificiações nas fontes do RM
#==============================================================================
# Criado por: Faalco © 2013
#==============================================================================
Font.default_name = ["Quicksand_Book_Oblique"] # Subistitua Verdana pelo nome da Fonte
Font.default_size = 18 # Subistitua aqui pelo tamanho que quer a Fonte
Font.default_italic = true #true/false para ativar ou desativar o itálico
Font.default_bold = false #true/false para ativar ou desativar o negrito
Font.default_color = Color.new(255, 255, 255) #Muda a cor das fonte em RGB a cor
#padrão e branco (255, 255, 255) ~ (Muda apenas a cor do Title)
#===============================================================================
# ** Bitmap Additional Methods
# Autor: miguel8884
#-------------------------------------------------------------------------------
# Data de lançamento: 26/07/2014
# Versão: 2.0
#-------------------------------------------------------------------------------
# Dependências:
# * Nenhum
#-------------------------------------------------------------------------------
# Descrição:
#
# Adiciona alguns métodos novos na classe bitmap
#-------------------------------------------------------------------------------
# Características:
# * Quase todos o métodos das windows!
# * Alguns métodos adicionais!
#-------------------------------------------------------------------------------
# Log:
# v1.0
# 26/07/2014 - Script lançado!
# v2.0
# 11/08/2014 - Varias correções e um método novo!
#===============================================================================
#===============================================================================
# Classe bitmap com novos métodos adicionados
#===============================================================================
class Bitmap
def text_color(n)
Cache.system("Window").get_pixel(64 + (n % 8) * 8, 96 + (n / 8) * 8)
end
def normal_color; text_color(0); end;
def system_color; text_color(16); end;
def crisis_color; text_color(17); end;
def knockout_color; text_color(18); end;
def gauge_back_color; text_color(19); end;
def hp_gauge_color1; text_color(20); end;
def hp_gauge_color2; text_color(21); end;
def mp_gauge_color2; text_color(23); end;
def mp_gauge_color1; text_color(22); end;
def mp_cost_color; text_color(23); end;
def power_up_color; text_color(24); end;
def power_down_color; text_color(25); end;
def tp_gauge_color1; text_color(28); end;
def tp_gauge_color2; text_color(29); end;
def tp_cost_color; text_color(29); end;
def change_color(color)
font.color.set(color)
end
def create_icon(icon_index, x, y)
bitmap = Cache.system("Iconset")
rect = Rect.new(icon_index % 16 * 24, icon_index / 16 * 24, 24, 24)
blt(x, y, bitmap, rect)
end
def create_face(face_name, face_index, x, y)
bitmap = Cache.face(face_name)
rect = Rect.new(face_index % 4 * 96, face_index / 4 * 96, 96, 96)
blt(x, y, bitmap, rect)
bitmap.dispose
end
def create_character(character_name, character_index, x, y)
return unless character_name
bitmap = Cache.character(character_name)
sign = character_name[/^[\!\$]./]
if sign && sign.include?('$')
cw = bitmap.width / 3
ch = bitmap.height / 4
else
cw = bitmap.width / 12
ch = bitmap.height / 8
end
n = character_index
src_rect = Rect.new((n%4*3+1)*cw, (n/4*4)*ch, cw, ch)
blt(x - cw / 2, y - ch, bitmap, src_rect)
end
def create_actor_graphic(actor, x, y)
create_character(actor.character_name, actor.character_index, x, y)
end
def create_actor_face(actor, x, y)
create_face(actor.face_name, actor.face_index, x, y)
end
def create_actor_name(actor, x, y, width = 112)
change_color(hp_color(actor))
draw_text(x, y, width, line_height, actor.name)
end
def create_actor_class(actor, x, y, width = 112)
change_color(normal_color)
draw_text(x, y, width, line_height, actor.class.name)
end
def create_actor_nickname(actor, x, y, width = 180)
change_color(normal_color)
draw_text(x, y, width, line_height, actor.nickname)
end
def create_actor_level(actor, x, y)
change_color(system_color)
draw_text(x, y, 32, line_height, Vocab::level_a)
change_color(normal_color)
draw_text(x + 32, y, 24, line_height, actor.level, 2)
end
def create_actor_icons(actor, x, y, width = 96)
icons = (actor.state_icons + actor.buff_icons)[0, width / 24]
icons.each_with_index {|n, i| create_icon(n, x + 24 * i, y) }
end
def create_gauge(x, y, width, rate, color1, color2)
fill_w = (width * rate).to_i
gauge_y = y + line_height - 8
fill_rect(x, gauge_y, width, 6, gauge_back_color)
gradient_fill_rect(x, gauge_y, fill_w, 6, color1, color2)
end
def create_border(size, color)
bw = self.width
bh = self.height
rect1 = Rect.new(0,0,size,bh)
rect2 = Rect.new(size,0,bw-size*2,size)
rect3 = Rect.new(size,bh-size,bw-size*2,size)
rect4 = Rect.new(bw-size,0,size,bh)
fill_rect(rect1, color)
fill_rect(rect2, color)
fill_rect(rect3, color)
fill_rect(rect4, color)
end
def create_actor_equip(actor,x,y,id)
create_icon(actor.equips[id].icon_index,x,y)
end
def create_actor_atributes(actor,atribute,x,y,align = 1,size = 24,width = 100,height = 40)
case atribute
when "attack"
atribute = actor.atk
when "defense"
atribute = actor.def
when "agility"
atribute = actor.agi
when "hp"
atribute = actor.hp
when "mhp"
atribute = actor.mhp
when "mp"
atribute = actor.mp
when "mmp"
atribute = actor.mmp
when "luck"
atribute = actor.luck
when "mag_attack"
atribute = actor.mat
when "mag_defense"
atribute = actor.mdf
end
draw_text(x,y,width,height,atribute,align)
end
def create_current_and_max_values(x, y, width, current, max, color1, color2)
change_color(color1)
xr = x + width
if width < 96
draw_text(xr - 40, y, 42, line_height, current, 2)
else
draw_text(xr - 92, y, 42, line_height, current, 2)
change_color(color2)
draw_text(xr - 52, y, 12, line_height, "/", 2)
draw_text(xr - 42, y, 42, line_height, max, 2)
end
end
def line_height
return 24
end
end
#===============================================================================
# YIA Simple Menu (requested by GreyInvidia)
# By YesImAaron
#
# IF USED MUST CREDIT
# YesImAaron
#===============================================================================
# This script set's up a simple menu at the bottom center of the screen
# The only commands in the menu are Items Save and Exit.
#===============================================================================
#===============================================================================
module YIA
#===============================================================================
# XPOS = x position of the menu
# YPOS = y position of the menu
# WIDTH = width of the menu
#===============================================================================
XPOS = 130
YPOS = 350
WIDTH = 300
end
#===============================================================================
# EDIT PAST HERE AT YOUR OWN RISK
#==============================================================================
# ** Window_YIA_Menu
#------------------------------------------------------------------------------
# This set's up the command window
#==============================================================================
class Window_YIA_Menu < Window_HorzCommand
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize(x, y, width)
@window_width = width
super(x, y)
end
#--------------------------------------------------------------------------
# * Get Window Width
#--------------------------------------------------------------------------
def window_width
@window_width
end
#--------------------------------------------------------------------------
# * Get Digit Count
#--------------------------------------------------------------------------
def col_max
return 3
end
#--------------------------------------------------------------------------
# * Create Command List
#--------------------------------------------------------------------------
def make_command_list
add_command(Vocab::item, :item)
add_command(Vocab::save, :save)
add_command(Vocab::game_end, :game_end)
end
end
class Scene_Map < Scene_Base
#--------------------------------------------------------------------------
# * Call Menu Screen
#--------------------------------------------------------------------------
alias :yia_call_menu call_menu
def call_menu
yia_call_menu
Sound.play_ok
SceneManager.call(Scene_YIA_Menu)
Window_MenuCommand::init_command_position
end
end
class Scene_YIA_Menu < Scene_MenuBase
#--------------------------------------------------------------------------
# * Start Processing
#--------------------------------------------------------------------------
def start
super
create_command_window
end
#--------------------------------------------------------------------------
# * Create Command Window
#--------------------------------------------------------------------------
def create_command_window
@command_window = Window_YIA_Menu.new(YIA::XPOS,YIA::YPOS,YIA::WIDTH)
@command_window.set_handler(:item, method(:command_item))
@command_window.set_handler(:save, method(:command_save))
@command_window.set_handler(:game_end, method(:command_game_end))
@command_window.set_handler(:cancel, method(:return_scene))
end
#--------------------------------------------------------------------------
# * [Item] Command
#--------------------------------------------------------------------------
def command_item
SceneManager.call(Scene_Item)
end
#--------------------------------------------------------------------------
# * [Save] Command
#--------------------------------------------------------------------------
def command_save
SceneManager.call(Scene_Save)
end
#--------------------------------------------------------------------------
# * [Exit Game] Command
#--------------------------------------------------------------------------
def command_game_end
SceneManager.call(Scene_End)
end
#--------------------------------------------------------------------------
# * Return to Calling Scene
#--------------------------------------------------------------------------
def return_scene
SceneManager.call(Scene_Map)
end
end
#=============================================================================#
#======================# #======================#
#======================# Flashlight BG #======================#
#======================# by #======================#
#======================# Gousenfire #======================#
#======================# Versão: 1.2 #======================#
#=============================================================================#
#=============================================================================#
# #
# Configurações #
# #
#=============================================================================#
module FlashlightModule
# Opacidade da imagem da lanterna 0 = Transparente / 255 = Preto
Opacity = 220
# Switch que mostra que está de noite
Switch1 = 1
# Nome da imagem na pasta pictures
Image = "lanterna2"
# ID, no database, do item que representa as pilhas
Batery = 2
# ID, no database, do item que representa a lanterna
FlashL = 1
# Botão que liga a lanterna
Buttom = :L # Aperte F1 ao iniciar o jogo para ver a lista de botoes
# Tempo (em frames) para se perder uma pilha
Time = 99999999999999999999999999999999999999999999999 # 60 framses = 1 segundo
# SE tocada quando ocorre algum erro
SEE = "Buzzer1"
# SE tocada quando liga a lanterna
SET = "Cursor2"
# Ficar escuro quando a Switch1 estiver ligada?
Dark = true
end
#=============================================================================#
# #
# Código Fonte #
# (Não altere essa parte sem a permissão do criador) #
#=============================================================================#
class Spriteset_Map
include FlashlightModule
alias fl_initialize initialize
alias fl_update update
alias fl_dispose dispose
def initialize
@laternIMG, @laternIMG.bitmap = Sprite.new, Cache.picture(Image)
@laternIMG.z = 998
@laternIMG.opacity = Opacity
@laternIMG.visible = false
@darkBM, @darkBM.bitmap = Sprite.new
@darkBM.bitmap = Bitmap.new(1088,1200)
@darkBM.x = 0
@darkBM.y = 0
@darkBM.z = 999
@darkBM.bitmap.fill_rect(@darkBM.bitmap.rect, Color.new(0, 0, 0))
@darkBM.opacity = Opacity
@darkBM.visible = false
@darkBM.update
@lanterOnOrOff = false # variable that controlls if the lantern is on or off
@isDark = false # variable that controlls if is dark or not
@haveEnoughtBaterys = false # variable that controll if the player have enought baterys to turn on the lantern
@haveTheLanter # variable that check if the player has the item Lanter
fl_initialize
end
def update
# if the buttun is pressed change the variable to the opisit
if Input.trigger?(Buttom)
if @lanterOnOrOff
@lanterOnOrOff = false
Audio.se_play("Audio/SE/" + SET, 70, 100)
else
if @isDark && @haveEnoughtBaterys && @haveTheLanter
@lanterOnOrOff = true
Audio.se_play("Audio/SE/" + SET, 70, 100)
else
Audio.se_play("Audio/SE/" + SEE, 70, 100)
end
end
end
if @lanterOnOrOff && (!@isDark || !@haveEnoughtBaterys || !@haveTheLanter)
@lanterOnOrOff = false
Audio.se_play("Audio/SE/" + SET, 70, 100)
end
# check if the player has the item lanter in the inventory
if $game_party.item_number($data_items[FlashL]) > 0
@haveTheLanter = true
else
@haveTheLanter = false
end
# Check if the player has batery in the inventory
if $game_party.item_number($data_items[Batery]) > 0
@haveEnoughtBaterys = true
else
@haveEnoughtBaterys = false
end
# transform the switch in a variable
if $game_switches[Switch1]
@isDark = true
if Dark
if !@lanterOnOrOff
dark_the_sky
else
light_up_yhe_sky
end
end
else
@isDark = false
if Dark
light_up_yhe_sky
end
end
# call the right met
if @lanterOnOrOff
lanter_is_on
else
latern_is_off
end
fl_update # call update
end
def lanter_is_on
@laternIMG.visible = true
if Graphics.frame_count % Time == 0
$game_party.lose_item($data_items[Batery], 1)
end
case $game_player.direction
when 2
@laternIMG.angle, @coord = 0, [544, 586]
when 8
@laternIMG.angle, @coord = 180, [-544, -565]
when 6
@laternIMG.angle, @coord = 90, [576, -522]
when 4
@laternIMG.angle, @coord = 270, [-576, 570]
end
@laternIMG.x = $game_player.screen_x - @coord[0]
@laternIMG.y = $game_player.screen_y - @coord[1]
@laternIMG.update
end
def latern_is_off
@laternIMG.visible = false
@lanterOnOrOff = false
@laternIMG.update
end
def dark_the_sky
@darkBM.visible = true
@darkBM.update
end
def light_up_yhe_sky
@darkBM.visible = false
@darkBM.update
end
def dispose
latern_is_off
light_up_yhe_sky
fl_dispose
end
end
#=======================================================
# Fix Picture
# Autor: Raizen
# Exclusividade da comunidade : www.centrorpg.com
# O script fixa qualquer imagem na posição (0,0) que contém o
# prefixo (FIX), e assim posibilita ao maker fazer
# iluminações e panomaps com essa imagem fixa.
#=======================================================
class Sprite_Picture < Sprite
alias raizen_picture_update update_position
def update_position
@picture.name.include?("(FIX)") ? update_position_raizen : raizen_picture_update
end
def update_position_raizen
self.x = -$game_map.display_x*32
self.y = -$game_map.display_y*32
self.z = @picture.number
end
end
#==============================================================================
#
# ▼ Yanfly Engine Ace - Parallax Lock v1.00
# -- Last Updated: 2012.02.19
# -- Level: Normal
# -- Requires: n/a
#
#==============================================================================
$imported = {} if $imported.nil?
$imported["YEA-ParallaxLock"] = true
#==============================================================================
# ▼ Updates
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# 2012.02.19 - Started Script and Finished.
#
#==============================================================================
# ▼ Introduction
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# This script gives developers the ability to lock a map's parallax and cause
# it to not scroll by either vertically, horizontally, or both. Furthermore,
# this script also enables tile locking the map parallax, allowing the parallax
# to only move in conjunction with the player.
#
#==============================================================================
# ▼ Instructions
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# To install this script, open up your script editor and copy/paste this script
# to an open slot below ▼ Materials/素材 but above ▼ Main. Remember to save.
#
# -----------------------------------------------------------------------------
# Map Notetags - These notetags go in the map notebox in a map's properties.
# -----------------------------------------------------------------------------
# <lock parallax x>
# This prevents the map's parallax from scrolling horizontally.
#
# <lock parallax y>
# This prevents the map's parallax from scrolling vertically.
#
# <full lock parallax>
# This prevents the map's parallax from scrolling at all.
#
# <tile lock parallax>
# This causes the map's parallax to be locked to tiles and scrolls with them.
#
#==============================================================================
# ▼ Compatibility
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# This script is made strictly for RPG Maker VX Ace. It is highly unlikely that
# it will run with RPG Maker VX without adjusting.
#
#==============================================================================
# ▼ Editting anything past this point may potentially result in causing
# computer damage, incontinence, explosion of user's head, coma, death, and/or
# halitosis so edit at your own risk.
#==============================================================================
module YEA
module REGEXP
module MAP
LOCK_PARALLAX_X = /<(?:LOCK_PARALLAX_X|lock parallax x)>/i
LOCK_PARALLAX_Y = /<(?:LOCK_PARALLAX_Y|lock parallax y)>/i
FULL_LOCK_PARALLAX = /<(?:FULL_LOCK_PARALLAX|full lock parallax)>/i
TILE_LOCK_PARALLAX = /<(?:TILE_LOCK_PARALLAX|tile lock parallax)>/i
end # MAP
end # REGEXP
end # YEA
#==============================================================================
# ■ RPG::Map
#==============================================================================
class RPG::Map
#--------------------------------------------------------------------------
# public instance variables
#--------------------------------------------------------------------------
attr_accessor :parallax_lock_x
attr_accessor :parallax_lock_y
attr_accessor :parallax_tile_lock
#--------------------------------------------------------------------------
# common cache: load_notetags_paralock
#--------------------------------------------------------------------------
def load_notetags_paralock
@parallax_lock_x = false
@parallax_lock_y = false
@parallax_tile_lock = false
#---
self.note.split(/[\r\n]+/).each { |line|
case line
#---
when YEA::REGEXP::MAP::LOCK_PARALLAX_X
@parallax_lock_x = true
@parallax_tile_lock = false
when YEA::REGEXP::MAP::LOCK_PARALLAX_Y
@parallax_lock_y = true
@parallax_tile_lock = false
when YEA::REGEXP::MAP::FULL_LOCK_PARALLAX
@parallax_lock_x = true
@parallax_lock_y = true
@parallax_tile_lock = false
when YEA::REGEXP::MAP::TILE_LOCK_PARALLAX
@parallax_lock_x = false
@parallax_lock_y = false
@parallax_tile_lock = true
#---
end
} # self.note.split
#---
end
end # RPG::Map
#==============================================================================
# ■ Game_Map
#==============================================================================
class Game_Map
#--------------------------------------------------------------------------
# alias method: setup
#--------------------------------------------------------------------------
alias game_map_setup_parallax_paralock setup_parallax
def setup_parallax
@map.load_notetags_paralock
game_map_setup_parallax_paralock
end
#--------------------------------------------------------------------------
# new method: parallax_lock_x?
#--------------------------------------------------------------------------
def parallax_lock_x?
return @map.parallax_lock_x
end
#--------------------------------------------------------------------------
# new method: parallax_lock_y?
#--------------------------------------------------------------------------
def parallax_lock_y?
return @map.parallax_lock_y
end
#--------------------------------------------------------------------------
# new method: parallax_tile_lock?
#--------------------------------------------------------------------------
def parallax_tile_lock?
return @map.parallax_tile_lock
end
#--------------------------------------------------------------------------
# alias method: parallax_ox
#--------------------------------------------------------------------------
alias game_map_parallax_ox_paralock parallax_ox
def parallax_ox(bitmap)
return 0 if parallax_lock_x?
return @display_x * 32 if parallax_tile_lock?
return game_map_parallax_ox_paralock(bitmap)
end
#--------------------------------------------------------------------------
# alias method: parallax_oy
#--------------------------------------------------------------------------
alias game_map_parallax_oy_paralock parallax_oy
def parallax_oy(bitmap)
return 0 if parallax_lock_y?
return @display_y * 32 if parallax_tile_lock?
return game_map_parallax_oy_paralock(bitmap)
end
end # Game_Map
#==============================================================================
#
# ▼ End of File
#
#==============================================================================
#==============================================================================
# Screenshot do Mapa Completo [VXA]
#------------------------------------------------------------------------------
# Tira uma screenshot de todo o mapa onde está localizado e armazena em um
# arquivo.
#------------------------------------------------------------------------------
# Autor : Kyo Panda
# Conversão : Gab!
# Site : http://www.mundorpgmaker.com/
# Versão : 1.0
# Lançado em : 23 de Abril de 2011
#==============================================================================
#==============================================================================
# Agradecimentos:
#------------------------------------------------------------------------------
# • Falco :
# * Pelo módulo PNG utilizado na gravação das imagens.
# • Lu Sd 04 // stif.alown // Guedes:
# * Por ajudar na localização dos bugs do script.
#==============================================================================
#==============================================================================
# Como usar:
#------------------------------------------------------------------------------
#
# #--------------------------------------------------------------------------
# # Instalação
# #--------------------------------------------------------------------------
#
# • Cole o script abaixo dos "▼ Scripts Adicionais" e acima do "▼ Principal"
# no Editor de Scripts do RPG Maker VX.
#
# • Configure o script na área "Configuração" logo abaixo, se desejar.
#
#==============================================================================
#==============================================================================
# Para scripters:
#------------------------------------------------------------------------------
# • $game_map.snap_to_bitmap
# Executa o comando de screenshot do mapa.
#==============================================================================
#==============================================================================
# Histórico de versões:
#------------------------------------------------------------------------------
# • 1.0 - 23 de Abril de 2011:
# * Primeira versão do script.
# • 2.0 - 24 de Agosto de 2012:
# * Versão para RPG Maker VX Ace; funcional
#==============================================================================
#==============================================================================
# Map_ScreenshotSettings
#------------------------------------------------------------------------------
# Módulo de configuração do script Screenshot do Mapa.
#==============================================================================
module Map_ScreenshotSettings
#--------------------------------------------------------------------------
# Configuração
#--------------------------------------------------------------------------
# Defina aqui se o script estará ativo ou não.
# Defina true para ativar e false para desativar
SCRIPT_ACTIVE = true
# Defina aqui o nome da pasta onde suas screenshots serão armazenadas.
# Se nenhuma pasta for definida, as screenshots serão gravadas na pasta
# principal do seu projeto.
# Defina o nome da pasta entre apóstrofos ('') ou aspas ("").
# Defina como '', "" ou nil, para não utilizar uma pasta em especial.
DIRECTORY = "Screenshots"
# Defina aqui o modo atribuído ao nome da screenshot que será armazenada.
# Utilize a tag "%m" para que seja definido o nome do mapa.
# Utilize a tag "%{n}d" para definir a quantidade de números que será
# atribuído ao nome. Onde {n} siginifica o número de digitos no nome.
# Se não for definido a tag "%{n}d", o número será adicionado ao final do
# nome, por padrão.
# Defina o nome entre apóstrofos ('') ou aspas ("").
FILENAME = "%4d - %m"
# Defina aqui a tecla utilizada para se tirar a screenshot do mapa.
# Defina a tecla entre apóstrofes ('') ou aspas ("").
# As teclas disponíveis serão mostradas à seguir, pela configuração padrão
# do RPG Maker VX.
#
# Letra : Tecla
#----------------------
# A : Shift
# B : X, Esc, 0
# C : Z, Enter, Espaço
# L : Q
# R : W
# X : A
# Y : S
# Z : D
INPUT = :Y
# Defina aqui se deseja exibir uma mensagem de que a screenshot foi
# processada.
MESSAGE_ACTIVE = true
# Defina aqui a mensagem exibida antes que a screenshot seja processada.
MESSAGE1 = "Gerando Screenshot..."
# Defina aqui a mensagem exibida após a screenshot ser processada.
MESSAGE2 = "Screenshot criada com sucesso!"
#--------------------------------------------------------------------------
# Fim da configuração
#--------------------------------------------------------------------------
# Criação da pasta de armazenamento de screenshots do mapa
if !DIRECTORY.nil? && !DIRECTORY.empty?
Dir.mkdir(DIRECTORY) if !Dir.entries("./").include?(DIRECTORY)
end
end
if Map_ScreenshotSettings::SCRIPT_ACTIVE
class Game_Map
def snap_to_bitmap
def updateMap
Graphics.update
SceneManager.scene.spriteset.update
end
oldpos = [@display_x, @display_y]
gw, gh = Graphics.width, Graphics.height
bitmap = Bitmap.new(@map.width * 32, @map.height * 32)
sampleRect = Rect.new(0, 0, gw, gh)
(bitmap.height/gh.to_f).ceil.times{|i|
(bitmap.width/gw.to_f).ceil.times{|j|
y = gh * i > bitmap.height - gh ? bitmap.height - gh : gh * i
x = gw * j > bitmap.width - gw ? bitmap.width - gw : gw * j
set_display_pos(x/32,y/32)
updateMap
bitmap.blt(x, y, Graphics.snap_to_bitmap, sampleRect)
}
}
set_display_pos(*oldpos)
updateMap
msgbox(Map_ScreenshotSettings::MESSAGE1) if Map_ScreenshotSettings::MESSAGE_ACTIVE
fullname = File.join(Map_ScreenshotSettings::DIRECTORY, "Screenshot#{Time.new.to_i}.png")
bitmap.save(fullname)
msgbox(Map_ScreenshotSettings::MESSAGE2) if Map_ScreenshotSettings::MESSAGE_ACTIVE
end
end
class Bitmap
def save(file_name)
def chunk(type, data)
[data.size, type, data, Zlib.crc32(type + data)].pack("NA4A*N")
end
img_data = ""
width, height = self.width, self.height
for j in 0...(height)
img_data << "\0"
for i in 0...(width)
pos_c = self.get_pixel(i, j)
img_data << [pos_c.red, pos_c.green, pos_c.blue, pos_c.alpha].pack("C*")
end
end
c = [
"\x89PNG\r\n\x1a\n",
chunk("IHDR", [width, height, 8, 6, 0, 0, 0].pack("N2C5")),
chunk("IDAT", Zlib::Deflate.deflate(img_data)),
chunk("IEND", "")
]
File.open(file_name, "wb"){|file| c.each{|chunk| file.write(chunk) }}
end
end
class Scene_Map
attr_reader :spriteset
alias mapscreenshot_update update
def update(*args)
mapscreenshot_update(*args)
return unless Input.trigger?(Map_ScreenshotSettings::INPUT)
$game_map.snap_to_bitmap
end
end
end
Citação de: Mistis online 26/07/2017 às 05:51
YobidashimasuInformações básicas:Nome do criador:Mistis
Gênero:Terror
Data de inicialização:24/07/17
Equipe:
[box class=titlebg]Introdução ao projeto:[/box]Estava trabalhando no meu antigo projeto "O Lorde" porem por ser uma historia muito complexa, grande e difícil de passar para o rpg maker decidi criar pequenos projetos antes para ganhar mais experiencia, então comecei a pensar em um novo projeto tive muitas ideias, mas no fim a que se tornou a escolhida para sair do papel foi essa.
[box class=titlebg]História e personagens:[/box]Sinopse: Um escritor e sua mulher, decide se mudar para casa de seu falecido pai, uma cabana que foi passa de geração em geração na família dos Nishimotos. Então nessa cabana antiga Tatsuo encontra o Yobidashimasu, um livro que contém um ritual. Quando alguém lê o ritual em voz alta, um espirito sai para amaldiçoar quem leu e todos próximos a ele.Personagens:[box class=titlebg]
Tasuo Nishimoto: Tasuo decide ir passar as ferias no interior com sua recém mulher Hoshi Ogawa. Nunca foi uma pessoa religiosa, muitas vezes até mesmo esnobava quem acreditava em espíritos e deuses. O verdadeiro motivo de se mudar, foi para ficar longe do barulho da cidade grande é para poder terminar seu livro de suspense em paz.
Hoshi Ogawa: Hoshi sempre foi uma mulher calma e concentrada. Aceitou se mudar com seu marido para o interior, pois encontrou uma grande oportunidade de ampliar seu conhecimento em violoncelo e conseguir desenvolver melhor sua nova musica "S.ó.S", pois sua nova casa seria afastada de qualquer civilização.
Miki: Gato preto de Hoshi OgawaVídeo[/box]Esse vídeo é mais pra pedir para vocês avaliar o "sistema" de descrição que eu fiz no projeto, queria deixar algo pra ficar na imaginação do jogar.(Aceito críticas construtivas sobre isso)Spoiler
[close]
[box class=titlebg]Sistemas e scripts:[/box]
Faalco - Font Optionsmiguel8884 - Bitmap Additional MethodsSpoiler
Código Selecionar#==============================================================================
# Faalco - Font Options
#------------------------------------------------------------------------------
# Com esse script você pode fazer modificiações nas fontes do RM
#==============================================================================
# Criado por: Faalco © 2013
#==============================================================================
Font.default_name = ["Quicksand_Book_Oblique"] # Subistitua Verdana pelo nome da Fonte
Font.default_size = 18 # Subistitua aqui pelo tamanho que quer a Fonte
Font.default_italic = true #true/false para ativar ou desativar o itálico
Font.default_bold = false #true/false para ativar ou desativar o negrito
Font.default_color = Color.new(255, 255, 255) #Muda a cor das fonte em RGB a cor
#padrão e branco (255, 255, 255) ~ (Muda apenas a cor do Title)[close]YesImAaron - YIA Simple MenuSpoiler
Código Selecionar#===============================================================================
# ** Bitmap Additional Methods
# Autor: miguel8884
#-------------------------------------------------------------------------------
# Data de lançamento: 26/07/2014
# Versão: 2.0
#-------------------------------------------------------------------------------
# Dependências:
# * Nenhum
#-------------------------------------------------------------------------------
# Descrição:
#
# Adiciona alguns métodos novos na classe bitmap
#-------------------------------------------------------------------------------
# Características:
# * Quase todos o métodos das windows!
# * Alguns métodos adicionais!
#-------------------------------------------------------------------------------
# Log:
# v1.0
# 26/07/2014 - Script lançado!
# v2.0
# 11/08/2014 - Varias correções e um método novo!
#===============================================================================
#===============================================================================
# Classe bitmap com novos métodos adicionados
#===============================================================================
class Bitmap
def text_color(n)
Cache.system("Window").get_pixel(64 + (n % 8) * 8, 96 + (n / 8) * 8)
end
def normal_color; text_color(0); end;
def system_color; text_color(16); end;
def crisis_color; text_color(17); end;
def knockout_color; text_color(18); end;
def gauge_back_color; text_color(19); end;
def hp_gauge_color1; text_color(20); end;
def hp_gauge_color2; text_color(21); end;
def mp_gauge_color2; text_color(23); end;
def mp_gauge_color1; text_color(22); end;
def mp_cost_color; text_color(23); end;
def power_up_color; text_color(24); end;
def power_down_color; text_color(25); end;
def tp_gauge_color1; text_color(28); end;
def tp_gauge_color2; text_color(29); end;
def tp_cost_color; text_color(29); end;
def change_color(color)
font.color.set(color)
end
def create_icon(icon_index, x, y)
bitmap = Cache.system("Iconset")
rect = Rect.new(icon_index % 16 * 24, icon_index / 16 * 24, 24, 24)
blt(x, y, bitmap, rect)
end
def create_face(face_name, face_index, x, y)
bitmap = Cache.face(face_name)
rect = Rect.new(face_index % 4 * 96, face_index / 4 * 96, 96, 96)
blt(x, y, bitmap, rect)
bitmap.dispose
end
def create_character(character_name, character_index, x, y)
return unless character_name
bitmap = Cache.character(character_name)
sign = character_name[/^[\!\$]./]
if sign && sign.include?('$')
cw = bitmap.width / 3
ch = bitmap.height / 4
else
cw = bitmap.width / 12
ch = bitmap.height / 8
end
n = character_index
src_rect = Rect.new((n%4*3+1)*cw, (n/4*4)*ch, cw, ch)
blt(x - cw / 2, y - ch, bitmap, src_rect)
end
def create_actor_graphic(actor, x, y)
create_character(actor.character_name, actor.character_index, x, y)
end
def create_actor_face(actor, x, y)
create_face(actor.face_name, actor.face_index, x, y)
end
def create_actor_name(actor, x, y, width = 112)
change_color(hp_color(actor))
draw_text(x, y, width, line_height, actor.name)
end
def create_actor_class(actor, x, y, width = 112)
change_color(normal_color)
draw_text(x, y, width, line_height, actor.class.name)
end
def create_actor_nickname(actor, x, y, width = 180)
change_color(normal_color)
draw_text(x, y, width, line_height, actor.nickname)
end
def create_actor_level(actor, x, y)
change_color(system_color)
draw_text(x, y, 32, line_height, Vocab::level_a)
change_color(normal_color)
draw_text(x + 32, y, 24, line_height, actor.level, 2)
end
def create_actor_icons(actor, x, y, width = 96)
icons = (actor.state_icons + actor.buff_icons)[0, width / 24]
icons.each_with_index {|n, i| create_icon(n, x + 24 * i, y) }
end
def create_gauge(x, y, width, rate, color1, color2)
fill_w = (width * rate).to_i
gauge_y = y + line_height - 8
fill_rect(x, gauge_y, width, 6, gauge_back_color)
gradient_fill_rect(x, gauge_y, fill_w, 6, color1, color2)
end
def create_border(size, color)
bw = self.width
bh = self.height
rect1 = Rect.new(0,0,size,bh)
rect2 = Rect.new(size,0,bw-size*2,size)
rect3 = Rect.new(size,bh-size,bw-size*2,size)
rect4 = Rect.new(bw-size,0,size,bh)
fill_rect(rect1, color)
fill_rect(rect2, color)
fill_rect(rect3, color)
fill_rect(rect4, color)
end
def create_actor_equip(actor,x,y,id)
create_icon(actor.equips[id].icon_index,x,y)
end
def create_actor_atributes(actor,atribute,x,y,align = 1,size = 24,width = 100,height = 40)
case atribute
when "attack"
atribute = actor.atk
when "defense"
atribute = actor.def
when "agility"
atribute = actor.agi
when "hp"
atribute = actor.hp
when "mhp"
atribute = actor.mhp
when "mp"
atribute = actor.mp
when "mmp"
atribute = actor.mmp
when "luck"
atribute = actor.luck
when "mag_attack"
atribute = actor.mat
when "mag_defense"
atribute = actor.mdf
end
draw_text(x,y,width,height,atribute,align)
end
def create_current_and_max_values(x, y, width, current, max, color1, color2)
change_color(color1)
xr = x + width
if width < 96
draw_text(xr - 40, y, 42, line_height, current, 2)
else
draw_text(xr - 92, y, 42, line_height, current, 2)
change_color(color2)
draw_text(xr - 52, y, 12, line_height, "/", 2)
draw_text(xr - 42, y, 42, line_height, max, 2)
end
end
def line_height
return 24
end
end[close]Gousenfire - Flashlight BGSpoiler
Código Selecionar#===============================================================================
# YIA Simple Menu (requested by GreyInvidia)
# By YesImAaron
#
# IF USED MUST CREDIT
# YesImAaron
#===============================================================================
# This script set's up a simple menu at the bottom center of the screen
# The only commands in the menu are Items Save and Exit.
#===============================================================================
#===============================================================================
module YIA
#===============================================================================
# XPOS = x position of the menu
# YPOS = y position of the menu
# WIDTH = width of the menu
#===============================================================================
XPOS = 130
YPOS = 350
WIDTH = 300
end
#===============================================================================
# EDIT PAST HERE AT YOUR OWN RISK
#==============================================================================
# ** Window_YIA_Menu
#------------------------------------------------------------------------------
# This set's up the command window
#==============================================================================
class Window_YIA_Menu < Window_HorzCommand
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize(x, y, width)
@window_width = width
super(x, y)
end
#--------------------------------------------------------------------------
# * Get Window Width
#--------------------------------------------------------------------------
def window_width
@window_width
end
#--------------------------------------------------------------------------
# * Get Digit Count
#--------------------------------------------------------------------------
def col_max
return 3
end
#--------------------------------------------------------------------------
# * Create Command List
#--------------------------------------------------------------------------
def make_command_list
add_command(Vocab::item, :item)
add_command(Vocab::save, :save)
add_command(Vocab::game_end, :game_end)
end
end
class Scene_Map < Scene_Base
#--------------------------------------------------------------------------
# * Call Menu Screen
#--------------------------------------------------------------------------
alias :yia_call_menu call_menu
def call_menu
yia_call_menu
Sound.play_ok
SceneManager.call(Scene_YIA_Menu)
Window_MenuCommand::init_command_position
end
end
class Scene_YIA_Menu < Scene_MenuBase
#--------------------------------------------------------------------------
# * Start Processing
#--------------------------------------------------------------------------
def start
super
create_command_window
end
#--------------------------------------------------------------------------
# * Create Command Window
#--------------------------------------------------------------------------
def create_command_window
@command_window = Window_YIA_Menu.new(YIA::XPOS,YIA::YPOS,YIA::WIDTH)
@command_window.set_handler(:item, method(:command_item))
@command_window.set_handler(:save, method(:command_save))
@command_window.set_handler(:game_end, method(:command_game_end))
@command_window.set_handler(:cancel, method(:return_scene))
end
#--------------------------------------------------------------------------
# * [Item] Command
#--------------------------------------------------------------------------
def command_item
SceneManager.call(Scene_Item)
end
#--------------------------------------------------------------------------
# * [Save] Command
#--------------------------------------------------------------------------
def command_save
SceneManager.call(Scene_Save)
end
#--------------------------------------------------------------------------
# * [Exit Game] Command
#--------------------------------------------------------------------------
def command_game_end
SceneManager.call(Scene_End)
end
#--------------------------------------------------------------------------
# * Return to Calling Scene
#--------------------------------------------------------------------------
def return_scene
SceneManager.call(Scene_Map)
end
end[close]Raizen - Fix PictureSpoiler
Código Selecionar#=============================================================================#
#======================# #======================#
#======================# Flashlight BG #======================#
#======================# by #======================#
#======================# Gousenfire #======================#
#======================# Versão: 1.2 #======================#
#=============================================================================#
#=============================================================================#
# #
# Configurações #
# #
#=============================================================================#
module FlashlightModule
# Opacidade da imagem da lanterna 0 = Transparente / 255 = Preto
Opacity = 220
# Switch que mostra que está de noite
Switch1 = 1
# Nome da imagem na pasta pictures
Image = "lanterna2"
# ID, no database, do item que representa as pilhas
Batery = 2
# ID, no database, do item que representa a lanterna
FlashL = 1
# Botão que liga a lanterna
Buttom = :L # Aperte F1 ao iniciar o jogo para ver a lista de botoes
# Tempo (em frames) para se perder uma pilha
Time = 99999999999999999999999999999999999999999999999 # 60 framses = 1 segundo
# SE tocada quando ocorre algum erro
SEE = "Buzzer1"
# SE tocada quando liga a lanterna
SET = "Cursor2"
# Ficar escuro quando a Switch1 estiver ligada?
Dark = true
end
#=============================================================================#
# #
# Código Fonte #
# (Não altere essa parte sem a permissão do criador) #
#=============================================================================#
class Spriteset_Map
include FlashlightModule
alias fl_initialize initialize
alias fl_update update
alias fl_dispose dispose
def initialize
@laternIMG, @laternIMG.bitmap = Sprite.new, Cache.picture(Image)
@laternIMG.z = 998
@laternIMG.opacity = Opacity
@laternIMG.visible = false
@darkBM, @darkBM.bitmap = Sprite.new
@darkBM.bitmap = Bitmap.new(1088,1200)
@darkBM.x = 0
@darkBM.y = 0
@darkBM.z = 999
@darkBM.bitmap.fill_rect(@darkBM.bitmap.rect, Color.new(0, 0, 0))
@darkBM.opacity = Opacity
@darkBM.visible = false
@darkBM.update
@lanterOnOrOff = false # variable that controlls if the lantern is on or off
@isDark = false # variable that controlls if is dark or not
@haveEnoughtBaterys = false # variable that controll if the player have enought baterys to turn on the lantern
@haveTheLanter # variable that check if the player has the item Lanter
fl_initialize
end
def update
# if the buttun is pressed change the variable to the opisit
if Input.trigger?(Buttom)
if @lanterOnOrOff
@lanterOnOrOff = false
Audio.se_play("Audio/SE/" + SET, 70, 100)
else
if @isDark && @haveEnoughtBaterys && @haveTheLanter
@lanterOnOrOff = true
Audio.se_play("Audio/SE/" + SET, 70, 100)
else
Audio.se_play("Audio/SE/" + SEE, 70, 100)
end
end
end
if @lanterOnOrOff && (!@isDark || !@haveEnoughtBaterys || !@haveTheLanter)
@lanterOnOrOff = false
Audio.se_play("Audio/SE/" + SET, 70, 100)
end
# check if the player has the item lanter in the inventory
if $game_party.item_number($data_items[FlashL]) > 0
@haveTheLanter = true
else
@haveTheLanter = false
end
# Check if the player has batery in the inventory
if $game_party.item_number($data_items[Batery]) > 0
@haveEnoughtBaterys = true
else
@haveEnoughtBaterys = false
end
# transform the switch in a variable
if $game_switches[Switch1]
@isDark = true
if Dark
if !@lanterOnOrOff
dark_the_sky
else
light_up_yhe_sky
end
end
else
@isDark = false
if Dark
light_up_yhe_sky
end
end
# call the right met
if @lanterOnOrOff
lanter_is_on
else
latern_is_off
end
fl_update # call update
end
def lanter_is_on
@laternIMG.visible = true
if Graphics.frame_count % Time == 0
$game_party.lose_item($data_items[Batery], 1)
end
case $game_player.direction
when 2
@laternIMG.angle, @coord = 0, [544, 586]
when 8
@laternIMG.angle, @coord = 180, [-544, -565]
when 6
@laternIMG.angle, @coord = 90, [576, -522]
when 4
@laternIMG.angle, @coord = 270, [-576, 570]
end
@laternIMG.x = $game_player.screen_x - @coord[0]
@laternIMG.y = $game_player.screen_y - @coord[1]
@laternIMG.update
end
def latern_is_off
@laternIMG.visible = false
@lanterOnOrOff = false
@laternIMG.update
end
def dark_the_sky
@darkBM.visible = true
@darkBM.update
end
def light_up_yhe_sky
@darkBM.visible = false
@darkBM.update
end
def dispose
latern_is_off
light_up_yhe_sky
fl_dispose
end
end[close]Yanfly Engine Ace - Parallax Lock v1.00Spoiler
Código Selecionar#=======================================================
# Fix Picture
# Autor: Raizen
# Exclusividade da comunidade : www.centrorpg.com
# O script fixa qualquer imagem na posição (0,0) que contém o
# prefixo (FIX), e assim posibilita ao maker fazer
# iluminações e panomaps com essa imagem fixa.
#=======================================================
class Sprite_Picture < Sprite
alias raizen_picture_update update_position
def update_position
@picture.name.include?("(FIX)") ? update_position_raizen : raizen_picture_update
end
def update_position_raizen
self.x = -$game_map.display_x*32
self.y = -$game_map.display_y*32
self.z = @picture.number
end
end[close]Kyo Panda - Screenshot do Mapa CompletoSpoiler
Código Selecionar#==============================================================================
#
# ▼ Yanfly Engine Ace - Parallax Lock v1.00
# -- Last Updated: 2012.02.19
# -- Level: Normal
# -- Requires: n/a
#
#==============================================================================
$imported = {} if $imported.nil?
$imported["YEA-ParallaxLock"] = true
#==============================================================================
# ▼ Updates
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# 2012.02.19 - Started Script and Finished.
#
#==============================================================================
# ▼ Introduction
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# This script gives developers the ability to lock a map's parallax and cause
# it to not scroll by either vertically, horizontally, or both. Furthermore,
# this script also enables tile locking the map parallax, allowing the parallax
# to only move in conjunction with the player.
#
#==============================================================================
# ▼ Instructions
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# To install this script, open up your script editor and copy/paste this script
# to an open slot below ▼ Materials/素材 but above ▼ Main. Remember to save.
#
# -----------------------------------------------------------------------------
# Map Notetags - These notetags go in the map notebox in a map's properties.
# -----------------------------------------------------------------------------
# <lock parallax x>
# This prevents the map's parallax from scrolling horizontally.
#
# <lock parallax y>
# This prevents the map's parallax from scrolling vertically.
#
# <full lock parallax>
# This prevents the map's parallax from scrolling at all.
#
# <tile lock parallax>
# This causes the map's parallax to be locked to tiles and scrolls with them.
#
#==============================================================================
# ▼ Compatibility
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# This script is made strictly for RPG Maker VX Ace. It is highly unlikely that
# it will run with RPG Maker VX without adjusting.
#
#==============================================================================
# ▼ Editting anything past this point may potentially result in causing
# computer damage, incontinence, explosion of user's head, coma, death, and/or
# halitosis so edit at your own risk.
#==============================================================================
module YEA
module REGEXP
module MAP
LOCK_PARALLAX_X = /<(?:LOCK_PARALLAX_X|lock parallax x)>/i
LOCK_PARALLAX_Y = /<(?:LOCK_PARALLAX_Y|lock parallax y)>/i
FULL_LOCK_PARALLAX = /<(?:FULL_LOCK_PARALLAX|full lock parallax)>/i
TILE_LOCK_PARALLAX = /<(?:TILE_LOCK_PARALLAX|tile lock parallax)>/i
end # MAP
end # REGEXP
end # YEA
#==============================================================================
# ■ RPG::Map
#==============================================================================
class RPG::Map
#--------------------------------------------------------------------------
# public instance variables
#--------------------------------------------------------------------------
attr_accessor :parallax_lock_x
attr_accessor :parallax_lock_y
attr_accessor :parallax_tile_lock
#--------------------------------------------------------------------------
# common cache: load_notetags_paralock
#--------------------------------------------------------------------------
def load_notetags_paralock
@parallax_lock_x = false
@parallax_lock_y = false
@parallax_tile_lock = false
#---
self.note.split(/[\r\n]+/).each { |line|
case line
#---
when YEA::REGEXP::MAP::LOCK_PARALLAX_X
@parallax_lock_x = true
@parallax_tile_lock = false
when YEA::REGEXP::MAP::LOCK_PARALLAX_Y
@parallax_lock_y = true
@parallax_tile_lock = false
when YEA::REGEXP::MAP::FULL_LOCK_PARALLAX
@parallax_lock_x = true
@parallax_lock_y = true
@parallax_tile_lock = false
when YEA::REGEXP::MAP::TILE_LOCK_PARALLAX
@parallax_lock_x = false
@parallax_lock_y = false
@parallax_tile_lock = true
#---
end
} # self.note.split
#---
end
end # RPG::Map
#==============================================================================
# ■ Game_Map
#==============================================================================
class Game_Map
#--------------------------------------------------------------------------
# alias method: setup
#--------------------------------------------------------------------------
alias game_map_setup_parallax_paralock setup_parallax
def setup_parallax
@map.load_notetags_paralock
game_map_setup_parallax_paralock
end
#--------------------------------------------------------------------------
# new method: parallax_lock_x?
#--------------------------------------------------------------------------
def parallax_lock_x?
return @map.parallax_lock_x
end
#--------------------------------------------------------------------------
# new method: parallax_lock_y?
#--------------------------------------------------------------------------
def parallax_lock_y?
return @map.parallax_lock_y
end
#--------------------------------------------------------------------------
# new method: parallax_tile_lock?
#--------------------------------------------------------------------------
def parallax_tile_lock?
return @map.parallax_tile_lock
end
#--------------------------------------------------------------------------
# alias method: parallax_ox
#--------------------------------------------------------------------------
alias game_map_parallax_ox_paralock parallax_ox
def parallax_ox(bitmap)
return 0 if parallax_lock_x?
return @display_x * 32 if parallax_tile_lock?
return game_map_parallax_ox_paralock(bitmap)
end
#--------------------------------------------------------------------------
# alias method: parallax_oy
#--------------------------------------------------------------------------
alias game_map_parallax_oy_paralock parallax_oy
def parallax_oy(bitmap)
return 0 if parallax_lock_y?
return @display_y * 32 if parallax_tile_lock?
return game_map_parallax_oy_paralock(bitmap)
end
end # Game_Map
#==============================================================================
#
# ▼ End of File
#
#==============================================================================[close]Spoiler
Código Selecionar#==============================================================================
# Screenshot do Mapa Completo [VXA]
#------------------------------------------------------------------------------
# Tira uma screenshot de todo o mapa onde está localizado e armazena em um
# arquivo.
#------------------------------------------------------------------------------
# Autor : Kyo Panda
# Conversão : Gab!
# Site : http://www.mundorpgmaker.com/
# Versão : 1.0
# Lançado em : 23 de Abril de 2011
#==============================================================================
#==============================================================================
# Agradecimentos:
#------------------------------------------------------------------------------
# • Falco :
# * Pelo módulo PNG utilizado na gravação das imagens.
# • Lu Sd 04 // stif.alown // Guedes:
# * Por ajudar na localização dos bugs do script.
#==============================================================================
#==============================================================================
# Como usar:
#------------------------------------------------------------------------------
#
# #--------------------------------------------------------------------------
# # Instalação
# #--------------------------------------------------------------------------
#
# • Cole o script abaixo dos "▼ Scripts Adicionais" e acima do "▼ Principal"
# no Editor de Scripts do RPG Maker VX.
#
# • Configure o script na área "Configuração" logo abaixo, se desejar.
#
#==============================================================================
#==============================================================================
# Para scripters:
#------------------------------------------------------------------------------
# • $game_map.snap_to_bitmap
# Executa o comando de screenshot do mapa.
#==============================================================================
#==============================================================================
# Histórico de versões:
#------------------------------------------------------------------------------
# • 1.0 - 23 de Abril de 2011:
# * Primeira versão do script.
# • 2.0 - 24 de Agosto de 2012:
# * Versão para RPG Maker VX Ace; funcional
#==============================================================================
#==============================================================================
# Map_ScreenshotSettings
#------------------------------------------------------------------------------
# Módulo de configuração do script Screenshot do Mapa.
#==============================================================================
module Map_ScreenshotSettings
#--------------------------------------------------------------------------
# Configuração
#--------------------------------------------------------------------------
# Defina aqui se o script estará ativo ou não.
# Defina true para ativar e false para desativar
SCRIPT_ACTIVE = true
# Defina aqui o nome da pasta onde suas screenshots serão armazenadas.
# Se nenhuma pasta for definida, as screenshots serão gravadas na pasta
# principal do seu projeto.
# Defina o nome da pasta entre apóstrofos ('') ou aspas ("").
# Defina como '', "" ou nil, para não utilizar uma pasta em especial.
DIRECTORY = "Screenshots"
# Defina aqui o modo atribuído ao nome da screenshot que será armazenada.
# Utilize a tag "%m" para que seja definido o nome do mapa.
# Utilize a tag "%{n}d" para definir a quantidade de números que será
# atribuído ao nome. Onde {n} siginifica o número de digitos no nome.
# Se não for definido a tag "%{n}d", o número será adicionado ao final do
# nome, por padrão.
# Defina o nome entre apóstrofos ('') ou aspas ("").
FILENAME = "%4d - %m"
# Defina aqui a tecla utilizada para se tirar a screenshot do mapa.
# Defina a tecla entre apóstrofes ('') ou aspas ("").
# As teclas disponíveis serão mostradas à seguir, pela configuração padrão
# do RPG Maker VX.
#
# Letra : Tecla
#----------------------
# A : Shift
# B : X, Esc, 0
# C : Z, Enter, Espaço
# L : Q
# R : W
# X : A
# Y : S
# Z : D
INPUT = :Y
# Defina aqui se deseja exibir uma mensagem de que a screenshot foi
# processada.
MESSAGE_ACTIVE = true
# Defina aqui a mensagem exibida antes que a screenshot seja processada.
MESSAGE1 = "Gerando Screenshot..."
# Defina aqui a mensagem exibida após a screenshot ser processada.
MESSAGE2 = "Screenshot criada com sucesso!"
#--------------------------------------------------------------------------
# Fim da configuração
#--------------------------------------------------------------------------
# Criação da pasta de armazenamento de screenshots do mapa
if !DIRECTORY.nil? && !DIRECTORY.empty?
Dir.mkdir(DIRECTORY) if !Dir.entries("./").include?(DIRECTORY)
end
end
if Map_ScreenshotSettings::SCRIPT_ACTIVE
class Game_Map
def snap_to_bitmap
def updateMap
Graphics.update
SceneManager.scene.spriteset.update
end
oldpos = [@display_x, @display_y]
gw, gh = Graphics.width, Graphics.height
bitmap = Bitmap.new(@map.width * 32, @map.height * 32)
sampleRect = Rect.new(0, 0, gw, gh)
(bitmap.height/gh.to_f).ceil.times{|i|
(bitmap.width/gw.to_f).ceil.times{|j|
y = gh * i > bitmap.height - gh ? bitmap.height - gh : gh * i
x = gw * j > bitmap.width - gw ? bitmap.width - gw : gw * j
set_display_pos(x/32,y/32)
updateMap
bitmap.blt(x, y, Graphics.snap_to_bitmap, sampleRect)
}
}
set_display_pos(*oldpos)
updateMap
msgbox(Map_ScreenshotSettings::MESSAGE1) if Map_ScreenshotSettings::MESSAGE_ACTIVE
fullname = File.join(Map_ScreenshotSettings::DIRECTORY, "Screenshot#{Time.new.to_i}.png")
bitmap.save(fullname)
msgbox(Map_ScreenshotSettings::MESSAGE2) if Map_ScreenshotSettings::MESSAGE_ACTIVE
end
end
class Bitmap
def save(file_name)
def chunk(type, data)
[data.size, type, data, Zlib.crc32(type + data)].pack("NA4A*N")
end
img_data = ""
width, height = self.width, self.height
for j in 0...(height)
img_data << "\0"
for i in 0...(width)
pos_c = self.get_pixel(i, j)
img_data << [pos_c.red, pos_c.green, pos_c.blue, pos_c.alpha].pack("C*")
end
end
c = [
"\x89PNG\r\n\x1a\n",
chunk("IHDR", [width, height, 8, 6, 0, 0, 0].pack("N2C5")),
chunk("IDAT", Zlib::Deflate.deflate(img_data)),
chunk("IEND", "")
]
File.open(file_name, "wb"){|file| c.each{|chunk| file.write(chunk) }}
end
end
class Scene_Map
attr_reader :spriteset
alias mapscreenshot_update update
def update(*args)
mapscreenshot_update(*args)
return unless Input.trigger?(Map_ScreenshotSettings::INPUT)
$game_map.snap_to_bitmap
end
end
end[close]
[box class=titlebg]Download:[/box]Ainda não está disponível (em até dia 30 já está)
[box class=titlebg]Créditos e Agradecimentos[/box]
Quando eu adicionar a Demo atualizo essa Box
Citação de: Cristiano Sword online 26/07/2017 às 15:05
bacana man, gostei do tema diferente de era medieval a japao feudal, espero a demo,
como vai ser as batalhas?