VX 스크립트

미니맵
2008.06.02 15:12

미니맵 띠우는 스크립트 ^^

profile
조회 수 7247 추천 수 1 댓글 37
Atachment
첨부 '1'
사용자 삽입 이미지




위의 스크립트를 main 섹션 위쪽에 붙여넣으세요~ ^^

Project4.rar  <--예제 게임입니다.


동영상으로 제작은 아직 하지 못하였네요.


약간 비추 하는 스크립트입니다.

미니맵을 자동으로 생성하는게아니라...

그림을 가지고와서 화면에 표시해주는 방식이네요.

Map1.png

이런그림을 맵마다 일일이 만들어줘야 된다는거죠...

준비물은 예제게임안에 들어있습니다.
아래 그림파일을 Pictures 폴더에 넣어줍니다. (소재관리에서....아시죠?)
Back.png  /  Frame.png  /  Player.png  / 맵 이미지 ^^; 


그런다음에 스크립트를 main섹션 위족에 추가해주시구요.

그리고 한글판 VX를 사용중이라면 스크립틀르 살짝 수정해주셔야됩니다.

Scene_Base 섹션 12~14줄 삭제

Font.default_size = 22 # 기본 크기, '문장의 표시'의 프리뷰와 동일하게 맞췄음.
Font.default_bold = false #볼드를 사용하지 않음, 사용함은 true
 Font.default_name = ["휴먼나무"] #기본으로 설정된 한글 폰트

main 섹션  7~10줄 삭제

unless Font.exist?("UmePlus Gothic")
  print "폰트가 발견되지 않습니다."
  exit
end

이렇게 해주신다음에 스크립트를 적용하시면 될거에요 ^^



동영상은 다음에 올려야겠네요 ^^;
Comment '37'
  • ?
    Minus1 2008.06.02 15:35
    오옷, 이거 굉장히 유용하겠네요. 투명도도 조절할 수 있고...

    사이즈는 상시 떠있게 하기엔 조금 크고... 버튼 누르면 뜨게 하면 좋겠네요.

    추천 추천~
  • ?
    작은악마 2008.06.02 16:56
    와우 굿~~~
  • ?
    bliss_3 2008.06.02 17:10

    와아 감사합니다 ~

  • ?
    아나카시 2008.06.02 17:25
    !!! 흐윽... 찾는게 드디어 나왔어
    XP보다 훨씬 깔끔하네 역시 VX를 포기하지 않는게 나았어 Ha Ha Ha
  • ?
    아나카시 2008.06.02 17:27
    어?? 뭐지?? 오류난다?? 설마 말로만 들었던 다른 스크립트와 충돌하는건가??
  • profile
    아방스 2008.06.02 19:23

    확인을 못해보고 올렸는데.

    잠시후에 확인하고 사용법 촬영 해서 올려드릴께요 ^^;

  • ?
    아나카시 2008.06.02 19:44
    흐윽 흐윽 뭐지 사용법이 필요했던거야?
    뭐...대충보니 가끔씩 어떤 스크립트 쓸려면 메인스크립트에다가 뭐 입력해야하던데...(니가 뭘 안다고 말하는게냐!!!)
    아무튼 우리를 위해 열심히 강좌를 올려주시는 아방스님 감사합니다.
  • profile
    아방스 2008.06.02 22:16

    올리고보니 사용하기 좀 번거로운 녀석이군요...

    미리 확인하고 올렸어야 했는데..

  • ?
    아나카시 2008.06.03 17:41
    ...헐...? 일일이 전부 찍어...?
    역시 VX를 포기해야하는건가...
  • ?
    Incubus 2008.06.09 17:24
    이미지를 직접 만들어야 하지만 그게 장점이 될 수도 있겠네요.

    지도를 원하는 이미지로 지정 할 수 있으니까요 ^^;
  • ?
    Minus1 2008.06.10 10:33
    맞아요. 단순 이미지 축소가 아니라 진짜 지도 모냥으로...
  • ?
    양념통닼 2008.06.10 08:58
    다른 스크립트랑 충돌해서 사용불가....
  • ?
    morte 2008.06.15 15:43
    깔끔하지만.. 그냥 그림을 불려오는 방식이였군요
  • ?
    ☆별 2008.06.30 19:33
    일일이 맵을 찍어줘야 한다는 불편한이 있지만 기회가되면 써보고 싶습니다.
  • ?
    RPG만들기의천재 2008.07.19 22:02

    퍼가여~

  • ?
    김형석 2008.07.22 20:41
    감사해요
  • ?
    뱅뱅이 2008.08.03 13:11
    굿굿!!~ 잘쓸게요~
  • ?
    캐초보 2008.08.03 22:48
    ㅋㅋ
  • ?
    슈팅스타 2008.08.06 14:42
    이거 사용하면 월드맵에서의 나의 위치도 표시할 수 있겠군요 감사해요
  • ?
    Crazy、몽키 2008.09.03 07:17
    헉.... 어려운거같다.... ㅎㅎ 첨이라서요...
  • ?
    Crazy、몽키 2008.09.03 07:17
    한번 해보죠! 머 .... 될수있을런지는...
  • ?
    알피쥐 2008.09.08 19:13

    써도돼나?

  • ?
    떵ENd 2008.10.09 18:01
    감사감사 감사요 ~
  • ?
    소닉의RPG 2008.10.12 13:18
    이건 좀 복잡해요
  • ?
    엘류군 2008.10.12 13:42
    그래도 써볼게염
  • ?
    왕초본데엽 2008.10.14 16:29
    멋지네요
  • ?
    다크아머 2008.10.25 11:11
    좋은자료 감사하므니다.
  • profile
    카와이 2009.01.13 14:10
    흠흠.. 이벤트로도 할수있지만 좋은자료 생택지페리 ㄲㄲ
  • ?
    zx5024 2009.02.09 16:52
    귀찮긴하겠지만 다만들고나면 쓰기 괜찮을텐데 ㅋ.;;
  • ?
    쏘쥬맛갈비 2009.02.13 22:04

    스크립트가...

    ####################################################################
    # MapRadar v1.8

    # By: SojaBird
    # Site: http://www.nestcast.blogspot.com
    # Discription: Shows a radar with map and where the player is located

    ####################################################################
    # Start Setup
    ####################################################################

    # General Setup
    Radar_Switch = 1 # Number of the switch wich determens if the radar is shown or not
    Player_Map = 1 # Wheter to move the playericon or the map to display the playerposition [MovePlayerIcon=1, MoveMap=2]
    MapOffset = 3 # Amount wich the map will be offset from the border (E.g. the frameborderthickness)


    # Picture Setup
    PlayerWidth = 8 # The width of the playerindicator picture
    PlayerHeight = 8 # The height of the playerindicator picture

    PicWidth = 144 # The width of the frame and back pictures
    PicHeight = 144 # The height of the frame and back pictures

    Frame = "Frame" # Name of the picture for the frame
    Player = "Player" # Name of the picture wich shows the playerindicator
    Back = "Back" # Name of the picture wich is the BG for the Hud whene there is no map displayed
    # You need a picture of every map you want to display in the Hud, where the width=PlayerSize*[number of X-tiles] and where is the height=PlayerSize*[number of Y-tiles]
    # The name of these maps need to be "Map..." where the "..." stand for the map nr. So for map001 you need a picture called "Map1", for map002 "Map2" etc.


    # Placement Setup
    PlacementX = 2 # Horizontal placement of the Hud [Left=1, Center=2, Right=3, Custom=0]
    PlacementY = 2 # Vertical placement of the Hud [Top=1, Center=2, Bottom=3, Custom=0]

    CustomX = 0 # Your custom horizontal placement of the Hud
    CustomY = 0 # Your custom vertical placement of the Hud


    # Opacity Setup
    Back_Opacity = 100 # Background opacity
    Map_Opacity = 200 # Map opacity
    Frame_Opacity = 255 # Frame opacity
    Player_Opacity = 200 # Playerindicator opacity

    Hide = true # Wheter or not to hide the Hud when the player is behind it
    Hide_Opacity = 150 # Amount that decreases the opacity of the Hud when the player is behind it


    # Text Setup
    DrawLocation = true # Whether or not to draw the mapname
    Font = "" # Font of the drawn mapname (use "" for the default "UmePlus Gothic"-style)

    LocationX =
    LocationY =

    SelfX = 0
    SelfY = 0


    # ScriptUse Setup
    UseRadar = true # Whether or not to use this script (put false and playergrafic to non to make mappictures)


    ####################################################################
    # End Setup
    ####################################################################

    ####################################################################
    ####################################################################

    X_Place =
        case PlacementX
          when 1
            0
          when 2
            272-(PicWidth/2)
          when 3
            544-PicWidth
          when 0
            CustomX
          end

    Y_Place =
        case PlacementY
          when 1
            0
          when 2
            208-(PicHeight/2)
          when 3
            416-PicHeight
          when 0
            CustomY
          end

    ####################################################################
    ####################################################################
                        if UseRadar == true
    ####################################################################
    ####################################################################
     
    class Scene_Map < Scene_Base
     
      def start
        super
        $game_map.refresh
        @spriteset = Spriteset_Map.new
        @message_window = Window_Message.new
        if $game_switches[Radar_Switch] == true
          $Radar = Radar.new
        end
      end

      def terminate
        super
        if $scene.is_a?(Scene_Battle)
          @spriteset.dispose_characters
        end
        snapshot_for_background
        @spriteset.dispose
        @message_window.dispose
        if $game_switches[Radar_Switch] == true
          $Radar.dispose
        end
        if $scene.is_a?(Scene_Battle)
          perform_battle_transition
        end
      end
     
      def update
        super
        $game_map.interpreter.update
        $game_map.update
        $game_player.update
        $game_system.update
        @spriteset.update
        @message_window.update
        if $game_switches[Radar_Switch] == true
          if $Radar == nil
            $Radar = Radar.new
          end
          $Radar.update
        elsif $Radar != nil
          $Radar.dispose
        end
        unless $game_message.visible
          update_transfer_player
          update_encounter
          update_call_menu
          update_call_debug
          update_scene_change
        end
      end
     
      def update_transfer_player
        return unless $game_player.transfer?
        fade = (Graphics.brightness > 0)
        fadeout(30) if fade
        @spriteset.dispose
        $game_player.perform_transfer
        $game_map.autoplay
        $game_map.update
        Graphics.wait(15)
        @spriteset = Spriteset_Map.new
        if $game_switches[Radar_Switch] == true
          $Radar.dispose
          $Radar = Radar.new
        end
        fadein(30) if fade
        Input.update
      end
     
    end

    ####################################################################
    ####################################################################

    class Radar
     
      def initialize
        # draw frame
        @frame = Sprite.new
        @frame.bitmap = Cache.picture(Frame)
        @frame.x = X_Place
        @frame.y = Y_Place
        @frame.z = 9998
        @frame.opacity = Frame_Opacity
        # draw location
        if DrawLocation == true
          @location_name = Sprite.new
          @location_name.bitmap = Bitmap.new(200,32)
          @location_name.x = (544/2)-100
          @location_name.y = 416-32
          if Font == ""
            @location_name.bitmap.font.name = "UmePlus Gothic"
          else
            @location_name.bitmap.font.name = Font
          end
          @map_id = $game_map.map_id
          @location_name.bitmap.clear
          @location_name.bitmap.draw_text(0, 0, 200, 32, load_data("Data/MapInfos.rvdata")[@map_id].name,1)
        end
        # draw bg
        @map_back_viewport = Viewport.new(X_Place, Y_Place, PicWidth, PicHeight)
        @map_back = Sprite.new(@map_back_viewport)
        @map_back.z = 9996
        @map_back.bitmap = Cache.picture(Back)
        @map_back.opacity = Back_Opacity
        # draw map
        @map_viewport = Viewport.new(X_Place+MapOffset, Y_Place+MapOffset, PicWidth, PicHeight)
        @map = Sprite.new(@map_viewport)
        @map.bitmap = Cache.picture("Map" + $game_map.map_id.to_s)
        @map.z = 9997
        @map.opacity = Map_Opacity
        # draw player
        @player_icon = Sprite.new(@map_viewport)
        @player_icon.bitmap = Cache.picture(Player)
        @player_icon.x = PicWidth/2
        @player_icon.y = PicHeight/2
        @player_icon.z = 9999
        @player_icon.opacity = Player_Opacity

        update
      end
     
      def update
        # draw location
        if DrawLocation == true
          if @map_id != $game_map.map_id
            @map_id = $game_map.map_id
            @location_name.bitmap.clear
            @location_name.bitmap.draw_text(0, 0, 200, 32, load_data("Data/MapInfos.rvdata")[@map_id].name,1)
          end
        end
        # move player or map?
        case Player_Map
        when 1
          # move player to map (x, y)
          if @map.x*32 != $game_player.x or @map.y*32 != $game_player.y
            @player_icon.x = ($game_player.x * PlayerWidth)
            @player_icon.y = ($game_player.y * PlayerHeight)
          end
        when 2
          # move map to player (x, y)
          if @map.x*32 != $game_player.x or @map.y*32 != $game_player.y
            @map.x = (PicWidth/2) - ($game_player.x * PlayerWidth)
            @map.y = (PicHeight/2) - ($game_player.y * PlayerHeight)
          end
        end
        if Hide == true
          if $game_player.x >= X_Place/32 and $game_player.y >= Y_Place/32 and $game_player.x <= (X_Place+PicWidth)/32 and $game_player.y <= (Y_Place+PicHeight)/32
            @frame.opacity = Frame_Opacity-Hide_Opacity
            @map_back.opacity = Back_Opacity-Hide_Opacity
            @map.opacity = Map_Opacity-Hide_Opacity
            @player_icon.opacity = Player_Opacity-Hide_Opacity
          else
            @frame.opacity = Frame_Opacity
            @map_back.opacity = Back_Opacity
            @map.opacity = Map_Opacity
            @player_icon.opacity = Player_Opacity
          end
        end
      end

      def dispose
        if DrawLocation == true
          @location_name.dispose
        end
        @map.opacity = 0
        @map_back.opacity = 0
        @player_icon.opacity = 0
        @frame.opacity = 0
      end
    end


                        end

    너무 길어..

  • ?
    칼맞은법사 2009.03.16 20:00

    파티원이따라다니는스크립트는 354줄이구요 보통 스크립트 그정도하지않나요? =_=...
    전그렇게알고있는데..//
    ( 게이지바같은건짧음 class Game_System < Game_System
      attr_accessor :mini_guage
      def initialize
        super
        @mini_guage = false
      end
    end

    class Sprite_Character < Sprite_Character
      def update_bitmap
        super
        if !@hpguage.nil?
          @hpguage.dispose
          @hpguage = nil
        end
        if !@mpguage.nil?
          @mpguage.dispose
          @mpguage = nil
        end
        return if $game_system.mini_guage
        if @character == $game_player and $game_party.members.size > 0 and
          $game_player.vehicle_type == -1 and $game_temp.next_scene.nil?
          hpguage = Bitmap.new(32, 3)
          mpguage = Bitmap.new(32, 1)
          hpguage.fill_rect(0,0,hpguage.width,hpguage.height,Color.new(255,0,0,160))
          mpguage.fill_rect(0,0,hpguage.width,hpguage.height,Color.new(0,0,255,160))
          hp = ($game_party.members[0].hp*32)/$game_party.members[0].maxhp
          mp = ($game_party.members[0].mp*32)/$game_party.members[0].maxmp
          vhp = Viewport.new($game_player.screen_x-16,$game_player.screen_y-37, hp,3)
          vmp = Viewport.new($game_player.screen_x-16,$game_player.screen_y-34, mp,3)
          @hpguage = Sprite.new(vhp)
          @mpguage = Sprite.new(vmp)
          @hpguage.bitmap = hpguage
          @mpguage.bitmap = mpguage
        end
      end
    end
    이거)

  • ?
    lhh9606 2009.03.17 16:59
    안돼네 오류떠 ㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋ
  • ?
    꼬맹씨 2009.08.21 13:49
    에러가 떠요.
  • ?
    이웃집사람 2010.02.27 14:39

    감사해요ㅎㅎ

  • ?
    캬무캬무 2011.07.25 17:07

    어렵지만 멋지네요!

  • profile
    아방스 2011.07.25 20:55

    멎진 게임 만드시길 바랍니다.

  • profile
    은색바람 2012.01.11 16:02

    오타가 있었음!