Professional Documents
Culture Documents
Tutorial To Hackel
Tutorial To Hackel
1. Introduction
I always wanted to have an Ally System for XAS, but after looking around and not finding one I
decided to make one myself.
Download it here!
You create an ally in much the same way you create a monster (see: how to create a new enemy)
- the only difference being the minus sign in front of the Enemy ID.
Basically, the enemies have the same values as your Allies (eg, Ally has an Enemy ID of -3 so he
is the 3rd entry in the Database).
Therefore Hackel has created a new layout to use to improve the AI, simply write this into the
move route:
ki(sa,sb,sc,sd,se,ra,rb,rc,rd,re,hp,ha,freq,heal-per,skilltime,keinn)
Where sa is the most commonly used skill and se is the least used.
Where ra is the most commonly used skill and re is the least used.
freq = the attack speed, the greater the number is so slow to attack, (each is attacked xte times x
= freq)
heal-per = The percentage of life that will be cured (if heal-per = 30 then heals the ally or run
away if he has to live 30%)
keinn = no melee, though it is true ally will not go into the melee (eg for the Wizards while
melee weapons but they should not use)
When any of the above does not apply (ie. you don't want to use a skill) simply put a zero in its
place.
The ally is also using his weapon independently but as he cannot know wether it's a range or
close combat weapon, just place the ID of the weapon skill into module XAS_SKILL
LONG_RANGE_SKILL when it's a range combat weapon and into SHORT_RANGE_SKILL
when it's a close combat weapon.
Also you should add every skill that is just causing damage to the enemy to
SKILL_ENEMY_ALLY
4. How to use
Now you could copy the events into the map but instead I integrated a system that is doing this
automatically.
Therefore you have to fill out the module XAS_ALLY
ALLY_MAPID = (e.g. 2) = the map on which your allys appear (in this map there must be only
allys)
one last hint: you can also add a 4. eventpage to the allys that is e.g. activated by a switch (to turn
off the actors)
5. Additional functions
For
that allys are a little better I had to write new moveroute commands
that you have to use for that your allys don't attack the hero:
keki(skill1,fs1,skill2,fs2,heal,freq,healper,skilltime,speed,se,fr)
skill1 = 1st skill the graphic name must be ENEMYNAME_[fs1]spe1 fs1 = number of frames
fs1 = frames of the skill1 graphic
skill2 = 2nd skill the graphic name must be ENEMYNAME_[fs1]spe2 fs2 = number of frames
fs2 = frames of the skill2 graphic
heal = a heal skill
freq = attack speed ( 20 = fast ,60 = slow)
healper = if 30 => he start to heal if he has 30% of his hp
skilltime = same as freq only for skills
speed = walk speed 5 = fast 3 = slow
se = attack se (sound)
fr = the pitch of the se
fkeki(askill,skill1,fs1,skill2,fs2,heal,freq,healper,skilltime,speed,se,fr)
askill = the attack skill
skill1 = 1st skill the graphic name must be ENEMYNAME_[fs1]spe1 fs1 = number of frames
fs1 = frames of the skill1 graphic
skill2 = 2nd skill the graphic name must be ENEMYNAME_[fs1]spe2 fs2 = number of frames
fs2 = frames of the skill2 graphic
heal = a heal skill
freq = attack speed ( 20 = fast ,60 = slow)
healper = if 30 => he start to heal if he has 30% of his hp
skilltime = same as freq only for skills
speed = walk speed 5 = fast 3 = slow
se = attack se (sound)
fr = the pitch of the se
allki(fskill,ffs,skill,fs,heal,freq,healper,skilltime,speed,se,fr)
fskill = range skill the graphic name must be ENEMYNAME_[ffs]spe2 ffs = number of frames
ffs = frames of the rage comabt skill graphic
skill = close combat skill the graphic name must be ENEMYNAME_[fs]spe1 fs = number of
frames
fs = frames of the close comabt skill graphic
heal = a heal skill
freq = attack speed ( 20 = fast ,60 = slow)
healper = if 30 => he start to heal if he has 30% of his hp
skilltime = same as freq only for skills
speed = walk speed 5 = fast 3 = slow
se = attack se (sound)
fr = the pitch of the se
Some examples:
keki(0,0,0,0,0,30,40,0,3,0,0)
allki(77,1,0,0,0,20,10,100,3,"Mana - Duran_Hit",50)
keki(76,4,0,0,0,0,40,70,2,0,0)
fkeki(72,0,0,0,0,0,40,40,0,3,0,0)
Translated by Rainbird
(Original German version by Hackel)
閱讀更多: http://blogs.myspace.com/index.cfm?
fuseaction=blog.view&friendId=447095114&blogId=474947857#ixzz0yGQBHWbX