MantisBT - VCMI
View Issue Details
0000037VCMIGUI - Battlespublic2009-10-02 12:022014-02-01 22:33
Tow dragon 
ori.bar 
normalminoralways
closedopen 
0.7 
 
0000037: Stack amount boxes can overlap (0.7#71)
Originally reported by Aidis:

0.7#71 Creature stack number frames in battle can overlap when standing close to each other.
H3: http://s5.tinypic.com/1ilh87.jpg [^]
VCMI: http://s5.tinypic.com/348oaq1.jpg [^]


Copied from SF tracker. Forum report: http://forum.vcmi.eu/viewtopic.php?p=1846#1846 [^]
Detailed description for the stack amount boxes correct placement (forum link: http://forum.vcmi.eu/viewtopic.php?p=2952#2952 [^]):

The rules are:

1) The creatures in the attacking army (left side of the battlefield) have the default position of the stack number box in the lower part of the hex in front of them, attached to the line separating their (front) hex and the hex in front containing the box (see Monks, Pikemen, etc in the screenshot below)

2) The creatures in the defending army (right side of the battlefield) have the default position of the stack number box in the upper part of the hex in front of the, attached to the line separating their (front) hex and the hex in front containing the box. The purpose of that is that when there's an empty hex between a friendly and an enemy creature, both boxes can be displayed without overlapping (see 1 Archangel facing 2 Gold Dragons in the upper right side of the screenshot)

3) When the hex in front of a creature is occupied by any type of object (other creature, war machine or terrain obstacle), the stack number box moves inside the hex of the creature, centered (see Paladin in screenshot). For 2-hex creatures, it is placed in the front hex of that creature, but again centered (see 1 Archangel facing 2 Diamond Dragons)

Sample screenshot: http://i4.photobucket.com/albums/y104/Zamolxis/VCMI/VCMI%2007/090711-H3CStackNumberssample.jpg [^]

Notes:
- If a creature is in one of the hexes on the opposite side of the battlefield, the end of the battlefield is not considered as an "obstacle", hence their stack number box is still shown in front of them (out of the hexed area, still attached to the side of creature's hex).
- Dead creatures are also ignored, so we may have a stack number box in the hex of a dead stack.
- Castle Walls are considered an obstacle, but moats (or similar) are not.
No tags attached.
has duplicate 0000650closed Tow dragon Number of units label of one creature covers another one which stands in front of the first one 
jpg 2011-09-03_086StackBoxes.jpg (76,379) 2011-09-03 07:51
https://bugs.vcmi.eu/file_download.php?file_id=796&type=bug
jpg
Issue History
2009-10-02 12:02Tow dragonNew Issue
2009-10-02 13:44ZamolxisCategoryGUI - battles =>
2009-10-08 23:32ZamolxisNote Added: 0000070
2009-10-08 23:34ZamolxisDescription Updatedbug_revision_view_page.php?rev_id=92#r92
2009-10-08 23:34ZamolxisAdditional Information Updatedbug_revision_view_page.php?rev_id=94#r94
2009-10-08 23:35ZamolxisNote Edited: 0000070bug_revision_view_page.php?rev_id=96
2009-11-17 20:25ZamolxisDescription Updatedbug_revision_view_page.php?rev_id=346#r346
2009-11-17 20:25ZamolxisAdditional Information Updatedbug_revision_view_page.php?rev_id=347#r347
2009-11-17 20:25ZamolxisNote Deleted: 0000070
2009-11-17 20:52ZamolxisDescription Updatedbug_revision_view_page.php?rev_id=348#r348
2009-11-17 20:52ZamolxisAdditional Information Updatedbug_revision_view_page.php?rev_id=349#r349
2009-11-17 20:57ZamolxisAdditional Information Updatedbug_revision_view_page.php?rev_id=350#r350
2009-11-17 20:58ZamolxisAdditional Information Updatedbug_revision_view_page.php?rev_id=351#r351
2009-11-17 20:59ZamolxisAdditional Information Updatedbug_revision_view_page.php?rev_id=352#r352
2010-05-29 19:04ZamolxisProduct Version => 0.7
2010-05-29 19:04ZamolxisDescription Updatedbug_revision_view_page.php?rev_id=765#r765
2010-05-29 19:04ZamolxisAdditional Information Updatedbug_revision_view_page.php?rev_id=766#r766
2010-11-18 21:28ZamolxisRelationship addedhas duplicate 0000650
2011-09-02 12:00ZamolxisAssigned ToTow dragon => ori.bar
2011-09-02 14:16ZamolxisNote Added: 0001977
2011-09-03 07:51ZamolxisFile Added: 2011-09-03_086StackBoxes.jpg
2011-09-03 07:58ZamolxisNote Edited: 0001977bug_revision_view_page.php?bugnote_id=1977#r1380
2011-09-04 00:11ori.barNote Added: 0001980
2011-09-04 01:54ZamolxisNote Edited: 0001980bug_revision_view_page.php?bugnote_id=1980#r1390
2014-02-01 22:33IvanNote Added: 0004376
2014-02-01 22:33IvanStatusassigned => closed

Notes
(0001977)
Zamolxis   
2011-09-02 14:16   
(edited on: 2011-09-03 07:58)
Partially fixed in 0.86, in the sense that the stack size boxes don't overlap anymore, but there's still a lot of fine tuning left to do. See first all the details in Additional Information and and Sample screenshot for the exact place where the box should be for the attacker and the defender. But just to make sure things are not left out, see here a full list of all the adjustments which still need to be done:

- box for attacking (left army) creatures should be moved 2 pixels to the left (its yellow border should overlap the green hex border) and about 8 pixels up (should be about 3 pixels above the corner of the hex)

- box for defending (right army) creatures should be moved 2 pixels to the right and about 23 pixels up (its upper yellow border should be about 1 hex below the upper side corner of the empty hex in front)

- when the box is moved in the hex of the creature (creature/obstacle in the hex in front), it should be more centered then now. In H3 it was about 6 pixels from the left edge of the hex and about 7 pixels from the right edge (so centered but slightly to the left, and that regardless of whether they're attacker or defender side creatures). EDIT: I was even mistaken here. The fix doesn't yet move in the hex of the creature. What I was seeing was the box of the enemy creature in front. See newly attached screenshot: we have 1 Dragon facing 220 Sprites, not the other way around as we see there.

- box moves on top of the creature also when a friendly creature is in front (in 0.86 it happens only if an enemy creature is in front)

- the box should not be overlapped by anything in the same line of hexes, like the legs of the creature or a dead creature. In 0.86 it goes behind the legs of the defending creature when overlapping, or totally disappears behind obstacles (but this is because it should actually not be in the hex of the obstacle, but moved in creature's hex)

If I notice other discrepancies, I'll update this note.

EDIT: See new screenshot attached. I don't know why I had the feeling the stack boxes don't overlap anymore. The main change I seem to notice is that if in 0.85 the Sprites' box would have overlapped the Dragon's, now it's the box of the friendly stack behind the Sprites that overlaps the one of the Dragon.

(0001980)
ori.bar   
2011-09-04 00:11   
(edited on: 2011-09-04 01:54)
I've commited a fix - r2365 - to prevent overlap (i.e. screenshot will no longer happen). However, positions are still not accurate. Furthermore, box position is only updated when it is the turn for a human stack to play.

(0004376)
Ivan   
2014-02-01 22:33   
Closing issues fixed long time ago.