#Semi-off placed mexes don't grant full metal income
1 messages · Page 1 of 1 (latest)
all mexes you are able to build should grant full metal value, either tighten the snapping or remove the metal proration
that sounds really…odd to me. like i’m pretty sure that’s not how the game is coded at all. my guess for better explanations:
- you were in an estall which sort of fixed itself briefly due to your lab turning off briefly while your incisor rolls off in this screenshot. this results in reduced income mexes even without the energy stall icon
- you just built this mex. it seems mex UI takes a second to spin up to full income?
if i had to guess, the former
Yeah. I always build my Mex offset. Never saw this...behavior. Must be a bug
it's not, I've had this bug in several games and seen it while spectating. it's uncommon but it does happen.
there's no con nearby so obv it wasn't built just now
can you send the replay? i am curious
could also be useful to any bugfixing devs
Iirc the threshold for mex placement is made bigger for snap to always find a spot on a 16x16 grid, while manual mexes are placed on a 8x8 grid.
The threshold is too big and allows placement with an additional 8-offset in one or two direction which excludes multiple squares from the metal extractor range.
Iirc when mex snap is used, this does not happen.
But some cases of mexsnap not finding a spot and manual targetting being able to place with an 8 offset happen from times to times
If you can confirm this always happens 1/ with mex snap entirely disabled or 2/ in a situation where mex snap does not find a valid spot (no line showing that the building is displaced to the build pos) despite the mex being buildable
Then that would confirm previous findings on that
One of the fix is reducing the threshold. ^^
Reason i haven't pr-ed a bandaid fix is I havent tested enough to be sure it doesnt create any new issue.
i stand corrected. apparently the game is coded like that 😅
I vaguely remember a reason for this could be that metal spots are defined on a separate texture for the engine. Imagine an image in black and white. A full white pixel will give full metal income for that grid box. However its possible that a few maps have metal spots where this texture is not fully "sharp", meaning that the edges for (some of) the spots are "grey" instead of black or white. This causes the engine to grant partial income for the metal extractor.
Iirc it does not really matter. As long as the extractor radius covers a whole spot, the spotsize is post processed in lua to include the whole spot and not just the full white areas.
I don't think there is a minimal metal squarr value beyond just > 0.
So these squares should be included when performing placement checks.
exhibit B
Also there's this iirc
The grid is 16x16 and shows metal squares
the circle is an extractor radius of 16
green areas are "cells" considered within radius
based on wether cell center is within radius
so same radius, different number of cells
we need extraction radii that don't have such variations in amount of seen metal squares
globally bigger radii are ok, but small ones aren't
Forcing to place on 16x16 grid would work but i think people would be pissed not being able to place
and chrono, yeah that's what i seen
that second placed mex
bypassed mexsnap i think
because there's already a mex on the spot
so you manually placed it
the metal spot finder api still validated something that isn't actually within range
because of that threshold
it's 8-elmos ofset in probably both directions
(you can compare its placement vs the being built one)
so it has suboptimal radius placement
it does not see the furthest metal squares
try disabling mex snap altogether, and you should be able to reproduce without having that other mex on it
but with mex snap, that should never happen in the spot is entirely free
is that really how it works? squares all the way down lol
There may be some specific broken mex spots on specific maps.
Basically in the underlying metal map you're supposed to make metal spots like this:
But sometimes if you use a rendered metal map rather than handcrafted one they end up something like this:
And then the mex will snap widget will threat the orphan dot in the metal map as a separate mex spot.
You can also place 1 mex between 2 spots if they're close together and get some income from both, works on rcr 
Unplayable 
We should prolly align metal extractors on the metal map grid tbh
Always fall into case 1 of my image so the underlying pattern is predictable and extractorRadius directly maps to the number of seen squares
you can generally tell whether something is gonna give reduced metal it's quite far off
-# why do we even allow extractors to be build so far out
We don't really, but nobody has bothered to remake old maps or enforce it on them some other way.
Can we bandaid fix this with a gadget that just always gives full metal even if it shouldn’t according to the engine?
needs to be fixed
This is the eventual wanted fix which is why it hasn't been done yet
We were over designing metal spots when we came up with that though
Into metal spots, metal clouds, and metal maps