ID:161687
Apr 11 2008, 12:27 pm
|
|
Ok, so I've been trying to understand turn based combat, and I've looked at all the tutorials, and I'm still stuck on where to start. Basically I want to be able to type attack and it starts from there....
|
Apr 11 2008, 1:11 pm
|
|
Try to be more specific on what you want and I'll try and help out as I can :)
|
In response to Subzero1
|
|
Ok, I have the skills(magic and stuff) in three categories. I use a var called skillpath to link the skills to their procs(to make sure the skills work) So I want to start out picking rather your gonna use offense skills or defense skills.
|
In response to Lundex
|
|
mob/proc/BattleStart() |
In response to Subzero1
|
|
Ok, that works, now the big part I'm stuck on, is the whole monster AI......
|
In response to Lundex
|
|
Monster AI can be very simple or complex, depending on whaqt you want to do.
At its most basic level, enemy AI needs to be done like a rulebook. To act, heal if I have less than 10% HP, otherwise magic if I have more than 40% MP, otherwise attack. To heal, cast Heal Self if I have at least 15MP, otherwise drink a potion if I have one, otherwise look for a potion on the ground, otherwise retreat. To magic, buff self if I am not buffed, otherwise magic attack. To buff self, cast Vigor on self if I have 20MP, otherwise cast Rage if I have 5MP, otherwise cast Lightning Reflexes if I have 3 MP, otherwise concentrate if I have more than 50% HP, otherwise attack. To magic attack, cast Lightning if I have 35MP, otherwise cast Flying Sparks if I have 5MP, otherwise concentrate if I have more than 50% HP, otherwise attack. To retreat, pick a direction which does not move me toward any enemies and run. To attack, hit the nearest enemy with the weapon which will do most damage. If you build up a rule set like that, then your AIs can just follow the rules and they'll seem intelligent to your players. Of course, there are many methods of getting your AIs to make more intelligent decisions and to be more unpredictable to the players, to use information to their advantage, and so on. However, a basic rule set AI will give you a place to start implementing more advanced concepts. |
In response to PirateHead
|
|
Ah, that helps. I just have a hard time looping it and stuff..
|