Jump to content
Rpg²S Forum
  • 0

cosuccia da nulla


REu
 Share

Question

salve di nuovo, volevo solo sapere qual'è il codice esatto che corrisponde all'evento "wait 30 frames" (30 è un esempio), praticamente voglio mettere che dopo un tot di tempo nella la schermata dei titoli mi parte un evento (un filmato)

 

quindi in conclusione

 

codice del wait frames

 

codice del filmato (che ho)

 

grazzie anticipatamente

Io sono ciò che voi non siete e voi siete ciò che io sono.
Link to comment
Share on other sites

15 answers to this question

Recommended Posts

  • 0

Uh... non ho capito un acca di quello che hai detto.

VUoi sapere come creare un wait tot frames via ruby?

 

Comunque, gli eventi non si possono far partire nella schermata del titolo, indi o fai partire il filmato via ruby, oppure usi uno script per eliminare il title screen, e te ne fai uno ad eventi...

http://img214.imageshack.us/img214/6732/r2scopytk5.png

 

Raxen - Scission of God

 

Cerchiamo collaboratori (Musicisti, Grafici e Scripter) per un nuovo progetto fantasy!

 

Rhaxen Scission of God

 

 

BASTA AL MAKING ITALIANO CHE VA A ROTOLI! DIAMOCI UNA SVEGLIATA!!

BASTA ALLE SOLITE BANALI DISCUSSIONI SULLA DECADENZA DEI GIOCHI!! FACCIAMOLI STI GIOCHI!!!

APRITE LO SPOILER E LEGGETE IL MANIFESTO DEL MAKING ITALIANO, SE DAVVERO VE NE IMPORTA QUALCOSA!!

 

Il Manifesto del Making Italiano

 

SALVIAMO IL MAKING ITALIANO!!

Dopo un test dei nostri esperti (Alato, Blake e havana24) abbiamo scoperto che ad interesse risponde interesse: cioè se voi dimostrate di essere interessati a ciò che creano gli altri, questi saranno stimolati a continuare a creare! E' un concetto semplice ma estremamente sottovalutato, basta vedere quanti topic di bei giochi sono caduti nel dimenticatoio e sono stati cagati solo da poche persone (prendiamo per esempio il fantastico gioco di Vech che vi invito a vedere nella sezione RM2k).

Perciò quello che dobbiamo fare è: leggere, leggere, leggere, postare, postare, postare! E questo non significa postare a caso, ma leggere per bene il progetto di qualcuno, le domande poste, le creazioni grafiche e musicali, e fare dei post in cui si propongano miglioramenti, si critichino le brutture, si esaltino le bellezze, si aiutino gli oppressi etc etc

BASTA AL MAKING ITALIANO CHE VA A ROTOLI! DIAMOCI UNA SVEGLIATA!!

Per dimostrarvi ciò che sto esponendo vi riporto che la volta in cui abbiamo provato (Alato, Blake e havana24) a fare una cosa di questo genere, c'è costata un pomeriggio ma il giorno dopo abbiamo ottenuto il numero massimo di utenti online mai raggiunto!!! Ma soprattutto ciò significa che l'interesse riguardo al making era stato, almeno momentaneamente, risvegliato!!

Voi pensate che eravamo solo in 3 a cercare tutti i topic e ravvivarli (con sincerità e senza i soliti falsi "Oh che bello.", ma anche con critiche per lavori incompleti o assurdi) e abbiamo ottenuto quel grande risultato: se lo facessimo tutti non sarebbe una cosa potentissima?!?

BASTA ALLE SOLITE BANALI DISCUSSIONI SULLA DECADENZA DEI GIOCHI!! FACCIAMOLI STI GIOCHI!!!

Chi è contrario a questa cosa, può pure continuare così ma è una persona che col making non ha nulla a che fare, ma chi crede nel making inizi ora, immediatamente a seguire questa linea di pensiero!

 

Ma chi è d'accordo, chi davvero ci tiene al making, incolli questo Manifesto nella propria firma!! Mettete anche voi questa firma!!

 

 

Link to comment
Share on other sites

  • 0

Zero, lui praticamente ha chiesto il codice, indi in ruby, per far in modo che dopo un tot di tempo in cui non stai facendo niente nel title, parta un filmato. Tipo i giochi per PSX.

(Ora io non so farlo, quindi lascio la palla a voi esperti ;P)

Edited by Kenshin

"Giochiamo a: schiettezza o grande impresa eroica!"

Personaggio PBF: Lyriel
PN: 12/20
PV: 2/2
PA: 4 (5 col mantello d'acero)
Equipaggiamento:

Spada comune
Pugnale comune
Arco elfico (magico, ignifugo. Permette di colpire da lunghe distanze. Se distrutto si auto-restaura a fine battaglia. Le frecce scoccate con questo arco ottengono l'effetto dell'incantesimo Folata di vento permettendo di spazzare via piccoli oggetti e creature.)
Faretra con 20 frecce
Cappuccio
Armatura delle ombre borchiata (punti armatura 4, ignifuga, di notte +1 a furtività)
2 anelli di valore
Borsa comune (10 slot)

  • Corda
  • Penna e calamaio
  • Libro vuoto
  • Forma di formaggio
  • Mappa
  • Cannocchiale
  • Tagliola di ferro
  • Campanellino di Maia
  • Mantello d'Acero (+1PA): un mantello pesante di colore rossiccio che presenta dei motivi fiochi, dello stesso colore, a forma di foglie d'acero. E' dotato di un ampio cappuccio e può coprire completamente chi lo indossa. Se si resta fermi in un'area boschiva o tra un gruppo di alberi il mantello è in grado di celare completamente la presenza del possessore dando un grado di furtività pari a gr.5. Nel caso di bestie ed animali dalla visuale meno acuta, se il giocatore è già stato notato od ha notificato in qualche modo la sua presenza può gettarsi a terra tra un gruppo di foglie o tra i cespugli per scomparire completamente dalla visuale di tali nemici.

181 monete d'oro
Cintura porta coltelli (6 slot)

  • Coltello da lancio intarsiato
  • Coltello da lancio in metallo
  • Coltello da lancio in metallo

Campanellino di Maia




Se Lyriel, e solo lui, suona tre volte il campanellino può richiamare una creatura magica che combatterà al suo fianco al prezzo di 3 PN.
L'animale ha l'aspetto di un leopardo delle nevi, i suoi occhi sono viola e così gli artigli, i denti e la punta della coda. Questa è lunga e larga, molto folta e corposa. Il manto a differenza dei leopardi è tutto bianco, inoltre ha una folta criniera circolare intorno al collo a mo' di sciarpa e che si unisce con la sommità della fronte creando un cresta non molto alta pettinata all'indietro.
La creatura combatte indipendentemente dal possessore (il giocatore potrà descriverne il comportamento in battaglia e fuori, ma il master potrà riservarsi il diritto di far compiere alla creatura delle azioni per conto proprio).
La creatura non deve per forza stare vicino all'utilizzatore, ma può essere mandata lontano e tornare da lui su comando.
Lyriel e l'animale hanno un contatto mentale e possono comunicare anche a distanza.
Non vi è limite alla permanenza della creatura una volta evocata, però se i suoi PV raggiungono lo zero dovrà essere risvegliata magicamente da un mago od un curatore esperto. Lyriel può richiamare all'interno del campanellino la creatura quando essa non è impegnata in combattimento od in altre prove senza sforzi, ma dovrà spendere di nuovo 3 PN per richiamarla. Può continuare a combattere se Lyriel viene sconfitto.
L'animale vede bene anche di notte e se c'è nebbia.
Caratteristiche della creatura:
PV 2
PA 2
Atletica Gr.4
Furtività Gr.1
Attacco (tipo descritto dal giocatore nei limiti fisici di artigli e morso) di massimo Gr.5 può dichiarare DIRETTO su armature di cuoio o cuoio borchiato e MAGICO con tutti gli attacchi. Può dichiarare SONNO se artigli e denti viola entrano in contatto diretto con il sangue l'avversario. DIRETTO e SONNO sono due effetti, quindi come da regolamento solo uno può essere scelto. MAGICO può esser combinato con entrambi.
Malus: il campanellino deve tintinnare, quindi Lyriel suonandolo tradirà la sua presenza.
Il campanellino tutte le volte che viene suonato fa venire in mente Maia a Lyriel, quindi il giocatore dovrà scrivere una frase di almeno 3 parole per ricordare la bambina, ogni volta diversa, altrimenti l'evocazione non avrà esito.

 


Personaggio PBF: Wren
PN: 20/20
PV:2/2
PA:0


Borsa Comune

  • 3 filoni di pane
  • 4 mele
  • prosciutto
  • formaggio
  • coltello da cucina

 

Link to comment
Share on other sites

  • 0
VUoi sapere come creare un wait tot frames via ruby?
sisi

 

Comunque, gli eventi non si possono far partire nella schermata del titolo, indi o fai partire il filmato via ruby

 

lo so benissimo,forse mi sono espresso male,il filmato parte con lo script "scene_movie",voglio mettere che dopo un tot di frames parte il filmato tutto qui

Edited by REu
Io sono ciò che voi non siete e voi siete ciò che io sono.
Link to comment
Share on other sites

  • 0

Mi sembra di aver già risposto ad un altro che cercava di fare un po' la stessa cosa, guarda se ci capisci qualcosa il link è qui.

Se non c'hai capito niente te lo rispiego.

http://www.rpg2s.net/awards/bestscripter1.jpg

Se avete bisogno di modifiche, correzioni o creazioni da zero di script RGSS, allora visitate la mia bottega.

La bottega di Sylaer

Link to comment
Share on other sites

  • 0

if @wait_count > 0
@wait_count -=1
return
end

Questo lo devi mettere all'inizio del metodo update del Scene_Title.

@wait_count = 0

Questo invece lo devi mettere in cima alla classe fuori da ogni metodo, però sempre all'interno della classe.

@wait_count = 30

E infine metti questo all'interno del metodo command_new_game.

http://www.rpg2s.net/awards/bestscripter1.jpg

Se avete bisogno di modifiche, correzioni o creazioni da zero di script RGSS, allora visitate la mia bottega.

La bottega di Sylaer

Link to comment
Share on other sites

  • 0
perchè l'ultimo all'interno del new game? Non devo premere su new game,il filmato parte senza che io faccia nulla dopo un tot di frames
Io sono ciò che voi non siete e voi siete ciò che io sono.
Link to comment
Share on other sites

  • 0

il filmato mi parte immediatamente, non capisco perchèèèèè, ho messo

 

@wait_count -= 300 e poi il codice filmato,ma non aspetta 300 frames lo fa partire subito!

Io sono ciò che voi non siete e voi siete ciò che io sono.
Link to comment
Share on other sites

  • 0

$scene = Scene_Movie.new ("Promo title",7) questo è il codice del filmato

 

questo è lo script

 

#======================================================================
========
# ++ タイトル画面カスタマイズ ver. 1.01 ++
#  Script by パラ犬
#   RE3 3 script fusi insieme,PARA TITLE CUSTOM,scene title e lo script che sostituisce l'immagine dei title con dei frames.
#------------------------------------------------------------------------------
# タイトルメニューに画像を使用、もしくはメニューの文字を変更します。
#==============================================================================

module PARA_TITLE_CUSTOM
# メニューコマンドに画像を使う( true / false )
IMG_MENU = true

#↓---メニューコマンドに画像を使わない時の設定---

# メニューコマンドの文字列
MENU_NEWGAME = "ニューゲー� "  # ニューゲー� 
MENU_LOAD = "コンティニュー"   # コンティニュー
MENU_END = "シャットダウン"    # シャットダウン

# ウインドウ� を非表示( true / false )
WINDOW_TRANS = false
# ウインドウの透明度(ウインドウ� を表示している時に指定)
WINDOW_OPACITY = 160

# ウインドウの横サイズ
WINDOW_WIDTH = 192
# ウインドウの横位置( 0:座標指定 / 1:左端  / 2:中央 / 3:右端 )
WINDOW_ALIGN = 2
# 「座標指定」の時のウインドウの横座標
WINDOW_POS_X = 0
# ウインドウの縦位置( 0:座標指定 / 1:上端  / 2:中央 / 3:下端 )
WINDOW_VALIGN = 0
# 「座標指定」の時のウインドウの縦座標
WINDOW_POS_Y = 288

#↓---メニューコマンドに画像を使う時の設定---

# メニューコマンドに使う画像ファイル名(「Graphics/Titles」にインポート )
#( 書式は [ コマンド未選択時 , コマンドが選択されたとき ] )

# ニューゲー� 
IMG_NEWGAME = ["newgame", "newgame_active" ,"newgame_active 2","newgame_active 3"]
IMG_NEWGAME_X = 450   # 横位置
IMG_NEWGAME_Y = 320   # 縦位置
# コンティニュー
IMG_LOAD = ["continue","continue_active","continue_active 2","continue_active 3"]
IMG_LOAD_X = 450   # 横位置
IMG_LOAD_Y = 360   # 縦位置
# シャットダウン
IMG_END = ["shutdown","shutdown_active","shutdown_active 2","shutdown_active 3"]
IMG_END_X = 450   # 横位置
IMG_END_Y = 400   # 縦位置

# 画像の合成方法( 0:通常 / 1:� 算  / 2:減算 )
BLEND_TYPE = 0

end

# ↑ 設定� �目ここまで
class Scene_Title
def main
if $BTEST
battle_test
return
end
$data_actors = load_data("Data/Actors.rxdata")
$data_classes = load_data("Data/Classes.rxdata")
$data_skills = load_data("Data/Skills.rxdata")
$data_items = load_data("Data/Items.rxdata")
$data_weapons = load_data("Data/Weapons.rxdata")
$data_armors = load_data("Data/Armors.rxdata")
$data_enemies = load_data("Data/Enemies.rxdata")
$data_troops = load_data("Data/Troops.rxdata")
$data_states = load_data("Data/States.rxdata")
$data_animations = load_data("Data/Animations.rxdata")
$data_tilesets = load_data("Data/Tilesets.rxdata")
$data_common_events = load_data("Data/CommonEvents.rxdata")
$data_system = load_data("Data/System.rxdata")
$game_system = Game_System.new
anim_init(12, 200, true, "anim")
  s1 = PARA_TITLE_CUSTOM::MENU_NEWGAME
  s2 = PARA_TITLE_CUSTOM::MENU_LOAD
  s3 = PARA_TITLE_CUSTOM::MENU_END
  w = PARA_TITLE_CUSTOM::WINDOW_WIDTH
  @command_window = Window_Command.new(w, [s1, s2, s3])
     if PARA_TITLE_CUSTOM::WINDOW_TRANS
    @command_window.opacity = 0
  else
    @command_window.back_opacity = PARA_TITLE_CUSTOM::WINDOW_OPACITY
  end
    case PARA_TITLE_CUSTOM::WINDOW_ALIGN
    when 0
      @command_window.x = PARA_TITLE_CUSTOM::WINDOW_POS_X
    when 1
      @command_window.x = 0
    when 2
      @command_window.x = ( 640 - @command_window.width ) / 2
    when 3
      @command_window.x = 640 - @command_window.width
  end
  case PARA_TITLE_CUSTOM::WINDOW_VALIGN
    when 0
      @command_window.y = PARA_TITLE_CUSTOM::WINDOW_POS_Y
    when 1
      @command_window.y = 0
    when 2
      @command_window.y = ( 480 - @command_window.height ) / 2
    when 3
      @command_window.y = 480 - @command_window.height
  end
@command_window.back_opacity = 160
@command_window.x = 320 - @command_window.width / 2
@command_window.y = 288
@continue_enabled = false
for i in 0..3
if FileTest.exist?("Save#{i+1}.rxdata")
@continue_enabled = true
end
end
if @continue_enabled
@command_window.index = 1
else
@command_window.disable_item(1)
end
  # コマンドに画像を使う
  if PARA_TITLE_CUSTOM::IMG_MENU
    @command_window.visible = false
    @command_img1 = Sprite.new
    @command_img1.blend_type = PARA_TITLE_CUSTOM::BLEND_TYPE
    @command_img1.bitmap = RPG::Cache.title(PARA_TITLE_CUSTOM::IMG_NEWGAME[0])
    @command_img1.x = PARA_TITLE_CUSTOM::IMG_NEWGAME_X
    @command_img1.y = PARA_TITLE_CUSTOM::IMG_NEWGAME_Y
    @command_img2 = Sprite.new
    @command_img2.blend_type = PARA_TITLE_CUSTOM::BLEND_TYPE
    @command_img2.bitmap = RPG::Cache.title(PARA_TITLE_CUSTOM::IMG_LOAD[0])
    @command_img2.x = PARA_TITLE_CUSTOM::IMG_LOAD_X
    @command_img2.y = PARA_TITLE_CUSTOM::IMG_LOAD_Y
    @command_img3 = Sprite.new
    @command_img3.blend_type = PARA_TITLE_CUSTOM::BLEND_TYPE
    @command_img3.bitmap = RPG::Cache.title(PARA_TITLE_CUSTOM::IMG_END[0])
    @command_img3.x = PARA_TITLE_CUSTOM::IMG_END_X
    @command_img3.y = PARA_TITLE_CUSTOM::IMG_END_Y
    # コンティニューが有効な� �合、カーソルをコンティニューに合わせる
    # 無効な� �合、コンティニューの文字を半透明にする
    if @continue_enabled
      @command_img1.bitmap = RPG::Cache.title(PARA_TITLE_CUSTOM::IMG_NEWGAME[0])
      @command_img2.bitmap = RPG::Cache.title(PARA_TITLE_CUSTOM::IMG_LOAD[1])
    else
      @command_img2.opacity = 160
      @command_img1.bitmap = RPG::Cache.title(PARA_TITLE_CUSTOM::IMG_NEWGAME[1])
      @command_img2.bitmap = RPG::Cache.title(PARA_TITLE_CUSTOM::IMG_LOAD[0])
    end
  end
  # タイトル BGM を演奏
$game_system.bgm_play($data_system.title_bgm)
Audio.me_stop
Audio.bgs_stop
Graphics.transition
loop do
animation
Graphics.update
Input.update
update
if $scene != self
break
end
end
Graphics.freeze
@command_window.dispose
if PARA_TITLE_CUSTOM::IMG_MENU
    @command_img1.dispose
    @command_img2.dispose
    @command_img3.dispose
  end
@sprite.bitmap.dispose
@sprite.dispose
end
#--------------------------------------------------------------------------
#---------------------------------------------
def update
@command_window.update
if PARA_TITLE_CUSTOM::IMG_MENU
if Input.repeat?(Input::UP) or Input.repeat?(Input::DOWN)
 case @command_window.index
when 0
@command_img1.bitmap = RPG::Cache.title(PARA_TITLE_CUSTOM::IMG_NEWGAME[1])
          @command_img2.bitmap = RPG::Cache.title(PARA_TITLE_CUSTOM::IMG_LOAD[0])
          @command_img3.bitmap = RPG::Cache.title(PARA_TITLE_CUSTOM::IMG_END[0])
when 1
@command_img1.bitmap = RPG::Cache.title(PARA_TITLE_CUSTOM::IMG_NEWGAME[0])
          @command_img2.bitmap = RPG::Cache.title(PARA_TITLE_CUSTOM::IMG_LOAD[1])
          @command_img3.bitmap = RPG::Cache.title(PARA_TITLE_CUSTOM::IMG_END[0])
when 2
@command_img1.bitmap = RPG::Cache.title(PARA_TITLE_CUSTOM::IMG_NEWGAME[0])
          @command_img2.bitmap = RPG::Cache.title(PARA_TITLE_CUSTOM::IMG_LOAD[0])
          @command_img3.bitmap = RPG::Cache.title(PARA_TITLE_CUSTOM::IMG_END[1])
end
end
end
if Input.trigger?(Input::C) 
case @command_window.index
when 0
command_new_game
$scene = Scene_CampaignSelection.new
when 1
command_continue
when 2
command_shutdown
end
end
end
def command_new_game
$game_system.se_play($data_system.decision_se)
Audio.bgm_stop
Graphics.frame_count = 0
$game_temp = Game_Temp.new
$game_system = Game_System.new
$game_switches = Game_Switches.new
$game_variables = Game_Variables.new
$game_self_switches = Game_SelfSwitches.new
$game_screen = Game_Screen.new
$game_actors = Game_Actors.new
$game_party = Game_Party.new
$game_troop = Game_Troop.new
$game_map = Game_Map.new
$game_player = Game_Player.new
$game_party.setup_starting_members
$game_map.setup($data_system.start_map_id)
$game_player.moveto($data_system.start_x, $data_system.start_y)
$game_player.refresh
$game_map.autoplay
$game_map.update
$scene = Scene_Map.new
end
def command_continue
unless @continue_enabled
$game_system.se_play($data_system.buzzer_se)
return
end
$game_system.se_play($data_system.decision_se)
$scene = Scene_Load.new
end
def command_shutdown
$game_system.se_play($data_system.decision_se)
Audio.bgm_fade(800)
Audio.bgs_fade(800)
Audio.me_fade(800)
$scene = nil
end
def battle_test
$data_actors = load_data("Data/BT_Actors.rxdata")
$data_classes = load_data("Data/BT_Classes.rxdata")
$data_skills = load_data("Data/BT_Skills.rxdata")
$data_items = load_data("Data/BT_Items.rxdata")
$data_weapons = load_data("Data/BT_Weapons.rxdata")
$data_armors = load_data("Data/BT_Armors.rxdata")
$data_enemies = load_data("Data/BT_Enemies.rxdata")
$data_troops = load_data("Data/BT_Troops.rxdata")
$data_states = load_data("Data/BT_States.rxdata")
$data_animations = load_data("Data/BT_Animations.rxdata")
$data_tilesets = load_data("Data/BT_Tilesets.rxdata")
$data_common_events = load_data("Data/BT_CommonEvents.rxdata")
$data_system = load_data("Data/BT_System.rxdata")
Graphics.frame_count = 0
$game_temp = Game_Temp.new
$game_system = Game_System.new
$game_switches = Game_Switches.new
$game_variables = Game_Variables.new
$game_self_switches = Game_SelfSwitches.new
$game_screen = Game_Screen.new
$game_actors = Game_Actors.new
$game_party = Game_Party.new
$game_troop = Game_Troop.new
$game_map = Game_Map.new
$game_player = Game_Player.new
$game_party.setup_battle_test_members
$game_temp.battle_troop_id = $data_system.test_troop_id
$game_temp.battle_can_escape = true
$game_map.battleback_name = $data_system.battleback_name
$game_system.se_play($data_system.battle_start_se)
$game_system.bgm_play($game_system.battle_bgm)
$scene = Scene_Battle.new
end
def anim_init(nb_frame, vitesse, boucle, nom_image)
@nb_frame = nb_frame
@nom_image = nom_image
@vitesse = vitesse
@boucle = boucle
@compteur = 0
@sprite = Sprite.new
@sprite.bitmap = RPG::Cache.picture(@nom_image+"0")
end
def animation
for i in 0..@nb_frame-1
if @compteur == @vitesse * i
@sprite.bitmap = RPG::Cache.picture(@nom_image+i.to_s)
end
end
@compteur +=1
if @compteur == @vitesse * @nb_frame
if @boucle == true
@compteur = 0
else
@compteur -= 1
end
end
end
end

Io sono ciò che voi non siete e voi siete ciò che io sono.
Link to comment
Share on other sites

  • 0

Ho fatto però non ho provato quindi non soo sicuro che funzioni, comunque ho settato il tempo a 300 frame, se vuoi cambialo pure.

 

#==============================================================================
# ++ タイトル画面カスタマイズ ver. 1.01 ++
#  Script by パラ犬
#   RE3 3 script fusi insieme,PARA TITLE CUSTOM,scene title e lo script che sostituisce l'immagine dei title con dei frames.
#------------------------------------------------------------------------------
# タイトルメニューに画像を使用、もしくはメニューの文字を変更します。
#==============================================================================

module PARA_TITLE_CUSTOM
# メニューコマンドに画像を使う( true / false )
IMG_MENU = true

#↓---メニューコマンドに画像を使わない時の設定---

# メニューコマンドの文字列
MENU_NEWGAME = "ニューゲー� " # ニューゲー�
MENU_LOAD = "コンティニュー" # コンティニュー
MENU_END = "シャットダウン" # シャットダウン

# ウインドウ� を非表示( true / false )
WINDOW_TRANS = false
# ウインドウの透明度(ウインドウ� を表示している時に指定)
WINDOW_OPACITY = 160

# ウインドウの横サイズ
WINDOW_WIDTH = 192
# ウインドウの横位置( 0:座標指定 / 1:左端 / 2:中央 / 3:右端 )
WINDOW_ALIGN = 2
# 「座標指定」の時のウインドウの横座標
WINDOW_POS_X = 0
# ウインドウの縦位置( 0:座標指定 / 1:上端 / 2:中央 / 3:下端 )
WINDOW_VALIGN = 0
# 「座標指定」の時のウインドウの縦座標
WINDOW_POS_Y = 288

#↓---メニューコマンドに画像を使う時の設定---

# メニューコマンドに使う画像ファイル名(「Graphics/Titles」にインポート )
#( 書式は [ コマンド未選択時 , コマンドが選択されたとき ] )

# ニューゲー�
IMG_NEWGAME = ["newgame", "newgame_active" ,"newgame_active 2","newgame_active 3"]
IMG_NEWGAME_X = 450 # 横位置
IMG_NEWGAME_Y = 320 # 縦位置
# コンティニュー
IMG_LOAD = ["continue","continue_active","continue_active 2","continue_active 3"]
IMG_LOAD_X = 450 # 横位置
IMG_LOAD_Y = 360 # 縦位置
# シャットダウン
IMG_END = ["shutdown","shutdown_active","shutdown_active 2","shutdown_active 3"]
IMG_END_X = 450 # 横位置
IMG_END_Y = 400 # 縦位置

# 画像の合成方法( 0:通常 / 1:� 算 / 2:減算 )
BLEND_TYPE = 0

end

# ↑ 設定� �目ここまで
class Scene_Title
def main
if $BTEST
battle_test
return
end
$data_actors = load_data("Data/Actors.rxdata")
$data_classes = load_data("Data/Classes.rxdata")
$data_skills = load_data("Data/Skills.rxdata")
$data_items = load_data("Data/Items.rxdata")
$data_weapons = load_data("Data/Weapons.rxdata")
$data_armors = load_data("Data/Armors.rxdata")
$data_enemies = load_data("Data/Enemies.rxdata")
$data_troops = load_data("Data/Troops.rxdata")
$data_states = load_data("Data/States.rxdata")
$data_animations = load_data("Data/Animations.rxdata")
$data_tilesets = load_data("Data/Tilesets.rxdata")
$data_common_events = load_data("Data/CommonEvents.rxdata")
$data_system = load_data("Data/System.rxdata")
$game_system = Game_System.new
anim_init(12, 200, true, "anim")


@wait_count = 300


s1 = PARA_TITLE_CUSTOM::MENU_NEWGAME
s2 = PARA_TITLE_CUSTOM::MENU_LOAD
s3 = PARA_TITLE_CUSTOM::MENU_END
w = PARA_TITLE_CUSTOM::WINDOW_WIDTH
@command_window = Window_Command.new(w, [s1, s2, s3])
if PARA_TITLE_CUSTOM::WINDOW_TRANS
@command_window.opacity = 0
else
@command_window.back_opacity = PARA_TITLE_CUSTOM::WINDOW_OPACITY
end
case PARA_TITLE_CUSTOM::WINDOW_ALIGN
when 0
@command_window.x = PARA_TITLE_CUSTOM::WINDOW_POS_X
when 1
@command_window.x = 0
when 2
@command_window.x = ( 640 - @command_window.width ) / 2
when 3
@command_window.x = 640 - @command_window.width
end
case PARA_TITLE_CUSTOM::WINDOW_VALIGN
when 0
@command_window.y = PARA_TITLE_CUSTOM::WINDOW_POS_Y
when 1
@command_window.y = 0
when 2
@command_window.y = ( 480 - @command_window.height ) / 2
when 3
@command_window.y = 480 - @command_window.height
end
@command_window.back_opacity = 160
@command_window.x = 320 - @command_window.width / 2
@command_window.y = 288
@continue_enabled = false
for i in 0..3
if FileTest.exist?("Save#{i+1}.rxdata")
@continue_enabled = true
end
end
if @continue_enabled
@command_window.index = 1
else
@command_window.disable_item(1)
end
# コマンドに画像を使う
if PARA_TITLE_CUSTOM::IMG_MENU
@command_window.visible = false
@command_img1 = Sprite.new
@command_img1.blend_type = PARA_TITLE_CUSTOM::BLEND_TYPE
@command_img1.bitmap = RPG::Cache.title(PARA_TITLE_CUSTOM::IMG_NEWGAME[0])
@command_img1.x = PARA_TITLE_CUSTOM::IMG_NEWGAME_X
@command_img1.y = PARA_TITLE_CUSTOM::IMG_NEWGAME_Y
@command_img2 = Sprite.new
@command_img2.blend_type = PARA_TITLE_CUSTOM::BLEND_TYPE
@command_img2.bitmap = RPG::Cache.title(PARA_TITLE_CUSTOM::IMG_LOAD[0])
@command_img2.x = PARA_TITLE_CUSTOM::IMG_LOAD_X
@command_img2.y = PARA_TITLE_CUSTOM::IMG_LOAD_Y
@command_img3 = Sprite.new
@command_img3.blend_type = PARA_TITLE_CUSTOM::BLEND_TYPE
@command_img3.bitmap = RPG::Cache.title(PARA_TITLE_CUSTOM::IMG_END[0])
@command_img3.x = PARA_TITLE_CUSTOM::IMG_END_X
@command_img3.y = PARA_TITLE_CUSTOM::IMG_END_Y
# コンティニューが有効な� �合、カーソルをコンティニューに合わせる
# 無効な� �合、コンティニューの文字を半透明にする
if @continue_enabled
@command_img1.bitmap = RPG::Cache.title(PARA_TITLE_CUSTOM::IMG_NEWGAME[0])
@command_img2.bitmap = RPG::Cache.title(PARA_TITLE_CUSTOM::IMG_LOAD[1])
else
@command_img2.opacity = 160
@command_img1.bitmap = RPG::Cache.title(PARA_TITLE_CUSTOM::IMG_NEWGAME[1])
@command_img2.bitmap = RPG::Cache.title(PARA_TITLE_CUSTOM::IMG_LOAD[0])
end
end
# タイトル BGM を演奏
$game_system.bgm_play($data_system.title_bgm)
Audio.me_stop
Audio.bgs_stop
Graphics.transition
loop do
animation
Graphics.update
Input.update
update
if $scene != self
break
end
end
Graphics.freeze
@command_window.dispose
if PARA_TITLE_CUSTOM::IMG_MENU
@command_img1.dispose
@command_img2.dispose
@command_img3.dispose
end
@sprite.bitmap.dispose
@sprite.dispose
end
#--------------------------------------------------------------------------
#---------------------------------------------
def update
@command_window.update
if PARA_TITLE_CUSTOM::IMG_MENU
if Input.repeat?(Input::UP) or Input.repeat?(Input::DOWN)
case @command_window.index
when 0
@command_img1.bitmap = RPG::Cache.title(PARA_TITLE_CUSTOM::IMG_NEWGAME[1])
@command_img2.bitmap = RPG::Cache.title(PARA_TITLE_CUSTOM::IMG_LOAD[0])
@command_img3.bitmap = RPG::Cache.title(PARA_TITLE_CUSTOM::IMG_END[0])
when 1
@command_img1.bitmap = RPG::Cache.title(PARA_TITLE_CUSTOM::IMG_NEWGAME[0])
@command_img2.bitmap = RPG::Cache.title(PARA_TITLE_CUSTOM::IMG_LOAD[1])
@command_img3.bitmap = RPG::Cache.title(PARA_TITLE_CUSTOM::IMG_END[0])
when 2
@command_img1.bitmap = RPG::Cache.title(PARA_TITLE_CUSTOM::IMG_NEWGAME[0])
@command_img2.bitmap = RPG::Cache.title(PARA_TITLE_CUSTOM::IMG_LOAD[0])
@command_img3.bitmap = RPG::Cache.title(PARA_TITLE_CUSTOM::IMG_END[1])
end
end
end
if Input.trigger?(Input::C)
case @command_window.index
when 0
command_new_game
$scene = Scene_CampaignSelection.new
when 1
command_continue
when 2
command_shutdown
end
end
if @wait_count > 0
  @wait_count -= 1
  if @wait_count == 0
 $scene = Scene_Movie.new("Promo title",7)
  end
end
end
def command_new_game
$game_system.se_play($data_system.decision_se)
Audio.bgm_stop
Graphics.frame_count = 0
$game_temp = Game_Temp.new
$game_system = Game_System.new
$game_switches = Game_Switches.new
$game_variables = Game_Variables.new
$game_self_switches = Game_SelfSwitches.new
$game_screen = Game_Screen.new
$game_actors = Game_Actors.new
$game_party = Game_Party.new
$game_troop = Game_Troop.new
$game_map = Game_Map.new
$game_player = Game_Player.new
$game_party.setup_starting_members
$game_map.setup($data_system.start_map_id)
$game_player.moveto($data_system.start_x, $data_system.start_y)
$game_player.refresh
$game_map.autoplay
$game_map.update
$scene = Scene_Map.new
end
def command_continue
unless @continue_enabled
$game_system.se_play($data_system.buzzer_se)
return
end
$game_system.se_play($data_system.decision_se)
$scene = Scene_Load.new
end
def command_shutdown
$game_system.se_play($data_system.decision_se)
Audio.bgm_fade(800)
Audio.bgs_fade(800)
Audio.me_fade(800)
$scene = nil
end
def battle_test
$data_actors = load_data("Data/BT_Actors.rxdata")
$data_classes = load_data("Data/BT_Classes.rxdata")
$data_skills = load_data("Data/BT_Skills.rxdata")
$data_items = load_data("Data/BT_Items.rxdata")
$data_weapons = load_data("Data/BT_Weapons.rxdata")
$data_armors = load_data("Data/BT_Armors.rxdata")
$data_enemies = load_data("Data/BT_Enemies.rxdata")
$data_troops = load_data("Data/BT_Troops.rxdata")
$data_states = load_data("Data/BT_States.rxdata")
$data_animations = load_data("Data/BT_Animations.rxdata")
$data_tilesets = load_data("Data/BT_Tilesets.rxdata")
$data_common_events = load_data("Data/BT_CommonEvents.rxdata")
$data_system = load_data("Data/BT_System.rxdata")
Graphics.frame_count = 0
$game_temp = Game_Temp.new
$game_system = Game_System.new
$game_switches = Game_Switches.new
$game_variables = Game_Variables.new
$game_self_switches = Game_SelfSwitches.new
$game_screen = Game_Screen.new
$game_actors = Game_Actors.new
$game_party = Game_Party.new
$game_troop = Game_Troop.new
$game_map = Game_Map.new
$game_player = Game_Player.new
$game_party.setup_battle_test_members
$game_temp.battle_troop_id = $data_system.test_troop_id
$game_temp.battle_can_escape = true
$game_map.battleback_name = $data_system.battleback_name
$game_system.se_play($data_system.battle_start_se)
$game_system.bgm_play($game_system.battle_bgm)
$scene = Scene_Battle.new
end
def anim_init(nb_frame, vitesse, boucle, nom_image)
@nb_frame = nb_frame
@nom_image = nom_image
@vitesse = vitesse
@boucle = boucle
@compteur = 0
@sprite = Sprite.new
@sprite.bitmap = RPG::Cache.picture(@nom_image+"0")
end
def animation
for i in 0..@nb_frame-1
if @compteur == @vitesse * i
@sprite.bitmap = RPG::Cache.picture(@nom_image+i.to_s)
end
end
@compteur +=1
if @compteur == @vitesse * @nb_frame
if @boucle == true
@compteur = 0
else
@compteur -= 1
end
end
end
end

 

 

Edited by Sylaer

http://www.rpg2s.net/awards/bestscripter1.jpg

Se avete bisogno di modifiche, correzioni o creazioni da zero di script RGSS, allora visitate la mia bottega.

La bottega di Sylaer

Link to comment
Share on other sites

  • 0

il codice deve essere questo

 

 

$scene = Scene_Movie.new ("Promo title",7)

 

l'ho cambiato e funziona,il problema è che al termine del filmato mi da un errore sulla stringa

 

if $ABS.display[0] dello SBABS 3 (il battle system in tempo reale)

Io sono ciò che voi non siete e voi siete ciò che io sono.
Link to comment
Share on other sites

  • 0

allora lo script filmato lo trovi qui

 

http://www.rpg2s.net/forum/index.php?showt...art=#entry57360

 

 

 

 

questo è lo sbabs 3 la stringa 133 da problemi

 

EDIT: la stringa 133 da problemi anche se sostituisco il codice "scene_movie" con un altro evento tipo scene_save ecc

 

EDIT 2: niente da fare, se tolgo direttamente lo sbabs 3 mi dà errore nello script "wrap_map" alla stringa 411 $game_map.wrap=nil

 

questi 2 errori hanno in comune il "game_map" anche se non capisco il perchè di questo errore

 

EDIT 3 adesso mi da errore qui $ABS.enemies = {} proprio all'inizio

 

#=====================================
# ■ Game Map
#=====================================

class Game_Map
 #--------------------------------------------------------------------------
 alias abs_game_map_setup setup
 #--------------------------------------------------------------------------
 def setup(map_id)
   $ABS.enemies = {}
   abs_game_map_setup(map_id)
 end
 #--------------------------------------------------------------------------
 def passable?(x, y, d, self_event = nil)
   unless valid?(x, y)
     return false
   end
   bit = (1 << (d / 2 - 1)) & 0x0f
   for event in events.values
     if event.tile_id >= 0 and event != self_event and
        event.x == x and event.y == y and not event.through
       if @passages[event.tile_id] & bit != 0
         return false
       elsif @passages[event.tile_id] & 0x0f == 0x0f
         return false
       elsif @priorities[event.tile_id] == 0
         return true
       end
     end
   end
   for ally in $game_allies.values
     if ally.map_id == $game_map.map_id
       if ally.dead == false
         if ally.tile_id >= 0 and ally != self_event and
           ally.x == x and ally.y == y and not ally.through
           if @passages[ally.tile_id] & bit != 0
             return false
           elsif @passages[ally.tile_id] & 0x0f == 0x0f
             return false
           elsif @priorities[ally.tile_id] == 0
             return true
           end
         end
       end
     end
   end
   for i in [2, 1, 0]
     tile_id = data[x, y, i]
     if tile_id == nil
       return false
     elsif @passages[tile_id] & bit != 0
       return false
     elsif @passages[tile_id] & 0x0f == 0x0f
       return false
     elsif @priorities[tile_id] == 0
       return true
     end
   end
   return true
 end
end

#======================================
# ■ Game Event
#======================================

class Game_Event < Game_Character
 #--------------------------------------------------------------------------
 alias abs_game_event_refresh refresh
 #--------------------------------------------------------------------------
 def name
   return @event.name
 end
 #--------------------------------------------------------------------------
 def id
   return @id
 end
 #--------------------------------------------------------------------------
 def refresh
   abs_game_event_refresh
   $ABS.refresh(@event, @list, @character_name)
 end
end

#======================================
# ■ Game Player
#======================================

class Game_Player < Game_Character
 #--------------------------------------------------------------------------
 alias abs_game_player_update update
 #--------------------------------------------------------------------------
 def update
   abs_game_player_update
   if $game_party.actors[0].dead?
     actor = $game_party.actors[0]
     $game_party.kill_actor(actor.id)
   end
 end
end

#======================================
# ■ Sprite Display
#======================================

class Sprite_Display < Sprite
 #--------------------------------------------------------------------------
 def initialize
   @counter = 0
   super
   self.bitmap = Bitmap.new(120, 48)
   self.bitmap.font.name = $defaultfonttype
   self.bitmap.font.size = $defaultfontsize
   self.x = 0
   self.y = 0
   self.z = 500
   update
 end
 #--------------------------------------------------------------------------
 def dispose
   if self.bitmap != nil
     self.bitmap.dispose
   end
   super
 end
 #--------------------------------------------------------------------------
 def update
   super
   if @counter == 1
     self.x = (-0.25 * $game_map.display_x) + ($game_player.x * 32) - 40
     self.y = (-0.25 * $game_map.display_y) + ($game_player.y * 32) - 40
   end
   if $ABS.display[0]
     @counter += 1
   end
   self.visible = $ABS.display[0]
   self.bitmap.clear
   if @counter != 60 and $ABS.display[0] == true
     text = $ABS.display[1]
     self.bitmap.font.color.set(255, 255, 255)
     self.bitmap.draw_text(self.bitmap.rect, text, 1)
   else
     self.visible = false
     @counter = 0
     self.bitmap.clear
     $ABS.display[0] = false
   end
 end
end

#======================================
# ■ Sprite Character
#======================================

class Sprite_Character < RPG::Sprite
 #--------------------------------------------------------------------------
 attr_accessor :enemy_id
 attr_accessor :actor_id
 #--------------------------------------------------------------------------
 alias abs_spriteset_character_update update
 #--------------------------------------------------------------------------
 def initialize(viewport, character = nil)
   super(viewport)
   @enemy_id = 0
   @actor_id = -1
   @character = character
   update
 end
 #--------------------------------------------------------------------------
 def update
   abs_spriteset_character_update
   if @character.is_a?(Game_Player)
     if !$game_party.actors[0].dead?
       if $game_party.actors[0].damage != nil
         self.damage($game_party.actors[0].damage, $game_party.actors[0].critical)
         $game_party.actors[0].damage = nil
       end
       animation = $data_animations[$game_party.actors[0].state_animation_id]
       self.loop_animation(animation)
     end
   end
   if @character.is_a?(Game_Event)
     if $ABS.enemies[@character.id] != nil
       if $ABS.enemies[@character.id].damage != nil
         self.damage($ABS.enemies[@character.id].damage, $ABS.enemies[@character.id].critical)
         $ABS.enemies[@character.id].damage = nil
       end
       animation = $data_animations[$ABS.enemies[@character.id].state_animation_id]
       self.loop_animation(animation)
     end
   end
   if @character.is_a?(Game_Ally)
     if @character.dead == false
       return if $game_party.actors[@character.actor_id]. == nil
       if $game_party.actors[@character.actor_id].damage != nil
         self.damage($game_party.actors[@character.actor_id].damage, $game_party.actors[@character.actor_id].critical)
         $game_party.actors[@character.actor_id].damage = nil
       end
       animation = $data_animations[$game_party.actors[@character.actor_id].state_animation_id]
       self.loop_animation(animation)
     else
       self.dispose_loop_animation
       self.z = 10
     end
   end
 end
end

#======================================
# ■ Spriteset Map
#======================================

class Spriteset_Map
 #--------------------------------------------------------------------------
 alias abs_spriteset_map_initialize initialize
 alias abs_spriteset_map_dispose dispose
 alias abs_spriteset_map_update update
 #--------------------------------------------------------------------------
 def initialize
   @ranged = []
   @display = Sprite_Display.new
   abs_spriteset_map_initialize
   for ally in $game_allies.values
     if ally.map_id != $game_map.map_id
       ally.transparent = true
     else
       ally.transparent = false
     end
     sprite = Sprite_Character.new(@viewport1, ally)
     @character_sprites.push(sprite)
   end
 end
 #--------------------------------------------------------------------------
 def dispose
   @display.dispose
   for range in @ranged
     range.dispose
   end
   for enemy in $ABS.enemies.values
     enemy.ranged = nil
   end
   for range in $ABS.ranged.values
     range = nil
   end
   abs_spriteset_map_dispose
 end
 #--------------------------------------------------------------------------
 def update
   @display.update
   for sprite in @character_sprites
     if sprite.character.is_a?(Game_Ally)
       if $game_party.actors[sprite.character.actor_id] == nil
         temp = @character_sprites.delete(sprite)
         temp.dispose
       end
     end
   end
   abs_spriteset_map_update
   for range in @ranged
     range.update
     next if range.enemy_id == 0
     if $ABS.enemies[range.enemy_id] == nil
       temp = @ranged.delete(range)
       temp.dispose
     end
   end
   for actor_ranged in $ABS.ranged.values
     next if actor_ranged == nil
     if actor_ranged.running == false
       actor_ranged.running = true
       sprite = Sprite_Character.new(@viewport1, actor_ranged)
       sprite.actor_id = $ABS.ranged.index(actor_ranged)
       @ranged.push(sprite)
     end
   end
   for enemy in $ABS.enemies.values
     next if enemy.ranged == nil
     if enemy.ranged.running == false
       enemy.ranged.running = true
       sprite = Sprite_Character.new(@viewport1, enemy.ranged)
       sprite.enemy_id = $ABS.enemies.index(enemy)
       @ranged.push(sprite)
     end
   end
   for sprite in @ranged
     next if sprite.enemy_id == 0
     enemy= $ABS.enemies[sprite.enemy_id]
     return if enemy == nil or enemy.ranged == nil or enemy.ranged.ending == nil
     if enemy.ranged.ending == true
       if !sprite.effect?
         $ABS.enemies[sprite.enemy_id].ranged = nil
         temp = @ranged.delete(sprite)
         temp.dispose
       end
     end
   end
   for sprite in @ranged
     next if sprite.actor_id == -1
     range = $ABS.ranged[sprite.actor_id]
     if range.ending == true
       if !sprite.effect?
         $ABS.ranged.delete(sprite.actor_id)
         temp = @ranged.delete(sprite)
         temp.dispose
       end
     end
   end
 end
 #--------------------------------------------------------------------------
 def add_ally(id)
   sprite = Sprite_Character.new(@viewport1, $game_allies[id])
   @character_sprites.push(sprite)
 end
end

#======================================
# ■ Window Base
#======================================

class Window_Base < Window
#--------------------------------------------------------------------------
 def draw_actor_hp_bar(actor, x, y, width = 70, height = 10, bar_color = Color.new(255, 0, 0, 255))
   self.contents.fill_rect(x, y, width, height, Color.new(255, 255, 255, 100)) 
   return if actor.maxhp == 0
   w = width * actor.hp / actor.maxhp
   for i in 0..height
     r = bar_color.red   * (height -i)/height  + 0   * i/height 
     g = bar_color.green * (height -i)/height  + 0 * i/height 
     b = bar_color.blue  * (height -i)/height  + 0 * i/height 
     a = bar_color.alpha * (height -i)/height  + 255 * i/height 
     self.contents.fill_rect(x, y+i, w , 1, Color.new(r, g, b, a)) 
   end
 end
 #--------------------------------------------------------------------------
 def draw_actor_sp_bar(actor, x, y, width = 70, height = 10, bar_color = Color.new(0, 0, 255, 255))
   self.contents.fill_rect(x, y, width, height, Color.new(255, 255, 255, 100)) 
   return if actor.maxsp == 0
   w = width * actor.sp / actor.maxsp
   for i in 0..height
     r = bar_color.red   * (height -i)/height  + 0   * i/height 
     g = bar_color.green * (height -i)/height  + 0 * i/height 
     b = bar_color.blue  * (height -i)/height  + 0 * i/height 
     a = bar_color.alpha * (height -i)/height  + 255 * i/height 
     self.contents.fill_rect(x, y+i, w , 1, Color.new(r, g, b, a)) 
   end
 end
 #--------------------------------------------------------------------------
 def draw_dash_bar(x, y, width = 50, height = 10)
   self.contents.fill_rect(x, y, width, height, Color.new(255, 255, 255, 100)) 
   case $ABS.dash_level
   when 0 .. 1 
     bar_color = Color.new(255, 0, 0, 255)
   when 2 .. 3
     bar_color = Color.new(255, 255, 0, 255) 
   else
     bar_color = Color.new(0, 255, 0, 255) 
   end
   w = width * $ABS.dash_level / 5
   for i in 0..height
     r = bar_color.red   * (height -i)/height  + 0   * i/height 
     g = bar_color.green * (height -i)/height  + 0 * i/height 
     b = bar_color.blue  * (height -i)/height  + 0 * i/height 
     a = bar_color.alpha * (height -i)/height  + 255 * i/height 
     self.contents.fill_rect(x, y+i, w , 1, Color.new(r, g, b, a)) 
   end
 end
 #--------------------------------------------------------------------------
 def draw_sneak_bar(x, y, width = 50, height = 10)
   self.contents.fill_rect(x, y, width, height, Color.new(255, 255, 255, 100)) 
   case $ABS.sneak_level
   when 0 .. 1 
     bar_color = Color.new(255, 0, 0, 255)
   when 2 .. 3
     bar_color = Color.new(255, 255, 0, 255) 
   else
     bar_color = Color.new(0, 255, 0, 255) 
   end
   w = width * $ABS.sneak_level / 5
   for i in 0..height
     r = bar_color.red   * (height -i)/height  + 0   * i/height 
     g = bar_color.green * (height -i)/height  + 0 * i/height 
     b = bar_color.blue  * (height -i)/height  + 0 * i/height 
     a = bar_color.alpha * (height -i)/height  + 255 * i/height 
     self.contents.fill_rect(x, y+i, w , 1, Color.new(r, g, b, a)) 
   end
 end
end

#======================================
# ■ Window HUB
#======================================

class Window_HUD < Window_Base
 #--------------------------------------------------------------------------
 def initialize
   super(0, 400, 640, 80)
   self.contents = Bitmap.new(width - 32, height - 32)
   self.contents.font.name = $defaultfonttype  
   self.contents.font.size = $defaultfontsize
   self.opacity = 100
   update
 end
 #--------------------------------------------------------------------------
 def refresh
   self.contents.clear
   self.contents.draw_text(-20, 0, 50, 30, "L", 1)
   self.contents.draw_text(-20, 15, 50, 30, "E", 1)
   self.contents.draw_text(-10, 0, 50, 30, "A", 1)
   self.contents.draw_text(-10, 15, 50, 30, "D", 1)
   for i in 0...4
     actor =  $game_party.actors[i]
     next if actor == nil
     if $game_allies[i] != nil
       if $game_allies[i].under_attack == true and actor.dead? == false
         self.contents.draw_text(60 + (i*110), -5, 70, 32, "Engagé", 1)
       else
         draw_actor_state(actor, 60 + (i*110), -5, width = 70)
       end
     else
       if $ABS.player_engaged == true and actor.dead? == false
         self.contents.draw_text(60 + (i*110), -5, 70, 32, "Engagé", 1)
       else
         draw_actor_state(actor, 60 + (i*110), -5, width = 70)
       end
     end
     self.contents.font.color = normal_color
     draw_actor_graphic(actor, 40 + (i*110), 45)
     draw_actor_hp_bar(actor, 60 + (i*110), 25)
     draw_actor_sp_bar(actor, 60 + (i*110), 40)
   end
   self.contents.draw_text(480, -5, 50, 32, "Dash", 1)
   draw_dash_bar(480, 30)
   self.contents.draw_text(550, -5, 50, 32, "Sneak", 1)
   draw_sneak_bar(550, 30)
   Graphics.frame_reset
 end
 #--------------------------------------------------------------------------
 def update
   return if Graphics.frame_count % 20 != 0
   return if self.visible == false
   refresh
   Graphics.frame_reset
 end
end

#======================================
# ■ Scene Title
#======================================

class Scene_Title
 #--------------------------------------------------------------------------
 alias abs_scene_title_cng command_new_game
 #--------------------------------------------------------------------------
 def command_new_game
   $game_system.se_play($data_system.decision_se)
   Audio.bgm_stop
   Graphics.frame_count = 0
   $game_temp          = Game_Temp.new
   $game_system        = Game_System.new
   $game_switches      = Game_Switches.new
   $game_variables     = Game_Variables.new
   $game_self_switches = Game_SelfSwitches.new
   $game_screen        = Game_Screen.new
   $game_actors        = Game_Actors.new
   $game_party         = Game_Party.new
   $game_troop         = Game_Troop.new
   $game_map           = Game_Map.new
   $game_player         = Game_Player.new
   
   $ABS = Action_Battle_System.new
   $game_allies = {}
   for i in 1...$data_system.party_members.size
     $game_allies[i] = Game_Ally.new(i)
   end
   $game_party.setup_starting_members
   $game_map.setup($data_system.start_map_id)
   for ally in $game_allies.values
     ally.moveto($data_system.start_x, $data_system.start_y)
     ally.refresh
     ally.map_id = $data_system.start_map_id
   end
   
   $game_player.map_id = $data_system.start_map_id  
   $game_player.moveto($data_system.start_x, $data_system.start_y)
   $game_player.refresh
   $game_map.autoplay
   $game_map.update
   $scene = Scene_Map.new
 end
end

#======================================
# ■ Scene Map
#======================================

class Scene_Map
 #--------------------------------------------------------------------------
 alias abs_scene_map_main main
 alias abs_scene_map_update update
 alias abs_scene_map_transfer_player transfer_player
 #--------------------------------------------------------------------------
 attr_accessor   :spriteset
 #--------------------------------------------------------------------------
 def main
   @hud = Window_HUD.new
   abs_scene_map_main
   @hud.dispose
 end
 #--------------------------------------------------------------------------
 def update
   if Kboard.keyboard($R_Key_E)
     $game_party.shift_forward
   end
   if Kboard.keyboard($R_Key_R)
     $game_party.shift_backward
   end
   if Kboard.keyboard($R_Key_T)
     $game_player.wait_command = true
     $game_party.shift_forward
   end
   if Kboard.keyboard($R_Key_Y)
     for ally in $game_allies.values
       if ally.map_id == $game_map.map_id
         ally.wait_command = true
       end
     end
   end
   if Kboard.keyboard($R_Key_U)
     $ABS.player_engaged = false
     for ally in $game_allies.values
       if ally.map_id == $game_map.map_id
         ally.wait_command = false
         ally.under_attack = false
         ally.refresh
       end
     end
   end
   if $ABS.hud_pc == true
    if Kboard.keyboard($R_Key_P)
      if @hud.visible == true
        @hud.visible = false
      else
        @hud.visible = true
      end
    end
  else
    @hud.visible = $ABS.hud
  end
   if Input.trigger?(Input::C)
     $ABS.player_attack
   end
   if Kboard.keyboard($R_Key_G)
     $ABS.player_ranged
   end
   if Kboard.keyboard($R_Key_H)
     $ABS.player_skill(1)
   end
   if Kboard.keyboard($R_Key_J)
     $ABS.player_skill(2)
   end
   if Kboard.keyboard($R_Key_K)
     $ABS.player_skill(3)
   end
   if Kboard.keyboard($R_Key_L)
     $ABS.player_skill(4)
   end
   if Kboard.keyboard($R_Key_N)
     $ABS.close_follow = true
   end
   if Kboard.keyboard($R_Key_M)
     $ABS.close_follow = false
   end
   for key in $game_allies.keys
     $game_allies[key].update
   end
   $ABS.update
   @hud.update
   if $ABS.transer_player == true
     transfer
   end
   abs_scene_map_update
 end
 #--------------------------------------------------------------------------
 def transfer
   $ABS.transer_player = false
   $game_map.update
   @spriteset.dispose
   @spriteset = Spriteset_Map.new
   if $game_temp.transition_processing
     $game_temp.transition_processing = false
     Graphics.transition(20)
   end
   $game_map.autoplay
   Graphics.frame_reset
   Input.update
 end
 #--------------------------------------------------------------------------
 def transfer_player
   for ally in $game_allies.values
     if ally.wait_command == false and ally.dead == false
       ally.moveto($game_temp.player_new_x, $game_temp.player_new_y)
       ally.map_id = $game_temp.player_new_map_id
     end
   end
   $game_player.map_id = $game_temp.player_new_map_id
   abs_scene_map_transfer_player
 end
end

#======================================
# ■ Scene Skill
#======================================

class Scene_Skill
 #--------------------------------------------------------------------------
 alias abs_scene_skill_main main
 alias abs_scene_skill_update update
 alias abs_scene_skill_update_skill update_skill
 #--------------------------------------------------------------------------
 def main
   @shk_window = Window_Command.new(250, ["Assegna un'abilità a questo tasto"])
   @shk_window.visible = false
   @shk_window.active = false
   @shk_window.x = 200
   @shk_window.y = 250
   @shk_window.z = 1500
   abs_scene_skill_main
   @shk_window.dispose
 end
 #--------------------------------------------------------------------------
 def update
   @shk_window.update
   abs_scene_skill_update
   if @shk_window.active
     update_shk
     return
   end
 end
 #--------------------------------------------------------------------------
 def update_skill
   abs_scene_skill_update_skill
   if Kboard.keyboard($R_Key_H)
     $game_system.se_play($data_system.decision_se)
     @skill_window.active = false
     @shk_window.active = true
     @shk_window.visible = true
     $ABS.skill_key[1] = @skill_window.skill.id
   end
   if Kboard.keyboard($R_Key_J)
     $game_system.se_play($data_system.decision_se)
     @skill_window.active = false
     @shk_window.active = true
     @shk_window.visible = true
     $ABS.skill_key[2] = @skill_window.skill.id
   end
   if Kboard.keyboard($R_Key_K)
     $game_system.se_play($data_system.decision_se)
     @skill_window.active = false
     @shk_window.active = true
     @shk_window.visible = true
     $ABS.skill_key[3] = @skill_window.skill.id
   end
   if Kboard.keyboard($R_Key_L)
     $game_system.se_play($data_system.decision_se)
     @skill_window.active = false
     @shk_window.active = true
     @shk_window.visible = true
     $ABS.skill_key[3] = @skill_window.skill.id
   end
 end
#--------------------------------------------------------------------------
def update_shk
  if Input.trigger?(Input::C)
    $game_system.se_play($data_system.decision_se)
    @shk_window.active = false
    @shk_window.visible = false
    @skill_window.active = true
    $scene = Scene_Skill.new(@actor_index)
    return
  end
end
end

#======================================
# ■ Scene Load
#======================================

class Scene_Load < Scene_File
 #--------------------------------------------------------------------------
 alias abs_scene_load_read_save_data read_save_data
 #--------------------------------------------------------------------------
 def read_save_data(file)
   $ABS = Action_Battle_System.new
   abs_scene_load_read_save_data(file)
   $game_allies = Marshal.load(file)
   $game_map.setup($game_map.map_id)
 end
end

#======================================
# ■ Scene Save
#======================================

class Scene_Save < Scene_File
 #--------------------------------------------------------------------------
 alias abs_scene_save_write_save_data write_save_data
 #--------------------------------------------------------------------------
 def write_save_data(file)
   abs_scene_save_write_save_data(file)
   Marshal.dump($game_allies, file)
 end
end

#======================================
# ■ Keyboard Script
#---------------------------------------------------------------------------
#  By: Cybersam
#   Date: 25/05/05
#   Version 4
#======================================

module Kboard
 #--------------------------------------------------------------------------
 $RMouse_BUTTON_L = 0x01        # left mouse button
 $RMouse_BUTTON_R = 0x02        # right mouse button
 $RMouse_BUTTON_M = 0x04        # middle mouse button
 $RMouse_BUTTON_4 = 0x05        # 4th mouse button 
 $RMouse_BUTTON_5 = 0x06        # 5th mouse button
 #--------------------------------------------------------------------------
 $R_Key_BACK      = 0x08        # BACKSPACE key
 $R_Key_TAB       = 0x09        # TAB key
 $R_Key_RETURN    = 0x0D        # ENTER key
 $R_Key_SHIFT     = 0x10        # SHIFT key
 $R_Key_CTLR      = 0x11        # CTLR key
 $R_Key_ALT       = 0x12        # ALT key
 $R_Key_PAUSE     = 0x13        # PAUSE key
 $R_Key_CAPITAL   = 0x14        # CAPS LOCK key
 $R_Key_ESCAPE    = 0x1B        # ESC key
 $R_Key_SPACE     = 0x20        # SPACEBAR
 $R_Key_PRIOR     = 0x21        # PAGE UP key
 $R_Key_NEXT      = 0x22        # PAGE DOWN key
 $R_Key_END       = 0x23        # END key
 $R_Key_HOME      = 0x24        # HOME key
 $R_Key_LEFT      = 0x25        # LEFT ARROW key
 $R_Key_UP        = 0x26        # UP ARROW key
 $R_Key_RIGHT     = 0x27        # RIGHT ARROW key
 $R_Key_DOWN      = 0x28        # DOWN ARROW key
 $R_Key_SELECT    = 0x29        # SELECT key
 $R_Key_PRINT     = 0x2A        # PRINT key
 $R_Key_SNAPSHOT  = 0x2C        # PRINT SCREEN key
 $R_Key_INSERT    = 0x2D        # INS key
 $R_Key_DELETE    = 0x2E        # DEL key
 #--------------------------------------------------------------------------
 $R_Key_0         = 0x30        # 0 key
 $R_Key_1         = 0x31        # 1 key
 $R_Key_2         = 0x32        # 2 key
 $R_Key_3         = 0x33        # 3 key
 $R_Key_4         = 0x34        # 4 key
 $R_Key_5         = 0x35        # 5 key
 $R_Key_6         = 0x36        # 6 key
 $R_Key_7         = 0x37        # 7 key
 $R_Key_8         = 0x38        # 8 key
 $R_Key_9         = 0x39        # 9 key
 #--------------------------------------------------------------------------
 $R_Key_A         = 0x41        # A key
 $R_Key_B         = 0x42        # B key
 $R_Key_C         = 0x43        # C key
 $R_Key_D         = 0x44        # D key
 $R_Key_E         = 0x45        # E key
 $R_Key_F         = 0x46        # F key
 $R_Key_G         = 0x47        # G key
 $R_Key_H         = 0x48        # H key
 $R_Key_I         = 0x49        # I key
 $R_Key_J         = 0x4A        # J key
 $R_Key_K         = 0x4B        # K key
 $R_Key_L         = 0x4C        # L key
 $R_Key_M         = 0x4D        # M key
 $R_Key_N         = 0x4E        # N key
 $R_Key_O         = 0x4F        # O key
 $R_Key_P         = 0x50        # P key
 $R_Key_Q         = 0x51        # Q key
 $R_Key_R         = 0x52        # R key
 $R_Key_S         = 0x53        # S key
 $R_Key_T         = 0x54        # T key
 $R_Key_U         = 0x55        # U key
 $R_Key_V         = 0x56        # V key
 $R_Key_W         = 0x57        # W key
 $R_Key_X         = 0x58        # X key
 $R_Key_Y         = 0x59        # Y key
 $R_Key_Z         = 0x5A        # Z key
 #--------------------------------------------------------------------------
 $R_Key_LWIN      = 0x5B        # Left Windows key (Microsoft Natural keyboard) 
 $R_Key_RWIN      = 0x5C        # Right Windows key (Natural keyboard)
 $R_Key_APPS      = 0x5D        # Applications key (Natural keyboard)
 #--------------------------------------------------------------------------
 $R_Key_NUMPAD0   = 0x60        # Numeric keypad 0 key
 $R_Key_NUMPAD1   = 0x61        # Numeric keypad 1 key
 $R_Key_NUMPAD2   = 0x62        # Numeric keypad 2 key
 $R_Key_NUMPAD3   = 0x63        # Numeric keypad 3 key
 $R_Key_NUMPAD4   = 0x64        # Numeric keypad 4 key
 $R_Key_NUMPAD5   = 0x65        # Numeric keypad 5 key
 $R_Key_NUMPAD6   = 0x66        # Numeric keypad 6 key
 $R_Key_NUMPAD7   = 0x67        # Numeric keypad 7 key
 $R_Key_NUMPAD8   = 0x68        # Numeric keypad 8 key
 $R_Key_NUMPAD9	 = 0x69        # Numeric keypad 9 key
 $R_Key_MULTIPLY  = 0x6A        # Multiply key (*)
 $R_Key_ADD       = 0x6B        # Add key (+)
 $R_Key_SEPARATOR = 0x6C        # Separator key
 $R_Key_SUBTRACT  = 0x6D        # Subtract key (-)
 $R_Key_DECIMAL   = 0x6E        # Decimal key
 $R_Key_DIVIDE    = 0x6F        # Divide key (/)
 #--------------------------------------------------------------------------
 $R_Key_F1        = 0x70        # F1 key
 $R_Key_F2        = 0x71        # F2 key
 $R_Key_F3        = 0x72        # F3 key
 $R_Key_F4        = 0x73        # F4 key
 $R_Key_F5        = 0x74        # F5 key
 $R_Key_F6        = 0x75        # F6 key
 $R_Key_F7        = 0x76        # F7 key
 $R_Key_F8        = 0x77        # F8 key
 $R_Key_F9        = 0x78        # F9 key
 $R_Key_F10       = 0x79        # F10 key
 $R_Key_F11       = 0x7A        # F11 key
 $R_Key_F12       = 0x7B        # F12 key
 #--------------------------------------------------------------------------
 $R_Key_NUMLOCK   = 0x90        # NUM LOCK key
 $R_Key_SCROLL    = 0x91        # SCROLL LOCK key
 #--------------------------------------------------------------------------
 $R_Key_LSHIFT	   = 0xA0        # Left SHIFT key
 $R_Key_RSHIFT	   = 0xA1        # Right SHIFT key
 $R_Key_LCONTROL  = 0xA2        # Left CONTROL key
 $R_Key_RCONTROL  = 0xA3        # Right CONTROL key
 $R_Key_L_ALT	   = 0xA4        # Left ALT key
 $R_Key_R_ALT	   = 0xA5        # Right ALT key
 #--------------------------------------------------------------------------
 $R_Key_SEP	     = 0xBC        # , key
 $R_Key_DASH	     = 0xBD        # - key
 $R_Key_DOTT	     = 0xBE        # . key
 #--------------------------------------------------------------------------
 GetKeyState = Win32API.new("user32","GetAsyncKeyState",['i'],'i')
 GetKeyboardState = Win32API.new("user32","GetKeyState",['i'],'i')
 GetSetKeyState = Win32API.new("user32","SetKeyboardState",['i'],'i')
 #--------------------------------------------------------------------------
 module_function
 #--------------------------------------------------------------------------
 def keyb(rkey)
    if GetKeyState.call(rkey) != 0
      return 1
    end
    return 0
 end
  #--------------------------------------------------------------------------
 def keyboard(rkey)
   GetKeyState.call(rkey) & 0x01 == 1  #
 end
 #--------------------------------------------------------------------------
 def key(rkey, key = 0)
   GetKeyboardState.call(rkey) & 0x01 == key #
 end
end

Edited by REu
Io sono ciò che voi non siete e voi siete ciò che io sono.
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...