Jump to content
Rpg²S Forum

*Script HUD HP/MP/EXP/GP


lotgd
 Share

Recommended Posts

Un Buon scipt per visualizza l'hp l'mp l'exp ed i soldi sullo schermo. Lo sto usando per il mio progetto.

Autore : MeisMe
Grafica : Peaches, oshie666 & Axerax

Crea una nuova classe sopra main, chiamala come ti pare ed inserisci questo codice :
<div style="margin:20px;margin-top:5px" "="">

 

#=============================================================
#==========
# ** 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
@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 != $game_party.actors.size
@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

 

 

 

 


Screenshot
con 1 pg
http://img33.picoodle.com/img/img33/4/2/22/t_hudsingolom_d3bd2ea.jpg

con il party
http://img31.picoodle.com/img/img31/4/2/22/t_hudm_5bafaad.jpg


Istruzioni : dopo aver creato la nuova classe ed inserito lo script, inserite queste immagini, nelle rispettive cartelle icon e pictures. (eliminare eventualmente nella seconda riga i === in eccesso che straborda.

Download Immagini


Se non volete usare la visualizzazione del party ma solo quello del PG principale (tipo il 1° screenshot) andate QUI per trovare lo script modificato.

Edited by Apo
applicato tag code

IL MIO NICK è FRISKON Quando mi son registrato, credevo di fare lo spettatore!

 

 

Link to comment
Share on other sites

:rovatfl: Forte....davvero utile.

Lo possiamo usare per i nostri progetti?

Link to comment
Share on other sites

mmm...lodevole, veramente lodevole

ci dò una guardata poi commento meglio!

 

EDIT.

Molto bello ma c'è un errore!!!

Cancellate la seconda riga per farlo funzionare correttamente!

Edited by Anthair

http://img13.imageshack.us/img13/1359/userbarlor.png

 

"La Storia Ha Orrore Dei Paradossi"(Raziel)

Partecipante al Rpg2s.net Game Contest 2008/2009

http://www.rpg2s.net/contest/GameContest0809/gc0809-bannerino.jpg

Gioco in Sviluppo: Æterna Nova Lux

 

RMXP.IT, Rest In Peace!

Link to comment
Share on other sites

Non è proprio un errore, è solo che gli uguali della prima riga debordano sulla seconda, per evitare che succeda basta mettere il codice non solo all'interno dello spoiler ma anche all'interno del tag codice.

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

[ O T ] ecco... la prossima volta mi faccio i fatti miei... ma se ci sono script senza uno screenshot, e messi alla azz di cane... addirittura erano linkati dalla lista script, senza offesa ma sapendo che son qui da 4 giorni... [ / O T ]

 

ho levato lo spoiler e messo il codebox e mica è cambiato qualcosa...

scusate se ogni tanto voglio aiutare anch'io.

Edited by lotgd

IL MIO NICK è FRISKON Quando mi son registrato, credevo di fare lo spettatore!

 

 

Link to comment
Share on other sites

PSYKO certo che lo puoi usare ^_^ 1° non sono io l'autore, 2° Qui si postano script da mettere a disposizione degli utenti del sito.

 

(ho perso 2 giorni x trovare sto script che mi serviva tanto)

 

Sylaer GRAZIE ancora, se eri donna ti violentavo :D (x l'aiuto)

 

 

 

(scusate il doppio post, ma non trovo il tasto per eliminare il mex, volevo far 1 mex solo)

Edited by lotgd

IL MIO NICK è FRISKON Quando mi son registrato, credevo di fare lo spettatore!

 

 

Link to comment
Share on other sites

Sylaer GRAZIE ancora, se eri donna ti violentavo :D (x l'aiuto)
Me lo dicono in tanti.
(scusate il doppio post, ma non trovo il tasto per eliminare il mex, volevo far 1 mex solo)

non devi eliminare il messaggio clicca sul pulsante edit in fondo alla finestrella del post accanto a quelli +quote e reply, così modifichi il messaggio precedente.

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

non devi eliminare il messaggio clicca sul pulsante edit in fondo alla finestrella del post accanto a quelli +quote e reply, così modifichi il messaggio precedente.

 

si so editarli ... ma invece di editare avevo scritto n'altro messaggio...

IL MIO NICK è FRISKON Quando mi son registrato, credevo di fare lo spettatore!

 

 

Link to comment
Share on other sites

  • 5 months later...

bello script, solo ke lo avevo già visto :tongue:

appena trovo dove metto il link...

 

EDIT: ecco era nella sezione VX, era uno script Xp che con la total conversion diventava compatibile con il VX

http://www.rpg2s.net/forum/index.php?showtopic=4284

Edited by =DahiL=

http://img145.imageshack.us/img145/3703/2597sg7.png

http://img229.imageshack.us/img229/9955/mozillafirefoxuser4zj.png

http://i213.photobucket.com/albums/cc264/badbunny699/dexterza5.png

http://img359.imageshack.us/img359/220/clipboard028ar.jpg

http://img402.imageshack.us/img402/9318/virgilflyvy0.gif AsD Fan

http://i67.servimg.com/u/f67/13/07/24/89/banner12.png

Prossimamente...

Link to comment
Share on other sites

  • 1 month later...
Un Buon scipt per visualizza l'hp l'mp l'exp ed i soldi sullo schermo. Lo sto usando per il mio progetto.

 

Autore : MeisMe

Grafica : Peaches, oshie666 & Axerax

 

Crea una nuova classe sopra main, chiamala come ti pare ed inserisci questo codice :

Spoiler

#=============================================================
==========
# ** 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
@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 != $game_party.actors.size
@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

Screenshot

con 1 pg

http://img33.picoodle.com/img/img33/4/2/22/t_hudsingolom_d3bd2ea.jpg

 

con il party

http://img31.picoodle.com/img/img31/4/2/22/t_hudm_5bafaad.jpg

Istruzioni : dopo aver creato la nuova classe ed inserito lo script, inserite queste immagini, nelle rispettive cartelle icon e pictures. (eliminare eventualmente nella seconda riga i === in eccesso che straborda.

 

Download Immagini

Se non volete usare la visualizzazione del party ma solo quello del PG principale (tipo il 1° screenshot) andate QUI per trovare lo script modificato.

Link to comment
Share on other sites

  • 1 month later...

Complimenti mi serviva proprio questo script. :rovatfl:

Ho provato quelli degli altri post ma non funzionano. :Ok:

Spero ke questo funzioni. :sisi:

Passo e chiudo. :wink:

Che c'è?? Mi piace adottare e per questo sono favorevole!!!!
Spoiler
http://img508.imageshack.us/img508/7690/kyuubicp8.gifhttp://img212.imageshack.us/img212/1453/narutofe1.gifhttp://img114.imageshack.us/img114/9343/chijisz1.gifhttp://img205.imageshack.us/img205/451/jirayadc8.gifhttp://img230.imageshack.us/img230/6766/gokuia2.gifhttp://img412.imageshack.us/img412/9338/gotenel3.gifhttp://img262.imageshack.us/img262/6382/gohanssj2ky4.gifhttp://i32.tinypic.com/1j2tm1.gifhttp://img231.imageshack.us/img231/791/zorosn7.gifhttp://img215.imageshack.us/img215/6690/sanjiqw0.gifhttp://img228.imageshack.us/img228/8339/sanjirotantebr6.gifhttp://img522.imageshack.us/img522/1112/rufyafrokx4.gifhttp://img228.imageshack.us/img228/9480/rufyfn6.gifhttp://img525.imageshack.us/img525/6821/chopperfg2.gifhttp://img510.imageshack.us/img510/4945/rufygearks5.gifhttp://img132.imageshack.us/img132/8950/gonfl4.gifhttp://img174.imageshack.us/img174/3047/killuall4.gifhttp://img161.imageshack.us/img161/5866/kurapicamc5.gif
Link to comment
Share on other sites

 

Io riuppo sempre...

si può fare in modo che attraverso un call script si possa levare l'HUD per poi rimetterlo?


Puoi provare così, ma non sono sicuro che funzioni . . .

Aggiungi, subito dopo class Scene_Map, in questo script o nello Scene_Map standard
class Scene_Map
# Inserire questa dichiarazione
attr_accessor :HUD

 

 


poi, per eliminarlo usa, tramite call script

$scene.HUD.dispose

 

 


e per farlo riapparire

$scene.HUD = Window_HUD.new
Edited by Apo
applicato tag code

 


SCRIPT RGSS (RPG Maker XP) VINTAGE LIBRARY [2018+]


Breaking (in ogni senso) News: "Treno deraglia per via del seno di Sakurai Aoi . . ." - Info nello spoiler !!

 


http://afantasymachine.altervista.org/_altervista_ht/NOOOOOOOOOilMIOtreninooooo_500.gif


Non riesco a smettere di essere affascinato da immagini come questa . . .

http://anime.vl-vostok.ru/art/photos2011/17/78049800/wall_VladAnime_WWA_1885-1680x1050.jpg


Alcuni wallpapers che faccio ruotare sul mio vecchio PC . . .


http://afantasymachine.altervista.org/_altervista_ht/gits_window.jpg

http://afantasymachine.altervista.org/_altervista_ht/madoka_group01.jpg
http://afantasymachine.altervista.org/_altervista_ht/arisu_picipici_01.jpg
http://afantasymachine.altervista.org/_altervista_ht/phantom_wp01_einzwei.jpg


La parte più spassosa della mia vita è quando gli altri cercano di spiegarmi i miei pensieri . . .


BBCode Testing


Typeface & Size



Link to comment
Share on other sites

  • 5 months later...

Scusate ma se i volessi far apparire esclusivamente le barre HP ed MP? (non ho trovato uno script che fosse uno con questa funzione ed ho usato il tasto Cerca con tutte le alternative possibili immaginabili -.-")

E per cambiare i color?

Grazie mille ^^

 

EDIT:

Ok ce l'ho fatta, mi ci son un pò incaponito, ma le lezioni di script del forum (e un piccolo aiuto del'lhelp) cominciano a dare i loro frutti. Ecco un elenco dei cambiamenti:

 

Invece di mostrare il nome del pg vengono mostrati "Hp : [attuali]/[massimi]" e al posto del Lvl "Sp: [attuali]"

Le barre le ho avvicinate e fatte un pò più sottili (erano troppo larghe per i miei gusti) ho cambiato i colori ed ho eliminato quella dell'exp, ora mi accingo ad eliminare anche le icone, ma volendo quelle si possono pure lasciare (basta farle un pò più piccine visto che ora gli spazi son ridotti)

 

Se qualche matto come me fosse interessato mi faccia un fischio, glielo passo volentieri ^^

(o in caso glielo modifico su misura, ma non molto poichè sono una zappa con l'rgss é.è )

Edited by nihil-omen

http://i30.tinypic.com/xehois.gif

} 2rA - web site {

E' disponibile il primo capitolo completo di 2rA!

} 2rA: Capitolo I {

Link to comment
Share on other sites

Domandina: (sti giorni vi sto tempestando!)

 

E se io volessi spostare le barre? Che ne so, metterle in basso a sinistra [mi serve soprattutto per poterle lasciare lì in basso quando poi apro il menù Compact]? Ho provato a cambiare le coordinate, ma se le abbasso all'infuori del luogo in cui è situata la picture semplicemente non mi appaiono. Ho capito che c'entra qualcosa con la pic, solo che non so come intervenire >.<

 

Inoltre io ho eliminato la barra dell'exp, però vorrei creare una barra basata su due variabili, come faccio? Ora provo a studiarmi lo script per carpire tutti i processi per creare la barra però non sicuro di riucsire da solo é_è Help! T.T

http://i30.tinypic.com/xehois.gif

} 2rA - web site {

E' disponibile il primo capitolo completo di 2rA!

} 2rA: Capitolo I {

Link to comment
Share on other sites

 

# Valore che determina il riempimento della barra
e1 = idvarfill
# Valore massimo della barra
e2 = idvarmax 

Domandina: (sti giorni vi sto tempestando!)

 

E se io volessi spostare le barre? Che ne so, metterle in basso a sinistra [mi serve soprattutto per poterle lasciare lì in basso quando poi apro il menù Compact]? Ho provato a cambiare le coordinate, ma se le abbasso all'infuori del luogo in cui è situata la picture semplicemente non mi appaiono. Ho capito che c'entra qualcosa con la pic, solo che non so come intervenire >.<

 

Inoltre io ho eliminato la barra dell'exp, però vorrei creare una barra basata su due variabili, come faccio? Ora provo a studiarmi lo script per carpire tutti i processi per creare la barra però non sicuro di riucsire da solo é_è Help! T.T

E' colpa dell'altezza della finestra, i cui contents sono grandi giusto il necessario per usare la picture. Basta aumentare il valore del quarto parametro dell'istruzione super nell'initialize della finestra . . .

 

 

Se non sei riuscito a creare una barra basata su due variabili, qui ti faccio un esempio di metodo basato sul codice originale delle barre di questo script . . .

I due valori usati per stabilire il riempimento della barra sono nelle variabili locali e1 ed e2

 

 

def draw_vars_bar(idvarfill, idvarmax, x, y, length, thick)
width = length
height = thick
c1 = Color.new(255, 0, 0)
c2 = Color.new(155, 0, 0)
# i valori idvarfill e idvarmax sono gli ID delle variabili usate 
# Valore che determina il riempimento della barra
e1 = $game_variables[idvarfill]
# Valore massimo della barra
e2 = $game_variables[idvarmax]
# Se il valore di riempimento è maggiore di quello di barra piena
# usa come valore di riempimento quello di barra piena
e1 = [e1, e2].min
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

 

 

Il riempimento della barra appare rosso visto che l'esempio è la versione modificata della barra degli HP . . .

Se per variabili intendevi variabili ruby invece che variabili evento, basta modificare le righe 8 e 10 del metodo postato

 

quest_completed = $quest_data[quest_id].completed_steps
quest_end = $quest_data[quest_id].steps.size
draw_vars_bar(quest_completed, quest_end, 160, 32 * quest_id, 80, 20)
# ma anche, ad esempio
var1 = $game_variables[122]
var2 = $game_variables[123]
draw_vars_bar(var1, var2, 160, 32, 120, 8)
# o un valore preso da una variabile evento ed uno stabilito in altro modo . . .

 

 

 

Edited by Apo
applicato tag code

 


SCRIPT RGSS (RPG Maker XP) VINTAGE LIBRARY [2018+]


Breaking (in ogni senso) News: "Treno deraglia per via del seno di Sakurai Aoi . . ." - Info nello spoiler !!

 


http://afantasymachine.altervista.org/_altervista_ht/NOOOOOOOOOilMIOtreninooooo_500.gif


Non riesco a smettere di essere affascinato da immagini come questa . . .

http://anime.vl-vostok.ru/art/photos2011/17/78049800/wall_VladAnime_WWA_1885-1680x1050.jpg


Alcuni wallpapers che faccio ruotare sul mio vecchio PC . . .


http://afantasymachine.altervista.org/_altervista_ht/gits_window.jpg

http://afantasymachine.altervista.org/_altervista_ht/madoka_group01.jpg
http://afantasymachine.altervista.org/_altervista_ht/arisu_picipici_01.jpg
http://afantasymachine.altervista.org/_altervista_ht/phantom_wp01_einzwei.jpg


La parte più spassosa della mia vita è quando gli altri cercano di spiegarmi i miei pensieri . . .


BBCode Testing


Typeface & Size



Link to comment
Share on other sites

Avevo intuito che c'era un qualche settagio iniziale della classe che impediva di far apparire le cose al di là di determinate coordinate (appunto dovevano apparire nella finestrella...) solo che non sapevo quale parametro era é.è

Chiedo venia per tutte queste domande, è che devo imparare e solo così noto miglioramenti...

 

Comunque si, sono riuscito a fare la terza barra ^^ l'unico problema è che il valore di essa aumenta solo col refresh delle

altre due, devo dunque aggiungere altro oppure è un problema tutto degli eventi che settano la crescita di quella barra?

(la barra in questinoe, come quella degli SP, si ricaricano col tempo, più sono alti determinati parametri del pg più velocemente si ricaricano, però se il pg fa level up senza perdere hp o sp il cambiameto di velocità della terza barra non cambia).

Grazie mille in ogni caso ^^ [son riuscito addirittura a mettere i colori che volevo io!!!!! e a far apparire l'icona dell'arma equippata!]]

Edited by nihil-omen

http://i30.tinypic.com/xehois.gif

} 2rA - web site {

E' disponibile il primo capitolo completo di 2rA!

} 2rA: Capitolo I {

Link to comment
Share on other sites

Devi intervenire sul metodo (def) update della finestra dell'HUD.

def update	super	if @actors.size != $game_party.actors.size		@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	endend

A partire dalla linea 12 del pezzo di codice che ho postato viene fatta la verifica del cambiamento di tutti i parametri mostrati in finestra, quindi devi aggiungere qui la verifica del cambiamento del parametro che regola il riempimento della terza barra, e dopo la chiamata al refresh settare @old_parambarra3 = parambarra3.

Edited by giver

 


SCRIPT RGSS (RPG Maker XP) VINTAGE LIBRARY [2018+]


Breaking (in ogni senso) News: "Treno deraglia per via del seno di Sakurai Aoi . . ." - Info nello spoiler !!

 


http://afantasymachine.altervista.org/_altervista_ht/NOOOOOOOOOilMIOtreninooooo_500.gif


Non riesco a smettere di essere affascinato da immagini come questa . . .

http://anime.vl-vostok.ru/art/photos2011/17/78049800/wall_VladAnime_WWA_1885-1680x1050.jpg


Alcuni wallpapers che faccio ruotare sul mio vecchio PC . . .


http://afantasymachine.altervista.org/_altervista_ht/gits_window.jpg

http://afantasymachine.altervista.org/_altervista_ht/madoka_group01.jpg
http://afantasymachine.altervista.org/_altervista_ht/arisu_picipici_01.jpg
http://afantasymachine.altervista.org/_altervista_ht/phantom_wp01_einzwei.jpg


La parte più spassosa della mia vita è quando gli altri cercano di spiegarmi i miei pensieri . . .


BBCode Testing


Typeface & Size



Link to comment
Share on other sites

  • 11 months later...
Puoi provare così, ma non sono sicuro che funzioni . . .

 

Aggiungi, subito dopo class Scene_Map, in questo script o nello Scene_Map standard

 

class Scene_Map  # Inserire questa dichiarazione  attr_accessor :HUD

 

poi, per eliminarlo usa, tramite call script

 

$scene.HUD.dispose

 

e per farlo riapparire

 

$scene.HUD = Window_HUD.new

 

Non si potrebbe fare in modo che sia necessario chiamarlo e basta?

 

Nel senso non appare finchè non lo attivo.

Edited by BIN.AD. corporation™
BIN.AD. corporation™ All rights ® reservedVisita il sito http://binadcorporation.jimdo.comVedrai, ti catturerà!!!
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...