Jump to content

Placement Obstructor for Atlas


wowgetoffyourcellphone
 Share

Recommended Posts

Hey guy. So, on some maps the AI builds things in bad places, like choke points and pathways. This is a major problem on maps like Acropolis where paths down from the top of the starting area should not be blocked. The AI often will block these paths with buildings, mainly houses. So, I have make obstructor to prevent this.

It prevent building construction and placement, but does not block pathfinding. It is only visible in Atlas. Attached is the template file if you wanr to use it for vanilla or your mod.

 

screenshot1118.jpg

 

<?xml version="1.0" encoding="utf-8"?>
<Entity parent="template_entity_full">
  <Footprint>
    <Square width="38.5" depth="7.0"/>
    <Height>9.0</Height>
  </Footprint>
  <Obstruction>
    <Active>true</Active>
    <BlockMovement>false</BlockMovement>
    <BlockPathfinding>false</BlockPathfinding>
    <BlockFoundation>true</BlockFoundation>
    <BlockConstruction>true</BlockConstruction>
    <DisableBlockMovement>false</DisableBlockMovement>
    <DisableBlockPathfinding>false</DisableBlockPathfinding>
    <Static width="37.0" depth="6.0"/>
  </Obstruction>
  <Selectable>
    <Overlay>
      <Outline>
        <LineTexture>outline_border.png</LineTexture>
        <LineTextureMask>outline_border_mask.png</LineTextureMask>
        <LineThickness>0.4</LineThickness>
      </Outline>
    </Overlay>
  </Selectable>
  <Visibility>
	<RetainInFog>true</RetainInFog>
	<AlwaysVisible>false</AlwaysVisible>
	<Corpse>false</Corpse>
	<Preview>false</Preview>
  </Visibility>
  <VisualActor>
    <Actor>structures/hellenes/wall_long.xml</Actor>
    <SilhouetteDisplay>false</SilhouetteDisplay>
    <SilhouetteOccluder>false</SilhouetteOccluder>
    <VisibleInAtlasOnly>true</VisibleInAtlasOnly>
  </VisualActor>
</Entity>

 

A few minor problems:

I don't know what DisableBlockMovement and DisableBlockPathfinding mean, lol. Regardless, it seem to work as needed.

And, also, the tooltip in-game when preventing the placement of building says something about can't place new building over an existing building. Obviously the player cannot see a building there, so might get frustrated. This is minor, since most human player will not choose to block the path with buildings in most instances. 

 

 

placement_obstructor.xml

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...