Opened 8 years ago

Closed 7 years ago

Last modified 2 years ago

#3746 closed defect (fixed)

Fish on land

Reported by: Odelpasso Owned by: elexis
Priority: Should Have Milestone: Alpha 21
Component: Maps Keywords: simple
Cc: Patch: Phab:D1729, Phab:D4315

Description (last modified by Langbart)

Hi,

There is a problem with the fish location when i want to fish. In fact, the fish is not in the sea but on the ground. Like you can see on the screenshot.

http://hpics.li/0e2eddf

Odelpasso

Related ticket:

Attachments (1)

commands.txt (890.5 KB ) - added by elexis 8 years ago.
Here an a19 replay of the random map script "Archipelago" where fish is on land in multiple places. Notice that fish and trees are the last entities to be placed and fish avoids the class clLand. By changing the perspective to gaia, one can press the Alt button and doubleclick on a single fish spot to select all fish on a map.

Download all attachments as: .zip

Change History (8)

comment:1 by elexis, 8 years ago

Component: Art & AnimationMaps

Happens on many maps. Which map is that on the screenshot?

by elexis, 8 years ago

Attachment: commands.txt added

Here an a19 replay of the random map script "Archipelago" where fish is on land in multiple places. Notice that fish and trees are the last entities to be placed and fish avoids the class clLand. By changing the perspective to gaia, one can press the Alt button and doubleclick on a single fish spot to select all fish on a map.

comment:2 by FeXoR, 8 years ago

The usage of tile classes - even more their names - are entirely up to the map designer.

There are several ways to ensure fish does not wind up at land.

IMO maps should be carefully tested before adding them. The designer is likely most reachable at this point to fix bugs that may be found.

In the long run it would be really convinient if the engine would simply remove invalid placed entities but I don't see that happen (and in some cases it's actually hard to determine what "invalid" means).

This is somehow related to collision detection (see https://wildfiregames.com/forum/index.php?/topic/16242-random-maps-suggestions-bug-reports-and-ideas-about-random-maps-here/&do=findComment&comment=297569). A passability map and further placement checks e.g. for buildings would be nice to have. That would mean much work though to simulate the placement restrictions in RMGen since none of those are in shared libraries.

Still a "detect possible unwanted placement" function or so would be nice to have at least for debug purposes - or as a mean of cleanup, wich on the other hand would encourage sloppy scripting ... so maybe not.

comment:3 by elexis, 8 years ago

Keywords: simple added
Summary: Wrong location for the fishFish on land

The task for this ticket is to ensure that fish isn't placed on land.

Confirmed maps: archipelago (see replay above) Probably affected maps: Unknown, Unknown Nomad, Islands, Migration.

It might be sufficient to mess with the tileclasses and distances. Perhaps the clLand is painted incorrectly, for a wrong elevation.

comment:4 by elexis, 7 years ago

Owner: set to elexis
Resolution: fixed
Status: newclosed

In 18870:

Don't place fish on land on the random map archipelago, fixes #3746.

comment:5 by elexis, 7 years ago

Milestone: BacklogAlpha 21

This is the only random map script affected by this bug. Every other map either places the clWater / clLand class correctly (i.e. for exactly the tiles that are water/land) or also avoid the clPlayer class which on those maps stands for the initial player base terrain.

This was really easy to find out by just placing a thousand mines on the map wherever clLand would be.

comment:6 by Langbart, 2 years ago

Description: modified (diff)
Patch: Phab:D1729, Phab:D4315

comment:7 by Freagarach, 2 years ago

In 26003:

Missing tileclass in archipelago / fix fish on land.

This would cause fishes to be spawned on land under a specific set of conditions. Cases where the concerned land is not painted clPlayer for example (which fish also avoids).
Added by @marder: spacing of the forest and wood amount was corrected as the above pushed the wood away from the player.

Original patch by: @smiley
Additional changes by: @marder
Differential revision: https://code.wildfiregames.com/D1729
Comments by: @elexis
Tested by: @Freagarach
Fixes: #5797
Refs. #3746

Note: See TracTickets for help on using tickets.