[Not a bug] Monsters attack diagonally

Messages are moved here (should anyone ever want to see them again) once they are no longer applicable to the current version (e.g. suggestions that have been implemented or bugs that have been fixed).

Moderator: George Gilbert

Forum rules
Please read the Forum rules and policies before posting.
Post Reply
User avatar
Gambit37
Should eat more pies
Posts: 13715
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

[Not a bug] Monsters attack diagonally

Post by Gambit37 »

You can't fight homer, he's hidden behind two walls. These long-range wall-breaking attacks are really unfair!

I'm back at the secret place with Homer and can't open the metal door....
User avatar
Sophia
Concise and Honest
Posts: 4240
Joined: Thu Sep 12, 2002 9:50 pm
Location: Nowhere in particular
Contact:

Post by Sophia »

Gambit37 wrote:You can't fight homer, he's hidden behind two walls. These long-range wall-breaking attacks are really unfair!
You're right, it IS unfair, but don't blame me, it's a bug in RTC. There is absolutely no way this monster should be attacking you.

"Homer" is at a diagonal from the party (in a completely unrelated room), and there are two walls in the way.

For example, if the party is at 1, "Homer" is at 2, and X's are walls, the situation would be something of this sort:

X1
2X
User avatar
Gambit37
Should eat more pies
Posts: 13715
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Post by Gambit37 »

Yeah, I can see him using Ku on the magic map. Nasty green blob.

I've noticed that the scorpions can launch their attacks diagonally too -- is this a bug or part of the new AI?
User avatar
George Gilbert
Dungeon Master
Posts: 3022
Joined: Mon Sep 25, 2000 11:04 am
Location: London, England
Contact:

Post by George Gilbert »

I can't reproduce this at all.

Sophia - can you send me a sample dungeon with such a configuration that does this?

Gambit - if you havn't moved on too far from the area, can you send me a save game (and instructions on where to go to show the problem!)
User avatar
Gambit37
Should eat more pies
Posts: 13715
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Post by Gambit37 »

Actually, I'm not sure about the diagonal issue now. I may simply have been a matter of perception.

In an earlier part of the dungeon, I came to an area with a gold scorpion and a cross of pits with some armour in the middle. I was attacked remotely when it was clearly diagonally positioned to my left. However, later solving this part I discovered a red scorpion hiding a magic boulder -- it may have been this attacking my directly straight on but through several walls.

As for homer and his diagonal attack, it isn't, it's straight on:

Image

Given what you've said Sophia, is it the case that monsters shouldn't have these 'remote' attacks at all? I thought that was quite a cool feature, but maybe it's a new bug then!
User avatar
George Gilbert
Dungeon Master
Posts: 3022
Joined: Mon Sep 25, 2000 11:04 am
Location: London, England
Contact:

Post by George Gilbert »

Hmm - yes; I've caught one of these attacks in a debugger now and can see what's happening - specifically, it is doing a remote "ranged" attack, not a diagonal.

One could easily argue that this is a feature rather than a bug though!

Sophia - what was your intention / expectation for the ranged attacks of this creature?
User avatar
George Gilbert
Dungeon Master
Posts: 3022
Joined: Mon Sep 25, 2000 11:04 am
Location: London, England
Contact:

Post by George Gilbert »

BTW - The logic currently in the RTC engine is that "ranged" attacks that involve some kind of projectile (physical item, spell etc) won't get fired unless there's a clear path through (or a path that might become clear - for example, if there's a destroyable door in the way and the attack is a fireball one, then thats OK).

Other ranged attacks however, always occur no matter what's in the way. Whilst this was originally the correct behaviour (for example, monsters that had a ranged attack of "heal self" should do so regardless of whether there's a wall in the way!), perhaps this type of use has been superceded by the new "movement" attack method slots and the new behaviour for ranged attacks should always check for a (potentially) clear path.
User avatar
beowuuf
Archmastiff
Posts: 20687
Joined: Sat Sep 16, 2000 2:00 pm
Location: Basingstoke, UK

Post by beowuuf »

Wasn't tonari trying to do something with the ranged attack slots though?
User avatar
Sophia
Concise and Honest
Posts: 4240
Joined: Thu Sep 12, 2002 9:50 pm
Location: Nowhere in particular
Contact:

Post by Sophia »

Ah, ok. I was confused as to where exactly where you were standing. As is clear from that magic map, though, those monsters should have no way to get at the party.

I am not sure of the version history, but I believe SS was compiled before there was an even a distinction between ranged attacks and close attacks.

In any case, it was my design intention that this monster was to have no range attacks at all. This is just the standard ATTACK_METHOD_MONSTER_* method.

It seems like a bug with the backward compatibility, because when I load the .txt file into the editor, the monster's attack method shows up in the right place.
User avatar
Sophia
Concise and Honest
Posts: 4240
Joined: Thu Sep 12, 2002 9:50 pm
Location: Nowhere in particular
Contact:

Post by Sophia »

Sophia wrote:It seems like a bug with the backward compatibility, because when I load the .txt file into the editor, the monster's attack method shows up in the right place.
On second thought, no, the attack methods don't show up in the right place. There is no conclusive evidence of anything, here, because the editor produces a ton of errors when loading sstrike.txt (it's designed for 0.37ish and hasn't been updated), and the attack methods of a lot of other monsters are not set to what they ought to be, either. So, for all I know, it could be clobbering it and doing something strange.
User avatar
George Gilbert
Dungeon Master
Posts: 3022
Joined: Mon Sep 25, 2000 11:04 am
Location: London, England
Contact:

Post by George Gilbert »

Sophia wrote:In any case, it was my design intention that this monster was to have no range attacks at all. This is just the standard ATTACK_METHOD_MONSTER_* method.

It seems like a bug with the backward compatibility, because when I load the .txt file into the editor, the monster's attack method shows up in the right place.
OK - I understand what's going on now. The monster in question doesn't *just* have ATTACK_METHOD_MONSTER_ methods; only the 1st and 3rd one - it's 3rd attack method activates a relay.

The backwards compatibility is done in the engine by duplicating the 3 basic attack methods (which were the only ones in early versions) into the 3 ranged ones. This works perfectly for all "normal" attacks (ATTACK_METHOD_MONSTER, spell attacks etc); all are available at close range (as before) and the ranged ones work at range (and the ATTACK_METHOD_MONSTER has no effect because the monster isn't next to the party).

The problem is that it doesn't know what to do with the relay attack method - it could be anything (close, ranged, healing or whatever).

So, in conclusion, there's a flaw in how the backwards compatibility works. Unfortnately, it's not clear how (or even if) it can be fixed. So I think the thing to do is to recompile SS with the latest version of RTC and all the problems will go away :D
User avatar
Gambit37
Should eat more pies
Posts: 13715
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Post by Gambit37 »

If that were done, would I have to start my game all over again?
User avatar
George Gilbert
Dungeon Master
Posts: 3022
Joined: Mon Sep 25, 2000 11:04 am
Location: London, England
Contact:

Post by George Gilbert »

Shouldn't have to! The change in the monster definitions should be picked up and included in when you run with the new RTC file and the old SAV file.
User avatar
beowuuf
Archmastiff
Posts: 20687
Joined: Sat Sep 16, 2000 2:00 pm
Location: Basingstoke, UK

Post by beowuuf »

I've always meant to ask where exactly the division of saved game to .rtc module is

So monster and item definitions and graphics are .rtc
Dungeon layout and object placement are duplicated in the .sav and updated

What else is there, and where is it stored?
User avatar
George Gilbert
Dungeon Master
Posts: 3022
Joined: Mon Sep 25, 2000 11:04 am
Location: London, England
Contact:

Post by George Gilbert »

It's pretty logical really.

- Everything that's needed to play the game is in the RTC file
- Stuff that changes as you play the game is in the SAV file.
User avatar
beowuuf
Archmastiff
Posts: 20687
Joined: Sat Sep 16, 2000 2:00 pm
Location: Basingstoke, UK

Post by beowuuf »

So really an update in the .rtc file should solve alot of non-dungeon related issues
Post Reply