ok so I got to sticking the weapons into the actor list based on their techniques, and this is what I've got:
#--------------------------------------------------------------------------
# * Add Techniques
#--------------------------------------------------------------------------
def add_tech(tech_id)
return if @techniques[tech_id] != nil # stops if tech is already possessed
@techniques[tech_id] = Game_Technique.new(tech_id)
my_id = tech_id
weapon_tech(my_id) #this is new
end
#--------------------------------------------------------------------------
# * Custom Weapon Set - technique interface w/ add weapon
#--------------------------------------------------------------------------
def weapon_tech(var)
m = @techniques[var].skills
if m.include?(6)
a = $data_skills[6].str_f
z = $data_skills[6].dex_f
(a..z).step(1) do |n|
add_weapon(n)
end
else
return
end
end
Here's how it works:
When a character receives a new technique, the computer checks if that technique comes with weapon proficiencies like swords.
The way I created weapon proficiencies is by creating skills titled stuff like "swords", "axes", "guns", etc. And then exploited the
str_f (starting number) and
dex_f (end number) to get my number range. The number range is a section of the weapon list. For example, swords might be 1-4, spears 5-8, and axes 9-12. So if my skill was called Swords, I would set str_f to 1, and dex_f to 4, and then my script:
a = $data_skills[6].str_f
z = $data_skills[6].dex_f
(a..z).step(1) do |n|
add_weapon(n)
end
adds each of these weapons. What I need to know how to do is change that "6", in here:
if m.include?(6)
a = $data_skills[6].str_f
z = $data_skills[6].dex_f
into some kind of variable like "i", so it can check not just for skill #6 (which is only swords), but a short list of skills, like 6,7,8,9,10, and maybe some stuff out of order that might come later, like 62 (giant robot weapons?), 63 (joke weapons?), and so on. I just don't know how to turn
if m.include?(6)
a = $data_skills[6].str_f
z = $data_skills[6].dex_f
into something like
if m.include?([6,7,8,9,10,11,62,63])
a = $data_skills[[6,7,8,9,10,11,62,63]].str_f
z = $data_skills[[6,7,8,9,10,11,62,63]].dex_f