Many battles fought again by tongue

Strange day today. Not just because it would have been Mike’s birthday, but because for some reason I found myself fixing a bug in Doomdark’s Revenge. Back in January I had a bug reported to me by Simon Foston, I managed to get some save games from him and just needed to find some time to look at it. Now, it’s taken a little while for me to find that time, but for some reason I looked at it today. It wasn’t a conscious decision, I was just looking through some emails that needed dealing with and noticed Simon’s bug report.
A quick look through the code and with a tip off from Simon’s report, it became apparent that the ghosts of dead lords were continuing to take part in battles. I checked the original code and it looked as if the bug was there too, however, I then found that the isDead check was happening later in the process. Strangely what it means is that battles at a dead lords location are processed as part of a dead characters turn, and not as part of other characters in the location. In my case, I’d missed the later isDead check and therefore the dead lord actually took part in the battle.


So, it seemed strange to be working on a bug in Doomdark’s Revenge that included the dearly departed, today of all days. I’m sure Mike had a wry smile..

Related Posts:

We must not think that any task is hopeless…

t_tower0It’s been mentioned to me recently that it would be nice to have modding functionality for The Lords of Midnight. Opening the engine up was something I always wanted to do but I’m not sure to what level this needs to happen. Therefore if there is anyone out there who would be interested in modding LOM or using the engine, drop me an email, and we can discuss what approach to follow to make this happen.

Related Posts:

I thought the War was lost and Midnight doomed.

battle_full_linesI’ve been working my way through the outstanding bug list. One of the areas that seems to cause contention, is battles.

It causes me some problems because the original is actually pretty haphazard where battles are concerned. So I’m going to talk about the battles in a little more depth, just so that you can get an understanding as to why certain things seem to be happening.

Firstly, night processing goes like this…

1. Reset all characters at dawn
2. Give all AI characters their turn
3. Process Battles
4. Place things on map
5. Move Mists
6. Remove things from map at location’s where characters are
7. Check if characters can recruit soldiers from strongholds
8. Re-spawn armies at strongholds
9. Check for important deaths

Secondly, the interesting point here is, characters are given a chance to move BEFORE battles take place. So, if you attack a character, there is a good chance he will move and thus a battle will not take place.

To understand that a little more, let’s look at the AI turn.

The AI character must decide what to do every night. Each character will react to a number of objectives.

1. Goto Liege
2. Goto Foe
3. Goto Object
4. Goto Home
5. Do nothing

If they have a liege, and that liege’s objectives are 1 or 2, then this characters objective also become 1 or 2.

Otherwise, we pick a new objective

When picking a new objective we pick a random number between 1 and 16. If we choose 1 to 5, then these are our objective. Otherwise we continue with our current objective.

So as you can see, there is a 68% chance that we will just continue on with what were we previously doing. Which means that unless you are at a characters stronghold, and his current objective is to go home, then the likelihood, he is moving away from you.

There is only a 6% chance that the character will stay at his current location.

Personally, I am very surprised at these stats, because it makes battles bloody difficult. Unlike The Lords of Midnight where a nearby army would drop everything to attack, or an attacked army would stay until the death, in Doomdark’s Revenge, everything apart from battle seems to be of more interest.

Related Posts:

A Map Editor

lom_mapLooking for a coder who fancies writing a Map / Campaign /Scenario Editor for Lords of Midnight and Doomdark’s Revenge… and anything else that might follow.

I’m afraid it’s not a paid gig, nothing more than a bit of respect and possibly some penny whistles and moon pie…

It can be Mac OSX only or preferably cross platform. It can’t be windows only.

If you are interested, give me a shout.

Related Posts: