(0001014)
|
Zamolxis
|
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.
|
|