VX 스크립트

사용자 삽입 이미지
사용자 삽입 이미지
사용자 삽입 이미지
사용자 삽입 이미지
사용자 삽입 이미지



이것은 유용하지만 어려울수가 있습니다.

차근차근히 따라 오시길 바라겠습니다.

일단 이부분을 알아두셔야지 할수 있습니다.

일단 제가 다 해석을 하겠습니다.

V[n]    Replaced by the value of variable n (n = ID of a variable).(변동하는 평가를를 대체하라- 별효용성이 없음)
N[n]    Replaced by the name of actor n (n = ID of an actor). (액쳐의 이름을 대체하라)
C[n]    Change the color of the following text(n = 0 til 31).(텍스트의 색깔을 대체하라)
G       Replaced by the current gold amount. (현재 돈의 양을 대체하라)
      Replaced by the '' character. (의 캐릭터로부터 대체하라)

----이까지는 해석했지만 안 건드는게 좋습니다 밑부분부터 사용하시면 되겟습니다)--------

Control characters from woratanas NMS (v2.52):

MAP      Replaced by the current map name.  (통용하는 맵이를을 바꿔라)
NC[n]    Replaced by the class of actor n (n = ID of an actor). (액터의 직업을 N으로 부터 대체해라)
NP[n]    Replaced by the name of actor n in the party (n = integer between 1 and 4).(액터의 파티로부터 대체하거라( n=1부터 4까지 정수)
NM[n]    Replaced by the name of enemy n (n = ID of an enemy).(적의 이름을 바꾸거라)
NT[n]    Replaced by the name of troop n (n = ID of a troop).(무리의 N을 대체시겨라)
NI[n]    Replaced by the name of item n (n = ID of an item).(아이템의 이름으로부터 대체시켜라)
NW[n]    Replaced by the name of weapon n (n = ID of a weapon).(무기의 이름으로부터 대체시켜라)
NA[n]    Replaced by the name of armor n (n = ID of an armor).(방어구의 이름을 대체시켜라)
NS[n]    Replaced by the name of skill n (n = ID of a skill). (스킬의 이름을 바꿔라)
PRICE[n] Replaced by the price of the item n (n = ID of an item).
IC[n]    Replaced by the icon with the index n (n = Index of icon in the Iconset).
DW[n]    Replaced by the icon and name of weapon n (n = ID of a weapon).
DI[n]    Replaced by the icon and name of item n (n = ID of an item).
DA[n]    Replaced by the icon and name of armor n (n = ID of an armor).
DS[n]    Replaced by the icon and name of skill n (n = ID of a skill).
FN[str]  Following text is in font str (str = name of a font).
FS[n]    Following text is in fontsize n (n = integer. Standard is 20).

대충이렇게 됩니다.귀찮 ㅋ

Other control characters:

BO       Following text is or isn't bold.
IT       Following text is or isn't italic. 이택릭체
SH       Folling text is or isn't shadowed. 그림자체
AL[n]    Align text (n = integer between 0 and 2 (0 = left, 1 = center, 2 = right)). 가운데정렬 왼쪾 정렬 오른쪽정렬

스크립트를 보지면 이 부분이 있는데..

이부분은 게임에 적용할 일종의 연결고리라고 생각하지면 되겠습니다.

이것은 대입만하면 나타나기때문에 엄청 유용합니다.
---------------------------------------------------------------------------------------------------------------------------------------------------

이제 하는 방법을 가르켜 드리겠습니다.

일단 타이틀의

NEW GAME
LOAD GAME
EXIT
가 있다고 칩시다.

NEW GAME 를 연두색으로 가운데 정렬을 하고 싶다.
그러면 AL[1] 이게 가운데 정렬입니다.
그리고 C[3]  색깔을 연두색으로 바꿔라의 명령어 입니다.  위의 것 보시면 됨
그러면 AL[1]C[3]NEW GAME  이렇게 됩니다 이게 완성된 명령어 입니다.
지금 우리가 타이틀의 NEW GAME 을 바꾸려하니 당연히 게임만들기에 들어가서
F9에 들어가고 위의 그림(그림참조)과 같이 합니다.

그리고 확인을 하고 테스트를 해보면-

그리고 LOAD GAME에 칼을 넣고 싶으면
ITIC[9]LOAD GAME 를 넣으면 되겠죠 ^^

EXIT에는 미카엘을 넣어봅시다..

그러면 AL[2]C[10]EXIT미카엘 로 하면
완성된 그림 위에 감상하시죠..



------------------------------------------------------

일단 스크립트에 이것을 먼저 삽입을 해주신 다음에 위의 것을 해야합니다.






#==============================================================================
# ** [ERZVX] Enhanced Bitmap#draw_text (by ERZENGEL at 27-April-2008 at 19:53)
#------------------------------------------------------------------------------
#  Bitmap#draw_text is able to convert control characters.
#==============================================================================
=begin
###############################################################################

Default control characters:

V[n]    Replaced by the value of variable n (n = ID of a variable).
N[n]    Replaced by the name of actor n (n = ID of an actor).
C[n]    Change the color of the following text(n = 0 til 31).
G       Replaced by the current gold amount.
      Replaced by the '' character.

Control characters from woratanas NMS (v2.52):

MAP      Replaced by the current map name.
NC[n]    Replaced by the class of actor n (n = ID of an actor).
NP[n]    Replaced by the name of actor n in the party (n = integer between 1 and 4).
NM[n]    Replaced by the name of enemy n (n = ID of an enemy).
NT[n]    Replaced by the name of troop n (n = ID of a troop).
NI[n]    Replaced by the name of item n (n = ID of an item).
NW[n]    Replaced by the name of weapon n (n = ID of a weapon).
NA[n]    Replaced by the name of armor n (n = ID of an armor).
NS[n]    Replaced by the name of skill n (n = ID of a skill).
PRICE[n] Replaced by the price of the item n (n = ID of an item).
IC[n]    Replaced by the icon with the index n (n = Index of icon in the Iconset).
DW[n]    Replaced by the icon and name of weapon n (n = ID of a weapon).
DI[n]    Replaced by the icon and name of item n (n = ID of an item).
DA[n]    Replaced by the icon and name of armor n (n = ID of an armor).
DS[n]    Replaced by the icon and name of skill n (n = ID of a skill).
FN[str]  Following text is in font str (str = name of a font).
FS[n]    Following text is in fontsize n (n = integer. Standard is 20).

Other control characters:

BO       Following text is or isn't bold.
IT       Following text is or isn't italic.
SH       Folling text is or isn't shadowed.
AL[n]    Align text (n = integer between 0 and 2 (0 = left, 1 = center, 2 = right)).

###############################################################################
=end
#==============================================================================
# ** Bitmap
#==============================================================================
class Bitmap
  #--------------------------------------------------------------------------
  # * Draw text
  #--------------------------------------------------------------------------
  alias :erzvx_draw_text :draw_text unless $@
  def draw_text(*args)
    # Falls erstes Argument ein Rectobjekt ist
    if args[0].is_a?(Rect)
      if args.size > 3 then raise(ArgumentError) end
      x, y, width, height = args[0].x, args[0].y, args[0].width, args[0].height
      str = args[1]
      align = args[2]
    else
      if args.size > 6 then raise(ArgumentError) end
      x, y, width, height, str, align = args[0..5]
    end
    # Links ausrichten, falls Wert von align nil oder größer als 2 ist
    align = 0 if align.nil? || align > 2
    # Standardeigenschaften in Variablen speichern
    name, size,   color  = self.font.name, self.font.size,   self.font.color
    bold, italic, shadow = self.font.bold, self.font.italic, self.font.shadow
    # Temporäre Variablen erstellen
    tstr = (str.is_a?(String) ? str : str.to_s) + "n";  tc = '';  tx = 0
    begin
      lasttstr = tstr.clone
      tstr = convert_special_characters(tstr)
    end until tstr == lasttstr
    while (!(c = tstr.slice!(/./m)).nil?)
      case c
      when "x01"  # C[n]
        tstr.sub!(/[([0-9]+)]/, "")
        tcolor = $1.to_i
        self.font.color = text_color(tcolor) if tcolor >= 0 && tcolor <= 31
      when "x02"  # C[n]
        tstr.sub!(/[([0-2]+)]/, "")
        align = $1.to_i       
      when "x83"  # IC[n]
        tstr.sub!(/[([0-9]+)]/, "")
        icon_index = $1.to_i
        draw_icon(icon_index, x, y)
        tx += 24
      when "x84"  # FN[*]
        tstr.sub!(/[(.*?)]/, "")
        self.font.name = $1.to_s
      when "x85"  # FS[n]
        tstr.sub!(/[([0-9]+)]/, "")
        self.font.size = $1.to_i
      when "x88"  # BO
        self.font.bold = !self.font.bold
      when "x89"  # IT
        self.font.italic = !self.font.italic
      when "x93"  # SH
        self.font.shadow = !self.font.shadow
      when "n"    # Neue Zeile
        if align == 1     # Zentriert
          tx = width - tx
          tx = tx / 2
          erzvx_draw_text((x + tx), y, (width - tx), height, tc)
        elsif align == 2  # Rechts
          tx = width - tx
          erzvx_draw_text((x + tx), y, (width - tx), height, tc)
        end
        # Temporäre Variablen zurücksetzen
        tc = tstr = '';  tx = 0
      else         # Normal text character
        # Ausrichtungsabfrage (Links)
        if align == 0
          erzvx_draw_text((x + tx), y, width, height, c, align)
          tx += text_size(c).width
        else
          tc += c
          tx += text_size(c).width
        end
      end
    end
    # Standardeigenschaften wiederherstellen
    self.font.name, self.font.size,   self.font.color  = name, size,   color
    self.font.bold, self.font.italic, self.font.shadow = bold, italic, shadow
  end
  #--------------------------------------------------------------------------
  # * Convert Special Characters
  #--------------------------------------------------------------------------
  def convert_special_characters(str)
    # Mit Wert einer Variable ersetzen
    str.gsub!(/V[([0-9]+)]/i) { $game_variables[$1.to_i] }
    # Mit Namen eines Heldens ersetzen
    str.gsub!(/N[([0-9]+)]/i) { $game_actors[$1.to_i].name }
    # Nachfolgenden Text in anderer Farbe anzeigen
    str.gsub!(/C[([0-9]+)]/i) { "x01[#{$1}]" }
    # Mit dem aktuellen Goldbetrag ersetzen
    str.gsub!(/G/) { $game_party.gold.to_s }
    # Backslash anzeigen
    str.gsub!(/\/) { "" }
    # Ausrichtung ändern
    str.gsub!(/AL[([0-2]+)]/i) { "x02[#{$1}]" }
    # Woratana's :: Map Name
    str.gsub!(/MAP/i) { get_map_name }
    # Woratana's :: Actor Class Name
    str.gsub!(/NC[([0-9]+)]/i) {
      $data_classes[$data_actors[$1.to_i].class_id].name }
    # Woratana's :: Party Actor Name
    str.gsub!(/NP[([0-9]+)]/i) { $game_party.members[($1.to_i - 1)].name }
    # Woratana's :: Monster Name
    str.gsub!(/NM[([0-9]+)]/i) { $data_enemies[$1.to_i].name }
    # Woratana's :: Troop Name
    str.gsub!(/NT[([0-9]+)]/i) { $data_troops[$1.to_i].name }
    # Woratana's :: Item Name
    str.gsub!(/NI[([0-9]+)]/i) { $data_items[$1.to_i].name }
    # Woratana's :: Weapon Name
    str.gsub!(/NW[([0-9]+)]/i) { $data_weapons[$1.to_i].name }
    # Woratana's :: Armor Name
    str.gsub!(/NA[([0-9]+)]/i) { $data_armors[$1.to_i].name }
    # Woratana's :: Skill Name
    str.gsub!(/NS[([0-9]+)]/i) { $data_skills[$1.to_i].name }
    # Woratana's :: Item Price
    str.gsub!(/PRICE[([0-9]+)]/i) { $data_items[$1.to_i].price.to_s }
    # Woratana's :: Draw Icon
    str.gsub!(/IC[([0-9]+)]/i) { "x83[#{$1}]" }
    # Woratana's :: Draw Weapon Name + Icon
    str.gsub!(/DW[([0-9]+)]/i) {
      "x83[#{$data_weapons[$1.to_i].icon_index}]NW[#{$1.to_i}]" }
    # Woratana's :: Draw Item Name + Icon
    str.gsub!(/DI[([0-9]+)]/i) {
      "x83[#{$data_items[$1.to_i].icon_index}]NI[#{$1.to_i}]" }
    # Woratana's :: Draw Armor Name + Icon
    str.gsub!(/DA[([0-9]+)]/i) {
      "x83[#{$data_armors[$1.to_i].icon_index}]NA[#{$1.to_i}]" }
    # Woratana's :: Draw Skill Name + Icon
    str.gsub!(/DS[([0-9]+)]/i) {
      "x83[#{$data_skills[$1.to_i].icon_index}]ns[#{$1.to_i}]" }
    # Woratana's :: Font Name Change
    str.gsub!(/FN[(.*?)]/i) { "x84[#{$1}]" }
    # Woratana's :: Font Size Change
    str.gsub!(/FS[([0-9]+)]/i) { "x85[#{$1}]" }
    # Woratana's :: BOLD Text
    str.gsub!(/BO/i) { "x88" }
    # Woratana's :: ITALIC Text
    str.gsub!(/IT/i) { "x89" }
    # Woratana's :: SHADOW Text
    str.gsub!(/SH/i) { "x93" }
    return str
  end
  #--------------------------------------------------------------------------
  # * Get Text Color
  #--------------------------------------------------------------------------
  def text_color(n)
    x = 64 + (n % 8) * 8
    y = 96 + (n / 8) * 8
    windowskin = Cache.system('Window')
    return windowskin.get_pixel(x, y)
  end
  #--------------------------------------------------------------------------
  # * Get Map Name
  #--------------------------------------------------------------------------
  def get_map_name
    $data_mapinfos = load_data('Data/MapInfos.rvdata') if $data_mapinfos.nil?
    map_id = $game_map.map_id
    return $data_mapinfos[map_id].name
  end
  #--------------------------------------------------------------------------
  # * Draw Icon
  #--------------------------------------------------------------------------
  def draw_icon(icon_index, x, y)
    bitmap = Cache.system('Iconset')
    rect = Rect.new(icon_index % 16 * 24, icon_index / 16 * 24, 24, 24)
    self.blt(x, y, bitmap, rect)
  end
end








-----------------------------------------------------------------------------


게임상의 모든 글자에 효과 줄수 있습니다. 글자에 아이콘 넣을 수도 있고, 기울기, 그림자,  
엄청 유용합니다만 오류도 안생기고..

힘드시면 쪽지를 보내서 대신 해드리겠습니다.


Who's 미카엘

?

미카엘

Comment '33'
  • ?
    미카엘 2008.08.20 17:23
    BO는 글자의 굵기
  • ?
    시로 2008.08.20 17:28
    대박인걸까요
  • ?
    미카엘 2008.08.20 17:29
    이정도면 대박감인걸요.
  • ?
    변남 2008.08.20 20:13
    넘 어려워..
  • ?
    미카엘 2008.08.21 01:13
    잘 보시면 별로 안어렵습니다 ㅋㅋㅋ
  • ?
    중복 2008.08.21 01:04
    오~ 잘봤습니다
  • ?
    이피쿤 2008.08.22 09:36
    대박자료맞네요~! 잘 쓰겠습니다 미카엘님! 덕분에 오프닝이 풍성해 지겠군요!
  • ?
    넌닝구가좋아 2008.08.22 10:07
    Good
  • ?
    토내이도 2008.08.22 19:20
    와 이거 유용하게 쓰일듯
    사용방법은 조금씩 보면서 익혀야지.
  • ?
    민님 2008.08.22 21:47
    와 초 개대박이네요!!! 아 글자에 색넣고 싶엇는데 택스트에만 되서ㅜㅜㅜ
    짱임 님짱드셔욤
    근데 그림 칼뿐인가욤..?
  • ?
    미카엘 2008.08.31 21:28
    칼 말고 모든 아이콘은 다됨. 색도 물론.. 응용하면 글자란 글자는 다 효과줄수 있음
  • ?
    민님 2008.08.22 21:49
    아아 알겟심 어렵지만 좋은듯
  • ?
    방콕족의생활 2008.08.23 06:47
    잘 쓰겟습니다 ^^
  • ?
    okgeoym1215 2008.08.23 17:29
    이거 만드신분 대단하시네요……。

    아이디어가 멋진듯하네요! ^^;;;
    좋은자료 감사합니다. ^^;;;
  • ?
    ㅡㅅㅡ 2008.08.25 16:06
    이런 VX 다 ㅡㅡ
  • ?
    꿈꾸는소년 2008.08.27 13:34

    영..여...영어닷!!!!

  • ?
    Shadow 2008.08.28 20:39
    어렵진 않는데 아이콘을 넣도록 사용한건 좀 옆쪽에 표시되는게 마음에 들질 않는군요.
  • ?
    zeromax's joke 2008.09.01 14:33
    emoticon
  • ?
    푸른★ 2008.09.02 21:53
    처음엔어려웠는데차근차근이해가가네요
    근데스크립트가있어야되는건가여?
  • ?
    미카엘 2008.09.02 21:57

    ㅇㅇ

  • ?
    DR.kim 2008.09.16 09:04
    좋은데요 ? ^^ NEW GAME 을 칼로 장식하는..
  • ?
    ★찜찜 2008.09.17 10:39
    emoticon
  • ?
    21thcentuary 2008.09.23 19:10
    ...쓰기 싫다
  • ?
    eye of 살쾡이 2008.10.09 09:27
    헉 너무길다...
  • ?
    떵ENd 2008.10.09 17:56
    감사해요 ^^
  • ?
    다크아머 2008.10.25 10:50
    ㅠ.ㅜ 정신없다.
  • ?
    zx5024 2009.02.07 14:54
    오오...!! 대박이라길래 왔는데 ㅋ..
  • ?
    discipline 2009.04.21 14:27
    헉!! 이건 내가 원하던 글씨 색깔 바꾸기 스크립트

    대박임.. 진짜 레어 유니크 세트 표시 다 가능함. 참쉽구요. 게다가
  • ?
    discipline 2009.04.21 14:39
    그나저나 이거 HP 네자릿수 되면 글씨체 크기 줄지 않는데 ... 돈도 999만원 이상 넘어가면 글씨체 크기 줄지 않아서 넘친다는
     
    전 아이콘은 하지 않을거라서 수정 하는 방법 잇나요.. alias :erzvx_draw_text :draw_text unless $@

    이 한줄 스크립트 냄새나는데 수정하는 방법좀...
  • ?
    나는누구임 2009.05.10 20:43

    바로 이런것이죠. 아이탬 이름에 색넣는것을!

  • ?
    Karm(in) 2012.01.18 11:04

    사용 후에 스크립트 문장 하나에서 오류가 나네요.

  • ?
    고무고무열매 2012.08.06 19:48
    143번줄에서 오류나요.
  • ?
    고무고무열매 2012.08.06 19:54
    스크립트 적용도 안되고요

List of Articles
번호 분류 제목 글쓴이 날짜 조회 수
공지 스크립트 자료 게시물 작성시 주의사항 3 습작 2012.12.24 5398
» ((대박!)) 게임상의 모든 글자에 효과 주기.. 33 미카엘 2008.08.20 5581
636 (?스크립트) 스크립트 읽어서 그래픽 넣으세요.(영어 잘하는 사람만 권장...) 2 Man... 2008.10.27 1444
635 메뉴 (모그메뉴 풀세트팩 SEL Style.) 유니크급 자료 147 file 할렘 2009.02.07 9558
634 상점 (수정)크리쳐 샵, 'SW_CreatureShop' by Siot Warrior 15 file 시옷전사 2010.09.03 3675
633 액터 (수정)크리쳐 합체, 'SW_CreatureMix' by SiotWarrior 22 file 시옷전사 2010.09.07 2972
632 기타 (이거 정말 좋군요) 말이나 용을 탈수있게 하는 스크립트. 31 file 아방스가 짱 2010.02.28 4261
631 기타 (좀 이상한 or 쓸모없을 듯 한)화면상에 몬스터와 만나려면 몇걸음 남았는지 표시하는 스크립트! 2 루시페르 2009.06.06 2318
630 기타 078656577er님의 스크립트를 개조한, 사격용 스크립트 1 file 타코 2012.03.16 2519
629 기타 2 Players Engine 11 레이니케 2008.03.28 2294
628 2 Players Engine 2인용하기 15 file RPGbooster 2008.10.08 3999
627 전투 2003식 사이드뷰 적들도 가까이와서 공격함 ㅇㅇ 51 배군 2008.05.02 6750
626 이동 및 탈것 2D 횡스크롤 스크립트 56 file 사람이라면? 2010.08.15 7570
625 이동 및 탈것 3D 던젼 스크립트 38 아방스 2010.12.06 5772
624 그래픽 3D그래픽 파티클엔진 45 file RPGbooster 2008.10.08 10130
623 파티 5인 파티 프로젝트 V1.1 4 file 지나가는떡꼬치 2012.06.30 2988
622 이동 및 탈것 8 방향 이동스크립트 + 스프라이트 효과 12 file 레오 2009.02.06 7557
621 기타 <중수이상>RPG VX의 대표적 참조값 6 까까까 2009.05.31 3236
620 영상 ??(Avi play ver beta 0.8) 4 Man... 2008.10.28 1575
619 ??(다 영어)여기서 부터 드레그만 빼고 Man... 2008.10.27 1078
618 ??? 1 Man... 2008.10.27 1020
Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 ... 32 Next
/ 32