Jump to content
Rpg²S Forum
  • 0

Quando c'è cattivo sangue


Raxas_Alice
 Share

Question

Salve a tutti, stavo lavorando su un progettino -sono ancora all'intro- e ho tra gli script quelli della visualizzazione degli oggetti trovato qui e uno dell'autosave di BulleXt.

Il problema sta che pare siano impatibili, in quanto se provo ad aprire l'autosalvataggio mi da un errore di "IO needed" nello script per gli oggetti. Volevo sapere se qualcuno magari riusciva a capire come mai o se poteva renderli compatibili ^^"

Io posto quello dell'autosave, così per ogni evenienza.

Avviso che non vi erano salvataggi antecedenti all'inserimento di entrambi gli script :biggrin:

 

 

 

=begin
							  AutoSave VX
							  
Author: BulleXt(bulletxt@gmail.com)
Version: 0.1
Date: 06/07/2009

Description:
This script by default will automatically save when you do a map transfer,
after winning a battle and after exiting menu.
You can also manually call an autosave inside an event by simply doing a
call script like this:
Auto_Save.new
The script doesn't disable normal saving system so player can still save on his
slots, he will not be able to overwrite the autosave slot.
The script also lets you set how many saving slots you want.
=end

#This is the autosave slot number
SAVE_NUMBER = 1

#this is the number of how many saving slots you want
NUMBER_OF_SAVE_SLOTS = 10

#This is an ID switch, if ON it disables the autosave on map transfer
SAVE_ON_MAP_TRANSFER = 18

#This is an ID switch, if ON it disables the autosave after winning a battle
SAVE_AFTER_WINNING_BATTLE = 19

#This is an ID switch, if ON it disables the autosave after closing Menu
SAVE_AFTER_CLOSING_MENU = 20

############################### END CONFIGURATION ##############################

SAVING_FILE = "Save" + SAVE_NUMBER.to_s() + ".rvdata"
SAVE_NUMBER = 1 if SAVE_NUMBER > NUMBER_OF_SAVE_SLOTS
SAVE_NUMBER = 1 if SAVE_NUMBER < 1

class Auto_Save < Scene_File
 def initialize
do_save
 end
end



class Scene_File < Scene_Base

 alias auto_save_bulletxt_initialize initialize
 def initialize(saving, from_title, from_event)
auto_save_bulletxt_initialize(saving, from_title, from_event)
@saving_inside_menu = false
 end
 
 def start  
super
@file_max = NUMBER_OF_SAVE_SLOTS
create_menu_background
@help_window = Window_Help.new
create_savefile_windows
if @saving
  @index = $game_temp.last_file_index
  @help_window.set_text(Vocab::SaveMessage)
else
  @index = self.latest_file_index
  @help_window.set_text(Vocab::LoadMessage)
end
@savefile_windows[@index].selected = true
@page_file_max = ((416 - @help_window.height) / 90).truncate
for i in 0...@file_max
  window = @savefile_windows[i]
  if @index > @page_file_max - 1
	if @index < @file_max - @page_file_max - 1
	  @top_row = @index
	  window.y -= @index * window.height
	elsif @index >= @file_max - @page_file_max
	  @top_row = @file_max - @page_file_max
	  window.y -= (@file_max - @page_file_max) * window.height
	else
	  @top_row = @index
	  window.y -= @index * window.height
	end
  end
  window.visible = (window.y >= @help_window.height and
  window.y < @help_window.height + @page_file_max * window.height)
end
 end
 
 #create window slots
 def create_savefile_windows
@top_row = 0
@savefile_windows = []
for i in 0..(NUMBER_OF_SAVE_SLOTS - 1)
  @savefile_windows.push(Window_SaveFile.new(i, make_filename(i)))
end
@item_max = NUMBER_OF_SAVE_SLOTS
 end
 
 #handle going down
 def cursor_down(wrap)
@file_max = NUMBER_OF_SAVE_SLOTS
if @index < @file_max - 1 or wrap
  @index = (@index + 1) % @file_max
  for i in 0...@file_max
	window = @savefile_windows[i]
	if @index == 0
	  @top_row = 0
	  window.y = @help_window.height + i % @file_max * window.height
	elsif @index - @top_row > @page_file_max - 1
	  window.y -= window.height
	end
	window.visible = (window.y >= @help_window.height and
	  window.y < @help_window.height + @page_file_max * window.height)
  end
  if @index - @top_row > @page_file_max - 1
	@top_row += 1
  end
end
 end
 #handle going up
 def cursor_up(wrap)
@file_max = NUMBER_OF_SAVE_SLOTS
if @index > 0 or wrap
  @index = (@index - 1 + @file_max) % @file_max
  for i in 0...@file_max
	window = @savefile_windows[i]
	if @index == @file_max - 1
	  @top_row = @file_max - @page_file_max
	  window.y = @help_window.height + i % @file_max * window.height
	  window.y -= (@file_max - @page_file_max) * window.height
	elsif @index - @top_row < 0
	  window.y += window.height
	end
	window.visible = (window.y >= @help_window.height and
	  window.y < @help_window.height + @page_file_max * window.height)
  end
  if @index - @top_row < 0
	@top_row -= 1
  end
end
 end
 
 
 alias auto_save_bulletxt_determine_savefile determine_savefile
 def determine_savefile
#if true, player has selected autosave slot so he must not save
if @savefile_windows[@index].filename == SAVING_FILE
  saving_not_allowed if @saving
  return  if @saving
end
#if here player can save
@saving_inside_menu = true if @saving
auto_save_bulletxt_determine_savefile
 end
 
 #window warning player can't save on auto save slot
 def saving_not_allowed
Sound.play_buzzer
b = Bitmap.new(340,60) 
b.draw_text(0, 20,340, 20, "Non puoi salvare nello slot Auto Salv.") 
w = Window_Message.new
w.contents = b
w.width = 380
w.height = 100
w.visible = true
w.openness = 255
w.x = 100
w.y = 180
w.back_opacity = 255
w.opacity = 255
w.update
Graphics.wait(180)
b.dispose
w.dispose
w = nil
b = nil
 end  

 
 def do_save
#if true, player is saving from inside menu
if @saving_inside_menu
  file = File.open(@savefile_windows[@index].filename, "wb")
else
  #if here player has done a manual Auto_Save.new call from event
  file = File.open(SAVING_FILE, "wb")
end
write_save_data(file)
file.close
return_scene if @saving_inside_menu
#$scene = Scene_Map.new if @saving_inside_menu == false
@saving_inside_menu = false
 end
 
end



class Scene_Battle < Scene_Base
 #save after winning a battle
 alias auto_save_bulletxt_process_victory process_victory
 def process_victory
auto_save_bulletxt_process_victory
Auto_Save.new if $BTEST == false && $game_switches[SAVE_AFTER_WINNING_BATTLE] == false
 end
end



class Scene_Map < Scene_Base
 #save on map transfer
 alias auto_save_bulletxt_update_transfer_player  update_transfer_player
 def update_transfer_player
return unless $game_player.transfer?
auto_save_bulletxt_update_transfer_player
Auto_Save.new if $game_switches[SAVE_ON_MAP_TRANSFER] == false
 end
end



class Scene_Menu < Scene_Base
 #save when exiting menu
 alias auto_save_bulletxt_update_command_selection update_command_selection
 def update_command_selection	
if Input.trigger?(Input::B)
  Auto_Save.new if $game_switches[SAVE_AFTER_CLOSING_MENU] == false
end
auto_save_bulletxt_update_command_selection
 end
end


class Window_SaveFile < Window_Base

 def initialize(file_index, filename)
super(0, 56 + file_index % NUMBER_OF_SAVE_SLOTS * 90, 544, 90)
@file_index = file_index
@filename = filename
load_gamedata
refresh
@selected = false
 end
 
 #change autoslave slot string "File $n"
 def refresh
self.contents.clear
self.contents.font.color = normal_color
name = Vocab::File + " #{@file_index + 1}"  if @file_index != SAVE_NUMBER - 1 
self.contents.draw_text(4, 0, 200, WLH, name)
@name_width = contents.text_size(name).width
@autosaveslot = "Autosalvataggio"
self.contents.draw_text(6, 0, 200, WLH, @autosaveslot) if @file_index == SAVE_NUMBER - 1
if @file_exist
  draw_party_characters(152, 58)
  draw_playtime(0, 34, contents.width - 4, 2)
end
 end
 
 #handle cursor width when going on autosave slot
def update_cursor
if @selected
  self.cursor_rect.set(0, 0, @name_width + 8, WLH)  if @file_index != SAVE_NUMBER - 1 
  self.cursor_rect.set(0, 0, 140, WLH)  if @file_index == SAVE_NUMBER - 1 
else
  self.cursor_rect.empty
end
 end

end

 

 

 

http://fc01.deviantart.net/fs71/f/2014/092/2/f/shtbanner_by_flaminiakennedy-d7cq8qm.png http://www.freankexpo.net/signature/697.png



Miglior Esplicazione del Progetto nel Cover Contest
http://www.rpg2s.net/cover_contest/icons/cc_special.png
Secondo posto allo Screen Contest #58
http://rpg2s.net/gif/SCContest2Oct.gif
Secondo posto allo Screen Contest #59
http://rpg2s.net/gif/SCContest2Oct.gif
Terzo posto allo Screen Contest #68
http://rpg2s.net/gif/SCContest3Oct.gif

Link to comment
Share on other sites

8 answers to this question

Recommended Posts

  • 0

I due script sono in questo ordine ?

 

1) Visualizzazione Oggetti

2) Autosave

 

Non hai eliminato nessuno script da quelli di default ?

 

Tra l'altro, lo script dell'Autosave è in versione 0.1, siamo sicuri che non presenti problemi di funzionamento ?

 


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

  • 0
Si sono in quell'ordine. Beh allora semmai terrò quello script giusto per vedere i minuti di gioco, poi quando creo il disco di gioco lo tolgo :)

http://fc01.deviantart.net/fs71/f/2014/092/2/f/shtbanner_by_flaminiakennedy-d7cq8qm.png http://www.freankexpo.net/signature/697.png



Miglior Esplicazione del Progetto nel Cover Contest
http://www.rpg2s.net/cover_contest/icons/cc_special.png
Secondo posto allo Screen Contest #58
http://rpg2s.net/gif/SCContest2Oct.gif
Secondo posto allo Screen Contest #59
http://rpg2s.net/gif/SCContest2Oct.gif
Terzo posto allo Screen Contest #68
http://rpg2s.net/gif/SCContest3Oct.gif

Link to comment
Share on other sites

  • 0
Si sono in quell'ordine. Beh allora semmai terrò quello script giusto per vedere i minuti di gioco, poi quando creo il disco di gioco lo tolgo :)

Qual'è lo script di visualizzazione oggetti?

"Io non volevo solo partecipare alle discussioni. Volevo avere il potere di farle fallire" [cit.]

http://holyres.altervista.org/UserBoard/BannerOverdrive35.png
http://holyres.altervista.org/UserBoard/Cap3.png

http://www.indiexpo.net/signature/578.png

Miei script per RPG Maker VX Ace:


*NB Tutti i miei script sono protetti da licenza CC - BY http://i.creativecommons.org/l/by/3.0/88x31.png

Questa licenza permette a terzi di distribuire, modificare, ottimizzare ed utilizzare la tua opera come base, anche commercialmente, fino a che ti diano il credito per la creazione originale. Questa è la più accomodante delle licenze offerte. É raccomandata per la diffusione e l'uso massimo di materiali coperti da licenza.

 

 



I miei tutorial:


Come distribuire il gioco - e anche come creare un'installazione professionale!
RGSS in pillole - Guida completa e facile all'RGSS2 e RGSS3 per novizi ed esperti
Come mappare con VX (e VX Ace) - guida base all'uso degli strumenti del mapping
Loop delle musiche - come tagliarle in modo da far venire musiche continue senza interruzioni finali
Creare backup dei progetti - per evitare di uccidervi dopo un errore che ha fatto perdere tutto!

Link to comment
Share on other sites

  • 0

http://fc01.deviantart.net/fs71/f/2014/092/2/f/shtbanner_by_flaminiakennedy-d7cq8qm.png http://www.freankexpo.net/signature/697.png



Miglior Esplicazione del Progetto nel Cover Contest
http://www.rpg2s.net/cover_contest/icons/cc_special.png
Secondo posto allo Screen Contest #58
http://rpg2s.net/gif/SCContest2Oct.gif
Secondo posto allo Screen Contest #59
http://rpg2s.net/gif/SCContest2Oct.gif
Terzo posto allo Screen Contest #68
http://rpg2s.net/gif/SCContest3Oct.gif

Link to comment
Share on other sites

  • 0

Ah, il classico item-popup di Woratana :D

Comunque, ho appena provato e gli script non mi danno alcun problema, funziona tutto.

"Io non volevo solo partecipare alle discussioni. Volevo avere il potere di farle fallire" [cit.]

http://holyres.altervista.org/UserBoard/BannerOverdrive35.png
http://holyres.altervista.org/UserBoard/Cap3.png

http://www.indiexpo.net/signature/578.png

Miei script per RPG Maker VX Ace:


*NB Tutti i miei script sono protetti da licenza CC - BY http://i.creativecommons.org/l/by/3.0/88x31.png

Questa licenza permette a terzi di distribuire, modificare, ottimizzare ed utilizzare la tua opera come base, anche commercialmente, fino a che ti diano il credito per la creazione originale. Questa è la più accomodante delle licenze offerte. É raccomandata per la diffusione e l'uso massimo di materiali coperti da licenza.

 

 



I miei tutorial:


Come distribuire il gioco - e anche come creare un'installazione professionale!
RGSS in pillole - Guida completa e facile all'RGSS2 e RGSS3 per novizi ed esperti
Come mappare con VX (e VX Ace) - guida base all'uso degli strumenti del mapping
Loop delle musiche - come tagliarle in modo da far venire musiche continue senza interruzioni finali
Creare backup dei progetti - per evitare di uccidervi dopo un errore che ha fatto perdere tutto!

Link to comment
Share on other sites

  • 0

cioè se tu carichi un autosalvataggio creatosi con un -esempio- trasporto da una mappa all'altra, non ti esce nessun errore? O_o

Come facesti, se posso chiedere? XD

http://fc01.deviantart.net/fs71/f/2014/092/2/f/shtbanner_by_flaminiakennedy-d7cq8qm.png http://www.freankexpo.net/signature/697.png



Miglior Esplicazione del Progetto nel Cover Contest
http://www.rpg2s.net/cover_contest/icons/cc_special.png
Secondo posto allo Screen Contest #58
http://rpg2s.net/gif/SCContest2Oct.gif
Secondo posto allo Screen Contest #59
http://rpg2s.net/gif/SCContest2Oct.gif
Terzo posto allo Screen Contest #68
http://rpg2s.net/gif/SCContest3Oct.gif

Link to comment
Share on other sites

  • 0
cioè se tu carichi un autosalvataggio creatosi con un -esempio- trasporto da una mappa all'altra, non ti esce nessun errore? O_o

Come facesti, se posso chiedere? XD

XD Hai ragione, non ho provato a caricare l'autosave... Avevo capito che dava errore quando eseguiva l'autosalvataggio, non il caricamento... Comunque ho già capito l'errore, appena ho tempo lo fixo.

"Io non volevo solo partecipare alle discussioni. Volevo avere il potere di farle fallire" [cit.]

http://holyres.altervista.org/UserBoard/BannerOverdrive35.png
http://holyres.altervista.org/UserBoard/Cap3.png

http://www.indiexpo.net/signature/578.png

Miei script per RPG Maker VX Ace:


*NB Tutti i miei script sono protetti da licenza CC - BY http://i.creativecommons.org/l/by/3.0/88x31.png

Questa licenza permette a terzi di distribuire, modificare, ottimizzare ed utilizzare la tua opera come base, anche commercialmente, fino a che ti diano il credito per la creazione originale. Questa è la più accomodante delle licenze offerte. É raccomandata per la diffusione e l'uso massimo di materiali coperti da licenza.

 

 



I miei tutorial:


Come distribuire il gioco - e anche come creare un'installazione professionale!
RGSS in pillole - Guida completa e facile all'RGSS2 e RGSS3 per novizi ed esperti
Come mappare con VX (e VX Ace) - guida base all'uso degli strumenti del mapping
Loop delle musiche - come tagliarle in modo da far venire musiche continue senza interruzioni finali
Creare backup dei progetti - per evitare di uccidervi dopo un errore che ha fatto perdere tutto!

Link to comment
Share on other sites

  • 0

Grazie davvero tanto tanto tanto :D

Non ti preoccupare posso aspettare, tanto prima che rilascio una beta ce ne vorrà xD

Per ora lo uso per vedere la durata più o meno del gioco durante la fase di test ^^

http://fc01.deviantart.net/fs71/f/2014/092/2/f/shtbanner_by_flaminiakennedy-d7cq8qm.png http://www.freankexpo.net/signature/697.png



Miglior Esplicazione del Progetto nel Cover Contest
http://www.rpg2s.net/cover_contest/icons/cc_special.png
Secondo posto allo Screen Contest #58
http://rpg2s.net/gif/SCContest2Oct.gif
Secondo posto allo Screen Contest #59
http://rpg2s.net/gif/SCContest2Oct.gif
Terzo posto allo Screen Contest #68
http://rpg2s.net/gif/SCContest3Oct.gif

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...