fra700 Posted February 28, 2011 Share Posted February 28, 2011 (edited) # # # Avventura diario Diary possono essere utilizzati in aggiunta a disegnare proprio i personaggi in modo così semplice. #使える制御文字は以下の通り。 # Caratteri di controllo vengono utilizzati come segue. # #\N[n] ID n番のアクターの名前を表示します。 # # \ N [n] ID numero n visualizzare il nome dell'attore. #\V[n] 変数 n番の値を表示します。 # \ V [n] n variabile visualizza il valore della seconda. #\C[n] フォントカラーを変更します。 # \ C [n] per cambiare il colore dei caratteri. #\G 現在の所持金を表示します。 # \ G Visualizzare il denaro corrente in tasca. #\O[n] 不透明度を変更します。 # \ O [n] modificare l'opacità. (0~255) #\H[n] フォントサイズを変更します。 (0 ~ 255) # \ H [n] per cambiare la dimensione del carattere. (6~32) #\R[本文,ルビ] ルビ付きの文字を表示します。 (6 ~ 32) # \ R [testo, rubino visualizzare il carattere con un rubino. #\Pic[x,y,ファイルネーム] ピクチャーにインポートされた画像を表示します。 # \ Pic [x, y, il nome del file per visualizzare l'immagine immagine viene importata. #\Bat[x,y,ファイルネーム,hue] バトラーにインポートされた画像を表示します。 # \ Bat [x, y, nome del file, la tonalità] visualizza le immagini importate in Butler. #\Cha[x,y,ファイルネーム,hue,向き,パターン] キャラクターにインポートされた画像を表示します。 # \ Cha [x, y, nome, colore, orientamento, visualizzare le immagini del modello di caratteri vengono importati. #※向き テンキーの配置と同じ、下2左4右6上8 # パターン1~4 # #日記内容の設定で使う時は「\\n[1]」のように#「\」を一つ余分につけてください。 # La stessa disposizione e l'orientamento delle ※ tastiera, 8 a destra sei di sinistra 2 down 4-4 # # # Quando si utilizza un modello impostato nel contenuto diario "\ \ n [1]" come # "\" uno Si prega di prendere in più. # #サンプルを色々いじってみれば、分かりやすいと思います。 # Tweak vari campioni per così dire, la più ovvia. # #2007.12.17 バグ修正#変数内容によって表示する内容を変えるように設定している場合#タイトルの表示が上手くいっていなかった不具合の修正。 2007/12/17 Corretto il bug # # # Se li proprio per cambiare ciò che viene mostrato a seconda della variabile # Corretto il bug che non ha visto il titolo andando bene. #それに伴い、内容を複数持たせる場合の設定方法が微妙に変更されました。 # Pertanto, è stata leggermente modificata più di un modo per avere il set di caso. # #2005.4.2 機能追加#タイトルも変数によって変更できるように。 # # # 2005/04/02 funzioni aggiuntive possono essere modificate dalla variabile titolo. #それに伴い@titleの扱いが変わっていますが(文字列→文字列の配列) #今までのままでも使えるようになってます。 # @ Titolo con essa è cambiato il trattamento della (un array di stringhe → stringa) # io sono ancora in grado di utilizzarlo fino ad ora. (文字列の場合はそのまま返す) #コメントと同じように @title[0] = "タイトル" みたいな感じで設定してください。 (Se la stringa viene restituito invariato) Commenti # come titolo @ [0] = "title" Impostare sembra. #日記4つ目の項目を参考にすれば、分かりやすいと思います。 # Se il quarto punto riferimento al diario, la più ovvia. # #2005.4.16 機能追加#タイトル部分にも制御文字を使用可能に。 # # # 2005/04/16 aggiunto funzionalità può anche controllare il personaggio del titolo è utilizzato. #一部制御文字(アクター名等)は前々から使えたのですが#文字色変更なども使えるようになりました。 # Alcuni caratteri di controllo (ad esempio i nomi attore) sono da prima sera ho potuto usare il # carattere da utilizzare così come i cambiamenti di colore. #ただ、ちょっとした副作用とかもあると思うので#選択式にしときました。 # Solo un po 'di effetti collaterali o perché pensi di avere a selettivamente Tokimashita #. # #2005.4.30 機能追加#ピクチャ表示の他にも、バトラー表示とキャラクター表示を追加しました。 # # # 2005/04/30 aggiunto oltre alla capacità di visualizzare foto, visualizzare e Butler ha aggiunto un display a caratteri. #ついでに、現在の不透明度でピクチャ等を表示するように。 # Per inciso, per mostrare l'opacità e l'immagine corrente. #ピクチャ表示の直前に\\O[160]とかすれば不透明度を調整できます。 Poco prima della visualizzazione delle immagini # \ \ O [160] o se è possibile regolare l'opacità. # #2005.4.30 更に追加#NO_DATA_VISIBLE で出現していない項目は非表示にするよう設定できるように。 # # # NO_DATA_VISIBLE 2005/04/30 aggiungere altri elementi che non sembrano essere nel set di nascondersi. #日記番号の表記をするかしないか選択できるように。 # Per essere in grado di scegliere o meno il numero di notazioni diario. #あと微妙にバグ修正。 Corretto il bug # poco dopo. Window_Base#transfer, Window_Base#draw_ex_text を調整。 Window_Base # trasferimento, Window_Base # draw_ex_text regolato. class Window_Questdiary_Select < Window_Selectable QUESTDIARY_DATA_MAX = 10 #日記データの最大数 TITLE_TEXT_EX = true #日記のタイトルにも制御文字を使用するか? classe Window_Questdiary_Select <Window_Selectable QUESTDIARY_DATA_MAX = 10 # numero massimo di dati di diario TITLE_TEXT_EX = true # se usare caratteri di controllo nel titolo del diario? #使用した場合長いタイトルを表示しきれない場合アリ #(draw_textを使用しないので、自動縮小機能が働かない為) NO_DATA_VISIBLE = true #まだ出現していない項目を表示するかどうか DRAW_ID = true #日記番号を表記するかどうかend class Data_Questdiary VISIBLE_JUDGE_MODE = 1 #出現判定にスイッチを使うか変数を使うか 0:スイッチ 1:変数 #スイッチにすると、1つの項目に複数のメッセージを #設定できなくなります。 # Ant non può essere marcato se si utilizza titolo lungo # (draw_text non utilizzare la funzione di auto-riduzione non funziona per) NO_DATA_VISIBLE = true # se visualizzare l'elemento non è ancora apparso DRAW_ID = true # numero di Diario per indicare se la fine della classe Data_Questdiary VISIBLE_JUDGE_MODE = 1 # 0 o utilizzare un interruttore per utilizzare una variabile per determinare se le occorrenze: un interruttore: il passaggio al variabile # messaggi a più di un articolo di # non può essere impostato. attr_reader :exist attr_reader :title attr_reader :id #-------------------------------------------------------------------------- # ● オブジェクト初期化 #-------------------------------------------------------------------------- def initialize(id) @id = id @title = [] @title[0] = "タイトルなーし" # デフォルトタイトル(通常使用しない) @variable = 0 @variable_max = 1 @comment = [] @exist = false set_data(id) end # タイトル取得 def title # 配列でなければそのまま返す return @title unless @title.is_a?(Array) # スイッチで判定か変数番号が0かタイトルが存在しない場合は配列の最初を返す if VISIBLE_JUDGE_MODE == 0 or @variable == 0 or @title[$game_variables[@variable]].nil? return @title[0] end # 変数番号によって返すタイトルを決める return @title[$game_variables[@variable]] end #-------------------------------------------------------------------------- # ● 日記内容の設定 #-------------------------------------------------------------------------- def set_data(id) @id = id case @id when 1 # ID @title = "\\c[1]テストなのですッ!\\c[0]" # タイトル @variable = 0 # 出現変数番号0なら常時出現 @comment[0] = <<-EOS # ここから内容を書く\\r[るびびびです,るびー]るるるるー\\h[32]でけー\\h[22]ふつー\\h[12]ちっけー\\h[22] \\c[2]色変えてすと\\c[0]\\o[128]うっすいぜ\\o[255] \\gごーるど 変数1の値=\\v[1] \\r[るび,るびーびーびーびーですよ]るるるるびー\\h[32]\\r[でっかいるび,おおきなふりがな]\\h[22]らららー\\h[12]\\r[ちっさいるび,ちいさなふりがな]\\h[22]ららりらー↓ピクチャ表示てすと\\pic[0,288,カットイン準備中]\\bat[480,160,001-Fighter01,160]\\cha[360,160,001-Fighter01,160,8,4] EOS # ここまで @variable_max = @comment.size @exist = true # 存在フラグ trueにしといてください when 2 @title[0] = "ちょっとした説明" @variable = 0 @comment[0] = <<-EOS variableに設定した変数番号の値で出現する・しないを設定可能変数の値が0の時は出現しない1以上の時はそれぞれ対応したメッセージが表示されますこのサンプルでは変数番号10番の値で4つ目の日記が変化します値を1か2にするとそれぞれメッセージが表示されます EOS @variable_max = @comment.size @exist = true when 3 @title[0] = "すくろーる" @variable = 0 @comment[0] = <<-EOS 1 スクロールします2 上下キーで1行ずつ移動3 左右キーでページ単位で移動4 5 6 7 8 9 10 11 12この先スクロールてすと13↓ 14↓ 15↓ 16↓ 17↓ 18↓ 19↓ 20↓ 21↓ 22↓ 23↓ 24こんな感じ EOS @variable_max = @comment.size @exist = true when 4 @title[0] = "" @title[1] = "\\n[1]の必殺技1" @title[2] = "\\n[1]の必殺技2" @title[3] = "\\n[1]の必殺技3" @title[4] = "\\n[1]の必殺技4" @variable = 10 @comment[0] = "" @comment[1] = <<-EOS 内容その1 \\pic[0,240,アルシェス撃] EOS @comment[2] = <<-EOS 内容その2 \\pic[0,240,超アルシェス撃] EOS @comment[3] = <<-EOS 内容その3 \\pic[0,240,超アルシェス撃] EOS @comment[4] = <<-EOS 内容その4 \\pic[0,240,超アルシェス撃] EOS @variable_max = @comment.size @exist = true when 5 @title[0] = "てすと" @variable = 0 @comment[0] = <<-EOS いろいろてすとです。 attr_reader: esistono attr_reader: attr_reader titolo: id #---------------------------------------- ● #---------- ---------------------------------- # inizializzare l'oggetto -------------------------------------------------- -------------- def initialize (id) @ id = @ title id = [] @ titolo [0] = "Na per il titolo" il titolo di default (non utilizzata) @ variabile = 0 @ @ variable_max = 1 comment = [] @ esistere = false set_data (id) end # # def titolo di ritorno, l'acquisizione del titolo dovrebbe essere un ritorno array @ unless@title.is_a titolo? (Array) # switch determina se un numero variabile Se non vi è alcun titolo o il primo array restituisce 0 se VISIBLE_JUDGE_MODE == 0 o variabile @ @ == 0 o titolo [$ game_variables [@] variabile]. nulla? ritorno titolo @ [0] end # Il numero di variabili Titolo calcolare il ritorno @ return del titolo [$ game_variables [variabile @]] fine #--------------------------------- ----------------------------------------- # Imposta il contenuto dei diari ● # - -------------------------------------------------- ---------------------- set_data def (id) @ id = @ id id caso in cui 1 # ID @ title = "\ \ c [1] un test La Tsu! \ \ c [0] "# title @ variabile = 0 emergere # costante verifica se un numero variabile 0 commento @ [0] = <<-EOS # Scrive il contenuto da qui \ \ r [estate indiana è Bibi, estate ー indiano ] ー Ruru Ruru \ \ h [32] ー solo su \ \ h [22] futsu \ \ h [12] ー solo Tch \ \ h [22] \ \ c [2], i colori cangianti \ \ c [0] \ \ o [128] Sia l'acqua Ugh \ \ o [255] \ \ g il valore di una variabile, ecc ci Rerelease = \ \ v [1] \ \ r [estate indiana, è ー e ー e ー e ー Indian Summer] estate ー indiana Rururu \ \ h [32] \ \ r [estate indiana grande, e la finta grande] \ \ h [22] li ー dalle loro \ \ h [12] \ \ r [indian Summer Chissai, e fingere di poco] \ \ h [22] e The per visualizzare l'immagine ↓ ー da Rari et \ \ pic [0.288, tagliato in preparazione] \ \ bat [480.160.001-Fighter01, 160] \ \ cha [360.160.001-Fighter01, 160,8,4] EOS # Ora variable_max @ = @ @ comment.size esistere = true # Si prega di rimuovere la bandiera di vera esistenza, quando 2 @ titolo [0] = "molto, molto breve" @ variabile = 0 commento @ [0] = variabile <<-EOS può essere impostato per non apparire impostato sul valore del numero variabile zero quando il valore di una variabile di almeno un non appare in questo esempio viene visualizzato un messaggio che corrispondono rispettivamente a 1 o 2 valori cambiano quarto diario del numero variabile di n. 10 messaggio appare EOS variable_max @ = @ @ comment.size esistere = true quando 3 @ titolo [0] = "Ro martellante ru" variabile @ @ = 0 commento [0] = <<-EOS 2 Scorrere 1 24 ↓ 23 ↓ 22 ↓ 21 ↓ 20 ↓ 19 ↓ 18 ↓ 17 ↓ 16 ↓ 15 ↓ 14 ↓ 13 e per scorrere avanti 12 10 11 9 8 7 6 5 4 mossa dalla sinistra della pagina e tasti destra 3 sposta di una riga premuto il tasto Sembra variable_max EOS @ = @ @ comment.size esistere = true quando 4 titolo @ [0] = "" title @ [1] = "\ \ n [1] 1 mossa finale di" @ titolo [2] = "\ \ n [1] 2 mossa finale di "@ titolo [3] =" \ \ n [1] 3 della mossa finale "@ titolo [4] =" \ \ n [1] 4 della mossa finale "@ variabile = 10 @ commento [0] = "" @ commento [1] = <<-EOS 1 contenuto di \ \ pic [0.240, martello Arushesu] EOS commento @ [2] = <<-EOS 2 contenuti della \ \ pic [0.240, Ultra Assault Arushesu] EOS commento @ [3] = <<-EOS 3 contenuto di \ \ pic [0.240, Ultra Assault Arushesu] EOS commento @ [4] = <<-EOS 4 di quello che \ \ pic [0.240, super Arushesu attacco] EOS variable_max @ = @ @ comment.size esistere = true quando il 5 @ titolo [0] = "L'alto e" @ variabile = 0 commento @ [0] = <<-EOS è molto a con. EOS @variable_max = @comment.size @exist = true end end #-------------------------------------------------------------------------- # ● 日記内容を返す #-------------------------------------------------------------------------- def show_comment return @comment[0] if VISIBLE_JUDGE_MODE == 0 if @comment.size == 1 return @comment[0] else temp = [[$game_variables[@variable], 0].max, @variable_max-1].min return @comment[temp] end end #-------------------------------------------------------------------------- # ● 日記タイトル出現判定 #-------------------------------------------------------------------------- def title_visible? return true if @variable == 0 if VISIBLE_JUDGE_MODE == 0 if $game_switches[@variable] return true else return false end else if $game_variables[@variable] == 0 return false else return true end end end end class Window_Base < Window #-------------------------------------------------------------------------- # ● 文字列変換 #-------------------------------------------------------------------------- def transfer(str) text = str.clone # 制御文字処理 begin text.gsub!(/\\[Vv]\[([0-9]+)\]/) { $game_variables[$1.to_i] } end text.gsub!(/\\[Nn]\[([0-9]+)\]/) do $game_actors[$1.to_i] != nil ? $game_actors[$1.to_i].name : "" end # 便宜上、"\\\\" を "\000" に変換 text.gsub!(/\\\\/) { "\000" } # "\\C" を "\001" に、"\\G" を "\002" に変換 text.gsub!(/\\[Cc]\[([0-9]+)\]/) { "\001[#{$1}]" } text.gsub!(/\\[Gg]/) { "\002" } # 不透明度 text.gsub!(/\\[Oo]\[([0-9]+)\]/) { "\200[#{$1}]" } # 文字サイズ text.gsub!(/\\[Hh]\[([0-9]+)\]/) { "\201[#{$1}]" } # ルビ text.gsub!(/\\[Rr]\[(.+?),(.+?)\]/) { "\202[#{$1},#{$2}]" } # ピクチャ表示 text.gsub!(/\\[Pp]ic\[([0-9]+),([0-9]+),([^,\]]+)\]/) { "\250[#{$1},#{$2},#{$3}]" } # バトラー表示 text.gsub!(/\\[bb]at\[([0-9]+),([0-9]+),([^,\]]+),([0-9]+)\]/) { "\251[#{$1},#{$2},#{$3},#{$4}]" } # キャラグラフィック表示 text.gsub!(/\\[Cc]ha\[([0-9]+),([0-9]+),([^,\]]+),([0-9]+),([0-9]+),([0-9]+)\]/) { "\252[#{$1},#{$2},#{$3},#{$4},#{$5},#{$6}]" } return text end #-------------------------------------------------------------------------- # ● 変換した文字列を描画 #-------------------------------------------------------------------------- def draw_ex_text(ox, oy, str, align=0) text = str.clone x = 0 y = 0 # c に 1 文字を取得 (文字が取得できなくなるまでループ) while ((c = text.slice!(/./m)) != nil) # \\ の場合 if c == "\000" # 本来の文字に戻す c = "\\" end # \C[n] の場合 if c == "\001" # 文字色を変更 text.sub!(/\[([0-9]+)\]/, "") color = $1.to_i if color >= 0 and color <= 7 self.contents.font.color = text_color(color) end # 次の文字へ next end # \G の場合 if c == "\002" # 所持ゴールドに変換 c = $game_party.gold.to_s # 文字を描画 self.contents.draw_text(ox+4+x, oy+4+ 32 * y, self.contents.text_size©.width, 32, c) # x に描画した文字の幅を加算 x += self.contents.text_size©.width # 次の文字へ next end # \O の場合 if c == "\200" text.sub!(/\[([0-9]+)\]/, "") opacity = $1.to_i temp = self.contents.font.color self.contents.font.color = Color.new(temp.red, temp.green, temp.blue, opacity) # 次の文字へ next end # \H の場合 if c == "\201" text.sub!(/\[([0-9]+)\]/, "") self.contents.font.size = [[$1.to_i, 6].max, 32].min # 次の文字へ next end # \R の場合 if c == "\202" text.sub!(/\[(.+?),(.+?)\]/, "") x += ruby_set(ox+x,oy+(y*32),$1,$2) # 次の文字へ next end # \Pic の場合 if c == "\250" text.sub!(/\[([0-9]+),([0-9]+),([^,\]]+)\]/, "") ope = self.contents.font.color.alpha set_picture($1.to_i, $2.to_i, $3, ope) # 次の文字へ next end # \Bat の場合 if c == "\251" text.sub!(/\[([0-9]+),([0-9]+),([^,\]]+),([0-9]+)\]/, "") ope = self.contents.font.color.alpha set_battler($1.to_i, $2.to_i, $3, $4.to_i, ope) # 次の文字へ next end # \Cha の場合 if c == "\252" text.sub!(/\[([0-9]+),([0-9]+),([^,\]]+),([0-9]+),([0-9]+),([0-9]+)\]/, "") ope = self.contents.font.color.alpha set_character($1.to_i, $2.to_i, $3, $4.to_i, $5.to_i, $6.to_i, ope) # 次の文字へ next end # 改行文字の場合 if c == "\n" # y に 1 を加算 y += 1 x = 0 # 次の文字へ next end # 文字を描画 self.contents.draw_text(ox+4+x, 4+oy+ 32 * y, 40, 32, c) # x に描画した文字の幅を加算 x += self.contents.text_size©.width end end #-------------------------------------------------------------------------- # ● ルビ描画 #-------------------------------------------------------------------------- def ruby_set(x,y,str,ruby) text_w = self.contents.text_size(str).width text_h = self.contents.text_size(str).height f_size_back = self.contents.font.size ruby_size = 10 self.contents.font.size = ruby_size ruby_w = self.contents.text_size(ruby).width self.contents.draw_text(4+x, 4+4+y-ruby_size+1, text_w, ruby_size, ruby, 1) self.contents.font.size = f_size_back self.contents.draw_text(4+x, 4+4+y, text_w, text_h, str) return text_w end #-------------------------------------------------------------------------- # ● ピクチャー描画 #-------------------------------------------------------------------------- def set_picture(x, y, filename, opacity=255) bitmap = RPG::Cache.picture(filename) self.contents.blt(x, y, bitmap, bitmap.rect, opacity) end #-------------------------------------------------------------------------- # ● バトラー描画 #-------------------------------------------------------------------------- def set_battler(x, y, filename, hue, opacity=255) bitmap =RPG::Cache.battler(filename, hue) self.contents.blt(x, y, bitmap, bitmap.rect, opacity) end #-------------------------------------------------------------------------- # ● キャラクター描画 #-------------------------------------------------------------------------- def set_character(x, y, filename, hue, dir, pat, opacity=255) bitmap = RPG::Cache.character(filename, hue) cw = bitmap.width / 4 ch = bitmap.height / 4 cy = ch * (dir / 2 - 1) cx = cw * (pat - 1) src_rect = Rect.new(cx, cy, cw, ch) self.contents.blt(x - cw / 2, y - ch, bitmap, src_rect, opacity) end #-------------------------------------------------------------------------- # ● テキストの行数を返す #-------------------------------------------------------------------------- def text_row(str) text = str.clone num = 0 # c に 1 文字を取得 (文字が取得できなくなるまでループ) while ((c = text.slice!(/./m)) != nil) # 改行文字の場合 if c == "\n" # num に 1 を加算 num += 1 # 次の文字へ next end end return num end end #============================================================================== # ■ Window_Scroll #------------------------------------------------------------------------------ # スクロールの機能を持つウィンドウクラスです。 EOS variable_max @ = @ @ comment.size esistere = fine vero fine #----------------------------------- ● #---- restituire il diario # --------------------------------------- -------------------------------------------------- -------------------- show_comment ritorno def commento @ [0] se VISIBLE_JUDGE_MODE if@comment.size == 0 == 1 commento restituire @ [0] = temp altro [[$ game_variables [@] variabile, 0]. max, @ variable_max-1]. restituire min commento @ [TEMP] end end #-------------------- -------------------------------------------------- Diario titoli sembrano intenzionate ● #--------------------------------------- ---- # ----------------------------------- def title_visible? @ return true se variabile == 0 se VISIBLE_JUDGE_MODE == 0 se $ game_switches [variabile @] return true return false end else if $ game_variables [@ variabile] == 0 return false return true end end end end class Window_Base <Window #----------- -------------------------------------------------- ------------- ● #------------------------------- # stringa di conversione ------------------------------------------- def trasferimento (str) text = carattere str.clone controllo di gestione # cominciare text.gsub! (/ \ \ [Vv] \ [([0-9] +) \] /) {$ game_variables [$ 1.to_i]} end text.gsub! (/ \ \ [Nn] \ [([0-9] +) \] /) fare game_actors $ [$ 1.to_i] = nil nome game_actors $ [$ 1.to_i]:!? "." fine # convenienza, "\ \ \ \ "a" \ 000 "in text.gsub! (/ \ \ \ \ /) {" \ 000 "} #" \ \ C "a" \ 001 "in," \ \ G "a" \ 002 " text.gsub Convert! (/ \ \ [Cc] \ [([0-9] +) \] /) {"\ 001 [# {$ 1}]"} text.gsub! (/ \ \ [gg] /) {"\ 002"} # text.gsub opacità! (/ \ \ [Oo] \ [([0-9] +) \] /) {"\ 200 [# {$ 1}]"} # string text.gsub dimensioni! (/ \ \ [HH] \ [([0-9] +) \] /) {"\ 201 [# {$ 1}]"} # text.gsub rubino! (/ \ \ [Rr \ [(.+?),(.+?) \] /) {"\ 202 [# {$ 1} },#{$ 2]"} # text.gsub immagine personale! (/ \ \ [PP] ic \ [([0-9 ]+),([ ]+),([^, 0-9 \] +) \] /) {"\ 250 [# {$ 1 },#{$ 2}, {# $ 3}] "} # vedere text.gsub Butler! (/ \ \ [bb] in \ [([0-9 0-9 ]+),([ ]+),([^, \ ]]+), ([0-9] +) \] /) {"\ 251 [# {$ 1 },#{$ },#{$ 2 3 4 },#{$}]"} # text.gsub caratteri grafici! (/ \ \ [Cc] ha \ [([0-9 0-9 ]+),([ ]+),([^, \ ]]+),([ ]+),([ 0-9 0-9] +),([ 0-9] +) \] /) {"\ 252 [# {$ 1 },#{$ },#{$ 2 3 4 },#{$ },#{$ },#{$ 5 6}] "} return fine testo #-------------------------------------------- # Disegnare una stringa convertita ------------------------------ ● #----------- -------------------------------------------------- ------------- draw_ex_text def (ox, oy, str, align = 0) testo str.clone = x = 0 y = 0 # c ottenere una lettera (la lettera non può essere recuperato Loop through) while ((c = m text.slice !(/./))! = nil) # \ \ Perché se c == "\ 000" # ripristinare il carattere originale c = "\ \" # end \ C [n] Perché se c == "\ 001" # cambiare il colore del testo text.sub! (/ \ [([0-9] +) \] /, "") color = $ 1.to_i se il colore > = 0 e il colore <= 7 = self.contents.font.color text_color (colore) end # end successivo carattere successivo # \ G caso se c == "\ 002" # c = $ game_party in possesso di oro . gold.to_s # rendere il self.contents.draw_text caratteri (ox +4 + self.contents.text_size x, oy 4 + 32 * y, ©. larghezza, 32, c) # x di personaggi disegnati più la larghezza di x + self.contents.text_size = ©. larghezza # carattere di fine next next # \ O perché se c == "\ 200" text.sub! (/ \ [([0-9] +) \] /, "") opacità = $ temp 1.to_i self.contents.font.color = self.contents.font.color = Color.new (temp.red, temp.green, temp.blue, opacità) # La lettera segue alla fine prossima # \ H caso se c == "\ 201" text.sub! (/ \ [([0-9] +) \] /, "") self.contents.font.size = [[$ 1.to_i, 6]. max, 32]. # min al carattere successivo fine prossima # \ R caso se c == "\ 202" text.sub! (/ \ [(.+?),( . +?) \] /, "") = x + ruby_set (ox + x, oy + (y * 32), $ 1, $ 2) # end successivo carattere successivo # \ Pic Perché se c == "\ 250 "text.sub! (/ \ [([0-9 0-9 ]+),([ ]+),([^, \]] +) \] /," ") OPE = self.contents.font . set_picture color.alpha ($ 1.to_i, $ 2.to_i, $ 3, OPE) # fine carattere precedente prossimo # \ Bat For se c == "\ 251" text.sub (/ \ [([0! - 9 ]+),([ 0-9 ]+),([^, \ ]]+),([ 0-9] +) \] /, "") OPE = self.contents.font.color.alpha set_battler ($ 1.to_i, $ 2.to_i, $ 3, $ 4.to_i, OPE) # fine carattere precedente prossimo # \ Cha Perché se c == "\ 252" text.sub (/ \ [([0! - 0-9 9 ]+),([ ]+),([^, \ ]]+),([ 0-9 0-9 ]+),([ ]+),([ 0-9] +) \] /, "") self.contents.font.color.alpha opa = set_character ($ 1.to_i, $ 2.to_i, $ 3, $ 4.to_i, $ 5.to_i, $ 6.to_i, OPE) # accanto al carattere successivo end # Se un carattere di nuova riga se c == "\ n" + y + 1 y = 1 x = 0 # per il carattere successivo alla fine del prossimo # Draw self.contents.draw_text testo (ox +4 + x, 4 + oy + 32 * y, 40, 32, c) # x più la larghezza di personaggi disegnati x + = self.contents.text_size ©. end end larghezza #----------- -------------------------------------------------- Drawing # rubino ● #-------------------------------- ------------- ------------------------------------------ def ruby_set (x, y, str , rubino) text_w = self.contents.text_size (STR). text_h width = self.contents.text_size (STR). f_size_back altezza = ruby_size self.contents.font.size = 10 = self.contents.font.size ruby_w ruby_size = self.contents.text_size (rubino). self.contents.draw_text larghezza (4 + x, 4 +4 + y-ruby_size +1, text_w, ruby_size, rubino, 1) self.contents.font.size self.contents = f_size_back . draw_text (4 + x, + y 4 +4, text_w, text_h, str) fine text_w ritorno #--------------------------- Immagine # ----------------------------------------------- ● Disegno #------------------------------------------------ -------------------------- set_picture def (x, y, nome del file, opacità = 255) = bitmap RPG:: Cache.picture (filename) self.contents.blt (x, y, bitmap, bitmap.rect, opacità) fine #------------------------------ Butler disegna -------------------------------------------- ● # # - -------------------------------------------------- ----------------------- def set_battler (x, y, nome, colore, opacità = 255) = bitmap RPG:: Cache.battler (filename, tonalità ) self.contents.blt (x, y, bitmap, bitmap.rect, opacità) fine #----------------------------- ● # # --------------------------------------------- disegnare personaggi -------------------------------------------------- ------------------------ (dir x, y, nome del file, tonalità, Pat, opacità = 255) def set_character bitmap RPG =:: Cache. carattere (il nome del file, tonalità) cw bitmap.width = / 4 ch bitmap.height = / 4 = cy * ch (dir / 2 - 1) = Cx Cw * (pat - 1) = src_rect Rect.new (cx, cy, cw, ch) self.contents.blt (x - cw / 2, y - ch, bitmap, src_rect, opacità) fine #---------------------- -------------------------------------------------- - # Restituisce il numero di righe di testo ● #--------------------------------------- ----------------------------------- def text_row (str) text = str.clone num = 0 # c Prendi una lettera (il ciclo fino a quando non è possibile ottenere la lettera) while ((c = m text.slice !(/./))! = nil) # Se un carattere di nuova riga se c == "\ n" # num al 1 num + = 1 # aggiungere la seguente lettera al prossimo fine fine fine fine ritorno num #============================== ================================================ # ■ Window_Scroll #------------------------------------------------ ------------------------------ # finestra di classe con una funzione di scorrimento. #============================================================================== class Window_Scroll < Window_Base #-------------------------------------------------------------------------- # ● 公開インスタンス変数 #-------------------------------------------------------------------------- attr_reader :index # カーソル位置 attr_reader :help_window # ヘルプウィンドウ #-------------------------------------------------------------------------- # ● オブジェクト初期化 # x : ウィンドウの X 座標 # y : ウィンドウの Y 座標 # width : ウィンドウの幅 # height : ウィンドウの高さ #-------------------------------------------------------------------------- def initialize(x, y, width, height) super(x, y, width, height) @item_max = 1 @column_max = 1 @index = 0 self.cursor_rect.empty end #-------------------------------------------------------------------------- # ● カーソル位置の設定 # index : 新しいカーソル位置 #-------------------------------------------------------------------------- def index=(index) @index = index # ヘルプテキストを更新 (update_help は継承先で定義される) #if self.active and @help_window != nil # update_help #end # カーソルの矩形を更新 update_cursor_rect end #-------------------------------------------------------------------------- # ● 行数の取得 #-------------------------------------------------------------------------- def row_max # 項目数と列数から行数を算出 return (@item_max + @column_max - 1) / @column_max end #-------------------------------------------------------------------------- # ● 先頭の行の取得 #-------------------------------------------------------------------------- def top_row # ウィンドウ内容の転送元 Y 座標を、1 行の高さ 32 で割る return self.oy / 32 end #-------------------------------------------------------------------------- # ● 先頭の行の設定 # row : 先頭に表示する行 #-------------------------------------------------------------------------- def top_row=(row) # row が 0 未満の場合は 0 に修正 if row < 0 row = 0 end # row が row_max - 1 超の場合は row_max - 1 に修正 if row > row_max - 1 row = row_max - 1 end # row に 1 行の高さ 32 を掛け、ウィンドウ内容の転送元 Y 座標とする self.oy = row * 32 end #-------------------------------------------------------------------------- # ● 1 ページに表示できる行数の取得 #-------------------------------------------------------------------------- def page_row_max # ウィンドウの高さから、フレームの高さ 32 を引き、1 行の高さ 32 で割る return 1#(self.height - 32) / 32 end #-------------------------------------------------------------------------- # ● 1 ページに表示できる項目数の取得 #-------------------------------------------------------------------------- def page_item_max # 行数 page_row_max に 列数 @column_max を掛ける return (self.height - 32) / 32#page_row_max #* @column_max end #-------------------------------------------------------------------------- # ● ヘルプウィンドウの設定 # help_window : 新しいヘルプウィンドウ #-------------------------------------------------------------------------- def help_window=(help_window) @help_window = help_window # ヘルプテキストを更新 (update_help は継承先で定義される) if self.active and @help_window != nil update_help end end #-------------------------------------------------------------------------- # ● カーソルの矩形更新 #-------------------------------------------------------------------------- def update_cursor_rect # カーソル位置が 0 未満の場合 if @index < 0 self.cursor_rect.empty return end # 現在の行を取得 row = @index #/ @column_max # 現在の行が、表示されている先頭の行より前の場合 if row < self.top_row # 現在の行が先頭になるようにスクロール self.top_row = row end # 現在の行が、表示されている最後尾の行より後ろの場合 if row > self.top_row + (self.page_row_max - 1) # 現在の行が最後尾になるようにスクロール self.top_row = row - (self.page_row_max - 1) end # カーソルの幅を計算 #cursor_width = self.width / @column_max - 32 # カーソルの座標を計算 #x = @index % @column_max * (cursor_width + 32) #y = @index / @column_max * 32 - self.oy # カーソルの矩形を更新 #self.cursor_rect.set(x, y, cursor_width, 32) end #-------------------------------------------------------------------------- # ● フレーム更新 #-------------------------------------------------------------------------- def update super # カーソルの移動が可能な状態の場合 if self.active and @item_max > 0 and @index >= 0 and self.contents.height / 32 > (self.height - 32) / 32 # 方向ボタンの下が押された場合 if Input.repeat?(Input::DOWN) # 列数が 1 かつ 方向ボタンの下の押下状態がリピートでない場合か、 # またはカーソル位置が(項目数 - 列数)より前の場合 if (@column_max == 1 and Input.trigger?(Input::DOWN)) or @index < @item_max - @column_max # カーソルを下に移動 $game_system.se_play($data_system.cursor_se) @index = (@index + @column_max) % @item_max end end # 方向ボタンの上が押された場合 if Input.repeat?(Input::UP) # 列数が 1 かつ 方向ボタンの上の押下状態がリピートでない場合か、 # またはカーソル位置が列数より後ろの場合 if (@column_max == 1 and Input.trigger?(Input::UP)) or @index >= @column_max # カーソルを上に移動 $game_system.se_play($data_system.cursor_se) @index = (@index - @column_max + @item_max) % @item_max end end # 方向ボタンの右が押された場合 if Input.repeat?(Input::RIGHT) # 表示されている最後尾の行が、データ上の最後の行よりも前の場合 if self.top_row + (self.page_row_max - 1) < (self.row_max - 1) # カーソルを 1 ページ後ろに移動 $game_system.se_play($data_system.cursor_se) @index = [@index + self.page_item_max, @item_max - 1].min self.top_row += self.page_row_max end end # 方向ボタンの左が押された場合 if Input.repeat?(Input::LEFT) # 表示されている先頭の行が 0 より後ろの場合 if self.top_row > 0 # カーソルを 1 ページ前に移動 $game_system.se_play($data_system.cursor_se) @index = [@index - self.page_item_max, 0].max self.top_row -= self.page_row_max end end end # ヘルプテキストを更新 (update_help は継承先で定義される) if self.active and @help_window != nil update_help end # カーソルの矩形を更新 update_cursor_rect end end class Window_Questdiary_Select < Window_Selectable attr_reader :data #-------------------------------------------------------------------------- # ● オブジェクト初期化 #-------------------------------------------------------------------------- def initialize super(0, 64, 640, 416) @column_max = 2 data_set @item_max = @data.size self.index = 0 refresh end def data_set @data = [] @diary_data = [0] for i in 1..QUESTDIARY_DATA_MAX @diary_data = Data_Questdiary.new(i) next if (!NO_DATA_VISIBLE and !@diary_data.title_visible?) @data.push(@diary_data) if @diary_data.exist end #@data.reverse! end #-------------------------------------------------------------------------- # ● 日記データ取得 #-------------------------------------------------------------------------- def diary return @data[self.index] end #-------------------------------------------------------------------------- # ● リフレッシュ #-------------------------------------------------------------------------- def refresh if self.contents != nil self.contents.dispose self.contents = nil end #項目数が 0 でなければビットマップを作成し、全項目を描画 return if @item_max == 0 self.contents = Bitmap.new(width - 32, row_max * 32) for i in 0...@item_max draw_item(i) end end def draw_item(index) item = @data[index] x = 4 + index % 2 * (288 + 32) y = index / 2 * 32 rect = Rect.new(x, y, self.width / @column_max - 32, 32) self.contents.fill_rect(rect, Color.new(0, 0, 0, 0)) self.contents.font.color = normal_color self.contents.draw_text(x, y, 32, 32, item.id.to_s) if DRAW_ID if item.title_visible? diary_title = transfer(item.title) if TITLE_TEXT_EX draw_ex_text(x+48, y - 4, diary_title, 0) else self.contents.draw_text(x+48, y, 212, 32, diary_title, 0) end else self.contents.draw_text(x+48, y, 212, 32, "-----", 0) end end end class Window_Questdiary_Info < Window_Scroll #-------------------------------------------------------------------------- # ● オブジェクト初期化 #-------------------------------------------------------------------------- def initialize super(0, 64, 640, 416) self.contents = Bitmap.new(width - 32, height - 32) end #-------------------------------------------------------------------------- # ● リフレッシュ #-------------------------------------------------------------------------- def refresh(comment) self.index = 0 self.contents.dispose contents_row = text_row(comment) self.contents = Bitmap.new(width - 32, [contents_row * 32, self.height - 32].max) @item_max = [(contents_row + 1 - (self.height - 32) / 32), 0].max self.contents.font.color = normal_color self.contents.font.size = 22 new_text = transfer(comment) draw_ex_text(0, 0, new_text) end end class Scene_Questdiary #-------------------------------------------------------------------------- # ● メイン処理 #-------------------------------------------------------------------------- def main # ウィンドウを作成 @title_window = Window_Base.new(0, 0, 640, 64) @title_window.contents = Bitmap.new(640 - 32, 64 - 32) @title_window.contents.draw_text(4, 0, 320, 32, "冒険日記", 0) @main_window = Window_Questdiary_Select.new @main_window.active = true # インフォウィンドウを作成 (不可視・非アクティブに設定) @info_window = Window_Questdiary_Info.new @info_window.z = 110 @info_window.visible = false @info_window.active = false @visible_index = 0 # トランジション実行 Graphics.transition # メインループ loop do # ゲーム画面を更新 Graphics.update # 入力情報を更新 Input.update # フレーム更新 update # 画面が切り替わったらループを中断 if $scene != self break end end # トランジション準備 Graphics.freeze # ウィンドウを解放 @title_window.dispose @main_window.dispose @info_window.dispose end #-------------------------------------------------------------------------- # ● フレーム更新 #-------------------------------------------------------------------------- def update # ウィンドウを更新 @main_window.update @info_window.update if @info_window.active update_info return end # メインウィンドウがアクティブの場合: update_target を呼ぶ if @main_window.active update_main return end end #-------------------------------------------------------------------------- # ● フレーム更新 (メインウィンドウがアクティブの場合) #-------------------------------------------------------------------------- def update_main # B ボタンが押された場合 if Input.trigger?(Input::B) # キャンセル SE を演奏 $game_system.se_play($data_system.cancel_se) $scene = Scene_Map.new return end # C ボタンが押された場合 if Input.trigger?(Input::C) if @main_window.diary.title_visible? == false # ブザー SE を演奏 $game_system.se_play($data_system.buzzer_se) return end # 決定 SE を演奏 $game_system.se_play($data_system.decision_se) @main_window.active = false @info_window.active = true @info_window.visible = true @visible_index = @main_window.index @info_window.refresh(@main_window.diary.show_comment) return end end #-------------------------------------------------------------------------- # ● フレーム更新 (インフォウィンドウがアクティブの場合) #-------------------------------------------------------------------------- def update_info # B ボタンが押された場合 if Input.trigger?(Input::B) # キャンセル SE を演奏 $game_system.se_play($data_system.cancel_se) @main_window.active = true @info_window.active = false @info_window.visible = false return end # C ボタンが押された場合 if Input.trigger?(Input::C) return # 決定 SE を演奏 $game_system.se_play($data_system.decision_se) if @comment_on @comment_on = false @comment_window.visible = false else @comment_on = true @comment_window.visible = true end return end if Input.trigger?(Input::L) # 決定 SE を演奏 $game_system.se_play($data_system.decision_se) loop_end = false while loop_end == false if @visible_index != 0 @visible_index -= 1 else @visible_index = @main_window.data.size - 1 end loop_end = true if @main_window.data[@visible_index].title_visible? end diary = @main_window.data[@visible_index] @info_window.refresh(diary.show_comment) return end if Input.trigger?(Input::R) # 決定 SE を演奏 $game_system.se_play($data_system.decision_se) loop_end = false while loop_end == false if @visible_index != @main_window.data.size - 1 @visible_index += 1 else @visible_index = 0 end loop_end = true if @main_window.data[@visible_index].title_visible? end diary = @main_window.data[@visible_index] @info_window.refresh(diary.show_comment) return end end end #================================================= ============================= classe Window_Scroll <Window_Base #---------------- -------------------------------------------------- ● #------------------------------------ Hiraku Kimi -------- # variabile di istanza -------------------------------------- attr_reader: indice # attr_reader cursore: help_window # Help finestra #------------------------------------------------- oggetto di inizializzazione ------------------------- ● # # x: finestra coordinata X # Y: finestra coordinata Y # larghezza: larghezza della finestra # altezza: altezza della finestra di #------------------------------------------ -------------------------------- def initialize (x, y, larghezza, altezza) super (x, y, width , altezza) @ item_max = 1 column_max @ @ = 1 index = 0 self.cursor_rect.empty fine #---------------------------- ● cursore ---------------------------------------------- # Set # index: posizione del cursore nuovo #----------------------------------------- --------------------------------- def = indice (index) indice = indice @ # aggiorna il testo di aiuto (update_help che è definito per via ereditaria) # se fine self.active e help_window @! = nil update_help # # # aggiornamento rettangolo fine update_cursor_rect cursore #------------------ -------------------------------------------------- # Recupera il numero di righe ------ ● #------------------------------------- ------------------------------------- row_max # def calcolare il numero di colonne e le righe del campo ritorno (@ @ column_max item_max + - 1) / column_max @ end #----------------------------------- ● --------------------------------------- # # --- Prendi la prima fila -------------------------------------------------- --------------------- fonte top_row # def della coordinata Y del contenuto della finestra, diviso per l'altezza della riga 32 1 self.oy ritorno / 32 # end - -------------------------------------------------- # Impostare la prima riga ----------------------- fila ● #: fila per apparire in cima #----------- -------------------------------------------------- ------------- top_row def = (riga) # riga 0 è corretto è inferiore a 0 se la riga <0 riga = 0 # fine riga è row_max - se più di una row_max - Risolto 1 se row_max> fila - 1 riga = row_max - 1 end # fila 32, moltiplicato per l'altezza di una riga, quale è la fonte della finestra coordinate Y self.oy riga * 32 = fine #----- -------------------------------------------------- -------------------- # Recupera il numero di righe che possono essere visualizzati nella pagina 1 ● #------------------- -------------------------------------------------- page_row_max def ----- # dalla altezza della finestra, tirare l'altezza del telaio 32 e poi diviso per l'altezza della linea di ritorno 32 1 1 # (self.height - 32) / 32 fine #------ -------------------------------------------------- ------------------ # ottenere il numero di elementi che possono essere visualizzati nella pagina 1 ● #-------------------- -------------------------------------------------- page_item_max def ---- # @ column_max numero di linee moltiplicato per il numero di page_row_max ritorno colonne (self.height - 32) / 32 # * # @ page_row_max fine column_max #--------------- -------------------------------------------------- Aiuto finestra delle impostazioni --------- help_window ● # #: #---------------------------- nuova finestra Guida. ---------------------------------------------- help_window def = ( help_window) @ help_window = help_window # aggiorna il testo di aiuto (update_help che è definito dalla successione) e se self.active help_window @! = nil end end update_help #--------------- -------------------------------------------------- ● #---------------------------------- --------- # update rettangolo cursore ---------------------------------------- update_cursor_rect # def posizione del cursore è inferiore a 0 se l'indice @ <0 finale di ritorno self.cursor_rect.empty # Prendi la riga corrente riga = @ # index / @ # column_max riga corrente, se la prima riga prima di essere visualizzati se self.top_row riga <# Scorrere verso l'alto in modo che la linea attuale self.top_row = riga end # L'attuale linea di fila, quando la coda viene visualizzato se self.top_row row> + (self.page_row_max - 1) # corrente Scorrere fino alla linea di fondo in modo che self.top_row fila = - (self.page_row_max - 1) end # calcolare la larghezza del cursore # cursor_width self.width = / column_max @ - 32 # # x = calcolare le coordinate del cursore @% @ * indice column_max (cursor_width + 32) # y = indice @ / @ * column_max 32 - self.oy # update rettangolo cursore # self.cursor_rect.set (x, y, cursor_width, 32) end # - -------------------------------------------------- ● #----------------------- ---------------------- # Frame aggiornamento -------------------------------------------------- - Def aggiornamento super # Se lo stato è possibile spostare il cursore se self.active e @ item_max> 0 e @ indice> = 0 e self.contents.height / 32> (self.height - 32) / 32 tasti direzionali # Quando viene premuto sotto se Input.repeat (Input:: DOWN)? # Se non ripetere o sotto la direzione pulsante stati premuti e un numero di colonne, la posizione del cursore o # (numero di articoli - il numero di colonne) da primo caso, se (? @ column_max == 1 e Input.trigger (Input:: GIU ')) o @ <@ indice item_max - column_max @ # Sposta il cursore verso il basso game_system.se_play $ ($ data_system.cursor_se) @ = indice (@ @ + indice column_max)% item_max @ end end # Quando si preme il pulsante per strada se Input.repeat? (ingresso:: UP) # Se non si ripetono lo stato e la direzione di premere un tasto su un numero di colonne o, # se il numero di colonne dalla parte posteriore o il punto di inserimento if (@ column_max == 1 e Input.trigger (Ingresso:?: UP)) o l'indice @> = @ column_max # Sposta il cursore $ game_system.se_play ( $ data_system.cursor_se) @ = indice (index @ - @ @ item_max column_max +)% item_max @ end end # Quando si preme il pulsante giusta direzione se Input.repeat (Input:: DESTRA) # è elencato l'ultima? linee di coda, se prima l'ultima riga di dati se self.top_row + (self.page_row_max - 1) <(self.row_max - 1) # Sposta il cursore indietro di una pagina game_system.se_play $ ($ data_system.cursor_se) @ = indice [indice @ + self.page_item_max, @ item_max - 1] self.top_row min + = direzione end end # self.page_row_max pulsante sinistro è premuto se Input.repeat (ingresso.?: : SINISTRA) # 0 se la prima fila dalla parte posteriore, che viene visualizzato se self.top_row> 0 # Sposta il cursore di una pagina game_system.se_play $ ($ data_system.cursor_se) @ = indice [@ index - di sé. page_item_max, 0]. self.top_row max -= self.page_row_max end end end # Aggiornare il testo di aiuto (update_help che è definito dalla successione) e se self.active help_window @! = nil fine update_help # update rettangolo cursore update_cursor_rect end end class Window_Questdiary_Select <Window_Selectable attr_reader: dati #--------------------------------------- ● #--------- ----------------------------------- # inizializzare l'oggetto -------------------------------------------------- --------------- def initialize super (0, 64, 640, 416) @ column_max = 2 data_set item_max @ = @ self.index data.size = 0 fine data_set refresh def dati @ = [] @ diary_data = [0] for i in 1 .. QUESTDIARY_DATA_MAX @ diary_data = Data_Questdiary.new (i) next if (! NO_DATA_VISIBLE e! @ diary_data . title_visible?) data.push @ (@ diary_data ) se end @ diary_data . esistere data.reverse # @! fine #---------------------------- ● dati diario ---------------------------------------------- # Prendi #------------------------------------------------ -------------------------- def ritorno diario @ dati [self.index] fine #------------ -------------------------------------------------- Aggiorna ------------ ● #---------------------------------- # ---------------------------------------- refresh def se self.contents! = nil auto . contents.dispose self.contents fine nil = # Creare una bitmap è diverso da zero numero di elementi, tutti gli oggetti nel disegno, se il ritorno @ item_max == 0 self.contents = Bitmap.new (larghezza - row_max 32, * 32 ) for i in 0 ... @ item_max draw_item (i) fine draw_item end def (indice) item = @ dati [indice] x = 4 + indice% 2 * (288 + 32) y = indice / 2 * 32 = rect Rect.new (x, y, self.width / column_max @ - 32, 32) self.contents.fill_rect (rect, Color.new (0, 0, 0, 0)) = self.contents.font.color normal_color auto . contents.draw_text (x, y, 32, 32, item.id.to_s) se DRAW_ID se item.title_visible diary_title = trasferimento (item.title) se draw_ex_text TITLE_TEXT_EX? (48 x, y - 4, diary_title, 0) else self.contents.draw_text (48 x, y, 212, 32, diary_title, 0) end else self.contents.draw_text (48 x, y, 212, 32, "-----", 0) fine end end class Window_Questdiary_Info <Window_Scroll #------------------------------------------- ● #------------- ------------------------------- # inizializzare l'oggetto -------------------------------------------------- ----------- def initialize super (0, 64, 640, 416) = self.contents Bitmap.new (larghezza - 32, altezza - 32) fine #--------- -------------------------------------------------- --------------- ● #------------------------------- # refresh ------------------------------------------- refresh def (commento) di sé. indice = 0 = self.contents.dispose contents_row text_row (commento) self.contents = Bitmap.new (larghezza - 32, [* contents_row 32, self.height - 32] max.) @ item_max contents_row = [(+ 1 - ( self.height. - 32) / 32), 0] self.contents.font.color max normal_color self.contents.font.size = = 22 = nuovo_testo trasferimento (commento) draw_ex_text (0, 0, nuovo_testo) end end class Scene_Questdiary #------------------------------------------------- ● #-------------------- ------------------------- # elaborazione principale -------------------------------------------------- creare un def finestra principale ---- # @ title_window Window_Base.new = (0, 0, 640, 64) = @ title_window.contents Bitmap.new (640 - 32, 64-32) @ title_window.contents.draw_text (4 , 0, 320, 32, "Diary of Adventure", 0) = Window_Questdiary_Select.new main_window @ @ main_window.active = true # creare la finestra info (impostato su inattivo invisibile) info_window @ = Window_Questdiary_Info.new info_window.z @ = 110@info_window.visible = false@info_window.active visible_index = false = 0 # @ Graphics.transition transizione Execute # loop ciclo principale do # Update schermo di gioco Graphics.update # Update input informazioni sul display Input.update # update Frame update # dopo il passaggio ciclo si interrompe se $ scena! = self end end break # Preparare un comunicato Graphics.freeze transizione finestra title_window.dispose # @ @ @ main_window.dispose info_window.dispose fine #----------- -------------------------------------------------- ● #-------------------------------- ------------- # Frame aggiornamento ------------------------------------------ def update # aggiorna la finestra main_window @ . update@info_window.update if@info_window.active fine ritorno update_info # La finestra principale è attiva: update_target chiamata if@main_window.active termine rientro update_main fine #--------------- -------------------------------------------------- # Frame aggiornamento --------- ● (finestra principale è attiva) #---------------------------- ---------------------------------------------- update_main # def B Se si preme il tasto se Input.trigger (Input:: B)? # Ascolta annullare game_system.se_play $ ($ data_system.cancel_se) = $ scena finale di ritorno Scene_Map.new # tasto C se l'input SE . trigger (ingresso:: C)? if@main_window.diary.title_visible == false # ritorno buzzer giocare SE game_system.se_play $ ($ data_system.buzzer_se) end # SE ha deciso di giocare $ game_system.se_play ($ data_system. decision_se) @ main_window.active false@info_window.active = = = true@info_window.visible visible_index vero @ = @ @ main_window.index info_window.refresh (@ main_window.diary.show_comment) end end ritorno #------- -------------------------------------------------- ----------------- # Frame aggiornamento ● (info è attivo) #-------------------- -------------------------------------------------- update_info def ---- # pulsante B è premuto se Input.trigger (Input:: B)? # Ascolta annullare $ game_system.se_play SE ($ data_system.cancel_se) @ main_window.active = true@info_window.active = false@info_window.visible fine = return false # tasto C se Input.trigger (ingresso:: C)? ritorno # SE ha deciso di giocare $ game_system.se_play ($ data_system.decision_se) se comment_on @ @ comment_on = false@comment_window.visible altro = false @ comment_on = true@comment_window.visible = true end end di ritorno, se Input.trigger (ingresso:: L)? # SE ha deciso di giocare $ game_system.se_play ($ data_system.decision_se) loop_end = mentre false loop_end == false se visible_index @ @ = 0 visible_index -= 1 else = @ @ visible_index main_window.data.size -!.? 1 della fine loop_end = true if@main_window.data [visible_index @] title_visible fine diario = @ main_window . dati [@ visible_index] info_window.refresh @ (diary.show_comment) end di ritorno, se Input.trigger (ingresso:: R)? # SE ha deciso di giocare $ game_system.se_play ($ data_system.decision_se) loop_end = loop_end mentre false == false se visible_index @ = @ main_window.data.size - 1 @ visible_index + = 1 else @ visible_index = 0 fine loop_end = [visible_index @] if@main_window.data vero title_visible fine diario = @ [main_window.data visible_index @.? ] @ info_window.refresh (diary.show_comment) return end end end Edited February 28, 2011 by fra700 Link to comment Share on other sites More sharing options...
0 Guardian of Irael Posted February 28, 2011 Share Posted February 28, 2011 Argh XD Hai già provato a copiarlo ed incollarlo prima su un .txt e poi nel progetto? O proprio non hai dove copiarlo già ordinato?^ ^Per la seconda ecco lo script già ordinato (dovrebbe esser quello) e beh quello è anche il modo per ordinarlo! XD^ ^ (\_/)(^ ^) <----coniglietto rosso, me! (> <) Il mio Tumblr dove seguire i miei progetti, i progetti della Reverie : : Project ^ ^ http://i.imgur.com/KdUDtQt.png disponibile su Google Play, qui i dettagli! ^ ^ http://i.imgur.com/FwnGMI3.png completo! Giocabile online, qui i dettagli! ^ ^ REVERIE : : RENDEZVOUS (In allenamento per apprendere le buone arti prima di cominciarlo per bene ^ ^) Trovate i dettagli qui insieme alla mia intervista (non utilizzerò più rpgmaker) ^ ^ 🖤http://www.rpg2s.net/dax_games/r2s_regali2s.png E:3 http://www.rpg2s.net/dax_games/xmas/gifnatale123.gifhttp://i.imgur.com/FfvHCGG.png by Testament (notare dettaglio in basso a destra)! E:3http://i.imgur.com/MpaUphY.jpg by Idriu E:3Membro Onorario, Ambasciatore dei Coniglietti (Membro n.44) http://i.imgur.com/PgUqHPm.pngUfficiale"Ad opera della sua onestà e del suo completo appoggio alla causa dei Panda, Guardian Of Irael viene ufficialmente considerato un Membro portante del Partito, e Ambasciatore del suo Popolo presso di noi"http://i.imgur.com/TbRr4iS.png<- Grazie Testament E:3Ricorda...se rivolgi il tuo sguardo ^ ^ a Guardian anche Guardian volge il suo sguardo ^ ^ a te ^ ^http://i.imgur.com/u8UJ4Vm.gifby Flame ^ ^http://i.imgur.com/VbggEKS.gifhttp://i.imgur.com/2tJmjFJ.gifhttp://projectste.altervista.org/Our_Hero_adotta/ado2.pngGrazie Testament XD Fan n°1 ufficiale di PQ! :DVivail Rhaxen! <- Folletto te lo avevo detto (fa pure rima) che nonavevo programmi di grafica per fare un banner su questo pc XD (ora ho dinuovo il mio PC veramente :D) Rosso Guardiano dellahttp://i.imgur.com/Os5rvhx.pngRpg2s RPG BY FORUM:Nome: Darth Reveal PV totali 2PA totali 16Descrizione: ragazzo dai lunghi capelli rossi ed occhi dello stesso colore. Indossa una elegante giacca rossa sopra ad una maglietta nera. Porta pantaloni rossi larghi, una cintura nera e degli stivali dello stesso colore. E' solito trasportare lo spadone dietro la schiena in un fodero apposito. Ha un pendente al collo e tiene ben legato un pezzo di stoffa (che gli sta particolarmente a cuore) intorno al braccio sinistro sotto la giacca, copre una cicatrice.Bozze vesti non definitive qui.Equipaggiamento:Indossa:60$ e 59$ divisi in due tasche interneLevaitanSpada a due mani elsa lungaGuanti del Defender (2PA)Anello del linguaggio animale (diventato del Richiamo)Scrinieri da lanciere (2 PA)Elmo del Leone (5 PA)Corazza del Leone in Ferro Corrazzato (7 PA) ZAINO (20) contenente:Portamonete in pelle di cinghiale contenente: 100$Scatola Sanitaria Sigillata (può contenere e tenere al sicuro fino a 4 oggetti curativi) (contiene Benda di pronto soccorso x3, Pozione di cura)CordaBottiglia di idromeleForma di formaggioTorcia (serve ad illuminare, dura tre settori)Fiasca di ceramica con Giglio Amaro (Dona +1PN e Velocità all'utilizzatore)Ampolla BiancaSemi di Balissa CAVALLO NORMALE + SELLA (30 +2 armi) contentente:66$Benda di pronto soccorso x3Spada a due maniFagotto per Adara (fazzoletto ricamato) Link to comment Share on other sites More sharing options...
0 fra700 Posted February 28, 2011 Author Share Posted February 28, 2011 (edited) Argh XD Hai già provato a copiarlo ed incollarlo prima su un .txt e poi nel progetto? O proprio non hai dove copiarlo già ordinato?^ ^Per la seconda ecco lo script già ordinato (dovrebbe esser quello) e beh quello è anche il modo per ordinarlo! XD^ ^ Sisi avevo provato la qualunque anche su text editor specifici ma niente. L'ho script l'ho preso precisamente da li (ma me lo dava con un formato di tre righe), mentre nel link che mi hai fornito si vede perfetto. Come mai? bisogna eseguire qualche traduzione, un qualche opzione situata nel menù del tasto destro per caso? EDIT: ok risolto, guardando la barra degli indirizzi ho dedotto che fosse un'altra sezione. Ti ringrazio! Edited February 28, 2011 by fra700 Link to comment Share on other sites More sharing options...
0 Guardian of Irael Posted February 28, 2011 Share Posted February 28, 2011 Ah ecco incominciavo a preoccuparmi e guardarmi intorno! XDBene allora contento che tu abbia risolto! XD Prego! ^ ^ (\_/)(^ ^) <----coniglietto rosso, me! (> <) Il mio Tumblr dove seguire i miei progetti, i progetti della Reverie : : Project ^ ^ http://i.imgur.com/KdUDtQt.png disponibile su Google Play, qui i dettagli! ^ ^ http://i.imgur.com/FwnGMI3.png completo! Giocabile online, qui i dettagli! ^ ^ REVERIE : : RENDEZVOUS (In allenamento per apprendere le buone arti prima di cominciarlo per bene ^ ^) Trovate i dettagli qui insieme alla mia intervista (non utilizzerò più rpgmaker) ^ ^ 🖤http://www.rpg2s.net/dax_games/r2s_regali2s.png E:3 http://www.rpg2s.net/dax_games/xmas/gifnatale123.gifhttp://i.imgur.com/FfvHCGG.png by Testament (notare dettaglio in basso a destra)! E:3http://i.imgur.com/MpaUphY.jpg by Idriu E:3Membro Onorario, Ambasciatore dei Coniglietti (Membro n.44) http://i.imgur.com/PgUqHPm.pngUfficiale"Ad opera della sua onestà e del suo completo appoggio alla causa dei Panda, Guardian Of Irael viene ufficialmente considerato un Membro portante del Partito, e Ambasciatore del suo Popolo presso di noi"http://i.imgur.com/TbRr4iS.png<- Grazie Testament E:3Ricorda...se rivolgi il tuo sguardo ^ ^ a Guardian anche Guardian volge il suo sguardo ^ ^ a te ^ ^http://i.imgur.com/u8UJ4Vm.gifby Flame ^ ^http://i.imgur.com/VbggEKS.gifhttp://i.imgur.com/2tJmjFJ.gifhttp://projectste.altervista.org/Our_Hero_adotta/ado2.pngGrazie Testament XD Fan n°1 ufficiale di PQ! :DVivail Rhaxen! <- Folletto te lo avevo detto (fa pure rima) che nonavevo programmi di grafica per fare un banner su questo pc XD (ora ho dinuovo il mio PC veramente :D) Rosso Guardiano dellahttp://i.imgur.com/Os5rvhx.pngRpg2s RPG BY FORUM:Nome: Darth Reveal PV totali 2PA totali 16Descrizione: ragazzo dai lunghi capelli rossi ed occhi dello stesso colore. Indossa una elegante giacca rossa sopra ad una maglietta nera. Porta pantaloni rossi larghi, una cintura nera e degli stivali dello stesso colore. E' solito trasportare lo spadone dietro la schiena in un fodero apposito. Ha un pendente al collo e tiene ben legato un pezzo di stoffa (che gli sta particolarmente a cuore) intorno al braccio sinistro sotto la giacca, copre una cicatrice.Bozze vesti non definitive qui.Equipaggiamento:Indossa:60$ e 59$ divisi in due tasche interneLevaitanSpada a due mani elsa lungaGuanti del Defender (2PA)Anello del linguaggio animale (diventato del Richiamo)Scrinieri da lanciere (2 PA)Elmo del Leone (5 PA)Corazza del Leone in Ferro Corrazzato (7 PA) ZAINO (20) contenente:Portamonete in pelle di cinghiale contenente: 100$Scatola Sanitaria Sigillata (può contenere e tenere al sicuro fino a 4 oggetti curativi) (contiene Benda di pronto soccorso x3, Pozione di cura)CordaBottiglia di idromeleForma di formaggioTorcia (serve ad illuminare, dura tre settori)Fiasca di ceramica con Giglio Amaro (Dona +1PN e Velocità all'utilizzatore)Ampolla BiancaSemi di Balissa CAVALLO NORMALE + SELLA (30 +2 armi) contentente:66$Benda di pronto soccorso x3Spada a due maniFagotto per Adara (fazzoletto ricamato) Link to comment Share on other sites More sharing options...
Question
fra700
Link to comment
Share on other sites
3 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now