How do visitors determine where to hang out?

Started by porcupine, December 14, 2014, 11:34:21 PM

Previous topic - Next topic

porcupine

Anybody figured this out?  I have a problem, my base has multiple entrances, two sides of a mountain.  On one side, I have a crashed ship, setting out maximum drone, and nowhere near the ability to take it (without loosing the colony of course).

On the other side, well, all my defenses.

I tried removing everything from my home region, and setting home just outside the side of the base in which I need help (and calling reinforcements) to no avail.  They congregate at my main defenses.

So how do visitors figure out where your home is?  Is it stockpiles?  Is it "claimed/owned" equipment?  It doesn't seem to be your home region..

Tynan

:D


public static IntVec3 RandomChillNearColonySpot(IntVec3 originCell)
{
System.Predicate<IntVec3> validator = c=>
{
if( !c.Standable() )
return false;

if( Find.RoofGrid.Roofed(c) )
return false;

if( !c.CanReachColony() )
return false;

if( !originCell.CanReach( c, PathMode.OnCell, TraverseMode.PassDoors, Danger.None ) )
return false;

return true;
};

for( int i=0; i<400; i++ )
{
Thing rootThing;

Building b;
Find.ListerBuildings.allBuildingsColonistCombatTargets.TryRandomElement(out b);
rootThing = b;

if( rootThing == null && Find.ListerBuildings.allBuildingsColonist.Count > 0 )
rootThing = Find.ListerBuildings.allBuildingsColonist.RandomElement();

if( rootThing == null && Find.ListerPawns.FreeColonistsCount > 0 )
rootThing = Find.ListerPawns.FreeColonists.RandomElement();

if( rootThing == null )
rootThing = Find.ListerPawns.ColonistsAndPrisoners.RandomElement();

IntVec3 c;
if( GenCellFinder.TryFindRandomMapCellNearWith( rootThing.Position, 12, validator, out c ) )
return c;
}

return GenCellFinder.RandomCellWith( validator );
}
Tynan Sylvester - @TynanSylvester - Tynan's Blog

porcupine

So I need to create a roof over the crashed ship, and have my boys hang out at it for awhile? :D

Seems a bit cheatey heh

Lost Cause

I like to build little stone temples around mine and keep them around forever!
It doesn't matter how many arms a colonist has as long as one of them is a Minigun!

Meridias

You might want to add in a check for "If where I'm standing is in the fire arcs of multiple turrets, this might not be a safe place to be." :)

Tynan

Quote from: Meridias on December 15, 2014, 10:48:16 PM
You might want to add in a check for "If where I'm standing is in the fire arcs of multiple turrets, this might not be a safe place to be." :)

Maybe not safe, but it's probably a FUN place to be!
Tynan Sylvester - @TynanSylvester - Tynan's Blog

StorymasterQ

Quote from: Tynan on December 15, 2014, 10:51:49 PM
Quote from: Meridias on December 15, 2014, 10:48:16 PM
You might want to add in a check for "If where I'm standing is in the fire arcs of multiple turrets, this might not be a safe place to be." :)

Maybe not safe, but it's probably a FUN place to be!

Because LOSING IS FUN!
I like how this game can result in quotes that would be quite unnerving when said in public, out of context. - Myself

The dubious quotes list is now public. See it here

Cimanyd

Quote from: StorymasterQ on December 16, 2014, 12:10:58 AM
Quote from: Tynan on December 15, 2014, 10:51:49 PM
Quote from: Meridias on December 15, 2014, 10:48:16 PM
You might want to add in a check for "If where I'm standing is in the fire arcs of multiple turrets, this might not be a safe place to be." :)

Maybe not safe, but it's probably a FUN place to be!

Because LOSING IS FUN!

The pirates and tribals certainly agree.
Some sort of psychic wave has swept over the landscape. Your colonists are okay, but...
It seems many of the scythers in the area have been driven insane.