MantisBT

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000515VCMIMechanics - Adventure Mappublic2010-07-03 03:322023-06-21 15:30
ReporterZamolxis 
Assigned ToSXX 
PrioritynormalSeverityminorReproducibilityalways
StatusresolvedResolutionfixed 
PlatformAMD 5600+OSWindowsOS VersionXP SP3
Product Version0.81 
Target VersionFixed in Version 
Summary0000515: "There is no place to put the boat" if the water is on the left (west) side of the shore + Correct Rules for boat summoning
DescriptionAlso, the position where the boat appears should be tweaked to match H3.

I've struggled for half an hour to figure out what was the rule in H3 (see attached screenshot) and it turns out the system was actually quite simple.

First, please see here the priority of the water tiles around the hero (clockwise, starting above the hero):

8 1 2
7 x 3
6 5 4

The rules are as follows:
- The game looks for the highest priority water tile available to place the boat (1 being the highest) at 1st cast
- At 2nd cast the game looks for the 2nd highest priority water tile to place the boat
- Further casting will continue to regularly alternate between the 1st & 2nd highest priority tiles (if only 1 available, after 1st cast it will be blocked by the summoned boat already - then see last rule below)
- If there are more than 2 available water tiles, still only the first 2 are considered (a boat is never placed on a 3rd available water tile)
- If an empty boat occupies what could be the 1st or 2nd available tile, then the game considers it as obstacle as well, hence choosing the empty tile and the boat moves there
- If all tiles around the hero are occupied (even if that means occupied by empty boats on water), we get the message "There is no place to put a boat" which we normally get when there is no free water tile around

Take Sir Mullich in the attached map to run your tests. For the bug in the subject, just take him to a vertical shore where the water is to the west (but I guess you don't need to waste time with the bug as long as you implement the above rules correctly)

Note: monster area of control does not impact water tiles. I'm pointing this out just in case, because the above rules should not be impacted by a monster stationed next to a water tile. Boats can be summoned on tiles adjacent to a monster and hero can board it without starting a fight (of course, only if he does not need to go through a terrain tile guarded by that monster before getting to the boat).
TagsNo tags attached.
Attached Filesjpg file icon 2010-07-03_SummonBoatPosition.jpg [^] (440,740 bytes) 2010-07-03 03:32


? file icon  VCMI_Tests.h3m [^] (12,527 bytes) 2010-07-03 03:35

- Relationships
related to 0002791resolvedSXX Crash when AI try to buy a boat outside of map 

-  Notes
(0006117)
SXX (administrator)
2015-11-25 16:56
edited on: 2015-11-25 16:56

"Summon boat" spell still fail to summon boat on position "6" from this task description in current git.

(0006119)
SXX (administrator)
2015-11-26 07:10
edited on: 2015-11-26 07:11

Looks like issue related to the fact that IBoatGenerator::bestLocation use "pos" of object and looks like hero position is displaced due "h3m" thingy.

(0006120)
SXX (administrator)
2015-11-26 07:21

BTW we really need to get rid of that "convertPosition"...
(0006121)
SXX (administrator)
2015-11-26 08:03

Applied temporary fix:
https://github.com/vcmi/vcmi/commit/c45cd1f4c284232275a9662e7f519d707d1af555 [^]

Though once I have time on that I'll try to get rid of convertPosition. Can't do that now because it's would require a lot of testing.
(0008636)
Ivan (developer)
2023-06-21 15:30

Fixed in https://github.com/vcmi/vcmi/pull/2243 [^]

- Issue History
Date Modified Username Field Change
2010-07-03 03:32 Zamolxis New Issue
2010-07-03 03:32 Zamolxis File Added: 2010-07-03_SummonBoatPosition.jpg
2010-07-03 03:35 Zamolxis Description Updated View Revisions
2010-07-03 03:35 Zamolxis File Added: VCMI_Tests.h3m
2015-11-13 21:11 SXX Assigned To => SXX
2015-11-13 21:11 SXX Status new => assigned
2015-11-25 16:56 SXX Note Added: 0006117
2015-11-25 16:56 SXX Note Edited: 0006117 View Revisions
2015-11-26 07:10 SXX Note Added: 0006119
2015-11-26 07:11 SXX Note Edited: 0006119 View Revisions
2015-11-26 07:21 SXX Note Added: 0006120
2015-11-26 08:03 SXX Note Added: 0006121
2017-09-12 13:27 SXX Relationship added related to 0002791
2023-06-21 15:30 Ivan Note Added: 0008636
2023-06-21 15:30 Ivan Status assigned => resolved
2023-06-21 15:30 Ivan Resolution open => fixed

Site | Forums | Wiki | Slack | GitHub


Copyright © 2000 - 2024 MantisBT Team
Hosting provided by DigitalOcean