FortressCraft Evolved

FortressCraft Evolved

Saravo Jun 2, 2018 @ 6:14am
Question to ore density (Bug in distance calculation post P20 for density)
Hi, at what range (x and y) are ores supposed to be at max density? The patch notes of P20 stated 256m, but I just tested this and at least on the surface this doesn't apply. Tested this on an old and a new world on P21 Nightly.
Last edited by Saravo; Jun 2, 2018 @ 2:30pm
< >
Showing 1-13 of 13 comments
Demerzel Jun 2, 2018 @ 6:48am 
There is no max density. They are just keep getting bigger and bigger.
Wariat117 Jun 2, 2018 @ 6:58am 
Originally posted by Demerzel:
There is no max density. They are just keep getting bigger and bigger.
they cannot be bigger than 2561 ore per block
Saravo Jun 2, 2018 @ 9:23am 
Yeah, I meant the density per ore block. P20 Changed this, so the ones near the base doesn't have that much ore per block (also visible by the ore texture). I think right now the density isn't increasing any more, even when you go farther away from the base . I went somewhat like 1000+ meters away from base in one direction and all veins still had a very low density per block, verified this by mining blocks manually and only got 1-2 ores per block (texture was also the one you get when a block is nearly depleted).

I think the density increased the further away from the base I got, but at a very low rate.
Wariat117 Jun 2, 2018 @ 9:59am 
out of curiosity I have tested it on p21-nightly

names of worlds weren't the same
To count amount of ore per block I have just divided vein size by amount of blocks in vein.


test 1
I have created world on the worst settings (greg/scarce)

Tin vein next to my base had 287 ore per block.
I have teleported to 2000 0 2000 and looked for closes vein of tin.
This tin vein had 507 ore per block.

Didn't test further




test 2
Another world, resources plentiful and the rest on default

Tin vein under my base had 264 ore per block. (this one was closer than greg one)
I have teleported to 2000 0 2000 and looked for closes vein of tin.
This tin vein had 507 ore per block. (lol)

It was a little strange so I have teleported to 264 0 0.
This tin vein had 320 ore per block.

Now I have teleported to 50000 0 0. (my character got strange seizures)
This ore vein had 1146 ore per block.
It's pretty far from the 2561 which is max...

Didn't test further




test 3
Everything default (rapid etc, just curiosity)

Tin vein under my base had 2560 ore per block.
/teleport 2000 0 2000
This tin vein have 2560 ore per block too.




Well... size increases but sloooowly and resourse level doesn't affect this... the ore veins on non rapid will maybe reach the max density at 150k meters away from base ;D
edit:
nope ;-; went to greg world and teleported to 150k...
arther has got seizures too... it's hard to scan anything because scanner shakes a lot...
but once i have managed to scan vein I have got 1280 ore per block ;d

Maybe it is max on non-rapid?
Last edited by Wariat117; Jun 2, 2018 @ 10:06am
Saravo Jun 2, 2018 @ 10:23am 
Could be, that 1280 is max on non-rapid. Nevertheless it would be nice to know if this behaviour is intended after P20 or if it is a bug in the ore creation :)

When it is indeed intended then I'll probably have to build kilometers of minetracks to keep the ore/bars coming and I'll have to change veins a lot more often than pre-P20.
Wariat117 Jun 2, 2018 @ 10:24am 
welp with the new freight cars that can carry 1k ore it might be possible

edit:
I have did another test and yeah non rapid max is 1280 and rapid max is 2560.

I thought that max is 2561 because antimatter drill is soo fast that it can mine more ore than the block contains ;D (And most of time it was 2561 in my case, now I have noticed 2577 and because of this tested again)
Last edited by Wariat117; Jun 2, 2018 @ 11:27am
Nedrith Jun 2, 2018 @ 1:59pm 
According to DJ this should be the math/code:

Originally posted by DjArcas:
Feel free to check my maths. The default richness is 1280.

if (lX < 0) lX = -lX;
if (lZ < 0) lZ = -lZ;

long lDist = lX + lZ;//Well, sqr dist
ushort lnDist = (ushort)Mathf.Sqrt(lDist);
lnDist *= 4;//0 to 4k @ 4k, but we'll clamp it so we hit max density at 256 metres
if (lnDist > 1024) lnDist = 1024; //0 at CPH, 1024 at 256 metres away
lValue = (ushort)(256 + lnDist);//256 -> 1280

Of course Wariat's testing suggests that DJ forgot to sqr dist unlike DJ's lDist line's comment suggest.

x=2000 z=2000 should be according to the code above sqrt(4000)*4 + 256 = 508 compared to the 507 Wariat got which doesn't take into account the closest tin vein from 2000 0 2000 which could decrease it by 1.

the 50000 0 0 one comes to 1150.

all of this means the largest vein should be when you are at 65536 blocks away from the CPH using X+Z as the distance math.

So yea either change veins often or build a lift to the T2 area and you (should?) be able to find decently sized T1 veins.

Last edited by Nedrith; Jun 2, 2018 @ 2:02pm
Saravo Jun 2, 2018 @ 2:13pm 
Yeah, but my problem is, that this also affects all other ores and as this formular is independend from y I fear what will happen to the t4 ores which already needed a lot of vein switching with the old pre-P20 ore calculation (before one reaches t2/t3 trenchers).
I really hope this is a math problem and not intended, otherwise I'll need to start a new world on rapid :(
Nedrith Jun 2, 2018 @ 2:24pm 
Originally posted by Rhofasul:
Yeah, but my problem is, that this also affects all other ores and as this formular is independend from y I fear what will happen to the t4 ores which already needed a lot of vein switching with the old pre-P20 ore calculation (before one reaches t2/t3 trenchers).
I really hope this is a math problem and not intended, otherwise I'll need to start a new world on rapid :(

It wouldn't be intended. Both last patch's notes and the above code's comments say that max richness should be at 256m away from the CPH.

The only question is whether DJ does a real distance formula lDist = SQRT(X^2 + Y^2) or just removes SQRT in it's entirety.

Personally I think richness = min(1024,(X+Z)*4) + 256 is the best way. Distance formula would be correct if horizontal tranasportation could go in the diagonal but it can't. Though you coul argue the player can travel in the diagonal which affects how quickly a player could get to the mining spot.
Saravo Jun 2, 2018 @ 2:30pm 
Ok, I edited the topic and lets hope DJ sees this one :)
Wariat117 Jun 2, 2018 @ 2:44pm 
Originally posted by Nedrith:
x=2000 z=2000 should be according to the code above sqrt(4000)*4 + 256 = 508 compared to the 507 Wariat got which doesn't take into account the closest tin vein from 2000 0 2000 which could decrease it by 1.
that's the closest I found :D
I have just used tin ping and walked to closest glowing vein, I have just wanted to see if it really increases.

That explains why the amount of ore per blocks wasn't exactly 507, it was "507.randomnumbers", numbers were low so I have rounded it to 507


Originally posted by Nedrith:
the 50000 0 0 one comes to 1150.
this is pretty close to my test too :D


Originally posted by Nedrith:
all of this means the largest vein should be when you are at 65536 blocks away from the CPH using X+Z as the distance math.
we need something to teleport ores lol




btw to anyone who is curius where the other guy found the math for ore density in the game:
https://steamcommunity.com/app/254200/discussions/0/1693795812297444720/?ctp=3#c1696048879943497208
Chris Jun 3, 2018 @ 1:05am 
Hope DJ will fix this bug.
Chris Jun 4, 2018 @ 9:01am 
Found nothing on trello...
< >
Showing 1-13 of 13 comments
Per page: 1530 50

Date Posted: Jun 2, 2018 @ 6:14am
Posts: 13