ID:154927
 
I use in my game "Souls".
they drop and you can lvl up them and you learn skills with souls!
now my problem is i need a way to learn the skill but not all.
i have for each soul a different "equipp" and "unequipp". i will add the skills if you eqipp and you loose the skills with unequipp.
my try was with different skilllists and each skilllist with own requirments, but i failed-.-
but thats what i need different skilllist and that you learn a skilllist at equip and you forgot them at unequipp. but not the complete list, with lvl requirment in each list.
skilllist cause each Soul use different skills.

Would be great if anyone could help me, its my first game
I don't really understand what you're willing to do, but for what I've read, there are "Souls" that are dropped (by enemies?), which can be Equiped/Unequiped. Upon equiping the Soul, you get it's available skills. You will also unlock it's skills by improving your Soul (maybe leveling up?).
From that point, you can do something like this:

mob/var
list/LearnedSkills = list()
list/CurrentSkills = list()

obj/Equip/Souls
NewbieSoul
name = "Newbie Soul"
icon = 'soul.dmi'
icon_state = "newbie"

var
Equiped = 0 // Tells if it's equipped. NO by default.
list/SkillList = list()

New() //We will define it's skills at the New() proc
SkillList["PowerUp"] = 4 //Syntax is the following: SkillList["SkillNameHere"] = (Level Requirement here)
SkillList["PowerDown"] = 4
SkillList["SuppaPunch"] = 10
SkillList["SuppaKick"] = 15

verb/Equip()
set hidden = 1 //Set this to 0 If you want this to show on tabs.
if(src.Equiped){src.Equiped = !(src.Equiped);usr.overlays-=src}
else {src.Equiped = !(src.Equiped);usr.overlays+=src}

if(!src.Equiped)
for(var/X in src.SkillList)
if(!(X in usr.CurrentSkills)) continue
else usr.CurrentSkills.Remove(X)
else
for(var/C in src.SkillList)
if(!(isnum(SkillList[C]))) continue
if(usr.Level >= src.SkillList[C])
if( !(usr.LearnedSkills.Find(C))) usr.LearnedSkills.Add(C)
usr.CurrentSkills.Add(C)


Don't use this code, but use it as an example.
It's not complex code and may be a bit buggy. I wrote it to show you how simple list may hold Skills.
This pretty much adds the skill name to a list.
You now may be thinking, how do I use the skills, when this is done?
Probably you would like a system that cycles between CurrentSkill's contents, and then a proc called Do_Skill() which will react depending on the Current In-cycle Skill.
mob/var
MaximumCycle=0 //0 by default, we will define it later.
CurrentCycle=null //There's no Current by default.
LastCycle=null //There were no Last Cycle by default.

mob/proc/Cycle_Skills()
if(usr.MaximumCycle == usr.CurrentSkills.len)
if(usr.CurrentCycle >= usr.MaximumCycle)
usr.CurrentCycle = 1
else usr.CurrentCycle++
else usr.MaximumCycle = usr.CurrentSkills.len

mob/proc/Trigger_Skill()
switch(usr.CurrentSkills[usr.CurrentCycle])
if("PowerUp")
usr.HP+= (usr.HP / 2)
usr.SP += (usr.SP /1.7) - 100
usr.Energy -= 40
if("SuppaPunch")
usr.icon_state="SPunch"
for(var/mob/M in get_step(usr,usr.dir))
M.HP -= usr.Strenght - (M.Defense/4)
/*Things will keep going like this.
This is a simple but yet effective Skill System.
Even through this is by no mean an advanced system, it may be used as long as it fits your game.
You would have to edit variables accordingly to your game's skill vars, as well as damage formulas.

I hope this helped you.*/


If you have got any question or need assistance don't mind telling.
In response to Neo Rapes Everything
easier! yes souls dropped by enemies and yes i have a lvlsystem!
each Soul use a unique equip and unequip verb..
i need a way to make alot skilllist easy, cause each soul will have a skillist, like CommonWaterSkillList,UncommonWaterSkillList, rare etc.

now i have the unique Un/Equip verb

with Equip CommonWaterSoul as verb you learn CommonWaterSkillList
but each skill in the list with lvl requirment
like CommonWaterSoulLvl>=5

with unequip verb you loose the complete skillList

verb
Equip_Common_Water_Soul()
if(usr.S1_equipped == 0)
usr.S1_equipped = 1
usr.S1Stamm=src.WasserS1Stamm//var of the soul are now mob var for 3 eqipped souls, with lvl system
usr.MaxHP+=src.WasserS1Stamm//bonus to player stats
usr.S1Energy=src.WasserS1Energy
usr.MaxMP+=src.WasserS1Energy
usr.S1Str=src.WasserS1Str
usr.Str+=src.WasserS1Str
usr.S1Def=src.WasserS1Def
usr.Def+=src.WasserS1Def
usr.S1Lvl=src.WasserS1Lvl//Thats the lvl var of the soul.
usr.S1Exp=src.WasserS1Exp
usr.S1NExp=src.WasserS1NExp
suffix += "{-EQUIPPED-}"
view() << "[usr] use a Common Water Soul Lvl[WasserS1Lvl]."
//add Skillist when S1Lvl<=? and right class

else
usr << "You are already using something else."
verb
Unequip_Common_Water_Soul()
if(usr.S1_equipped == 1)
suffix = ""
usr.MaxHP-=src.WasserS1Stamm// removed bonus
src.WasserS1Stamm=usr.S1Stamm//mob var back to soul var, with lvl bonus
usr.MaxMP-=src.WasserS1Energy
src.WasserS1Energy=usr.S1Energy
usr.Str-=src:WasserS1Str
src.WasserS1Str=usr.S1Str
usr.Def-=src.WasserS1Def
src.WasserS1Def=usr.S1Def
src.WasserS1Lvl=usr.S1Lvl
src.WasserS1Exp=usr.S1Exp
src.WasserS1NExp=usr.S1NExp
usr.S1_equipped = 0
view() << "[usr] removes Common Water Soul Lvl[WasserS1Lvl]."//bei unequip sieht man das lvl
//remove complete skillist, no Soul=no Skills

else
usr << "It isn't equipped"



thats my verbs for ONE soul. sorry that some of it is german!

//////////////////////////////////
i need something to add skilllist, they all placed in Skill panel
skilllist A
skilllist B

then a way to add the skills to the skillist
skilllist A=Skill a and skill b
skilllist B=skill c and skill d

then a system to add the skilllist with eqip verb and to forgot skill with unequip, but with lvl and class requirment
equip=add Skilllist A=skill a by lvl 10 or higher and as class a
equip=add Skilllist B=skill c by lvl 5 or higher and as class b
unequip=remove skilllist
In response to HerzogCasa
    verb
Equip_Common_Energy_Soul()
if(usr.S1_equipped == 0)
usr.S1_equipped = 1
usr.S1Stamm=src.EnergyS1Stamm
usr.MaxHP+=src.EnergyS1Stamm
usr.S1Energy=src.EnergyS1Energy
usr.MaxMP+=src.EnergyS1Energy
usr.S1Str=src.EnergyS1Str
usr.Str+=src.EnergyS1Str
usr.S1Def=src.EnergyS1Def
usr.Def+=src.EnergyS1Def
usr.S1Lvl=src.EnergyS1Lvl
usr.S1Exp=src.EnergyS1Exp
usr.S1NExp=src.EnergyS1NExp
usr.SubClassS1="CommonEnergySoul"
ListCheck()
suffix += "{-EQUIPPED-}"
view() << "[usr] use a Common Energy Soul Lvl[EnergyS1Lvl]."
for(var/obj/Skills/O in SkillList)
if(O.LearnedBy==usr.SubClassS1)
if(O.LearnedOn<=usr.S1Lvl)
usr.contents+=new O.type

usr<<"<I><B><small>You learned [O]!" //and lets give em a message about it

else
usr << "You are already using something else."
verb
Unequip_Common_Energy_Soul()
if(usr.S1_equipped == 1)
suffix = ""
usr.MaxHP-=src.EnergyS1Stamm
src.EnergyS1Stamm=usr.S1Stamm
usr.MaxMP-=src.EnergyS1Energy
src.EnergyS1Energy=usr.S1Energy
usr.Str-=src:EnergyS1Str
src.EnergyS1Str=usr.S1Str
usr.Def-=src.EnergyS1Def
src.EnergyS1Def=usr.S1Def
src.EnergyS1Lvl=usr.S1Lvl
src.EnergyS1Exp=usr.S1Exp
src.EnergyS1NExp=usr.S1NExp
usr.S1_equipped = 0
view() << "[usr] removes Common Energy Soul Lvl[EnergyS1Lvl]."

usr<<"<I><B><small>You Forgot all your Skills!"

else
usr << "It isn't equipped"
now i learn skills with equip.(lvl requirment and subclass requirment)
but anyone with a idea that i forgot the skill with unequip?
del usr.contents was bad:)
In response to HerzogCasa
fixed.......

but can anyone tell me how to use a new info box?
i will use some panels in another box. my first box is full with more then 8 panels.