#4295 closed defect (fixed)
[PATCH] Berries on impassable mountains on ardennes forests
Reported by: | elexis | Owned by: | Ágoston Sipos |
---|---|---|---|
Priority: | Nice to Have | Milestone: | Alpha 22 |
Component: | Maps | Keywords: | patch |
Cc: | Patch: |
Description (last modified by )
Sometimes berries can be placed onto impassable mountains on the map ardennes forest. The women trying to pick them will not detect this.
The bug can be easily reproduced by increasing the number of berries by a factor of 100.
The placing of berries on that map does not consider explorableArea
like other calls. However adding that alone doesn't fix it, presumably because it only checks the x/y coordinate while neglecting the spatial size of the group.
It seems bad practice to use an array with points for explorableArea
. Instead it should probably just call addToClass
for those tiles, so that berries can do avoidClasses
with a bigger radius.
Bug reported by fatherbushido.
Attachments (5)
Change History (16)
comment:1 by , 7 years ago
Component: | UI & Simulation → Maps |
---|---|
Keywords: | simple added |
Priority: | Should Have → Nice to Have |
comment:2 by , 7 years ago
comment:3 by , 7 years ago
Original report by fatherbushido in irc one day before the ticket creation (a20 replay link offline unfortunately).
I'm not aware of any RMS change that would change the berry placement on that map. Since you could reproduce the bug, there is no reason to believe that it was fixed. You should find a way to reproduce it everytime (placing 10000 berries?) to prove the validity of the patch in practice. By placing thousands of mines in the clHill
territory you can visualize where that is painted.
Increasing some min-distance might be right as that is an error that exists all over the place in maps/random/
. Thus analyzing the other resources in ardennes forest for min-distance issues lies in the scope of this ticket too.
by , 7 years ago
Attachment: | lotsofberries.jpg added |
---|
This is spamming the map with cc. 6000 berries (distanced 4 from clHill, removed the min. distance between berries.) Increased 3 to 4 because some berries were partly on impassable so only few people could gather them at a time.
by , 7 years ago
Attachment: | lotsofmetal.jpg added |
---|
These are the metal mines on clHill
. No other territory than the impassable are having that class.
by , 7 years ago
Attachment: | ardennes_forest.js.patch added |
---|
I believe that this number changes solve the problem. (Animals can also get onto impassable if not modified.)
comment:4 by , 7 years ago
Keywords: | rfc added |
---|---|
Milestone: | Backlog → Work In Progress |
Owner: | set to |
Status: | new → assigned |
follow-up: 6 comment:5 by , 7 years ago
Keywords: | patch added |
---|---|
Summary: | Berries on impassable mountains on ardennes forests → [PATCH] Berries on impassable mountains on ardennes forests |
Could you attach an image with the current state?
follow-up: 7 comment:6 by , 7 years ago
Replying to vladislavbelov:
Could you attach an image with the current state?
With normal parameters? (I mean no bigger number of berry/animal spawns)
comment:7 by , 7 years ago
Replying to odoaker:
Replying to vladislavbelov:
Could you attach an image with the current state?
With normal parameters? (I mean no bigger number of berry/animal spawns)
Yep, an image of the patched version to compare with the previous one.
comment:8 by , 7 years ago
The proposed change is likely correct. I'm suspecting though that this problem can occur with other maps as well (in case someone is up for writing a megapatch and either rebasing this one or other RMS megapatches like #4326 in case this one is committed before (which shouldn't be too hard as the change is simple, just many occurances)). Notice decorative actors don't have a collision box.
by , 7 years ago
This is how the map normally looks like (not much change)
by , 7 years ago
These are the berries at a critical place, but they're still far away from impassable territory enough to be gathered from.
comment:9 by , 7 years ago
Thank you for your patch and screenshots, I suggest in future to crop screenshots (to have smaller size than 512 KiB, or you could resize, the main thing is visible changes) and insert here in comments [[Image(url to attached image)]]
to prevent downloads of images and look at them right here.
comment:11 by , 7 years ago
Description: | modified (diff) |
---|---|
Keywords: | simple rfc removed |
Milestone: | Work In Progress → Alpha 22 |
Thanks for the patch, sorry that we ignored it for so long!
Seems to me that the impassable territory is using the
clHill
tileclass properly, so just by increasing the avoiding distance from it to 3, no berry gets placed there or even too close to be picked. (Btw. it wasn't easy to reproduce the bug, it required multiple attempts. Maybe this problem is already fixed, just the solution wasn't attached to this ticket?)