View Issue Details

IDProjectCategoryLast Update
0025315AI War 2Bug - GameplayDec 17, 2021 9:04 pm
ReporterRocketAssistedPuffin Assigned ToChris_McElligottPark  
Status resolvedResolutionfixed 
Product Version3.301 I Always Wanted To Be A Ghostbuster... 
Fixed in VersionBeta 3.765 Easier Upgrades And Necromancer Surge 
Summary0025315: Larger Gravity Wells have fewer Guard Posts
DescriptionThis happens on Grand and up at least. Planets like AI Homeworlds start to have fewer Posts at that point, and higher settings can result in having just 1.

Other, normal planets can have no Posts as well.
TagsNo tags attached.

Activities

RocketAssistedPuffin

Jun 21, 2021 8:26 am

reporter  

Image1.jpg (295,388 bytes)
Image2.jpg (238,554 bytes)   
Image2.jpg (238,554 bytes)   

RocketAssistedPuffin

Jun 23, 2021 11:02 am

reporter   ~0062236

Appear to have made a discovery.

The cause of this I think is in the "GuardPostAndCommandPlacers", specifically ones which do not use something else as a reference, such as "TwelveSpreadOutGuardPosts".

Ones that use something as a reference, such as "GuardingMetalDeposits", will spawn correctly, in the right number and next to every Deposit, regardless of where it is.

If it doesn't use a reference, such as "TwelveSpreadOutGuardPosts", the only Posts that will appear are those in the center of the gravity well.

The size of this "center" seems consistent, so as the Gravity Wells get larger, the "center" is smaller relatively, so Posts are more likely to be placed outside of it, and thus fail to spawn.
NormalHarvesterSpots.jpg (212,360 bytes)   
NormalHarvesterSpots.jpg (212,360 bytes)   
SpreadOutButOnly1InCenter.jpg (240,239 bytes)   
SpreadOutButOnly1InCenter.jpg (240,239 bytes)   

RocketAssistedPuffin

Jun 23, 2021 11:10 am

reporter   ~0062237

The previous 2 images were on "Colossal, 400k", apologies.

Here is "TwelveSpreadOutGuardPosts" on "Grand, 148k".

Still clustered in the center, but fewer are missing. This appears to be consistent on every world I look at.
MorePostsOnGrand.jpg (256,265 bytes)   
MorePostsOnGrand.jpg (256,265 bytes)   

RocketAssistedPuffin

Jun 23, 2021 8:03 pm

reporter   ~0062268

Helper_SeedRandomDisperse( Context, ThisPlanet, pointsToAvoid, pointsToSeed, NumberToSeed,
                FInt.FromParts( 0, 050 ), FInt.FromParts( 0, 900 ),
                FInt.FromParts( 0, 150 ), FInt.FromParts( 0, 250 ),
                FInt.FromParts( 0, 50 ), FInt.FromParts( 0, 20 ), TypeDataForTesting, out seededCount );


Appear to have narrowed it down to this. Those "FromParts" are these, left to right, top to bottom:

minDistanceFromCenter
maxDistanceFromCenter
minDistanceFromWormholes
minDistanceFromOtherPoints
addedToDistanceFromCenterPerFail
addedToDistanceFromWormholesPerFail

If both MinDistanceFromWormholes and minDistanceFromOtherPoints are modified to be very low values, all the Posts spawn tightly together in the center.

If I put maxDistanceFromCenter up, Posts start reappearing on the outsides of the gravity well.

It seems to...not have any scaling built into it? Getting confused now.

tom.prince

Oct 24, 2021 10:28 pm

developer   ~0062995

I was digging into this, and I think it is due to (pre-variable gravity well sizes), a bunch of things used percentage of a gravity well as a measure of distance. And, with the update to have variable size gravity wells, *some* of those things want to vary based on the planets gravity well, and some don't. There is a constant xternalConstants.Instance.MultiplierBase_GravwellRadius_ForUnitsSeedingNearAnother for ones that don't want to vary.

Looking at `TwelveSpreadOutGuardPosts` (and its callees), the minDistanceFromWormholes and minDistanceFromOtherPoints are both scaled using the gravity well size (in AIGuardPostAndCommandPlacers_Base.Helper_GetPointAroundACenterButNotTooCloseToOtherItems) but minDistanceFromCenter and maxDistanceFromCenter are not scaled with gravity well size (in PlanetExtensions.GetSafePlacementPoint_AroundDesiredPointVicinity). I think those are backwards (at least for TwelveSpreadOutGuardPosts, I'm not sure about other callers). I think that leads to all of the posts trying to spawn near the center, but not being able to spawn more than one that is far enough from the others.

tom.prince

Oct 24, 2021 11:06 pm

developer   ~0062996

Looking at the code some more, I think Helper_SeedRandomDisperse wants min/maxDistance scaled with gravity well size (and perhaps also minDistanceFromOther/Wormhole), which it could do by eventually calling PlanetExtensions.GetSafePlacementPointAroundPlanetCenter instead of GetSafePlacementPoint_AroundDesiredPointVicinity.

However, it currently calls those functions via Helper_GetPointAroundACenterButNotTooCloseToOtherItems, whose other callers (Helper_SeedAroundWormholes, Helper_SeedAroundPoint) *don't* want min/maxDistance scaled with gravity well size (or, at likely not to the same degree that Helper_SeedRandomDisperse does. Thus, it will need to be refactored or split, I think.

Chris_McElligottPark

Dec 10, 2021 10:34 am

administrator   ~0063448

Thanks!

* Guard post seeding has been updated substantially, and there should no longer be oddities on larger gravity well sizes.

RocketAssistedPuffin

Dec 17, 2021 8:49 pm

reporter   ~0063502

Now noticing it again when looking around AI worlds. The slow galaxy generation is there as well.

RocketAssistedPuffin

Dec 17, 2021 9:04 pm

reporter   ~0063503

Went and double checked and it's CF specific...bah. Silly me.

Issue History

Date Modified Username Field Change
Jun 21, 2021 8:26 am RocketAssistedPuffin New Issue
Jun 21, 2021 8:26 am RocketAssistedPuffin File Added: Image1.jpg
Jun 21, 2021 8:26 am RocketAssistedPuffin File Added: Image2.jpg
Jun 23, 2021 11:02 am RocketAssistedPuffin Note Added: 0062236
Jun 23, 2021 11:02 am RocketAssistedPuffin File Added: NormalHarvesterSpots.jpg
Jun 23, 2021 11:02 am RocketAssistedPuffin File Added: SpreadOutButOnly1InCenter.jpg
Jun 23, 2021 11:10 am RocketAssistedPuffin Note Added: 0062237
Jun 23, 2021 11:10 am RocketAssistedPuffin File Added: MorePostsOnGrand.jpg
Jun 23, 2021 8:03 pm RocketAssistedPuffin Note Added: 0062268
Oct 24, 2021 10:28 pm tom.prince Note Added: 0062995
Oct 24, 2021 11:06 pm tom.prince Note Added: 0062996
Dec 10, 2021 10:34 am Chris_McElligottPark Assigned To => Chris_McElligottPark
Dec 10, 2021 10:34 am Chris_McElligottPark Status new => resolved
Dec 10, 2021 10:34 am Chris_McElligottPark Resolution open => fixed
Dec 10, 2021 10:34 am Chris_McElligottPark Fixed in Version => Beta 3.765 Easier Upgrades And Necromancer Surge
Dec 10, 2021 10:34 am Chris_McElligottPark Note Added: 0063448
Dec 17, 2021 8:49 pm RocketAssistedPuffin Note Added: 0063502
Dec 17, 2021 9:04 pm RocketAssistedPuffin Note Added: 0063503