MantisBT

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000370VCMIMechanics - Adventure Mappublic2010-02-14 13:022011-11-01 12:25
ReporterBoulie 
Assigned ToTow 
PrioritynormalSeveritytweakReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version0.75d 
Target VersionFixed in Version0.82 
Summary0000370: Ship appears on the wrong (right) side of the shipyard. // EDIT: note added describing the rules for placing purchased boats
Descriptionif the shipyard is on the bottom side of the water.
See sreenshot.
Steps To Reproduceadded test map
TagsNo tags attached.
Attached Filesjpg file icon boat apears on the wrong side.jpg [^] (209,942 bytes) 2010-02-14 13:02


? file icon _test_SoD_map_upd.h3m [^] (2,635 bytes) 2010-07-04 21:35

- Relationships
related to 0000244closedTow Cannot buy boat if the shipyard is flagged with l-click (EDIT: added complete behavior for the 3-tile shipyard object) 
related to 0000103closedTow Bug with sailing - boat can sail through the edge of the land 

-  Notes
(0000981)
Warmonger (administrator)
2010-06-26 09:26

Looks like a problem with tile recognition. VCMI claims that all the tile apart from target are dirt, even though right shipyard can place a boat in same relative position. Probably related to 0000103.
(0001014)
Zamolxis (viewer)
2010-07-04 23:22
edited on: 2011-11-01 11:58

Unless I'm missing something, I believe this has nothing to do with 0000103, so I removed the relationship. I also updated the attached map with an altered version which can be of better help to test/prove the logic of boat placement if bought at shipyard.

Similar to 0000515, it's all about priorities. Assuming it'd be all water around a shipyard, OH3 had a hierarchy of all the tiles around the 3-tile shipyard in regards to the destination of the purchased boat. That is as follows:

H J L K I
A x.S.x B
C E G F D

In other words, that means:
- x.S.x is the 3-tile shipyard
- A to L are all the tiles around it in order of priorities, as detailed below
- first there is a priority of rows: middle > bottom > top
- then there is a priority of columns: extreme left > extreme right > middle left > middle right > middle
- H3 checks the tiles in the specified order, and rules out the following: land tiles + water tiles occupied by permanent objects (e.g. Shipwreck) + water tiles occupied by 'removable' objects (e.g.: Flotsam). If all surrounding tiles are occupied by these, we get the message with "...abandoned shipyard..." and we won't be able to use it, unless some of the objects are not fixed and we manage to remove them
- H3 does not rule out free water tiles or water tiles occupied by another boat*; the 1st tile that satisfies one of these two conditions is considered the designated destination tile (and only that, H3 does NOT look further if a boat is in there > we can choose if we want to keep this limitation, which is not particularly logic)
- If the designated tile is empty, the "Build A New Ship" opens if we enter a Shipyard or click on a Shipyard that we own (see also 0000244) and we can purchase a boat if we have the resources
- If the designated tile is occupied by a boat, we get the message "Cannot build another boat" (even if the boat there was not build at that shipyard, but just brought by a hero)

*H3 buggy behavior (I guess it's something they missed during the coding): When applying the above rules, H3 took into consideration only the situation in the beginning of the turn + boats purchased during the current turn + summoned/scuttled boats (including enemy boats destroyed in fight)
Consequence 1: If the shipyard was blocked by a Flotsam for example, just picking that up won't allow us to buy a boat that turn. H3 was able to update the tile status to "available for sail", but not to "available for placing purchased boat" (and I didn't test to see if it allowed summoned boats). That was updated only after End Turn. This is minor considering the chance of occurring, but annoying should it ever occur, so it would be nice if we don't "copy" this in VCMI.
Consequence 2: If one of our heroes in a boat moves on a "designated tile", H3 still places a purchased boat there, the 2 boats overlapping. Logically H3 should look for the next available tile, but I leave it up to the devs if this should be corrected, because I don't think this can lead to any frustrating situation for the player.

NOTES:
> Theodorus (has Admiral's Hat) & the upper-right shipyard are maybe best to use for tests.
> It'll be easier to run tests in VCMI for this one if you first take care of report 0000244, because currently we can't access owned shipyards just by clicking on them.

(0001015)
Warmonger (administrator)
2010-07-05 04:43
edited on: 2010-07-05 04:45

But these tiles are _not_ empty even though they should. I tried debugging and that's exactly what I've got. Bug is somewhere else but map parsing or pathfinding is not quite my pair of shoes.

(0001059)
Tow (developer)
2010-07-13 05:28

Implemented in r1649
Thank you for the thorough description.

@Warmonger
>Looks like a problem with tile recognition. VCMI claims that all the tile apart from target are dirt

I have not seen anything like that...
(0002116)
Zamolxis (viewer)
2011-11-01 12:25

Tested in 0.86 and confirmed as very nicely fixed/implemented (including fixing/enhancing H3 buggy behavior).

And btw, testing this gave me the chance to properly test the new pathfinder... sweet! :) Very nice job!

- Issue History
Date Modified Username Field Change
2010-02-14 13:02 Boulie New Issue
2010-02-14 13:02 Boulie File Added: boat apears on the wrong side.jpg
2010-02-14 13:03 Boulie File Added: _test_SoD_map.h3m
2010-06-03 08:39 Warmonger Status new => assigned
2010-06-03 08:39 Warmonger Assigned To => Warmonger
2010-06-10 09:25 Warmonger Category GUI - Adventure Map => Mechanics - Adventure Map
2010-06-26 09:26 Warmonger Note Added: 0000981
2010-06-26 09:26 Warmonger Relationship added related to 0000103
2010-07-04 20:49 Zamolxis File Deleted: _test_SoD_map.h3m
2010-07-04 20:50 Zamolxis File Added: _test_SoD_map_upd.h3m
2010-07-04 20:51 Zamolxis Relationship deleted related to 0000103
2010-07-04 20:56 Zamolxis Relationship added related to 0000244
2010-07-04 21:35 Zamolxis File Deleted: _test_SoD_map_upd.h3m
2010-07-04 21:35 Zamolxis File Added: _test_SoD_map_upd.h3m
2010-07-04 23:22 Zamolxis Note Added: 0001014
2010-07-04 23:31 Zamolxis Note Edited: 0001014 View Revisions
2010-07-04 23:35 Zamolxis Summary Ship appears on the wrong (right) side of the shipyard => Ship appears on the wrong (right) side of the shipyard. // EDIT: note added describing the rules for placing purchased boats
2010-07-05 04:43 Warmonger Note Added: 0001015
2010-07-05 04:44 Warmonger Note Edited: 0001015 View Revisions
2010-07-05 04:45 Warmonger Note Edited: 0001015 View Revisions
2010-07-05 07:03 Warmonger Relationship added related to 0000103
2010-07-09 04:58 Warmonger Relationship added related to 0000521
2010-07-10 01:49 Tow Relationship deleted related to 0000521
2010-07-13 05:28 Tow Note Added: 0001059
2010-07-13 05:28 Tow Status assigned => resolved
2010-07-13 05:28 Tow Fixed in Version => 0.89
2010-07-13 05:28 Tow Resolution open => fixed
2010-07-13 05:28 Tow Assigned To Warmonger => Tow
2011-11-01 11:57 Zamolxis Note Edited: 0001014 View Revisions
2011-11-01 11:58 Zamolxis Note Edited: 0001014 View Revisions
2011-11-01 11:58 Zamolxis Note Edited: 0001014 View Revisions
2011-11-01 12:25 Zamolxis Note Added: 0002116
2011-11-01 12:25 Zamolxis Status resolved => closed

Site | Forums | Wiki | Slack | GitHub


Copyright © 2000 - 2024 MantisBT Team
Hosting provided by DigitalOcean