#3836 closed defect (fixed)
[PATCH] Most maps can have inaccessible chickens
Reported by: | sanderd17 | Owned by: | elexis |
---|---|---|---|
Priority: | Must Have | Milestone: | Alpha 21 |
Component: | Maps | Keywords: | patch |
Cc: | Patch: |
Description
In attached replay, there's a chicken in the CC, which causes annoying behaviour with the cav.
Attachments (4)
Change History (13)
by , 8 years ago
Attachment: | commands.txt added |
---|
comment:1 by , 8 years ago
Milestone: | Alpha 20 → Backlog |
---|---|
Priority: | Should Have → Must Have |
Summary: | Lion's Den map can have inaccessible chickens → Most maps can have inaccessible chickens |
comment:4 by , 8 years ago
No, was just fixed for the new a20 maps. Many other maps still place chickens too close to the CC, so they might end up inside the CC. This seems to be only the case for the roman CC and is likely solvable by increasing the distance from 7 to 9.
by , 8 years ago
Attachment: | inaccessible_chicken_v1.patch added |
---|
Unifies the chicken placement code and increases minimum distance from 7 to 9.
comment:6 by , 8 years ago
Keywords: | patch rfc added |
---|---|
Milestone: | Backlog → Alpha 21 |
Summary: | Most maps can have inaccessible chickens → [PATCH] Most maps can have inaccessible chickens |
by , 8 years ago
Attachment: | inaccessible_chicken_v2.patch added |
---|
Passes fx and fz, removes unused chicken variable, patches some more maps that weren't exact dupes but some characters different.
by , 8 years ago
Attachment: | inaccessible_chicken_v3.patch added |
---|
Removes some more unused chicken variables, fixes wrong argument in corsica, reuse the function for ardennes forest, fix broken declaration in setup.js
comment:7 by , 8 years ago
Though there can still be problems (e.g. chicken and mines colliding) this patch is a definite improvement and should be committed.
comment:9 by , 8 years ago
Keywords: | rfc removed |
---|
Thanks for the review! I have also tested every individual map to guarantee that nothing broke!
This happens on most maps, for example
The bug occurs mostly with the roman CC, which has a footprint of 40x40 instead of 32x32. (See atlas with the settings above and different civs for player 1).
The minimum-distance of chickens need to be increased for all maps from
7
to9
. It should likely be a global constant, so it only needs to be changed in one place if the footprint changes.After the increase, one might run into collisions with metal/stone mines (mines don't try to
avoidClasses(clBaseResource,2)
and can also sometimes collide with each other).Unify chicken-placement code: Using the following command, one can see that almost all maps use
oChicken
when placing chickens (corsica.js
andoasis.js
useeChicken
,deep_forest
does it's own thing and _kalis maps usecreateBase
insetup.js
).With the next command, we can see that almost all maps use the exact same code (surprise):
Likely the same can be done with all the other RMS code %-l
If possible, the function
createBase
insetup.js
should just be used / adopted.