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

8 hours ago, FeXoR said:

It would be nice to be able to paint passability in atlas as terrain textures and elevation.

A 1 or more paintable "layer" in atlas would be nice for this. But in meantime, my placement obstructor makes up the difference.

Edited by wowgetoffyourcellphone
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...