[Modding][Question/Request] Planet bonus tiles

Is there a way to make the bonuses from the planet features (ex: Natural Wonder) act for all the improvements of the same type built on the planet instead of only the primary tile and the adjacent tiles (level bonuses)?

So, if a planet feature gives +2 levels to manufacturing improvement on the primary tile, all the manufacturing improvements built on the planet gain the +2 level bonus; and if the same planet feature gives +1 level to research improvements on the adjacent tiles, all the research improvements built on the planet gain +1 level bonus.

This way, the "planet features" become "colony" bonuses instead of "tile" bonuses.

The same for the improvements adjacency bonuses, and the trade resources adjacency bonuses.

The "adjacency bonuses" are removed for the improvements, the planet features and the trade resources on the planet to become "colony bonuses".

So, basically, the level bonuses from the improvements, the planet features, and the trade resources become effective for all the improvements of the same type built on the planet, and the adjacency bonuses due to the location of the improvements on the planet are removed.

The goal here, is to reduce the micromanagement time for the construction of improvements for the player, and, at the same time, it doesn't matter if the AI builds the wrong improvements on the tiles with the planet features, all the bonuses are always useful.



|-) :) ;) B) ***** If that is not possible, consider it as a request. ***** B) ;) :) |-)

5,426 views 3 replies
Reply #1 Top

Planet features are defined in PlanetFeatureDefs.XML; try adding <Scope></Scope> tags to them after the <EffectType></EffectType> tags and before the <Target></Target> tags, and see if you can find a value that affects everything on the planet. I don't know of anything in the base game that provides +X levels to everything on the colony, however, so there might not be a valid scope for what you're trying to do. Improvements.XML is the only place I know of where you might be able to find something which does have such a scope.

Unless I'm missing something, the valid values of <Scope></Scope> are

  <xs:simpleType name="ScopeTypes">
    <xs:restriction base="xs:string">
      <xs:enumeration value="Local"/>
      <xs:enumeration value="Global"/>
      <xs:enumeration value="Fleet"/>
      <xs:enumeration value="AreaEffect"/>
      <xs:enumeration value="ZOC"/>
      <xs:enumeration value="Queue"/>
      <xs:enumeration value="UPResolutionGalaxy"/>
    </xs:restriction>
  </xs:simpleType>

none of which seem likely to be what you want. Nevertheless, I might suggest trying 'Local' to see what happens.

Reply #2 Top

@joeball123

I tried to add the <Scope>Local</Scope> line in the file, but it seems to do nothing.

I cannot test more at this time as the game keeps to crash, despite a full reinstall, so I will wait for next patch.

Thank you for your responses in this thread and in the other Modding topics. :)

Reply #3 Top

So, between two crashes, :) I tried to add this in the "Stats section" for an improvement:

<!-- Stats -->

<Stats>
<EffectType>Level</EffectType>
<Scope>Global</Scope>
<Target>
<TargetType>Improvement</TargetType>
<ImprovementType>Manufacturing</ImprovementType>
</Target>
<BonusType>Flat</BonusType>
<Value>1</Value>
</Stats>

This works at a global level, each manufacturing improvement built on any planet adds 1 level to all manufacturing improvements built on all planets.

So, this can be used to make a specific improvement, per example limited to 1 improvement per civ, as it's quite powerful.

I tried next to limit the effect to only the improvements built on the planet, with this:

<Scope>Local</Scope> --> Allowed, but does nothing.

<Scope>Colony</Scope> --> Not allowed.

<Scope>Planet</Scope> --> Not allowed.


Is that possible in the current game engine?