Jump to content
Rpg²S Forum

Sylaer

Utenti
  • Posts

    287
  • Joined

  • Last visited

Posts posted by Sylaer

  1. perchè mi servirebbe sia sull'id (sai 001, 002, 003 ecc) che sulla classe.

    si, si può fare basta cambiare una riga, anzi ho già corretto l'errore, basta che tu risostituisca la window_status, e per i file da mettere in pictures devi mettere l'id e poi il nome della classe es. "1Fighter.png", per indicare l'immagine del primo personaggio con la classe Fighter.

  2. Ok, dammi il tuo numero di casa che così non sto più a postare sul forum e te li chiedo direttamente ^^

    Ho un po' di tempo libero prima di rincominciare l'uni e non avendo un progetto da fare mi metto ad aiutare chi ha bisogno. Sono generoso :).

     

    Comunque qui ho lo script.

    Questa è la Window_Status, sostituiscila con quella che hai:

     

    #==============================================================================
     # ** Window_Status
     #------------------------------------------------------------------------------
     #  This window displays full status specs on the status screen.
     #==========================================================================
    ====
     
     class Window_Status < Window_Base
    #--------------------------------------------------------------------------
    # * Object Initialization
    #	 actor : actor
    #--------------------------------------------------------------------------
    def initialize
      super(0, 0, 640 - 150, 480)
      self.contents = Bitmap.new(width - 32, height - 32)
      @actor = nil
    end
    #--------------------------------------------------------------------------
    # * Refresh
    #--------------------------------------------------------------------------
    def refresh
      self.contents.clear
      self.contents.font.size = 21
     file = @actor.id.to_s + @actor.class_name
     if FileTest.exist?("Graphics\\Pictures\\"+ file + ".png")
    	self.contents.blt(160,120,RPG::Cache.picture(file),Rect.new(0,0,320,320))
     end
      @x = 0
      draw_actor_name(@actor, 4, @x)
      draw_actor_class(@actor, 270, 0)
      x_step
      draw_actor_level(@actor, 16, @x)
      x_step
      x_lstep
      draw_actor_hp(@actor, 16, @x, 172)
      x_step
      draw_actor_sp(@actor, 16, @x, 172)
      x_step
      x_lstep
      draw_actor_parameter(@actor, 16, @x, 0)
      x_step
      draw_actor_parameter(@actor, 16, @x, 1)
      x_step
      draw_actor_parameter(@actor, 16, @x, 2)
      x_lstep
      x_step
      draw_actor_parameter(@actor, 16, @x, 3)
      x_step
      draw_actor_parameter(@actor, 16, @x, 4)
      x_step
      draw_actor_parameter(@actor, 16, @x, 5)
      x_step
      draw_actor_parameter(@actor, 16, @x, 6)
      self.contents.font.color = system_color
      self.contents.draw_text(270, 48, 80, 32, "EXP")
      self.contents.draw_text(270, 80, 80, 32, "NEXT")
      self.contents.font.color = normal_color
      self.contents.draw_text(270 + 80, 48, 84, 32, @actor.exp_s, 2)
      self.contents.draw_text(270 + 80, 80, 84, 32, @actor.next_rest_exp_s, 2)
      self.contents.font.color = system_color
      x_step
      x_lstep
      self.contents.draw_text(16, @x, 96, 32, "Equipment")
      x_step
      x_lstep
      draw_item_name($data_weapons[@actor.weapon_id], 16 + 16, @x)
      x_step
      draw_item_name($data_armors[@actor.armor1_id], 16 + 16, @x)
      x_step
      draw_item_name($data_armors[@actor.armor2_id], 16 + 16, @x)
      x_step
      draw_item_name($data_armors[@actor.armor3_id], 16 + 16, @x)
      x_step
      draw_item_name($data_armors[@actor.armor4_id], 16 + 16, @x)
    end
    def dummy
      self.contents.font.color = system_color
      self.contents.draw_text(320, 112, 96, 32, $data_system.words.weapon)
      self.contents.draw_text(320, 176, 96, 32, $data_system.words.armor1)
      self.contents.draw_text(320, 240, 96, 32, $data_system.words.armor2)
      self.contents.draw_text(320, 304, 96, 32, $data_system.words.armor3)
      self.contents.draw_text(320, 368, 96, 32, $data_system.words.armor4)
      draw_item_name($data_weapons[@actor.weapon_id], 320 + 24, 144)
      draw_item_name($data_armors[@actor.armor1_id], 320 + 24, 208)
      draw_item_name($data_armors[@actor.armor2_id], 320 + 24, 272)
      draw_item_name($data_armors[@actor.armor3_id], 320 + 24, 336)
      draw_item_name($data_armors[@actor.armor4_id], 320 + 24, 400)
    end
    def x_lstep
      @x += 8
    end
    def x_step
      @x += 24
    end
    def update(actor)
      if @actor != actor
    	@actor = actor
    	refresh
      end
    end
     end

     

    Qui invece ci sono le istruzioni per installare il menu status nel menu principale.

    Metti questo prima di Graphics.transition in Scene_Menu:

    @stat_window = Window_Status.new
      @stat_window.x = 150
      @stat_window.y = 0
      @stat_window.visible = false
      @stat_window.z = 300

    Questo va nei dispose

    @stat_window.dispose

    Poi questo va all'interno di update:

    if @stat_window.visible
    	update_stat
    	return
      end

    Sostituisci il when 3 dell'update status con:

    when 3
    	  $game_system.se_play($data_system.decision_se)
    	  @stat_window.visible = true
    	  @status_window.active = false
    	  @stat_window_index = @status_window.index
    	  @stat_window.update($game_party.actors[@stat_window_index])
    	end

    E infine schiaffa questo prima della fine della classe menu:

    def update_stat
      if Input.trigger?(Input::B)
    	$game_system.se_play($data_system.cancel_se)
    	@status_window.active = true
    	@stat_window.visible = false
    	return
      end
      if Input.trigger?(Input::R)
    	$game_system.se_play($data_system.cursor_se)
    	@stat_window_index += 1
    	@stat_window_index %= $game_party.actors.size
    	@stat_window.update($game_party.actors[@stat_window_index])
    	return
      end
      if Input.trigger?(Input::L)
    	$game_system.se_play($data_system.cursor_se)
    	@stat_window_index += $game_party.actors.size - 1
    	@stat_window_index %= $game_party.actors.size
    	@stat_window.update($game_party.actors[@stat_window_index])
    	return
      end
    end

     

    Adesso passiamo al come funziona.

    Hai detto che volevi che nel menu status ti si mostrasse l'immagine del personaggio a seconda della classe così se la cambiavi, cambiava anche l'immagine, giusto?

    Quindi ho fatto così, tutto quello che devi fare è mettere l'immagine con il nome della classe nella cartella Pictures in Graphics con estensione png e il gioco è fatto.

    Per quanto riguarda l'impaginazione della schermata status, se non ti va bene la cambio, e per la dimensione dell'immagine è lo stesso, tanto per me è un attimo.

  3. Nel mio gioco ho fatto una cosa uguale a questa, però diversi menu che se selezionati aprivano altri menu, per minimizzare lo spazio.

    Ora ti posto come si fa:

    Sostituisci queste due righe con quelle presenti in Scene_Menu.

     

    s5 = "Comnfigurazione"
    s6 = "Sistema  ►"

    Poi metti questo prima di Graphics.transition.

    s1 = "Salva" 
    s2 = "Carica"
    s3 = "Ritorna al Titolo"
    s4 = "Esci dal Gioco"
    @system_window = Window_Command.new(width,[s1,s2,s3,s4])
    @system_window.x = width
    @system_window.y = @command_window.y + @command_window.index * 32
    @system_window.z = 150

    Poi metti questo nelle liste dei dispose.

    @system_window.dispose

    Poi metti questo nelle liste degli update.

    @system_window.update
    if @system_window.active
      update_inventory
      return
    end

    Sostituisci il when 5 con questo:

    when 5
    	$game_system.se_play($data_system.decision_se)
    	@command_window.active = false
    	@system_window.active = true
    	@system_window.visible = true
    	end

    Infine aggiungi questo prima della fine della classe:

    def update_system
    if Input.trigger?(Input::B)
      $game_system.se_play($data_system.cancel_se)
      @command_window.active = true
      @system_window.active = false
      @system_window.visible = false
    end
    if Input.trigger?(Input::C)
      case @system_window.index
    	when 0 
    		$game_system.se_play($data_system.decision_se)
    		$scene = Scene_Save.new
    	when 1
    		$game_system.se_play($data_system.decision_se)
    		 $scene = Scene_Load.new
    	when 2
    		$game_system.se_play($data_system.decision_se)
    		  $scene = Scene_Title.new
    	when 3
    		$game_system.se_play($data_system.decision_se)
    		  $scene = Scene_End.new
      end
    end
     end

    E dovrebbe essere apposto.

    Se ci sono problemi, e ci possono essere anche perché non l'ho provato, dimmeli qui.

  4. Ho modificato lo script in modo che sempre e comunque ti mostri solo il personaggio principale.

     

    #==============================================================================
    # ** Game_Actor
    # Script by MeisMe
    # Graphics added by Peaches
    # Icons made by Joshie666 & Axerax
    #------------------------------------------------------------------------------
    # This class handles the actor. It's used within the Game_Actors class
    # ($game_actors) and refers to the Game_Party class ($game_party).
    #==============================================================================
    class Game_Actor
    #--------------------------------------------------------------------------
    # * Get the current EXP
    #--------------------------------------------------------------------------
    def now_exp
    return @exp - @exp_list[@level]
    end
    #--------------------------------------------------------------------------
    # * Get the next level's EXP
    #--------------------------------------------------------------------------
    def next_exp
    return @exp_list[@level+1] > 0 ? @exp_list[@level+1] - @exp_list[@level] : 0
    end
    end
    
    #==============================================================================
    # ** Window_HUD
    #------------------------------------------------------------------------------
    # This class is used to display HP, SP and Gold on the map.
    #==============================================================================
    class Window_HUD < Window_Base
    #--------------------------------------------------------------------------
    # * Object Initialization
    #--------------------------------------------------------------------------
    def initialize
    super(-16, -16, 672, 150)
    self.contents = Bitmap.new(width-32, height-32)
    self.opacity = 0
    self.contents.font.size = 14
    self.contents.font.name = "Arial"
    @actors = []
    @old_hp = []
    @old_sp = []
    @old_exp = []
    @old_level = []
    #for i in 0...$game_party.actors.size
    i = 0
    @actors.push($game_party.actors[i])
    @old_hp.push(@actors[i].hp)
    @old_sp.push(@actors[i].sp)
    @old_exp.push(@actors[i].now_exp)
    @old_level.push(@actors[i].level)
    #end
    @old_gold = $game_party.gold
    refresh
    end
    #--------------------------------------------------------------------------
    # * Refresh
    #--------------------------------------------------------------------------
    def refresh
    self.contents.clear
    self.contents.font.color = system_color
    #self.contents.draw_text(6, 0, 32, 14, $data_system.words.hp + "")
    #self.contents.draw_text(6, 14, 32, 14, $data_system.words.sp + "")
    self.contents.draw_text(6, 28, 32, 14, "")
    #self.contents.draw_text(6, 42, 32, 14, $data_system.words.gold + "")
    self.contents.font.color = normal_color
    #Images
    
    case @actors.size
    when 1
    bitmap = RPG::Cache.picture("HUD Graphic")
    self.contents.blt(0, 0, bitmap, Rect.new(0, 10, 500, 500))
    when 2
    bitmap = RPG::Cache.picture("HUD Graphic2")
    self.contents.blt(0, 0, bitmap, Rect.new(0, 10, 500, 500))
    when 3
    bitmap = RPG::Cache.picture("HUD Graphic2")
    self.contents.blt(0, 0, bitmap, Rect.new(0, 10, 500, 500))
    when 4
    bitmap = RPG::Cache.picture("HUD Graphic3")
    self.contents.blt(0, 0, bitmap, Rect.new(0, 10, 640, 500))
    when 5
    bitmap = RPG::Cache.picture("HUD Graphic3")
    self.contents.blt(0, 0, bitmap, Rect.new(0, 10, 640, 500))
    end
    
    #bitmap = RPG::Cache.picture("HUD Graphic")
    #self.contents.blt(0, 0, bitmap, Rect.new(0, 10, 500, 500))
    bitmap = RPG::Cache.icon("HP Symbol")
    self.contents.blt(3, 10, bitmap, Rect.new(0, 0, 24, 24))
    bitmap = RPG::Cache.icon("SP Symbol")
    self.contents.blt(3, 30, bitmap, Rect.new(0, 0, 24, 24))
    bitmap = RPG::Cache.icon("EXP Symbol")
    self.contents.blt(3, 50, bitmap, Rect.new(0, 0, 24, 24))
    bitmap = RPG::Cache.icon("Hero")
    self.contents.blt(25, 67, bitmap, Rect.new(0, 0, 24, 24))
    
    if $game_switches[99] == true
    if $game_variables[99] == 0
    self.contents.draw_text(x, y, 210, 14, $game_party.item_number[1])
    elsif $game_variables[8] == 1
    self.contents.draw_text(x, y, 210, 14, $game_party.item_number(2))
    elsif $game_variables[8] ==2
    self.contents.draw_text(x, y, 110, 14, @actors[i].name)
    end
    end
    x = 32
    for i in 0...@actors.size
    y = 6
    self.contents.draw_text(x, y, 110, 14, @actors[i].name)
    self.contents.draw_text(x, y, 110, 14, "Lv: #{@actors[i].level}", 2)
    y += 16
    draw_hp_bar(@actors[i], x, y, 112, 5)
    y += 19
    draw_sp_bar(@actors[i], x, y, 104, 5)
    y += 19
    draw_exp_bar(@actors[i], x, y, 88, 5)
    y += 19
    x += 130
    end
    x = 32
    self.contents.draw_text(45, 73, 110, 14, $game_party.gold.to_s)
    end
    #--------------------------------------------------------------------------
    # * Frame Update
    #--------------------------------------------------------------------------
    def update
    super
    if @actors.size != 1
    @actors = []
    for i in 0...$game_party.actors.size
    @actors.push($game_party.actors[i])
    end
    refresh
    return
    end
    for i in 0...@actors.size
    if @old_hp[i] != @actors[i].hp or
    @old_sp[i] != @actors[i].sp or
    @old_exp[i] != @actors[i].now_exp or
    @old_level[i] != @actors[i].level or
    @old_gold != $game_party.gold
    refresh
    @old_hp[i] = @actors[i].hp
    @old_sp[i] = @actors[i].sp
    @old_exp[i] = @actors[i].now_exp
    @old_level[i] = @actors[i].level
    @old_gold = $game_party.gold
    end
    end
    end
    #--------------------------------------------------------------------------
    # * Draw HP Bar
    #--------------------------------------------------------------------------
    def draw_hp_bar(actor, x, y, length, thick)
    width = length
    height = thick
    c1 = Color.new(255, 0, 0)
    c2 = Color.new(155, 0, 0)
    e1 = actor.hp
    e2 = actor.maxhp
    self.contents.fill_rect(x-1, y - 1, width+2, height + 3, Color.new(255, 255, 255, 255))
    self.contents.fill_rect(x, y, width, height + 1, Color.new(0, 0, 0, 255))
    w = width * e1 / e2
    for i in 0..height
    r = c1.red + (c2.red - c1.red) * (height -i)/height + 0 * i/height
    g = c1.green + (c2.green - c1.green) * (height -i)/height + 0 * i/height
    b = c1.blue + (c2.blue - c1.blue) * (height -i)/height + 0 * i/height
    a = c1.alpha + (c2.alpha - c1.alpha)* (height -i)/height + 255 * i/height
    self.contents.fill_rect(x, y+i, w, 1, Color.new(r, g, b, a))
    end
    end
    #--------------------------------------------------------------------------
    # * Draw SP Bar
    #--------------------------------------------------------------------------
    def draw_sp_bar(actor, x, y, length, thick)
    width = length
    height = thick
    c1 = Color.new(0, 0, 255)
    c2 = Color.new(0, 0, 155)
    e1 = actor.sp
    e2 = actor.maxsp
    self.contents.fill_rect(x-1, y - 1, width+2, height + 3, Color.new(255, 255, 255))
    self.contents.fill_rect(x, y, width, height + 1, Color.new(0, 0, 0))
    w = width * e1 / e2
    for i in 0..height
    r = c1.red + (c2.red - c1.red) * (height -i)/height + 0 * i/height
    g = c1.green + (c2.green - c1.green) * (height -i)/height + 0 * i/height
    b = c1.blue + (c2.blue - c1.blue) * (height -i)/height + 0 * i/height
    a = c1.alpha + (c2.alpha - c1.alpha)* (height -i)/height + 255 * i/height
    self.contents.fill_rect(x, y+i, w, 1, Color.new(r, g, b, a))
    end
    end
    #--------------------------------------------------------------------------
    # * Draw EXP Bar
    #--------------------------------------------------------------------------
    def draw_exp_bar(actor, x, y, length, thick)
    width = length
    height = thick
    c1 = Color.new(158, 208, 9)
    c2 = Color.new(58, 108, 0)
    e1 = actor.now_exp
    e2 = actor.next_exp
    if actor.next_exp == 0
    e1 = 1
    e2 = 1
    end
    self.contents.fill_rect(x-1, y - 1, width+2, height + 3, Color.new(255, 255, 255, 255))
    self.contents.fill_rect(x, y, width, height + 1, Color.new(0, 0, 0, 255))
    w = width * e1 / e2
    for i in 0..height
    r = c1.red + (c2.red - c1.red) * (height -i)/height + 0 * i/height
    g = c1.green + (c2.green - c1.green) * (height -i)/height + 0 * i/height
    b = c1.blue + (c2.blue - c1.blue) * (height -i)/height + 0 * i/height
    a = c1.alpha + (c2.alpha - c1.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
    
    #==============================================================================
    # ** Scene_Map
    #------------------------------------------------------------------------------
    # This class performs map screen processing.
    #==============================================================================
    class Scene_Map
    #--------------------------------------------------------------------------
    # * Object Aliasing
    #--------------------------------------------------------------------------
    alias hud_scene_map_main main
    alias hud_scene_map_update update
    #--------------------------------------------------------------------------
    # * Object Initialization
    #--------------------------------------------------------------------------
    def main
    @HUD = Window_HUD.new
    hud_scene_map_main
    @HUD.dispose
    end
    #--------------------------------------------------------------------------
    # * Frame Update
    #--------------------------------------------------------------------------
    def update
    @HUD.update
    hud_scene_map_update
    end
    end

     

     

  5. Mi serve tutto quello che c'è per la battaglia:

    - la battle stance, del personaggio/i

    - lo hud della battaglia

    - qualche icona dei tasti da premere

    - qualche tecnica, cioè le immagini che appaiono quando premi i tasti giusti

    - qualche nemico

    Questo per cominciare, comunque non è un problema se manca qualcosa, li volevo per cominciare a mostrare qualcosa.

     

    Ah, giusto, volevo chiederti: le tecniche dei nemici sono quelle standard dei mostri di rpg?

    Cioè se combatto contro un Fantasma, quando tocca a lui attaccare gli faccio utilizzare le mosse che sono scritte nel database, oppure altre?

  6. chiaramente in un sistema attivo verrà sostituito dalle solite ATB, anche se non so bene come funzionano

    Be' semplice, l'ATB è una barra che si riempie in base alla velocità, in questo caso l'iniziativa e quando è piena cioè raggiunge un certo valore prestabilito il personaggio associato è in grado di attaccare.

  7. Giusto. Ma dovrebbe comunque fare un passo indietro, per non riattivare il BS...

    Non è detto se programmi l'evento in modo che per 2 secondi, per esempio, quello sta fermo e anche se gli vai addosso non riattiva il bs, si può fare.

     

    Ah, prima mi sono dimenticato di chiederti come funziona il discorso dell'iniziativa?

  8. E' vero, si potrebbe, ma poi il player potrebbe incastrarsi, magari si dimenticherebbe il codice per le tecnice. Oppure si potrebbe fare che devono scrivere il nome della mossa, ma diventerebbe troppo "facile" da un certo punto di vista, perchè al player basterebbe imparare il nome della mossa. Per questo preferirei usare solo le frecce e al massimo tre tasti (A S e D sarebbero ottimi, per la loro posizione nella tastiera :3)
    Per il fatto di dimenticarsi delle mosse si potrebbe semplicemente mettere un menu dove sono elencate tutte le mosse scoperte o fattibili, in questa maniera si potrebbe aumentare il numero dei tasti senza problemi.
    Io pensavo più a una Overdrive selezionata con il codice, cioè, per fare la overdrive devi premere A, S, D e una serie di frecce. a seconda delle frecce cambia la Overdrive

    Si può fare.

    Si potrebbe fare, ma devi considerare che è fatto su base diretta, per cui i personaggi della mappa entrano in fight stance, quindi il personaggio dovrebbe diventare tipo lampeggiante e per qualche secondo non dovrebbe poter essere aggrato, di modo da potersi allontanare. Chiaramente la fuga deve essere un rischio, potrebbe non funzionare...

    Si potrebbe far si che il nemico sia rallentato, dandoti il tempo di scappare.

     

    Il resto si può benissimo fare.

  9. Originariamente avevamo intenzione di utilizzare solo i tasti freccia, A (enter) e B (esc), ma era un progetto per il 2k: adesso in teoria i tasti aumenterebbero, ma in pratica sarebbe troppo macchinoso, quindi i tasti rimangono gli stessi di prima, le quattro frecce e gli altri due tasti standard di RPGmaker.
    Secondo me potresti anche metterci più tasti, non diventa troppo macchinoso, e per me che faccio lo script non è che cambi tanto, in più con RMXP hai a disposizione tutti i tasti della tastiera.

     

    Il tempo da aspettare standard dovrebbe essere dieci secondi, ma quello penso sia facile da personalizzare agendo sullo ruby, no?

     

    Il numero di tecniche non è ancora stato deciso, ma anche quello lo vorremmo poter definire in seguito, insieme ai tasti da inserire per fare la tecnica stessa... anche quello dovrebbe essere facile da personalizzare, credo (poi dimmi se è impossibile, io il ruby l'ho usato poco >.<)

    Si è vero, domande idiote.

     

    Poi volevo inserire anche dei punti in più, conseguiti in qualche maniera particolare (sconfiggendo il nemico con una sola mossa, ad esempio) che serviranno per fare determinate Overdrive...
    Questo Overdrive potrebbe essere come quello di Final Fantasy X, cioè che si possa scegliere il tipo.

     

    se molte cose ti sembrano poco chiare o comunque vuoi inventare, mettici pure qualcosa di tuo ^_^'

    Pensavo che ci si potrebbe mettere una possibile fuga dalla battaglia, magari premendo insieme i tasti L e R,tipo ff.

  10. Ho bisogno soprattutto di sapere con precisione come lo volete fare.

    Cioè quanti tasti avete intenzione di poter far inserire al giocatore per effettuare la mossa?

    Quanto tempo aspettare per inserire la mossa?

    Quante tecniche avete intenzione di metterci?

    A cosa serve la barra Bonus/Mana?

    E altre.

×
×
  • Create New...