02-08-2004, 08:35 AM
Roland,Feb 5 2004, 10:49 AM Wrote:Inquiring modders want to know. ;)Ohh, by moding I can't tell off hand. But with the source it would be easy. The game uses a rather "strange" system of having various matrices of the dungeon. There, it sets the monsters number (if I recall correctly) into the tiles where it is currently residing. When moving, it will be in two tiles at once, however, the way it marks those tiles differ depending on direction it walks. It can mark with the monster number or the negative value of the monster number for example.
The ToHit only check for positive values (or negatives I don't remember). When walking horisontally, both the target tile and the one you leave is marked in a way that will not trigger a tohit (the monster does not exist for that purpose). I suspect this might in some way have to do with how the game handle the mouse over the dungeon and what can and can't be "seen" and overlapping things and such (if not, I have really no idea).
An easy way to fix it would be to simply add another matrix to handle ToHit. Or to change the use of the current one and change how the mouse works (if that is the reason it is as it is). One can also change how the ToHit checks for targets and simply have it check both positive and negative numbers (should possibly be modable) although it might end up playing different than one is used to.
Finally, I am not sure the game treated monsters and players identical in this aspect, but again, I can't remember. Ohh, and really finally, melee attacks, doesn't check tiles at all, but rather just calculate the distance to the target (which is why a monster will hit you when it stands in the same tile that you do (due to some bug you can end up that way), while a player can't do that since it check tiles. It is a bit messy as anyone can see, and cleaning that up would make it better. Not possible in a mod I would say though.
There are three types of people in the world. Those who can count and those who can't.