Jump to content
Rpg²S Forum
  • 0

Aiuto SDK


makgyver
 Share

Question

Ho visto ke spesso parlate dello script SDK e della sua utilità. Essendo nuovo del forum mi chiedo cosa sia questo SDK (anke se leggendo qua e la forse ho intuito), ma soprattuttodove posso trovarlo. Grazie mille!!

"A tre settimane da oggi io mieterò il mio raccolto, immaginate dove vorrete essere perchè così sarà. Serrate i ranghi! Seguitemi! E se vi ritroverete soli a cavalcare su verdi praterie col sole sulla faccia non preoccupatevi troppo perchè sarete nei campi elisi e sarete già morti! Fratelli, ciò che facciamo in vita riecheggia nell'eternità!"

 

"C'era un sogno che era roma sarà realizzato. Questo era il desiderio di Marco Aurelio!"

Link to comment
Share on other sites

6 answers to this question

Recommended Posts

  • 0

L'SDK ovvero Standard Development è una libreria inventata dal grande Sephiroth Spawn insieme a Near Fantastica e altri allo scopo di aggiungere funzioni utili o correggere varie imperfezioni del linguaggio RGSS. E' anche stata studiata per aiutare gli sviluppatori a utilizzare alcune funzioni del linguaggio. Molti script carini di Sephiroth Spawn, per non dire quasi tutti, funzionano solo( quasi sempre) con l'SDK.

Se ti interessa ti allego la documentazione( in inglese ) dell'SDK.

Documentazione_SDK.txt

Per l'istallazzione puoi o mettere tutte le parti dello script nell'editor oppure utilizzare un'altro sistema, cioè mettere i file codificati sulla cartella del gioco e inserire nell'editor solo uno script per utilizzarli.

Generalmente io uso il secondo metodo ed è anche quello che ti faccio vedere se ti interessa.

 

Devi creare una nuova classe sopra main chiamarlo RSC Require e metterci dentro questo script:

 

 

#==============================================================================
#  ** RSC Require
#------------------------------------------------------------------------------
#  Version 1.4.0
#  * Yeyinde, 2007
#------------------------------------------------------------------------------
#  Usage: require('My_RSCFile') or rsc_require('My_RSCFile')
#==============================================================================

#-----------------------------------------------------------------------------
#  * Aliasing
#-----------------------------------------------------------------------------
if @rsc_original_require.nil?
 alias rsc_original_require require
 @rsc_original_require = true
end
#-----------------------------------------------------------------------------
#  * require
#	   file : the file to load, rsc files will be handled in it's own method
#-----------------------------------------------------------------------------
def require(file)
 begin
rsc_original_require file
 rescue LoadError
rsc_require file
 end
end
#-----------------------------------------------------------------------------
#  * rsc_require
#		   file : the RSC file which will be loaded. The .rsc extension may
#				   be ommited
#-----------------------------------------------------------------------------
def rsc_require(file)
 # Create error object
 load_error = LoadError.new("No such file to load -- #{file}")
 # Tack on the extension if the argument does not already include it.
 file += '.rsc' unless file.split('.')[-1] == 'rsc'
 # Iterate over all require directories
 $:.each do |dir|
# Make the rout-to-file
filename = dir + '/' + file
# If load was successful
if load_rsc(filename)
  # Load was successful
  return true
end
 end
 # Raise the error if there was no file to load
 raise load_error
end
#-----------------------------------------------------------------------------
#  * load_rsc
#	file_name : the file to be evaluated
#-----------------------------------------------------------------------------
def load_rsc(file_name)
 file_name = file_name[2..file_name.length] if file_name[0..1] == './'
 # If the file exists and so does the encypted archive
 if File.exists?(file_name) && File.exists?('Game.rgssad')
raise RSCSecurityError.new("Potential security breach:
#{File.basename(file_name)} is a real file")
 end
 # Start a begin-rescue block
 begin
# Load the data from the file
script_data = load_data(file_name)
# Iterate over each data entry in the array
script_data.each_with_index do |data|
  # Store the script name
  script_name = data[0][0]
  # Store the script data after inflating it
  script = Zlib::Inflate.inflate(data[0][1])
  # Start a begin-rescue block
  begin
	# Evaluate the script data
	eval(script)
  # If there is an error with the script
  rescue Exception => error
	# Remove the (eval): from the start of the message
	error.message.gsub!('(eval):', '')
	# Get the line number
	line = error.message.sub(/:[\w \W]+/) {$1}
	# Get the error details
	message = error.message.sub(/\d+:in `load_rsc'/) {''}
	# Print the error and details
	print "File '#{file_name}' script '#{script_name}' line #{line}: #{error.type} occured.

#{message}"

	# Exit with value 1 (standard error)
	exit 1
  end
end
# Load was a success
return true
 # No file to load
 rescue Errno::ENOENT
# Load was a failure
return false
 end
end
#==============================================================================
#  ** RSCSecurityError
#==============================================================================
class RSCSecurityError < StandardError; end


# Insert Game.exe's base folder into require array
$: << '.' unless $:.include?('.')
# Remove all nil objects
$:.compact!

 

 

Sotto a questo devi mettere un'altro script chiamato SDK 2.3:

 

 

#==============================================================================
# ** RMXP Standard Development Kit (SDK) - RSC Require
#------------------------------------------------------------------------------
# Build Date  - 2005-11-22
# Version 1.0 - Near Fantastica				- 2005-11-22
# Version 1.1 - SephirothSpawn				 - 2005-12-18 - (Near Fantastica)
# Version 1.2 - Near Fantastica				- 2005-12-18 - (Wachunga)
# Version 1.3 - Wachunga					   - 2005-12-19 - (Near Fantastica)
# Version 1.4 - Prexus						 - 2006-03-02 - (SephirothSpawn)
# Version 1.5 - Jimme Reashu				   - 2006-03-25 - (Near Fantastica)
# Version 2.0 - SephirothSpawn / Trickster /
#			   Der Drake / Sandgolem		  - 2007-02-22 - (SDK Team)
# Version 2.1 - tibuda /alexanderpas / Mr. Mo  - 2007-02-25 - (SephirothSpawn)
# Version 2.2 - SephirothSpawn / Trickster / 
#			   tibuda						 - 2007-04-04 - (SDK Team)
# Version 2.3 - Rataime / SephirothSpawn / 
#			   Trickster / vgvgf			  - 2007-07-22 - (SDK Team)
#==============================================================================

Include_SDK_Parts = [2, 3, 4, 5]

require 'RSC Hidden Files/The RMXP Standard Development Kit 2.3'

 

 

Come ultimo script da aggiungere col nome di MACL sempre sotto a l'ultimo:

 

 

#==============================================================================
# ** Method and Class Library - RSC Setup
#------------------------------------------------------------------------------
# Build Date - 9-17-2006
# Version 1.0 - Trickster - 9-17-2006
# Version 1.1 - Trickster - 10-03-2006
# Version 1.2 - Trickster - Selwyn - 11-01-2006
# Version 1.3 - Trickster - 11-10-2006
# Version 1.4 - Trickster - 12-1-2006
# Version 1.5 - Trickster - Yeyinde - Lobosque - 1-1-2007
# Version 2.0 - MACL Authors - 4-26-2007
# Version 2.1 - MACL Authors - 7-22-2007
#==============================================================================

#============================================================================== 
# ** General Method & Class Library Settings
#==============================================================================

module MACL
 #-------------------------------------------------------------------------
 # * Pose Names for Charactersets
 #-------------------------------------------------------------------------
 Poses = ['down', 'left', 'right', 'up']
 #-------------------------------------------------------------------------
 # * Number of Frames Per Pose for charactersets
 #-------------------------------------------------------------------------
 Frames = 4
 #--------------------------------------------------------------------------
 # * Real Elements
 #--------------------------------------------------------------------------
 Real_Elements = 1, 2, 3, 4, 5, 6, 7, 8
 #-------------------------------------------------------------------------
 # * Version Number (Do not Touch)
 #-------------------------------------------------------------------------
 Version   = 2.1
 #-------------------------------------------------------------------------
 # * Loaded Libraries (Do not Touch)
 #-------------------------------------------------------------------------
 Loaded = []
end

#============================================================================== 
# ** Action Test Setup
#==============================================================================

class Game_BattleAction
 #-------------------------------------------------------------------------
 # * Attack Using
 #   - Set this to the basic ids that perform an attack effect
 #-------------------------------------------------------------------------
 ATTACK_USING = [0]
 #-------------------------------------------------------------------------
 # * Skill Using
 #   - Set this to the kinds that perform an skill effect
 #-------------------------------------------------------------------------
 SKILL_USING  = [1]
 #-------------------------------------------------------------------------
 # * Defend Using
 #   - Set this to the basic ids that perform an defend effect
 #-------------------------------------------------------------------------
 DEFEND_USING = [1]
 #-------------------------------------------------------------------------
 # * Item Using
 #   - Set this to the kinds that perform a item using effect
 #-------------------------------------------------------------------------
 ITEM_USING   = [2]
 #-------------------------------------------------------------------------
 # * Escape Using
 #   - Set this to the basic ids that perform an escape effect
 #-------------------------------------------------------------------------
 ESCAPE_USING = [2]
 #-------------------------------------------------------------------------
 # * Wait Using
 #   - Set this to the basic ids that perform a wait effect
 #-------------------------------------------------------------------------
 WAIT_USING  = [3]
end

#============================================================================== 
# ** Animated Autotile Settings
#==============================================================================

RPG::Cache::Animated_Autotiles_Frames = 16

#============================================================================== 
# ** Bitmap Settings
#==============================================================================

class Bitmap
 #--------------------------------------------------------------------------
 # * Bitmap.draw_equip settings
 #
 #   Icon Type Settings When Item Not Equipped
 #	- Draw_Equipment_Icon_Settings = { type_id => icon_name, ... }
 #
 #   Default Type Icons
 #	- Draw_Equipment_Icon_Settings.default = icon_name
 #--------------------------------------------------------------------------
 Draw_Equipment_Icon_Settings = { 0 => '001-Weapon01', 1 => '009-Shield01', 
2 => '010-Head01', 3 => '014-Body02', 4 => '016-Accessory01'
 }
 Draw_Equipment_Icon_Settings.default = '001-Weapon01'
 #--------------------------------------------------------------------------
 # * Bitmap.draw_blur settings
 #
 #   Master Default Settings
 #	- Default_Blur_Settings   = { setting_key => setting, ... }
 #
 #   Class Default Settings
 #	- @@default_blur_settings = { setting_key => setting, ... }
 #
 #   Settings
 #	'offset'  - Pixels to be offseted when bluring
 #	'spacing' - Number of times to offset blur
 #	'opacity' - Max Opacity of blur
 #--------------------------------------------------------------------------
 Default_Blur_Settings   = {'offset' => 2, 'spacing' => 1, 'opacity' => 255}
 @@default_blur_settings = {'offset' => 2, 'spacing' => 1, 'opacity' => 255}
 #--------------------------------------------------------------------------
 # * Bitmap.draw_anim_sprite settings
 #
 #   Master Default Settings
 #	- Default_Anim_Sprite_Settings   = { setting_key => setting, ... }
 #
 #   Class Default Settings
 #	- @@default_anim_sprite_settings = { setting_key => setting, ... }
 #
 #   Settings
 #	'f' - Frame count reset
 #	'w' - Number of frames wide in sprite set
 #	'h' - Height of frames wide in sprite set
 #--------------------------------------------------------------------------
 Default_Anim_Sprite_Settings   = {'f' => 8, 'w' => 4, 'h' => 4}
 @@default_anim_sprite_settings = {'f' => 8, 'w' => 4, 'h' => 4}
end

#============================================================================== 
# ** RPG::State
#==============================================================================

class RPG::State
 #--------------------------------------------------------------------------
 # * Normal Icon (Filename for normal (no states))
 #--------------------------------------------------------------------------
 Normal_Icon = '050-Skill07'
 #--------------------------------------------------------------------------
 # * Icon Names
 #
 #   Icon_Name = { state_id => 'filename', ... }
 #
 #   Use Nil to default back to state name
 #--------------------------------------------------------------------------
 Icon_Name = {
1  => '046-Skill03',
2  => 'Stop',
3  => 'Venom',
4  => 'Darkness',
5  => 'Mute',
6  => 'Confused',
7  => 'Sleep',
8  => 'Paralysis',
9  => '047-Skill04',
10 => '047-Skill04',
11 => 'Slow',
12 => '047-Skill04',
13 => '045-Skill06',
14 => '045-Skill06',
15 => '045-Skill06',
16 => '045-Skill06'
 }
 Icon_Name.default = nil
end

#------------------------------------------------------------------------------
# ** Reqire MACL 2.1
#------------------------------------------------------------------------------

require 'RSC Hidden Files/The Method and Class Library 2.1'

#------------------------------------------------------------------------------
# ** SDK Log
#------------------------------------------------------------------------------

if Object.const_defined?(:SDK)
 SDK.log('Method & Class Library', 'MACL Authors', 2.1, '??????????')
end

 

 

Infine come ultima cosa devi aggiungere questi file sulla cartella del progetto.

RSC Hidden Files

Poiché questi file sono codificati se ti interessa sapere il codice sorgente dell'SDK devi cercare su Internet.

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
Grazie mille. Ho fatto tutto come mi hai detto il gioco parte(cambiando le scritte da italiano a inglese) ma mi si pianta subito, e mi da errore in Game.exe. Che cosa può essere??

"A tre settimane da oggi io mieterò il mio raccolto, immaginate dove vorrete essere perchè così sarà. Serrate i ranghi! Seguitemi! E se vi ritroverete soli a cavalcare su verdi praterie col sole sulla faccia non preoccupatevi troppo perchè sarete nei campi elisi e sarete già morti! Fratelli, ciò che facciamo in vita riecheggia nell'eternità!"

 

"C'era un sogno che era roma sarà realizzato. Questo era il desiderio di Marco Aurelio!"

Link to comment
Share on other sites

  • 0
il tuo progetto non mi parte xke ho la versione 1.01 e quindi ovviamente non va, ho provato a fare un progetto nuovo e fare tutto di nuovo ma mi da lo stesso probelma. Credo sia quindi un problema di versione.

"A tre settimane da oggi io mieterò il mio raccolto, immaginate dove vorrete essere perchè così sarà. Serrate i ranghi! Seguitemi! E se vi ritroverete soli a cavalcare su verdi praterie col sole sulla faccia non preoccupatevi troppo perchè sarete nei campi elisi e sarete già morti! Fratelli, ciò che facciamo in vita riecheggia nell'eternità!"

 

"C'era un sogno che era roma sarà realizzato. Questo era il desiderio di Marco Aurelio!"

Link to comment
Share on other sites

  • 0

Si lo sospettavo, ma mi sembrava che l'SDK funzionasse anche sulla 1.01.

Prova a procurarti la 1.02 secondo me ci guadagni.

Comunque per far funzionare il progetto che ti ho dato io basta modificare il file .rxproj con un editor di testo e scrivere al posto 1.02 ovviamente 1.01.

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
E' da un po ke cerco di procurarmela ma non riesco. Beh per ora l'SDK non mi è urgentemente servito. Spero continui a essere così finkè non trovo la nuova versione. Cmq Grazie mille dell'aiuto!!

"A tre settimane da oggi io mieterò il mio raccolto, immaginate dove vorrete essere perchè così sarà. Serrate i ranghi! Seguitemi! E se vi ritroverete soli a cavalcare su verdi praterie col sole sulla faccia non preoccupatevi troppo perchè sarete nei campi elisi e sarete già morti! Fratelli, ciò che facciamo in vita riecheggia nell'eternità!"

 

"C'era un sogno che era roma sarà realizzato. Questo era il desiderio di Marco Aurelio!"

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