|
  |
Skill storage, I just have to get this out of the way YEY MY FIRST SCRIPT!! |
|
|
|
|
Apr 24 2009, 08:47 AM
|

What did you expect...

Group: Revolutionary
Posts: 461
Type: Developer
RM Skill: Intermediate

|
This script allows you to store an actors skills and replace an actors skills with those stored, you can store up to 5 sets of skills with this script by default, though you can easily store more by following the instructions in the script. All the instructions are in the script. CODE #================================================================ ======
# Store skill system by Breadlord
#==============================================================================
# Use the following script calls to use the script :
# $game_actors[n].store_skills_?
# This script call stores the current skills of the actor with the id of 'n'
# the '?' should be replaced with a number from 1 to 5, this number specifies
# which slot the skills would be stored in.
#
# $game_actors[n].restore_skill_from_?
# Again the n refers to an actor id, this time the skills stored in slot will
# be stored in the actors skills. The ? again refers to a slot, 1 to 5.
#
# $game_actors[1].delete_skills
# This is pretty obvious, it takes the skills of the actor specified, and
# deletes all there skills.
#
# $game_actors[1].check_store_?
# What this script calll does is it checks the contents of a store and
# displays the ids of all the skills stored in that store.For this script
# call put 1 were you would put the actor id in the other script calls, the
# '?' refers to the store to check.
#
#==============================================================================
# If you want more storage slots copy and paste these segments:
# def store_skills_1
# @skill_store_1 = @skills
# end
#
# def restore_skill_from_1
# @skills = @skill_store_1
# end
#
# def check_store_1
# print @skill_store_1
# end
#
# And change all the numbers to the number slot it is, say if you got another
# slot then in total you would have 6 slots, so you would replace the 1s with 6s
# You also have to go to the module Breadlord_Storage and add a new thing saying
#'@skill_store_? = {}'
#==============================================================================
module Breadlord_Storage
@skill_store_1 = {}
@skill_store_2 = {}
@skill_store_3 = {}
@skill_store_4 = {}
@skill_store_5 = {}
end
class Game_Actor < Game_Battler
alias :breadlords_skill_storage_initialize :initialize
def initialize(actor_id)
breadlords_skill_storage_initialize(actor_id)
end
def delete_skills
@skills = {} # This sets th eactors skills to {}
end
def store_skills_1
@skill_store_1 = @skills # This sets skill_store_? to the actors skills
end
def store_skills_2
@skill_store_2 = @skills # This sets skill_store_? to the actors skills
end
def store_skills_3
@skill_store_3 = @skills # This sets skill_store_? to the actors skills
end
def store_skills_4
@skill_store_4 = @skills # This sets skill_store_? to the actors skills
end
def store_skills_5
@skill_store_5 = @skills # This sets skill_store_? to the actors skills
end
def restore_skill_from_1
@skills = @skill_store_1 # This sets the actors skills to the skills in skill_store_?
end
def restore_skill_from_2
@skills = @skill_store_2 # This sets the actors skills to the skills in skill_store_?
end
def restore_skill_from_3
@skills = @skill_store_3 # This sets the actors skills to the skills in skill_store_?
end
def restore_skill_from_4
@skills = @skill_store_4 # This sets the actors skills to the skills in skill_store_?
end
def restore_skill_from_5
@skills = @skill_store_5 # This sets the actors skills to the skills in skill_store_?
end
def check_store_1
print @skill_store_1 # This shows the value in skill_store_?
end
def check_store_2
print @skill_store_2 # This shows the value in skill_store_?
end
def check_store_3
print @skill_store_3 # This shows the value in skill_store_?
end
def check_store_4
print @skill_store_4 # This shows the value in skill_store_?
end
def check_store_5
print @skill_store_5 # This shows the value in skill_store_?
end
end
#==============================================================================
# YEY THE END OF MY FIRST SCRIPT
#============================================================================== P.S MY FIRST SCRIPT
__________________________
 Check out my project http://www.rpgrevolution.com/forums/index....showtopic=29698[Show/Hide] I thought my sig was to big so... Clicky clicky  I taste a bit like Almonds. Mmm, the taste of almonds - anathema to many with nut allergies, and a bad sign for many more, as my taste is not unlike that of cyanide. Am I good or am I poison? A risky thing to guess about. What Flavour Are You? What Mystical creature are you? Pegasus  You are a shy, night time person and you are very gentle and soft hearted. You are like the opposite from your cousin the unicorn. Which Final Fantasy Character Are You?Final Fantasy 7Cna yuo raed tihs? Olny 55% of plepoe can. I cdnuolt blveiee taht I cluod aulaclty uesdnatnrd waht I was rdanieg. The phaonmneal pweor of the hmuan mnid, aoccdrnig to a rscheearch at Cmabrigde Uinervtisy, it dseno't mtaetr in waht oerdr the ltteres in a wrod are, the olny iproamtnt tihng is taht the frsit and lsat ltteer be in the rghit pclae. The rset can be a taotl mses and you can sitll raed it whotuit a pboerlm. Tihs is bcuseae the huamn mnid deos not raed ervey lteter by istlef, but the wrod as a wlohe. Azanmig huh? yaeh and I awlyas tghuhot slpeling was ipmorantt! fi yuo cna raed tihs, palce it in yuor siantugre.
 Your answers suggest you are a Strategist The four aspects that make up this personality type are:  Summary of Strategists * Quiet, easy-going and intellectually curious * Use logical, objective thinking to find original solutions to problems * Think of themselves as bright, logical and individualistic * May be impractical, forgetting practical issues, such as paying bills or doing the shopping More about Strategists Strategists are quiet people who like to get to the heart of tough problems on their own and come up with innovative solutions. They analyse situations with a sceptical eye and develop ways of measuring everything, including themselves. Strategists are the group most likely to say they are unhappy in their job, according to a UK survey. Strategists are generally easy-going. They are intellectually curious and enjoy abstract ideas. Sometimes they like thinking of a solution to a problem more than taking practical steps to solve it. In situations where they can't use their talents, are unappreciated, or not taken seriously, Strategists may become negatively critical or sarcastic. Under extreme stress, Strategists could be prone to inappropriate, tearful or angry outbursts. Strategists may be insensitive to the emotional needs of others or how their behaviour impacts the people around them.
|
|
|
|
|
|
|
|
|
Apr 24 2009, 11:00 AM
|

Level 6

Group: Member
Posts: 82
Type: Event Designer
RM Skill: Skilled

|
Kudos on your first script. Could you possibly give a little more of an explanation though? Is it similar to the KCG_SkillCP system or something?
__________________________
This is a signature. I know right?
|
|
|
|
|
|
|
|
|
Apr 24 2009, 12:02 PM
|

What did you expect...

Group: Revolutionary
Posts: 461
Type: Developer
RM Skill: Intermediate

|
Thanks for the kudos. And to say, this is not like the kgc cp system, this does not let you limit the skills the actor has. What this script does is that it can store the actors skills in the script, it can also change the actors skills to those in the script. This could be used by saying having the actors normal skills in th script aswell as a group of other skills. You could use this to have a transform skill that changes the actors skills to the other skills by using the script calls in the script, then you could have it so when the actor transforms back the actors skills are set to his normal skills (The ones previously stored in the script). The script calls are in the script.
__________________________
 Check out my project http://www.rpgrevolution.com/forums/index....showtopic=29698[Show/Hide] I thought my sig was to big so... Clicky clicky  I taste a bit like Almonds. Mmm, the taste of almonds - anathema to many with nut allergies, and a bad sign for many more, as my taste is not unlike that of cyanide. Am I good or am I poison? A risky thing to guess about. What Flavour Are You? What Mystical creature are you? Pegasus  You are a shy, night time person and you are very gentle and soft hearted. You are like the opposite from your cousin the unicorn. Which Final Fantasy Character Are You?Final Fantasy 7Cna yuo raed tihs? Olny 55% of plepoe can. I cdnuolt blveiee taht I cluod aulaclty uesdnatnrd waht I was rdanieg. The phaonmneal pweor of the hmuan mnid, aoccdrnig to a rscheearch at Cmabrigde Uinervtisy, it dseno't mtaetr in waht oerdr the ltteres in a wrod are, the olny iproamtnt tihng is taht the frsit and lsat ltteer be in the rghit pclae. The rset can be a taotl mses and you can sitll raed it whotuit a pboerlm. Tihs is bcuseae the huamn mnid deos not raed ervey lteter by istlef, but the wrod as a wlohe. Azanmig huh? yaeh and I awlyas tghuhot slpeling was ipmorantt! fi yuo cna raed tihs, palce it in yuor siantugre.
 Your answers suggest you are a Strategist The four aspects that make up this personality type are:  Summary of Strategists * Quiet, easy-going and intellectually curious * Use logical, objective thinking to find original solutions to problems * Think of themselves as bright, logical and individualistic * May be impractical, forgetting practical issues, such as paying bills or doing the shopping More about Strategists Strategists are quiet people who like to get to the heart of tough problems on their own and come up with innovative solutions. They analyse situations with a sceptical eye and develop ways of measuring everything, including themselves. Strategists are the group most likely to say they are unhappy in their job, according to a UK survey. Strategists are generally easy-going. They are intellectually curious and enjoy abstract ideas. Sometimes they like thinking of a solution to a problem more than taking practical steps to solve it. In situations where they can't use their talents, are unappreciated, or not taken seriously, Strategists may become negatively critical or sarcastic. Under extreme stress, Strategists could be prone to inappropriate, tearful or angry outbursts. Strategists may be insensitive to the emotional needs of others or how their behaviour impacts the people around them.
|
|
|
|
|
|
|
|
|
Apr 24 2009, 01:44 PM
|
Level 2

Group: Member
Posts: 20
Type: Developer
RM Skill: Skilled

|
I'm gonna check this script out, but I think you should also include a demo of the script, so people and actually see what it does before they use the script in their game... But, that's just my opinion...  Anyways, kudos on your first script.... I'll let you know what I think of it after I check it out...  Peace...!
|
|
|
|
|
|
|
|
|
Apr 25 2009, 12:24 AM
|
Level 12

Group: Revolutionary
Posts: 203
Type: None
RM Skill: Undisclosed

|
Nice! there should be an easier way to do this with variables in script insteadt of writing 20 lines more, ask someone... Anyways I reestyled it a bit(Don't put it in codebox, put it in code and spoiler tag: CODE #============================================================================== # Store Skill System 1.0 #============================================================================== # Script By: Breadlord #------------------------------------------------------------------------------ # Use the following script calls to use the script : # $game_actors[n].store_skills_? # This script call stores the current skills of the actor with the id of 'n' # the '?' should be replaced with a number from 1 to 5, this number specifies # which slot the skills would be stored in. # # $game_actors[n].restore_skill_from_? # Again the n refers to an actor id, this time the skills stored in slot will # be stored in the actors skills. The ? again refers to a slot, 1 to 5. # # $game_actors[1].delete_skills # This is pretty obvious, it takes the skills of the actor specified, and # deletes all there skills. # # $game_actors[1].check_store_? # What this script calll does is it checks the contents of a store and # displays the ids of all the skills stored in that store.For this script # call put 1 were you would put the actor id in the other script calls, the # '?' refers to the store to check. # #------------------------------------------------------------------------------ # If you want more storage slots copy and paste these segments: # def store_skills_1 # @skill_store_1 = @skills # end # # def restore_skill_from_1 # @skills = @skill_store_1 # end # # def check_store_1 # print @skill_store_1 # end # # And change all the numbers to the number slot it is, say if you got another # slot then in total you would have 6 slots, so you would replace the 1s with 6s # You also have to go to the module Breadlord_Storage and add a new thing saying #'@skill_store_? = {}' #==============================================================================
#============================================================================== # Breadlord_Storage #------------------------------------------------------------------------------ # This module makes the whole system. #==============================================================================
module Breadlord_Storage
@skill_store_1 = {} @skill_store_2 = {} @skill_store_3 = {} @skill_store_4 = {} @skill_store_5 = {} end
class Game_Actor < Game_Battler
alias :breadlords_skill_storage_initialize :initialize def initialize(actor_id) breadlords_skill_storage_initialize(actor_id) end
def delete_skills @skills = {} # This sets th eactors skills to {} end
def store_skills_1 @skill_store_1 = @skills # This sets skill_store_? to the actors skills end
def store_skills_2 @skill_store_2 = @skills # This sets skill_store_? to the actors skills end
def store_skills_3 @skill_store_3 = @skills # This sets skill_store_? to the actors skills end
def store_skills_4 @skill_store_4 = @skills # This sets skill_store_? to the actors skills end
def store_skills_5 @skill_store_5 = @skills # This sets skill_store_? to the actors skills end
def restore_skill_from_1 @skills = @skill_store_1 # This sets the actors skills to the skills in skill_store_? end
def restore_skill_from_2 @skills = @skill_store_2 # This sets the actors skills to the skills in skill_store_? end
def restore_skill_from_3 @skills = @skill_store_3 # This sets the actors skills to the skills in skill_store_? end
def restore_skill_from_4 @skills = @skill_store_4 # This sets the actors skills to the skills in skill_store_? end
def restore_skill_from_5 @skills = @skill_store_5 # This sets the actors skills to the skills in skill_store_? end
def check_store_1 print @skill_store_1 # This shows the value in skill_store_? end
def check_store_2 print @skill_store_2 # This shows the value in skill_store_? end
def check_store_3 print @skill_store_3 # This shows the value in skill_store_? end
def check_store_4 print @skill_store_4 # This shows the value in skill_store_? end
def check_store_5 print @skill_store_5 # This shows the value in skill_store_? end end
#============================================================================== # YEY THE END OF MY FIRST SCRIPT #==============================================================================
|
|
|
|
|
|
|
|
|
Apr 25 2009, 12:45 AM
|

What did you expect...

Group: Revolutionary
Posts: 461
Type: Developer
RM Skill: Intermediate

|
Thanks, and does anyone know how I could shortern the script (like speed said)
__________________________
 Check out my project http://www.rpgrevolution.com/forums/index....showtopic=29698[Show/Hide] I thought my sig was to big so... Clicky clicky  I taste a bit like Almonds. Mmm, the taste of almonds - anathema to many with nut allergies, and a bad sign for many more, as my taste is not unlike that of cyanide. Am I good or am I poison? A risky thing to guess about. What Flavour Are You? What Mystical creature are you? Pegasus  You are a shy, night time person and you are very gentle and soft hearted. You are like the opposite from your cousin the unicorn. Which Final Fantasy Character Are You?Final Fantasy 7Cna yuo raed tihs? Olny 55% of plepoe can. I cdnuolt blveiee taht I cluod aulaclty uesdnatnrd waht I was rdanieg. The phaonmneal pweor of the hmuan mnid, aoccdrnig to a rscheearch at Cmabrigde Uinervtisy, it dseno't mtaetr in waht oerdr the ltteres in a wrod are, the olny iproamtnt tihng is taht the frsit and lsat ltteer be in the rghit pclae. The rset can be a taotl mses and you can sitll raed it whotuit a pboerlm. Tihs is bcuseae the huamn mnid deos not raed ervey lteter by istlef, but the wrod as a wlohe. Azanmig huh? yaeh and I awlyas tghuhot slpeling was ipmorantt! fi yuo cna raed tihs, palce it in yuor siantugre.
 Your answers suggest you are a Strategist The four aspects that make up this personality type are:  Summary of Strategists * Quiet, easy-going and intellectually curious * Use logical, objective thinking to find original solutions to problems * Think of themselves as bright, logical and individualistic * May be impractical, forgetting practical issues, such as paying bills or doing the shopping More about Strategists Strategists are quiet people who like to get to the heart of tough problems on their own and come up with innovative solutions. They analyse situations with a sceptical eye and develop ways of measuring everything, including themselves. Strategists are the group most likely to say they are unhappy in their job, according to a UK survey. Strategists are generally easy-going. They are intellectually curious and enjoy abstract ideas. Sometimes they like thinking of a solution to a problem more than taking practical steps to solve it. In situations where they can't use their talents, are unappreciated, or not taken seriously, Strategists may become negatively critical or sarcastic. Under extreme stress, Strategists could be prone to inappropriate, tearful or angry outbursts. Strategists may be insensitive to the emotional needs of others or how their behaviour impacts the people around them.
|
|
|
|
|
|
|
|
|
Apr 25 2009, 03:32 AM
|

Level 6

Group: Member
Posts: 82
Type: Event Designer
RM Skill: Skilled

|
QUOTE (breadlord @ Apr 25 2009, 04:45 AM)  Thanks, and does anyone know how I could shortern the script (like speed said) Well you put a lot of space between lines, maybe cut those out?
__________________________
This is a signature. I know right?
|
|
|
|
|
|
|
|
|
Apr 25 2009, 06:56 AM
|
Level 12

Group: Revolutionary
Posts: 203
Type: None
RM Skill: Undisclosed

|
QUOTE (TimmahX @ Apr 25 2009, 03:32 AM)  QUOTE (breadlord @ Apr 25 2009, 04:45 AM)  Thanks, and does anyone know how I could shortern the script (like speed said) Well you put a lot of space between lines, maybe cut those out? Eh we are talking how he could shorten it, so that he doesn't define @ skillset.1 @skillset.2 and so on, but writes it like @skillset = [1,2,3...] Cause if you check my wersion there are all the spaces removed and reformatted.
|
|
|
|
|
|
|
|
  |
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:
RPG RPG Revolution is an Privacy
Policy and Legal
|
|