Kassim
-
Posts
17 -
Joined
-
Last visited
Content Type
Profiles
Forums
Calendar
Posts posted by Kassim
-
-
Salve a tutti, scusate se magari era già presente una soluzione al mio problema ma non l'ho trovata.
In pratica cercavo uno script per una mini mappa, cercando nel forum ho trovato questo:################################################################################
# Tidloc's Automatic Minimap v. 1.0.1 #
# (Jul-13-16) #
################################################################################
# This script lets the game automatically collect mapdata when the player is #
# travelling through the world. To adjust the maps on each map you have the #
# following notetags: #
#------------------------------------------------------------------------------#
# map notetags: #
# #
# "no Minimap" will be shown for this map #
# #
# minimap window will be hidden on this map #
# #
# full Minimap will be shown upon entering, no discovering needed #
# #
# with the item with ID *x* in the inventory, the whole map will be #
# discovered upon entering(like having a map for this area) #
# #
# the map has *x* tiles to be discovered. Needed to calculate the #
# fraction of discovery of this map #
# #
# this map shares a discovery fraction with map *x*. multiple notetags of #
# this kind can be placed per map. #
# #
# mapradius is altered by +/- x on this map #
#------------------------------------------------------------------------------#
# Further you can use the following notetag on equipment to gain bonus upon #
# them being equipped: #
# #
# mapradius is altered by +/- x when this item is equipped #
#------------------------------------------------------------------------------#
# Also, events can have notetags: #
# #
# the file *str*.png has to be placed in the folder of themap images #
# #
# when in the minimap scene the info *str* will be shown when the cursor #
# is pointing at that tile #
# #
# when pressing ENTER on the minimap scene, the scene changes to the map #
# with ID *m* at position *x*,*y* #
#------------------------------------------------------------------------------#
# This script has several script commands enabled: #
# Tidloc.exe :show, :Minimap #
# Hides Minimap in each map. This command is needed to show the minimap #
# in the first place. By default it's hidden! #
# Tidloc.exe :hide, :Minimap #
# Shows Minimap whenever it's allowed (depending on map notetags) #
# Tidloc.exe :toggle, :Minimap #
# Toggles showing the minimap (depending on map notetags) #
# Tidloc.exe *map*, :Minimap_frac #
# Returns the fraction of discovery for the mapo with the ID *map* #
# Tidloc.exe [*x*,*y*], :Minimap_refresh #
# Triggers a refresh of the minimap on the actual map starting on the #
# coordinates *x*,*y* #
# Tidloc.exe *map*, :Minimap_mark, *x*,*y*,*str*,*info* #
# Sets a mark on the map with the ID *map* on postition *x*,*y* with the #
# image *str*.png overwriting the actual image (if discovered). This marks #
# can be erased in the minimap scene by pressing ENTER on them. The info #
# string will be displayed on the minimap scene. #
# Tidloc.exe *map*, :Minimap_mark_rem, *x*,*y* #
# Removes a mark set by the command above. #
# Tidloc.exe "Minimap",:call #
# calls the minimap scene with an interactive map showing the infos of #
# events and map transitions possible. scrolling with arrow keys, fast #
# scrollig when SHIFT is pressed too. #
#------------------------------------------------------------------------------#
# All images need to be saved within the graphics\pictures folder and further #
# in the folder specified in line 119 of this script. #
#------------------------------------------------------------------------------#
# When no other images are defined, this script looks at the region of the #
# tiles that are passable by the player. Defining which graphics will be used #
# for each region is defined in the lines 120pp. for each single region. When #
# any region is about to be displayed on the minimap that's not defined the #
# game will exit with the exact error description. #
#==============================================================================#
# IMPORTANT NOTES #
# 1) You'll need the command in line 44 of this script to show the minimap at #
# all, by deafault it's hidden. #
# 2) When the minimap is hidden, no data will be collected by walking in maps #
# to prevent garbage collection of map data that won't be used. #
# 3) Using the DEBUG constant allows you to show the amount of free tiles #
# when you playtest on a map. This way you can easily calculate the max #
# number of tiles without having to count them all (for the #
# command). #
# 4) Players can set and erase their own marks in the minimap scene if the #
# constant Player_Marks is set true. #
# 5) I recommend to have the constant Event_checking on true, unless you only #
# use stationary events with their own images. #
#==============================================================================#
# Feel free to use this script, but please credit me for my work! ^__^ #
# © Tidloc (tidloc@gmx.at) #
################################################################################
$imported = {} if $imported.nil?
$imported["Tidloc-MiniMap"] = [1,0,1]
$needed = [] if $needed.nil?
$needed.push ["Tidloc-Header",[2,13,6],true,"Tidloc's Automatic Minimap"]
module Tidloc
Keys = {} if Keys.nil?
Keys["Minimap_scene"] = nil
Keys["Minimap_toggle"] = nil
Menu = {} if Menu.nil?
Menu["Minimap_scene"] = true
module Minimap
Discover_Radius = 15
Show_Frac = true
Event_checking = true
Player_Marks = true
Sprites = { :position_x => 10,
:position_y => 10,
:position_z => 1000,
:width => 100,
:height => 100
}
Image_size = [12,12]
Images = { :folder => "Mapimages",
:player => "player",
:mark => "mark",
:center => ["red_circle",16,16],
:Regions => { 0 => "blank",
1 => "door",
2 => "poi",
3 => "exit_up",
4 => "exit_down",
5 => "exit_left",
6 => "exit_right",
7 => "null",
8 => "grass",
9 => "wood",
10 => ""},
:blank => "blank"
}
Notetags = [[ //i,
//i,
//i,
//i,
//i
],
[ //i,
//i,
//i,
//i,
//i
]
]
DEBUG = false
end
module Vocabs;class< def MiniMap(code,lang)
if lang == "ger"
case code
when "Name"; return "Minimap"
when "nomap"; return "Keine Mappe verfügbar"
when "pmark"; return "Mappen Markierung"
when "error1"; return "FEHLER\n\n"+
"Region \01 auf der Mappe \02 bei Position x=\03, y=\04 nicht "+
"im Minimappen-Skript definiert!"
end
elsif lang =="eng"
case code
when "Name"; return "Minimap"
when "nomap"; return "No map available"
when "pmark"; return "Custom mark"
when "error1"; return "ERROR\n\n"+
"Region \01 occuring in map \02 at position x=\03, y=\04 not "+
"defined in the Minimap definitions!"
end
elsif lang =="cze"
case code
when "Name"; return "Minimap"
when "nomap"; return "Mapa není k dispozici"
when "pmark"; return "Vlastní značka"
when "error1"; return "ERROR\n\n"+
"Region \01 označený na mapě \02 na pozici x=\03, y=\04"+
"není definován ve scriptu Minimap!"
end
end
end
end;end
end
################################################################################
# #
################################################################################
module Tidloc;module Minimap;class< def Update
x = Tidloc::Minimap::Sprites[:position_x]
y = Tidloc::Minimap::Sprites[:position_y]
z = Tidloc::Minimap::Sprites[:position_z]
w = Tidloc::Minimap::Sprites[:width]
h = Tidloc::Minimap::Sprites[:height]
xp = $game_player.x
yp = $game_player.y
$game_system.tidloc_minimap_coord = [0,0] if $game_system.tidloc_minimap_coord.nil?
$game_system.tidloc_minimap = [] if $game_system.tidloc_minimap.nil?
$game_system.tidloc_minimap_marks = [] if $game_system.tidloc_minimap_marks.nil?
if $game_system.tidloc_minimap[$game_map.map_id].nil?
$game_system.tidloc_minimap[$game_map.map_id] = Array.new($game_map.width) { [] }
end
if $game_system.tidloc_minimap_marks[$game_map.map_id].nil?
$game_system.tidloc_minimap_marks[$game_map.map_id] = Array.new($game_map.width) { [] }
end
# map layer
if $game_temp.tidloc_minimap_sprite.nil?
$game_temp.tidloc_minimap_sprite = Sprite.new
$game_temp.tidloc_minimap_sprite.x = x
$game_temp.tidloc_minimap_sprite.y = y
$game_temp.tidloc_minimap_sprite.z = z
end
# event layer
if $game_temp.tidloc_minimap_sprite2.nil?
$game_temp.tidloc_minimap_sprite2 = Sprite.new
$game_temp.tidloc_minimap_sprite2.x = x
$game_temp.tidloc_minimap_sprite2.y = y
$game_temp.tidloc_minimap_sprite2.z = z+1
end
# when
if $game_map.map.note =~ Tidloc::Minimap::Notetags[0][1] || !$game_system.tidloc_minimap_show
if $game_temp.tidloc_minimap_sprite.bitmap
$game_temp.tidloc_minimap_sprite.bitmap.dispose
$game_temp.tidloc_minimap_sprite.bitmap = nil
end
if $game_temp.tidloc_minimap_sprite2.bitmap
$game_temp.tidloc_minimap_sprite2.bitmap.dispose
$game_temp.tidloc_minimap_sprite2.bitmap = nil
end
return
elsif SceneManager.scene.is_a?(Scene_Map)
if $game_temp.tidloc_minimap_sprite.bitmap.nil?
$game_temp.tidloc_minimap_sprite.bitmap = Bitmap.new(w,h)
$game_temp.tidloc_minimap_sprite.opacity = 160
end
if $game_temp.tidloc_minimap_sprite2.bitmap.nil?
$game_temp.tidloc_minimap_sprite2.bitmap = Bitmap.new(w,h)
$game_temp.tidloc_minimap_sprite2.opacity = 160
end
self.Force_Update
end
#
if $game_system.tidloc_minimap[$game_map.map_id].count_if(1) == 0
refresh
end
if $game_system.tidloc_minimap_coord[0] == -1 ||
$game_system.tidloc_minimap_coord[0] != xp ||
$game_system.tidloc_minimap_coord[1] != yp
self.Force_Update
else
return
end
end
def background
w = Tidloc::Minimap::Sprites[:width]
h = Tidloc::Minimap::Sprites[:height]
$game_temp.tidloc_minimap_sprite.bitmap.fill_rect(0, 0, w, h, Color.new(0,0,0,160) )
end
def Force_Update
return if $game_temp.tidloc_minimap_sprite.nil? || $game_temp.tidloc_minimap_sprite.bitmap.nil?
w = Tidloc::Minimap::Sprites[:width]
h = Tidloc::Minimap::Sprites[:height]
xp = $game_player.x
yp = $game_player.y
$game_system.tidloc_minimap_coord[0] = xp
$game_system.tidloc_minimap_coord[1] = yp
xtemp = (w/2).to_i
ytemp = (h/2).to_i
$game_temp.tidloc_minimap_sprite.bitmap.clear
$game_temp.tidloc_minimap_sprite2.bitmap.clear
background
# handling
if $game_map.map.note =~ Tidloc::Minimap::Notetags[0][0]
xtemp -= Tidloc::Vocabs.MiniMap("nomap",$tidloc_language).size *
$game_temp.tidloc_minimap_sprite.bitmap.text_size("T").width/2
xtemp = [0,xtemp.to_i].max
ytemp -= 16
$game_temp.tidloc_minimap_sprite.bitmap.draw_html(xtemp,ytemp,w,32,Tidloc::Vocabs.MiniMap("nomap",$tidloc_language))
return
end
xtemp -= 12
ytemp -= 12
#
# Discovering of the map:
#
#~ $game_system.tidloc_minimap[$game_map.map_id][xp][yp] = 1
$game_map.map.note =~ Tidloc::Minimap::Notetags[1][0]
if $game_party.steps > $game_system.tidloc_minimap_steps #&& ( $1.nil? ||
#$game_system.tidloc_minimap[$game_map.map_id].count_if(1) < $1.to_i )
$game_system.tidloc_minimap_steps = $game_party.steps
self.refresh
self.refresh_all
end
#
# Displaying of maps:
#
if $game_system.tidloc_minimap[$game_map.map_id]
$game_system.tidloc_minimap[$game_map.map_id].count.times{ |x|
xv = xtemp - (xp-x)*Tidloc::Minimap::Image_size[0]
next if xv <= -Tidloc::Minimap::Image_size[0] || xv > w
$game_system.tidloc_minimap[$game_map.map_id][x].count.times{ |y|
yv = ytemp - (yp-y)*Tidloc::Minimap::Image_size[1]
next if yv <= -Tidloc::Minimap::Image_size[1] || yv > h
# player position
if x==xp && y==yp
pic = Cache.picture( Tidloc::Minimap::Images[:folder]+"\\"+Tidloc::Minimap::Images[:player])
$game_temp.tidloc_minimap_sprite2.bitmap.blt(xv,yv,pic,Rect.new(0,0,*Tidloc::Minimap::Image_size))
next
end
i = $game_system.tidloc_minimap[$game_map.map_id][x][y]
next if i.nil?
if i.find{ |j| j.is_a?(Numeric)}
l = i.find{ |j| j.is_a?(Numeric)}
id = $game_map.region_id(x,y)
case l
when 0; next
when 1; begin
pic = Cache.picture( Tidloc::Minimap::Images[:folder]+"\\"+Tidloc::Minimap::Images[:Regions][id])
rescue
text = Tidloc::Vocabs.MiniMap("error1",$tidloc_language).clone
text.sub!(/\01/,id.to_s)
text.sub!(/\02/,$game_map.map_id.to_s)
text.sub!(/\03/,x.to_s)
text.sub!(/\04/,y.to_s)
msgbox text
exit
end
$game_temp.tidloc_minimap_sprite.bitmap.blt(xv,yv,pic,Rect.new(0,0,*Tidloc::Minimap::Image_size))
end
end
if i.find{ |j| j.is_a?(Array)&&j[0]==:img}
l = i.find{ |j| j.is_a?(Array)&&j[0]==:img}[1]
pic = Cache.picture( Tidloc::Minimap::Images[:folder]+"\\"+l)
$game_temp.tidloc_minimap_sprite2.bitmap.blt(xv,yv,pic,Rect.new(0,0,*Tidloc::Minimap::Image_size))
end
l = $game_system.tidloc_minimap_marks[$game_map.map_id][x][y]
if l
pic = Cache.picture( Tidloc::Minimap::Images[:folder]+"\\"+l[0])
$game_temp.tidloc_minimap_sprite2.bitmap.blt(xv,yv,pic,Rect.new(0,0,*Tidloc::Minimap::Image_size))
end
}
}
end
if Tidloc::Minimap::Show_Frac && (Tidloc::Minimap::DEBUG || $game_map.map.note =~ Tidloc::Minimap::Notetags[1][0])
if Tidloc::Minimap::DEBUG && $game_system.tidloc_minimap[$game_map.map_id]
$game_temp.tidloc_minimap_sprite.bitmap.draw_html(w-55,h-24,55,24,
$game_system.tidloc_minimap[$game_map.map_id].count_if(1).to_s )
else
maps = [$game_map.map_id]
$game_map.map.note.split(/[\r\n]+/).each { |line|
if line =~ Tidloc::Minimap::Notetags[1][1]
maps.push $1.to_i
end
}
frac = self.Fraction(*maps).round(1)
frac = 100 if frac == 100
$game_temp.tidloc_minimap_sprite.bitmap.draw_html(w-55,h-24,55,24,
"#{frac}%")
end
end
end
def Fraction(*map_ids)
soll = 0
haben = 0
map_ids.each{|m|
if load_data(sprintf("Data/Map%03d.rvdata2", m)).note =~ Tidloc::Minimap::Notetags[1][0]
soll += $1.to_i
haben += $game_system.tidloc_minimap[m].count_if(1) if $game_system.tidloc_minimap[m]
end
}
return 0 if soll == 0
return (100.0*haben)/soll
end
def event_check(x,y)
if $game_map.events.find{|k,e| e.x==x && e.y==y}
ev = $game_map.events.find{|k,e| e.x==x && e.y==y}[1]
ev.refresh
ev.update
list = ev.list
return if list.nil?
list.each_with_index{|l,i|
if l.code == 108
text = l.parameters[0]
j = i+1
while list[j].code == 408
begin
text += list[j].parameters[0]
rescue
msgbox list[j].parameters
end
j += 1
end
if text =~ Tidloc::Minimap::Notetags[1][2]
n = [:img,$1]
if $game_system.tidloc_minimap[$game_map.map_id][x] &&
(($game_system.tidloc_minimap[$game_map.map_id][x][y] && !$game_system.tidloc_minimap[$game_map.map_id][x][y].find{|k| k==n}) ||
!$game_system.tidloc_minimap[$game_map.map_id][x][y])
$game_system.tidloc_minimap[$game_map.map_id][x][y] = [] if !$game_system.tidloc_minimap[$game_map.map_id][x][y]
$game_system.tidloc_minimap[$game_map.map_id][x][y].push n
end
end
if text =~ Tidloc::Minimap::Notetags[1][3]
n = [:info,$1]
if $game_system.tidloc_minimap[$game_map.map_id][x] &&
(($game_system.tidloc_minimap[$game_map.map_id][x][y] && !$game_system.tidloc_minimap[$game_map.map_id][x][y].find{|k| k==n}) ||
!$game_system.tidloc_minimap[$game_map.map_id][x][y])
$game_system.tidloc_minimap[$game_map.map_id][x][y] = [] if !$game_system.tidloc_minimap[$game_map.map_id][x][y]
$game_system.tidloc_minimap[$game_map.map_id][x][y].unshift n
end
end
if text =~ Tidloc::Minimap::Notetags[1][4]
n = [:move,[$1.to_i,$2.to_i,$3.to_i]]
if $game_system.tidloc_minimap[$game_map.map_id][x] &&
(($game_system.tidloc_minimap[$game_map.map_id][x][y] && !$game_system.tidloc_minimap[$game_map.map_id][x][y].find{|k| k==n}) ||
!$game_system.tidloc_minimap[$game_map.map_id][x][y])
$game_system.tidloc_minimap[$game_map.map_id][x][y] = [] if !$game_system.tidloc_minimap[$game_map.map_id][x][y]
$game_system.tidloc_minimap[$game_map.map_id][x][y].unshift n
end
end
end
}
end
end
def refresh(x=$game_player.x, y=$game_player.y, r=Tidloc::Minimap::Discover_Radius)
return unless $game_system.tidloc_minimap[$game_map.map_id]
disc = [[x,y]]
disc2 = [[x,y]]
if $game_map.map.note =~ Tidloc::Minimap::Notetags[0][4]
r += $1.to_i
end
$game_party.members.each{|m|
m.equips.each{|e|
if e && e.note =~ Tidloc::Minimap::Notetags[0][4]
r += $1.to_i
end
} }
if $game_map.map.note =~ Tidloc::Minimap::Notetags[0][3]
r = 100000 if $game_party.item_number($data_items[$1.to_i]) > 0
elsif $game_map.map.note =~ Tidloc::Minimap::Notetags[0][2]
r = 100000
end
while disc.count > 0
temp = disc.shift
if $game_map.passable?(temp[0],temp[1],2) ||
$game_map.passable?(temp[0],temp[1],4) ||
$game_map.passable?(temp[0],temp[1],6) ||
$game_map.passable?(temp[0],temp[1],8)
$game_system.tidloc_minimap[$game_map.map_id][temp[0]][temp[1]] = [1]
event_check(*temp)
if Math.sqrt((temp[0]-x)**2+((temp[1]+1)-y)**2) <= r
if $game_map.check_passage(temp[0],temp[1],1) # 2 - down
n = [temp[0],temp[1]+1]
if !disc2.find{|d| d==n}
disc.push n.clone
disc2.push n.clone
end
end
event_check(temp[0],temp[1]+1)
end
if Math.sqrt(((temp[0]-1)-x)**2+(temp[1]-y)**2) <= r
if $game_map.check_passage(temp[0],temp[1],2) # 4 - left
n = [temp[0]-1,temp[1]]
if !disc2.find{|d| d==n}
disc.push n.clone
disc2.push n.clone
end
end
event_check(temp[0]-1,temp[1])
end
if Math.sqrt(((temp[0]+1)-x)**2+(temp[1]-y)**2) <= r
if $game_map.check_passage(temp[0],temp[1],4) # 6 - right
n = [temp[0]+1,temp[1]]
if !disc2.find{|d| d==n}
disc.push n.clone
disc2.push n.clone
end
end
event_check(temp[0]+1,temp[1])
end
if Math.sqrt((temp[0]-x)**2+((temp[1]-1)-y)**2) <= r
if $game_map.check_passage(temp[0],temp[1],8) # 8 - up
n = [temp[0],temp[1]-1]
if !disc2.find{|d| d==n}
disc.push n.clone
disc2.push n.clone
end
end
event_check(temp[0],temp[1]-1)
end
disc.compact!
else
event_check(*temp)
end
end
end
def refresh_all
return unless SceneManager.scene.is_a?(Scene_Map)
$game_map.update
$game_map.refresh
return unless $game_system.tidloc_minimap[$game_map.map_id]
$game_system.tidloc_minimap[$game_map.map_id].count.times{ |x|
$game_system.tidloc_minimap[$game_map.map_id][x].count.times{ |y|
next unless $game_system.tidloc_minimap[$game_map.map_id][x][y]
if $game_map.check_passage(x,y,1) ||
$game_map.check_passage(x,y,2) ||
$game_map.check_passage(x,y,4) ||
$game_map.check_passage(x,y,8)
$game_system.tidloc_minimap[$game_map.map_id][x][y] = [1]
end
event_check(x,y)
}
}
$game_map.events.each{|k,e|
e.refresh
e.update
next if e.list.nil?
next unless $game_system.tidloc_minimap[$game_map.map_id][e.x][e.y]
e.list.each_with_index{|l,i|
if l.code == 108
text = l.parameters[0]
j = i+1
while e.list[j].code == 408
begin
text += e.list[j].parameters[0]
rescue
msgbox e.list[j].parameters
end
j += 1
end
if text =~ Tidloc::Minimap::Notetags[1][2]
n = [:img,$1]
if $game_system.tidloc_minimap[$game_map.map_id][e.x][e.y] &&
!$game_system.tidloc_minimap[$game_map.map_id][e.x][e.y].find{|k| k==n}
$game_system.tidloc_minimap[$game_map.map_id][e.x][e.y].push n
end
end
if text =~ Tidloc::Minimap::Notetags[1][3]
n = [:info,$1]
if $game_system.tidloc_minimap[$game_map.map_id][e.x][e.y] &&
!$game_system.tidloc_minimap[$game_map.map_id][e.x][e.y].find{|k| k==n}
$game_system.tidloc_minimap[$game_map.map_id][e.x][e.y].unshift n
end
end
if text =~ Tidloc::Minimap::Notetags[1][4]
n = [:move,[$1.to_i,$2.to_i,$3.to_i]]
if $game_system.tidloc_minimap[$game_map.map_id][e.x][e.y] &&
!$game_system.tidloc_minimap[$game_map.map_id][e.x][e.y].find{|k| k==n}
$game_system.tidloc_minimap[$game_map.map_id][e.x][e.y].unshift n
end
end
end
}
}
end
end
class Scene_Minimap < Scene_Base
def start
super
create_background
create_map
@x = $game_player.x
@y = $game_player.y
@dx = @x
@dy = @y
end
def create_background
@background_sprite = Sprite.new
@background_sprite.bitmap = SceneManager.background_bitmap
@background_sprite.color.set(16, 16, 16, 128)
@background_sprite.z = 0
end
def create_map
@map_id = $game_map.map_id
@mapdata = load_data(sprintf("Data/Map%03d.rvdata2", @map_id))
# creating the sprite for the floor images
@map = Sprite.new
@map.x = 0
@map.y = 0
@map.z = 1
@map.bitmap = Bitmap.new(Graphics.width,Graphics.height)
# creating the sprite for the event images
@map2 = Sprite.new
@map2.x = 0
@map2.y = 0
@map2.z = 1
@map2.bitmap = Bitmap.new(Graphics.width,Graphics.height)
# creating the sprite for the center tile
pic = Cache.picture( Tidloc::Minimap::Images[:folder]+"\\"+Tidloc::Minimap::Images[:center][0])
rb = Tidloc::Minimap::Images[:center][1..2]
@map3 = Sprite.new
@map3.x = (Graphics.width - rb[0]) / 2
@map3.y = (Graphics.height - rb[1]) / 2
@map3.z = 3
@map3.bitmap = Bitmap.new(*rb)
@map3.bitmap.blt(0,0,pic,Rect.new(0,0,*rb))
# creating the sprite for showed mapinfo
@mapinfo = Sprite.new
@mapinfo.x = 0
@mapinfo.y = 0
@mapinfo.z = 10
@mapinfo.bitmap = Bitmap.new(Graphics.width,Graphics.height)
end
def update
super
update_control
update_map
end
def update_control
if Input.trigger?(:C)
# ENTER
i = $game_system.tidloc_minimap[@map_id][@x][@y]
s = i.find{ |j| j.is_a?(Array) && j[0] == :move}
if !s.nil?
if $game_system.tidloc_minimap[s[1][0]]
@map_id = s[1][0]
@x = s[1][1]
@y = s[1][2]
@mapdata = load_data(sprintf("Data/Map%03d.rvdata2", @map_id))
refresh_map
else
Sound.play_buzzer
refresh_map
end
elsif $game_system.tidloc_minimap_marks[@map_id][@x][@y]
$game_system.tidloc_minimap_marks[@map_id][@x][@y] = nil
update_map
else
$game_system.tidloc_minimap_marks[@map_id][@x][@y] = [Tidloc::Minimap::Images[:mark],Tidloc::Vocabs.MiniMap("pmark",$tidloc_language)]
update_map
end
end
if Input.trigger?(:B) || Input.trigger?(Tidloc::Keys["Minimap"])
SceneManager.return
end
@dx = @x
@dy = @y
if Input.press?(:SHIFT) && Input.press?(:LEFT) || Input.repeat?(:LEFT)
@dx = [@x-1,0].max
end
if Input.press?(:SHIFT) && Input.press?(:RIGHT) || Input.repeat?(:RIGHT)
@dx = [@x+1,$game_system.tidloc_minimap[@map_id].count-1].min
end
if Input.press?(:SHIFT) && Input.press?(:UP) || Input.repeat?(:UP)
@dy = [@y-1,0].max
end
if Input.press?(:SHIFT) && Input.press?(:DOWN) || Input.repeat?(:DOWN)
@dy = [@y+1,$game_system.tidloc_minimap[@map_id][@dx].count-1].min
end
if @dx != @x || @dy != @y
if $game_system.tidloc_minimap[@map_id][@dx][@dy]
@x = @dx
@y = @dy
refresh_map
end
end
end
def update_map
xtemp = Graphics.width/2 - 6
ytemp = Graphics.height/2 - 6
$game_system.tidloc_minimap[@map_id].count.times{ |x|
xv = xtemp - (@x-x)*Tidloc::Minimap::Image_size[0]
next if xv <= -Tidloc::Minimap::Image_size[0] || xv > Graphics.width
$game_system.tidloc_minimap[@map_id][x].count.times{ |y|
yv = ytemp - (@y-y)*Tidloc::Minimap::Image_size[1]
next if yv <= -Tidloc::Minimap::Image_size[1] || yv > Graphics.height
i = $game_system.tidloc_minimap[@map_id][x][y]
if @map_id==$game_map.map_id && x==$game_player.x && y==$game_player.y
pic = Cache.picture( Tidloc::Minimap::Images[:folder]+"\\"+Tidloc::Minimap::Images[:player])
@map.bitmap.blt(xv,yv,pic,Rect.new(0,0,*Tidloc::Minimap::Image_size))
next
end
if x==@x && y==@y
if i.is_a?(Array)
if $game_system.tidloc_minimap_marks[@map_id][x][y]
s = $game_system.tidloc_minimap_marks[@map_id][x][y][1]
w = @mapinfo.bitmap.text_size(Bitmap.html_decode(s)).width
dx = (Graphics.width-w)/2
dy = (Graphics.height-Tidloc::Minimap::Images[:center][2])/2 - 24
@mapinfo.bitmap.draw_html(dx,dy,w,24,s)
else
s = i.find{ |j| j.is_a?(Array) && j[0] == :info}
unless s.nil?
s = s[1]
text = s.clone
if $imported["Tidloc-MultiLang"] && text =~ Tidloc::MultiLang::RegExp[:convo]
text.gsub!(Tidloc::MultiLang::RegExp[:convo]) {Tidloc::MultiLang::Load($1,$2)}
end
w = Bitmap.html_decode(text).lstrip.rstrip.size*@mapinfo.bitmap.text_size("T").width
dx = (Graphics.width-w)/2
dy = (Graphics.height-Tidloc::Minimap::Images[:center][2])/2 - 24
@mapinfo.bitmap.draw_html(dx,dy,w,24,s)
end
end
end
end
next if i.nil?
if i.find{ |j| j.is_a?(Numeric)}
l = i.find{ |j| j.is_a?(Numeric)}
id = region_id(x,y)
case l
when 0; next
when 1; begin
pic = Cache.picture( Tidloc::Minimap::Images[:folder]+"\\"+Tidloc::Minimap::Images[:Regions][id])
rescue
text = Tidloc::Vocabs.MiniMap("error1",$tidloc_language).clone
text.sub!(/\01/,id.to_s)
text.sub!(/\02/,$game_map.map_id.to_s)
text.sub!(/\03/,x.to_s)
text.sub!(/\04/,y.to_s)
msgbox text
exit
end
@map.bitmap.blt(xv,yv,pic,Rect.new(0,0,*Tidloc::Minimap::Image_size))
end
end
if i.find{ |j| j.is_a?(Array)&&j[0]==:img}
l = i.find{ |j| j.is_a?(Array)&&j[0]==:img}[1]
pic = Cache.picture( Tidloc::Minimap::Images[:folder]+"\\"+l)
@map2.bitmap.blt(xv,yv,pic,Rect.new(0,0,*Tidloc::Minimap::Image_size))
end
l = $game_system.tidloc_minimap_marks[@map_id][x][y]
if l
pic = Cache.picture( Tidloc::Minimap::Images[:folder]+"\\"+l[0])
@map2.bitmap.blt(xv,yv,pic,Rect.new(0,0,*Tidloc::Minimap::Image_size))
end
}
}
end
def region_id(x, y)
@mapdata.data[x, y, 3] >> 8
end
def refresh_map
@map.bitmap.clear
@map2.bitmap.clear
@mapinfo.bitmap.clear
update_map
end
def terminate
super
@map.bitmap.dispose
@map.dispose
@map2.bitmap.dispose
@map2.dispose
@map3.bitmap.dispose
@map3.dispose
@mapinfo.bitmap.dispose
@mapinfo.dispose
end
end
end;end
Sarebbe anche perfetto se non fosse che usa le regioni con delle immagini associate per ricreare la mappa di gioco.
Invece io cercavo una mini mappa che funzionasse come quella citata sopra che mostra una parte della mappa di gioco e che si sposti insieme al PG ma che riprenda fedelmente la mappa di gioco come questo.Il top sarebbe una cosa del genere , un immagine che potrei andare a disegnare e usare come mini mappa. Ma forse chiedo troppo.
-
Sì, il consiglio è quello, capisco che il tile singolo è facile da usare, ma per i motivi suddetti meglio andare di autotile con i bordi, ti eviterai tutti i problemi di un mapping ed una passabilità complessi.
^ ^
Perfetto, grazie!
Anche perché guardando le mappe esempio le uniche che venivano sviluppate su, diciamo, tre livelli erano quelle dove usavano appunto quei Tile. invece le mappe sviluppate su due livelli usavano anche anche i tile A4 per intenderci.
Comunque grazie ancora!
-
Se non ho capito male mi consigli di editare questo:

a seconda delle esigenze (fuoco, giacchio ecc..)?
Perché con quei Tile riesco ad ottenere quello che voglio...
ti dico un trucco, che ho usato io per fare mappe con diverse profondità.
Metti degli eventi trasparenti sopra le caselle di bordo. in questo caso 4, due nel piano di sopra e 2 nel piano di sotto.
Crea su ciascuna 2 pagine di evento entrambe con grafica trasparente imposta le priorità degli eventi come sotto l'eroe e al livello dell'eroe, controllate da una switch. Quando sei sotto le due sotto devono essere calpestabili ma non quelle sopra e viceversa.
Metti altri 2 eventi che attivano o disattivano lo switch sulle scale con il touch.
mo' l'ho spiegato al volo, vedi se funge
Utile, ma non vado a sovraccaricare le mappe mettendo tanti eventi del genere ogni volta che servono e quindi rischiare lag?
-
Database -> tilesets -> seconda opzione sull'elenco a destra Passaggio 4 direzioni. Da lì puoi scegliere quali direzioni sono attraversabili e quali no.
Considera però che stai sbagliando tile, non devi usare quello di riempimento del terreno, ma quello col bordino calssico che circonda le pianure sopra alle alture, trovi diversi esempi nei tileset standard.
^ ^
(Attento anche alle scale che devono essere almeno un tile più lunghe della parete sulla quale appoggiano, altrimenti è come se fossero appiccicate verticalmente)
Allora per quanto riguarda il passaggio 4 direzioni me lo ricordavo,ho provato i vari tile ma non ottengo il risultato che voglio...

provo a spiegarmi meglio, da quella posizione vorrei che il pg non possa andare direttamente a sinistra e quindi ritrovarsi sul "rialzo" ma per farlo deve fare le scale...
-
D: Domanda stupidissima, scusate, ma mi ritrovo questo problema:

in pratica graficamente i vari livelli riesco a crearli ma testando il gioco il pg cammina a destra dal "primo" livello al "piano terra" tranquillamente.
Non ricordo più come si faceva ad impedire il passaggio in quel modo...
-
L'unico modo che conosco sarebbe quello di usare uno switch per controllare dove il personaggio si trova, altrimenti ho trovato questo tutorial cercando sul web, anche se non l'ho ancora provato: CLICCA
Buono, non avevo pensato a creare il "ponte" tramite eventi. Grazie mille!
Nell'ultimo mapping contest ci sono stati esempi di ponti su cui passare sopra e sotto, puoi prendere anche quelli come esempio, ma sostanzialmente la soluzione è quella esposta sopra.
fai una serie di switch che passandoci sopra attivano la passabilità in un modo o in un altro per i tile del ponte.
Il problema è se hai anche dei chara png che passeggiano sopra mentre tu sei sotto. La cosa diventa ingestibile. Perché se il ponte risulta SOPRA il personaggio, risulta sopra tutti i personaggi.
Ad ogni modo la scala per salire sulla piattaforma è corta, ha lo stesso numero di tile della colonna, quindi per la legge dei triangoli è verticale. Devi raddoppiarla per avere una scala a 45°.
(ste scale continuano a sbagliarle tutti eh)
Haha non riuscivo a trovare le parole corrette per rendere più chiaro il mio problema quindi ho creato al volo quella piattaforma senza badare troppo ai dettagli.
Per i chara sul ponte se sono fermi potrei gestirla con i teletrasporti, a meno che uno non sia pignolo e vada a contare i passi non si dovrebbe notare niente rimanendo tutto coperto...
Edit:
Come non detto, l' hai anche scritto che se il ponte è sopra al pg è sopra a tutti!
Ci sono due modi, e ti spiego direttamente il più semplice:
- Con un programma di grafica, crea un tile B, C, D o E che abbia i tile del ponte (non devono stare in A)
- Nel database, crea due set di tile identici, ma che su uno abbia i tile del ponte con il cerchio ed uno con la stella (che va di sopra)
- Fai un evento che cambia set di tile della mappa quando scende dalle scale o quando sale
Grazie per aver scelto la più semplice!
Ho capito tutto perfettamente!
Grazie ancora a tutti!
-
Buon pomeriggio a tutti!
Il mio problema è questo..
Vorrei che il personaggio camminasse sopra la "piattaforma" se sale le scale, altrimenti permettergli anche di passarci sotto.
E' possibile una cosa del genere?
-
Premetto che ho usato il tasto cerca, ma ci sta' che non abbia inserito le parole giuste quindi se è già stato spiegato altrove scusate se lo richiedo.
In un Topic su questo forum si fa riferimento ad un grandissimo charset usato per fare l'animazione dell'acqua.
D: come faccio a realizzare un charset grande in quel modo senza che rpg maker vx mi selezioni solo una parte dell'immagine? -
Ultima domanda poi vi lascio in pace xD
In fatto di gusti personali a voi piace lo stile chibi o SD?
-
Solitamente mettere tracciare una linea a mano libera è più veloce di farla una punto per punto, ma difficoltà, bellezza e stile dipendono tutte dal tipo di pixel o disegno che si ha per le mani.
^ ^
per quanto riguarda i set da usare sui tool è più difficile adattare questo stile? cioè essendo figure con teste molto grandi e molto dettagliati anche i tile dell'ambientazione seguiranno il chara, credo, e suppongo anche che chi scelga questo stile avrà vita difficile nel trovare qualcosa già fatto a disposizione su forum o google, no?
-
Molto bello davvero! :Q__
http://pre01.deviantart.net/eddd/th/pre/f/2015/126/7/5/doom_by_eidog-d8scn3f.png
E l'animazione non riesco a smettere di guardarla tanti tanti complimenti!
http://orig03.deviantart.net/8034/f/2016/042/9/6/stepped_animation_test_by_eidog-d9rbl8h.gif
-
E di questo stile cosa ne pensate? Ho notato che ultimamente è molto usato sopratutto nei nuovi giochi android, come difficoltà come lo ritenete più semplice o no del Pixel?
-
http://windship.deviantart.com/art/Idle-animation-test-178294714
questo stile è il chibi? o è altra roba, esistono delle basi per questo stile?
è fatto in PixelArt? (non penso ma...)
scusate l'ignoranza!
-
-
Mai usato il tool brucia, sempre di matitozza pure io! Però c'è un sacco di gente che usa INTERI LAYER in screen/overlay, è una tecnica da provare
I metodi di fusione li uso spesso anche io! sono molto utili, non so' quanto nella PixelArt (non ho grandi conoscenze in quel campo) ma nel colorare i LineArt penso diano buoni risultati (poi come ha detto Lusinal a lui è piaciuto quindi dipende dai gusti)
-
-
Me gusta!
Bello l'effetto dei fulmini intorno a BioTestament!forse un po' staccato dallo sfondo...
-
Benvenuto!
Benvenuto!
Grazie ad entrambi!!
-
Auguri Seph e auguri Holy!😊😊
-
Si uso la tavola! In un impeto di pazzia ho messo il brucia a casaccio e mi piaceva l'effetto! XD
Ho visto come colori attento che ti invio le mie lineart per fartele colorare! =p
Hahah io il brucia non lo uso quasi mai preferisco usare i colori per dare l'effetto dell'ombra!
Quando vuoi per le lineart ^^
-
Secondo personaggio rinnovanto! Shyla!
Gli ho tolto il mezzo chimono da depressa e l'ho trasformata in una parimpaposa ragazza come mi hanno insegnato gli anni ottanta!
http://i35.servimg.com/u/f35/18/56/59/72/nuovas10.jpg
Forte!!
Usi la tavoletta grafica? Mi convince poco l'ombra sotto il braccio destro per il resto mi piace
-
Altri mie lavori!
Ma chissene' direte voi
Il mio primo Pixel art su base di Toriyamahttp://i67.tinypic.com/2wmdf0i.jpg
Hisoka purtroppo non ricordo di chi era la Line art ma il color è mio

http://i63.tinypic.com/2eulumw.jpg
Rufy vs Cesar uguale come sopra
http://i64.tinypic.com/jgpp92.jpg
Naruto indovinate... Non ricordo di chi è la Line art
http://i63.tinypic.com/ztg4fp.jpg
Gerard
quanto vado fiero dei capelli che gli ho fatto
http://i64.tinypic.com/2qa604o.jpg
-
Sembra tutto ok. Ricordati di mettere direzione fissa a tutte le pagine dell'evento della porta, altrimenti si gira verso l'eroe e cambia grafica.
Ne approfitto per dire: buono il mapping, raro trovare questi livelli già dalle prime armi. Solo ti consiglio di aggiungere un po' di irregolarità alle pareti: sono troppo dritte e sembrano artificiali.
Allora ci sta che sia quello (la direzione fissa) che mi fa sparire la porta quando parte il messaggio...
Per quanto riguarda il mapping grazie mille e molto apprezzato il consiglio!
Confermo era quello il problema la direzione fissa -.-"
Risolto e grazie!!
-
Già era così per semplificare il tutto^^È che con "lineart" si intende... la lineart. Mi hai confuso XD
Belle colorazioni, preferisco la Erza v2
Comunque grazie mille!

Mini mappa
in Richieste scripts RGSS3 (VX-Ace)
Posted
Lo script non l'ho trovato in un topic a esso dedicato, era in una risposta a questa richiesta, e il mio problema non è con quello script in particolare, dato che in quel modo non mi serve, mi chiedevo se ci fosse una soluzione che fondesse insieme i due script che ti riposto qua
Script 1
Screenshot Script 2 ( che credo non esista più ma mi interessano solo gli script )