AccueilAccueil  PortailPortail  RechercherRechercher  Dernières imagesDernières images  S'enregistrerS'enregistrer  ConnexionConnexion  



-55%
Le deal à ne pas rater :
Coffret d’outils – STANLEY – STMT0-74101 – 38 pièces – ...
21.99 € 49.04 €
Voir le deal

Partagez
 

 Mini carte sans besoin d'image

Voir le sujet précédent Voir le sujet suivant Aller en bas 
AuteurMessage
Invité
Invité
avatar



Mini carte sans besoin d'image Empty
MessageSujet: Mini carte sans besoin d'image   Mini carte sans besoin d'image Icon_minitimeLun 23 Mar 2009 - 21:39

Voici un script de mini carte sans besoin d'image...
PAS DE MOI
Pris sur ce site: http://www.rmxp.org/forums/viewtopic.php?t=52001.msg493587

Je voulais juste savoir comment on fait pour mettre un point sur la carte.
Je sais qu'il faut mettre quelque chose dans un commentaire mais quoi..le noms (Keyword) (enemy treasure etc..) mais sa marche pas

# * SETUP EVENT KEYWORD & COLOR
#---------------------------------------------------------------
# ** Template:
# OBJECT_COLOR['keyword'] = Color.new(Red, Green, Blue, Opacity)
#-------------------------------------------------------------
# * 'keyword': Word you want to put in event's comment to show this color
# ** Note: 'keyword' is CASE SENSITIVE!
# * Color.new(...): Color you want
# You can put between 0 - 255 in each argument (Red, Green, Blue, Opacity)
#-------------------------------------------------------------
OBJECT_COLOR['npc'] = Color.new(30,144,255,160)
OBJECT_COLOR['treasure'] = Color.new(0,255,255,160)
OBJECT_COLOR['enemy'] = Color.new(139,35,35,160)
OBJECT_COLOR['merchant'] = Color.new(255,255,0,160)






Citation :
#===============================================================
# ● [VX] ◦ MiniMap ◦ □
# * Plug N Play Minimap (Don't need image~) *
#--------------------------------------------------------------
# ◦ by Woratana [woratana@hotmail.com]
# ◦ Thaiware RPG Maker Community
# ◦ Released on: 09/06/2008
# ◦ Version: 1.0 Beta
#--------------------------------------------------------------
# ◦ Credit: KGC for XP MiniMap Script,
# this script can't be done without his MiniMap.
#--------------------------------------------------------------

module MiniMap
#===========================================================================
# [START] MINIMAP SCRIPT SETUP PART
#---------------------------------------------------------------------------
SWITCH_NO_MINIMAP = 0 # Turn ON this switch to NOT SHOW minimap

MAP_RECT = [410, 20, 100, 100] # Minimap size and position
# [X, Y, Width, Height]
# You can change it in game, by call script:
# $game_system.minimap = [X, Y, Width, Height]

MAP_Z = 0 # Minimap's Z-coordinate
# Increase this number if there is problem that minimap show below some objects.

GRID_SIZE = 5 # Minimap's grid size. Recommend to use more than 3.

MINIMAP_BORDER_COLOR = Color.new(0, 0, 255, 160) # Minimap's border color
# Color.new(Red, Green, Blue, Opacity)
MINIMAP_BORDER_SIZE = 2 # Minimap's border size

FOREGROUND_COLOR = Color.new(224, 224, 255, 160) # Passable tile color
BACKGROUND_COLOR = Color.new(0, 0, 0, 160) # Unpassable tile color

USE_OUTLINE_PLAYER = true # Draw outline around player in minimap?
PLAYER_OUTLINE_COLOR = Color.new(0, 0, 0, 192) # Player Outline color
USE_OUTLINE_EVENT = false # Draw outline around events in minimap?
EVENT_OUTLINE_COLOR = Color.new(255, 255, 255, 192) # Player Outline color

PLAYER_COLOR = Color.new(255, 0, 0, 192) # Player color
#---------------------------------------------------------------------------

OBJECT_COLOR = {} # Don't change or delete this line!
#===============================================================
# * SETUP EVENT KEYWORD & COLOR
#---------------------------------------------------------------
# ** Template:
# OBJECT_COLOR['keyword'] = Color.new(Red, Green, Blue, Opacity)
#-------------------------------------------------------------
# * 'keyword': Word you want to put in event's comment to show this color
# ** Note: 'keyword' is CASE SENSITIVE!
# * Color.new(...): Color you want
# You can put between 0 - 255 in each argument (Red, Green, Blue, Opacity)
#-------------------------------------------------------------
OBJECT_COLOR['npc'] = Color.new(30,144,255,160)
OBJECT_COLOR['!chest'] = Color.new(0,255,255,160)
OBJECT_COLOR['enemy'] = Color.new(139,35,35,160)
OBJECT_COLOR['merchant'] = Color.new(255,255,0,160)

#===========================================================================
# * [OPTIONAL] TAGS:
#---------------------------------------------------------------------------
# Change keyword for disable minimap & keyword for show event on minimap~
#-----------------------------------------------------------------------
TAG_NO_MINIMAP = '[NOMAP]'
TAG_EVENT = 'MMEV'
#---------------------------------------------------------------------------

#---------------------------------------------------------------------------
# [END] MINIMAP SCRIPT SETUP PART
#===========================================================================

def self.refresh
if $scene.is_a?(Scene_Map)
$scene.spriteset.minimap.refresh
end
end

def self.update_object
if $scene.is_a?(Scene_Map)
$scene.spriteset.minimap.update_object_list
end
end
end

#==============================================================================
# ■ RPG::MapInfo
#==============================================================================
class RPG::MapInfo
def name
return @name.gsub(/\[.*\]/) { }
end

def original_name
return @name
end

def show_minimap?
return !@name.include?(MiniMap::TAG_NO_MINIMAP)
end
end
#==============================================================================
# ■ Game_System
#==============================================================================
class Game_System
attr_accessor :minimap
alias wora_minimap_gamsys_ini initialize

def initialize
wora_minimap_gamsys_ini
@minimap = MiniMap::MAP_RECT
end

def show_minimap
return !$game_switches[MiniMap::SWITCH_NO_MINIMAP]
end
end
#==============================================================================
# ■ Game_Map
#==============================================================================
class Game_Map
alias wora_minimap_gammap_setup setup
def setup(map_id)
wora_minimap_gammap_setup(map_id)
@db_info = load_data('Data/MapInfos.rvdata') if @db_info.nil?
@map_info = @db_info[map_id]
end

def show_minimap?
return @map_info.show_minimap?
end
end
#==============================================================================
# ■ Game_Event
#==============================================================================
class Game_Event < Game_Character
def mm_comment?(comment, return_comment = false )
if !@list.nil?
for i in 0...@list.size - 1
next if @list[i].code != 108
if @list[i].parameters[0].include?(comment)
return @list[i].parameters[0] if return_comment
return true
end
end
end
return '' if return_comment
return false
end
end
#==============================================================================
# ■ Game_MiniMap
#------------------------------------------------------------------------------
class Game_MiniMap
def initialize(tilemap)
@tilemap = tilemap
refresh
end

def dispose
@border.bitmap.dispose
@border.dispose
@map_sprite.bitmap.dispose
@map_sprite.dispose
@object_sprite.bitmap.dispose
@object_sprite.dispose
@position_sprite.bitmap.dispose
@position_sprite.dispose
end

def visible
return @map_sprite.visible
end

def visible=(value)
@map_sprite.visible = value
@object_sprite.visible = value
@position_sprite.visible = value
@border.visible = value
end

def refresh
@mmr = $game_system.minimap
map_rect = Rect.new(@mmr[0], @mmr[1], @mmr[2], @mmr[3])
grid_size = [MiniMap::GRID_SIZE, 1].max

@x = 0
@y = 0
@size = [map_rect.width / grid_size, map_rect.height / grid_size]

@border = Sprite.new
@border.x = map_rect.x - MiniMap::MINIMAP_BORDER_SIZE
@border.y = map_rect.y - MiniMap::MINIMAP_BORDER_SIZE
b_width = map_rect.width + (MiniMap::MINIMAP_BORDER_SIZE * 2)
b_height = map_rect.height + (MiniMap::MINIMAP_BORDER_SIZE * 2)
@border.bitmap = Bitmap.new(b_width, b_height)
@border.bitmap.fill_rect(@border.bitmap.rect, MiniMap::MINIMAP_BORDER_COLOR)
@border.bitmap.clear_rect(MiniMap::MINIMAP_BORDER_SIZE, MiniMap::MINIMAP_BORDER_SIZE,
@border.bitmap.width - (MiniMap::MINIMAP_BORDER_SIZE * 2),
@border.bitmap.height - (MiniMap::MINIMAP_BORDER_SIZE * 2))

@map_sprite = Sprite.new
@map_sprite.x = map_rect.x
@map_sprite.y = map_rect.y
@map_sprite.z = MiniMap::MAP_Z
bitmap_width = $game_map.width * grid_size + map_rect.width
bitmap_height = $game_map.height * grid_size + map_rect.height
@map_sprite.bitmap = Bitmap.new(bitmap_width, bitmap_height)
@map_sprite.src_rect = map_rect

@object_sprite = Sprite.new
@object_sprite.x = map_rect.x
@object_sprite.y = map_rect.y
@object_sprite.z = MiniMap::MAP_Z + 1
@object_sprite.bitmap = Bitmap.new(bitmap_width, bitmap_height)
@object_sprite.src_rect = map_rect

@position_sprite = Sprite_Base.new
@position_sprite.x = map_rect.x + @size[0] / 2 * grid_size
@position_sprite.y = map_rect.y + @size[1] / 2 * grid_size
@position_sprite.z = MiniMap::MAP_Z + 2

bitmap = Bitmap.new(grid_size, grid_size)
# Player's Outline
if MiniMap::USE_OUTLINE_PLAYER and MiniMap::GRID_SIZE >= 3
bitmap.fill_rect(bitmap.rect, MiniMap::PLAYER_OUTLINE_COLOR)
brect = Rect.new(bitmap.rect.x + 1, bitmap.rect.y + 1, bitmap.rect.width - 2,
bitmap.rect.height - 2)
bitmap.clear_rect(brect)
else
brect = bitmap.rect
end

bitmap.fill_rect(brect, MiniMap::PLAYER_COLOR)
@position_sprite.bitmap = bitmap

draw_map
update_object_list
draw_object
update_position
end

def draw_map
bitmap = @map_sprite.bitmap
bitmap.fill_rect(bitmap.rect, MiniMap::BACKGROUND_COLOR)
map_rect = Rect.new(@mmr[0], @mmr[1], @mmr[2], @mmr[3])
grid_size = [MiniMap::GRID_SIZE, 1].max

$game_map.width.times do |i|
$game_map.height.times do |j|
if !$game_map.passable?(i, j)
next
end
rect = Rect.new(map_rect.width / 2 + grid_size * i,
map_rect.height / 2 + grid_size * j,
grid_size, grid_size)
if grid_size >= 3
if !$game_map.passable?(i, j)
rect.height -= 1
rect.x += 1
rect.width -= 1
rect.width -= 1
rect.y += 1
rect.height -= 1
end
end
bitmap.fill_rect(rect, MiniMap::FOREGROUND_COLOR)
end
end
end

def update_object_list
@object_list = {}
$game_map.events.values.each do |e|
comment = e.mm_comment?(MiniMap::TAG_EVENT, true)
if comment != ''
type = comment.gsub(/#{MiniMap::TAG_EVENT}/){}.gsub(/\s+/){}
@object_list[type] = [] if @object_list[type].nil?
@object_list[type] << e
end
end
end

def draw_object
bitmap = @object_sprite.bitmap
bitmap.clear
map_rect = Rect.new(@mmr[0], @mmr[1], @mmr[2], @mmr[3])
grid_size = [MiniMap::GRID_SIZE, 1].max
rect = Rect.new(0, 0, grid_size, grid_size)
mw = map_rect.width / 2
mh = map_rect.height / 2

@object_list.each do |key, events|
color = MiniMap::OBJECT_COLOR[key]
next if events.nil? or color.nil?
events.each do |obj|
if !obj.character_name.empty?
rect.x = mw + obj.real_x * grid_size / 256
rect.y = mh + obj.real_y * grid_size / 256
# Event's Outline
if MiniMap::USE_OUTLINE_EVENT and MiniMap::GRID_SIZE >= 3
bitmap.fill_rect(rect, MiniMap::EVENT_OUTLINE_COLOR)
brect = Rect.new(rect.x + 1, rect.y + 1, rect.width - 2,
rect.height - 2)
bitmap.clear_rect(brect)
else
brect = bitmap.rect
end
bitmap.fill_rect(brect, color)
end
end
end
end

def update
if @mmr != $game_system.minimap
dispose
refresh
end
draw_object
update_position
if @map_sprite.visible
@map_sprite.update
@object_sprite.update
@position_sprite.update
end
end

def update_position
map_rect = Rect.new(@mmr[0], @mmr[1], @mmr[2], @mmr[3])
grid_size = [MiniMap::GRID_SIZE, 1].max
sx = $game_player.real_x * grid_size / 256
sy = $game_player.real_y * grid_size / 256
@map_sprite.src_rect.x = sx
@map_sprite.src_rect.y = sy
@object_sprite.src_rect.x = sx
@object_sprite.src_rect.y = sy
end
end
#==============================================================================
# ■ Spriteset_Map
#------------------------------------------------------------------------------
class Spriteset_Map
attr_reader :minimap
alias wora_minimap_sprsetmap_ini initialize
alias wora_minimap_sprsetmap_dis dispose
alias wora_minimap_sprsetmap_upd update

def initialize
wora_minimap_sprsetmap_ini
if $game_map.show_minimap?
@minimap = Game_MiniMap.new(@tilemap)
$game_system.show_minimap = true if $game_system.show_minimap.nil?
@minimap.visible = $game_system.show_minimap
end
end

def dispose
@minimap.dispose if !@minimap.nil?
wora_minimap_sprsetmap_dis
end

def update
if !@minimap.nil?
if $game_system.show_minimap
@minimap.visible = true
@minimap.update
else
@minimap.visible = false
end
end
wora_minimap_sprsetmap_upd
end
end
#==============================================================================
# ■ Scene_Map
#------------------------------------------------------------------------------
class Scene_Map < Scene_Base
attr_reader :spriteset
end
Revenir en haut Aller en bas
Matsuo Kaito
+ Heir Øf Ŧime +
+ Heir Øf Ŧime +
Matsuo Kaito


Masculin Age : 32
Inscrit le : 27/06/2008
Messages : 10881

Mini carte sans besoin d'image Empty
MessageSujet: Re: Mini carte sans besoin d'image   Mini carte sans besoin d'image Icon_minitimeMar 24 Mar 2009 - 9:32

Script déjà posté ici ...
Revenir en haut Aller en bas
MirainoHikari
Ex-Admin-Script
Ex-Admin-Script
MirainoHikari


Masculin Age : 41
Inscrit le : 26/05/2008
Messages : 2360

Mini carte sans besoin d'image Empty
MessageSujet: Re: Mini carte sans besoin d'image   Mini carte sans besoin d'image Icon_minitimeMar 24 Mar 2009 - 11:10

@Matsuo Kaito : Je vais déplacer, le mec c'est gourré d'endroit. C'est une question sur le script.

Premièrement, tu dois mettre le "outline events" à true si tu veux que d'autre chose que ton perso apparaisse sur ta carte.

Deuxièmement, dans le commentaire de ton event, tu dois retrouvé le "TAG_EVENT" (par défaut MMEV) suivit d'un de tes mots clé. J'ai testé le script et c'est aussi simple que ça.
Revenir en haut Aller en bas
http://mirainohikari.deviantart.com
niicoslash
Va-nu-pieds Lv.4
Va-nu-pieds Lv.4
niicoslash


Masculin Age : 26
Inscrit le : 05/10/2010
Messages : 72

Mini carte sans besoin d'image Empty
MessageSujet: Re: Mini carte sans besoin d'image   Mini carte sans besoin d'image Icon_minitimeDim 5 Déc 2010 - 9:54

bonjour je souhaiterai (si quelqu'un y arrive) que lorsqu'on lance notre jeu, la carte ne s'affiche pas
Revenir en haut Aller en bas
Zangther
Maître des Duels
Maître des Duels
Zangther


Masculin Age : 31
Inscrit le : 29/07/2009
Messages : 7840

Mini carte sans besoin d'image Empty
MessageSujet: Re: Mini carte sans besoin d'image   Mini carte sans besoin d'image Icon_minitimeDim 5 Déc 2010 - 11:17

Nécro pour une question aussi inutile...

Regarde dans le script c'est marqué :

SWITCH_NO_MINIMAP = 0 # Turn ON this switch to NOT SHOW minimap
Revenir en haut Aller en bas
niicoslash
Va-nu-pieds Lv.4
Va-nu-pieds Lv.4
niicoslash


Masculin Age : 26
Inscrit le : 05/10/2010
Messages : 72

Mini carte sans besoin d'image Empty
MessageSujet: Re: Mini carte sans besoin d'image   Mini carte sans besoin d'image Icon_minitimeLun 6 Déc 2010 - 18:38

D'accord mais lorsque je lance mon jeu la petite carte s'affiche et je ne veux pas qu'elle s'affiche (pour faire mieux )
Revenir en haut Aller en bas
Zangther
Maître des Duels
Maître des Duels
Zangther


Masculin Age : 31
Inscrit le : 29/07/2009
Messages : 7840

Mini carte sans besoin d'image Empty
MessageSujet: Re: Mini carte sans besoin d'image   Mini carte sans besoin d'image Icon_minitimeLun 6 Déc 2010 - 18:48

Un minimum de connaissances en langue anglaise est requise pour mettre des scripts anglais...

C'est marqué :

SWITCH_NO_MINIMAP = 0 # Mettez cet interrupteur sur activé pour NE PAS montrer la minimap

En gros, remplace le 0 par un autre nombre et active l'interrupteur voulu...

Revenir en haut Aller en bas
niicoslash
Va-nu-pieds Lv.4
Va-nu-pieds Lv.4
niicoslash


Masculin Age : 26
Inscrit le : 05/10/2010
Messages : 72

Mini carte sans besoin d'image Empty
MessageSujet: Re: Mini carte sans besoin d'image   Mini carte sans besoin d'image Icon_minitimeMar 7 Déc 2010 - 19:31

Desolé j'ai 2 en anglais alors ^^
Revenir en haut Aller en bas
BARVACHE
Vache Folle
Vache Folle
BARVACHE


Masculin Age : 29
Inscrit le : 22/05/2010
Messages : 3005

Mini carte sans besoin d'image Empty
MessageSujet: Re: Mini carte sans besoin d'image   Mini carte sans besoin d'image Icon_minitimeMar 7 Déc 2010 - 19:50

Il n'y a pas vraiment de quoi se vanter...
Pour pas faire de flood:
Je pense qu'il veut que la minimap ne s'affiche pas du tout. Alors que là, elle s'affiche, puis disparait lorsqu'on active le switch. Il y a peut être un moyen en passant par le script main...fin je me trompe peut être^^"
Revenir en haut Aller en bas
niicoslash
Va-nu-pieds Lv.4
Va-nu-pieds Lv.4
niicoslash


Masculin Age : 26
Inscrit le : 05/10/2010
Messages : 72

Mini carte sans besoin d'image Empty
MessageSujet: Re: Mini carte sans besoin d'image   Mini carte sans besoin d'image Icon_minitimeMar 7 Déc 2010 - 19:52

non c'est bien ça mais bon j'essaye de comprendre le ruby mais je comprend rien
Revenir en haut Aller en bas
Viper-Rko
Modérateur
Modérateur
Viper-Rko


Masculin Age : 28
Inscrit le : 20/09/2010
Messages : 4421

Mini carte sans besoin d'image Empty
MessageSujet: Re: Mini carte sans besoin d'image   Mini carte sans besoin d'image Icon_minitimeMar 7 Déc 2010 - 20:31

Je suis passé par la aussi, tentative de 2 fois pour comprendre le ruby. J'en ai eu marre de pas comprendre, maintenant je demande à Barvache Mini carte sans besoin d'image 362633 Quoi ! Faut bien qu'il serve à quelque chose enfin !
Revenir en haut Aller en bas
Zangther
Maître des Duels
Maître des Duels
Zangther


Masculin Age : 31
Inscrit le : 29/07/2009
Messages : 7840

Mini carte sans besoin d'image Empty
MessageSujet: Re: Mini carte sans besoin d'image   Mini carte sans besoin d'image Icon_minitimeMar 7 Déc 2010 - 21:22

Bah après suffit de ne pas utiliser le script et c'est bon. Faut faire avec ou alors ne pas utiliser.
Revenir en haut Aller en bas
Contenu sponsorisé




Mini carte sans besoin d'image Empty
MessageSujet: Re: Mini carte sans besoin d'image   Mini carte sans besoin d'image Icon_minitime

Revenir en haut Aller en bas
 

Mini carte sans besoin d'image

Voir le sujet précédent Voir le sujet suivant Revenir en haut 
Page 1 sur 1

Permission de ce forum:Vous ne pouvez pas répondre aux sujets dans ce forum
RPG Maker VX :: Entraide :: Scripts :: Requêtes :: Archives-
Créer un forum | ©phpBB | Forum gratuit d'entraide | Signaler un abus | Forum gratuit