[Modding][Question/Request] Tech

Is there a way to make a tech impossible to trade to/by a specific race?

Examples:

This tech cannot be traded to this civilization.

This tech cannot be traded by this civilization.

*

Is there a way to make a tech gives malus/bonus to relations (diplomacy) with other civs if researched?

Per example, if this tech is researched by civ A, civ A gets -2 to relations with civ X, and +1 to relations with civ Y.



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

5,166 views 4 replies
Reply #1 Top

Ignore me, forums is showing all your posts in general chat.

Reply #2 Top

Is there a way to make a tech impossible to trade to/by a specific race?

Yes, there are untradeable techs within the Yor tech tree. It has its own tag.

To have a tech impossible to acquire, you still add that tech to the tech tree without a parent tech. This makes both player and (surprisingly)AI unable to research or acquire the tech by trading.

[edit] The tag is called AICannotTrade, which is a boolean true/false.

Is there a way to make a tech gives malus/bonus to relations (diplomacy) with other civs if researched?
 
Probably there isn't a way. One alternative to receive a new treaty that is automatically signed by all factions that have the technology.

For race specific relations there is only the "HatesFaction" tag in FactionDefs, which was created for the Iconians, who hate the Yor. Yor probably don't have a emotion called "hate".

Reply #3 Top


Is there a way to make a tech gives malus/bonus to relations (diplomacy) with other civs if researched?

    <Stats>
      <EffectType>Diplomacy</EffectType>
      <Target>
        <TargetType>Faction</TargetType>
      </Target>
      <BonusType>Flat</BonusType>
      <Value>1</Value>
    </Stats>

Add that to the tech that you want to give a bonus or malus; remember to change the <Value>1</Value> line to something appropriate for what you want. I expect that you could also change the <BonusType>Flat</BonusType> to <BonusType>Multiplier</BonusType>, but I'm not certain. This works in technologies; it's used in the Terran tech tree for TerranDiplomaticSpecialization1, and based on RaceTraitDefs.XML you can use negative numbers in the value line.

Reply #4 Top

When it comes to Unknown_Hero, you have to read between the lines, he/she seems to always ask the tough stuff:

if this tech is researched by civ A, civ A gets -2 to relations with civ X, and +1 to relations with civ Y.