I was in the middle of debugging the encounter system.   I knew I added tons of new code to try and match the dungeon the best I could.  Like, parry, being knocked down, knocking down a monster, having your weapon knotted out of your hands or the encounter.  I spent a couple of months getting the encounter code working and adding in all the special monster code like the thief stealing, devourer sucking up your items.

As I was debugging I was also playing the dungeon and noticed that some times an encounter flees but the old ARX system.  Once a fight starts it is to the end and no encounter will flee.  So I started to look into the code to see why an encounter flees.  After I found the code and figured out what makes an ecounter flee,  my next step was when was this code called.   After researching that I locate default code of onLoad, onSurprise, onPreAttack and OnDeath code.  I have that many of these function have 1 – 6 different sections of codes based on the encounter.  Some encounter have thier own routines while most of them use a shared routine.  So I started coding all these routine into the game and that is where the flee came into on the onPreAttack code,  it has 6 different routine that is used and two of them have a check for flee in them.  So like a thief, he is more likely to flee after stealing from you or if he loses to many hit points.   There are a few that are designed to not flee at all,  fight to the death.

When I started I located a monster data where someone mapped out some of the variable of the monster.  So I’ve been able to map almost all of those variables and have implemented them into the ARX system. The encounter routine is very advanced.  Over the last couple of months, I’ve implemented parry, dodge, spell casting (you, encounter), drinking potions, knock down, being knocked down, loosing weapon, stunned and many more features.

Now the flee code is in the game with all the default code.

During this process, I found other areas of the game no FAQ gets correct.  You can lose alignment for several reason that is not mentioned.  Like,  stealing from encounter will cause you to lose alignment, but if you go ahead and kill that encounter and alignment of the encounter doesn’t matter you will lose even mose alignment, or kill the encounter that belongs to a guild that you belong to, you will lose 2 mood points on top of the alignment lose.

As I write this and research what I’m writting I see that there are a few onLoad features that are missing.  Like no monsters has an alignment of 255 but in the binary file the Knight has a 255, but it is changed on the load routine to reflect what is going on with the game at the time.  Have to implement this code.

Getting to know all the ins-and-outs of the encounter routine.  Getting really close to having almost all aspects of it implemented in the ARX system.  The game is really starting to feel like playing AR the dungeon.  More like the Dungeon then the City.  The fight routine in the dungeon is so far better than the city so, I’m basing the entire fight routine on the Dungeon.

 

 

By admin

Leave a Reply