Strat Modifiers for Tech-Tree-Specific Research Rates?

Moderator: Makail

Post Reply
Erebus Alpha
Posts: 9
Joined: Wed Aug 29, 2018 7:41 am

Strat Modifiers for Tech-Tree-Specific Research Rates?

Post by Erebus Alpha » Fri May 10, 2019 5:05 pm

I noticed there is a <PsiResearchModifier> option, which allows races to research Psionic techs at different rates. And also a <C3ResearchModifier> option, for modifying C3 research rates.

But suppose I wanted to modify the rate at which a race researches torpedo techs. Or ballistics. Or engineering. What are the modifiers to do this?

We know with absolute certainty that these values are modifiable on a per-tree basis - by building research modules. I just cannot seem to find the syntax necessary to do it. Opening up the sn_lab module file was not even the slightest bit helpful.

I went hunting through the tech tree and found this. A bunch of <FactionDefined> variables were set to false, all of them except psionics and cybernetics. I switched them all to true. So this is probably the first necessary step, for modifying the rates of all research trees independently on a per-race basis.

Code: Select all

  <TechFamilies>
    <Family>
      <Name>EnergyWeapons</Name>
      <Id>EWP</Id>
      <Icon>.\icons\energyweaps_tree.bmp</Icon>
      <FactionDefined>True</FactionDefined>
    </Family>
    <Family>
      <Name>Torpedos</Name>
      <Id>TRP</Id>
      <Icon>.\icons\torptech_tree.bmp</Icon>
      <FactionDefined>True</FactionDefined>
    </Family>
    <Family>
      <Name>EnergyTechnology</Name>
      <Id>NRG</Id>
      <Icon>.\icons\energytech_tree.bmp</Icon>
      <FactionDefined>True</FactionDefined>
    </Family>
    <Family>
      <Name>WarheadTechnology</Name>
      <Id>WAR</Id>
      <Icon>.\icons\warheadtech_tree.bmp</Icon>
      <FactionDefined>True</FactionDefined>
    </Family>
    <Family>
      <Name>BallisticWeapons</Name>
      <Id>BAL</Id>
      <Icon>.\icons\ballisticweaps_tree.bmp</Icon>
      <FactionDefined>True</FactionDefined>
    </Family>
    <Family>
      <Name>BioTechnology</Name>
      <Id>BIO</Id>
      <Icon>.\icons\biotech_tree.bmp</Icon>
      <FactionDefined>True</FactionDefined>
    </Family>
    <Family>
      <Name>IndustrialTechnology</Name>
      <Id>IND</Id>
      <Icon>.\icons\industrialtech_tree.bmp</Icon>
      <FactionDefined>True</FactionDefined>
    </Family>
    <Family>
      <Name>C3Technology</Name>
      <Id>CCC</Id>
      <Icon>.\icons\c3tech_tree.bmp</Icon>
      <FactionDefined>True</FactionDefined>
    </Family>
    <Family>
      <Name>PoliticalScience</Name>
      <Id>POL</Id>
      <Icon>.\icons\polsci_tree.bmp</Icon>
      <FactionDefined>True</FactionDefined>
    </Family>
    <Family>
      <Name>Engineering</Name>
      <Id>ENG</Id>
      <Icon>.\icons\engineering_tree.bmp</Icon>
      <FactionDefined>True</FactionDefined>
    </Family>
    <Family>
      <Name>RiderTechnology</Name>
      <Id>BRD</Id>
      <Icon>.\icons\ridertech_tree.bmp</Icon>
      <FactionDefined>True</FactionDefined>
    </Family>
    <Family>
      <Name>ShieldTechnology</Name>
      <Id>SLD</Id>
      <Icon>.\icons\shield_tree.bmp</Icon>
      <FactionDefined>True</FactionDefined>
    </Family>
    <Family>
      <Name>Psionics</Name>
      <Id>PSI</Id>
      <Icon>.\icons\psionictech_tree.bmp</Icon>
      <FactionDefined>True</FactionDefined>
    </Family>
    <Family>
      <Name>DriveTechnology</Name>
      <Id>DRV</Id>
      <Icon>.\icons\drivetech_tree.bmp</Icon>
      <FactionDefined>True</FactionDefined>
    </Family>
    <Family>
      <Name>Cybernetics</Name>
      <Id>CYB</Id>
      <Icon>.\icons\cybernetics_tree.bmp</Icon>
      <FactionDefined>True</FactionDefined>
    </Family>
  </TechFamilies>
Thanks to <C3ResearchModifier>, we know with certainty that the <[X]ResearchModifier> strat modifier, where [X] represents a specific tech tree (shields, or biology, or drive tech, or whatever) does NOT correspond precisely to the three-letter tech ID. Otherwise <C3ResearchModifier> would be <CCCResearchModifier>.

What are the strat modifiers necessary to change, say, the energy weapon tree's research modifier?

I am envisioning a tech tree with 100% research chances on all techs. But with heavy variance in the effective cost of the tech trees. Sure, the Liir could research siege drivers, accelerator amplification, and neutronium rounds - but the ballistic tree would be an EXPENSIVE one for them.

User avatar
Rossinna-Sama
Posts: 1723
Joined: Sun Nov 11, 2012 5:38 am

Re: Strat Modifiers for Tech-Tree-Specific Research Rates?

Post by Rossinna-Sama » Sat May 18, 2019 10:34 pm

Faction Defined determines if all factions can access that tree or if they need their own entries in every faction file, such as how Loa works with Psionics and Cybernetics. PH used it a while ago to restrict the ballistic tree for the Loa but the AI really doesn't like it so it really isn't suggested unless you're working on an MP-only mod with no AI players.

As for the research modifiers, that's actually not supported since only the entries found within the sots2_managed.dll can be used with those being:

PsiResearchModifier,
C3ResearchModifier,
LeviathanResearchModifier,
AsteroidMonitorResearchModifier

Trying to use any others won't work as the code doesn't know what to do with them. It's more work but you could try making faction specific tech entries for certain techs you want to be discounted or more expensive for certain factions or to restrict them from something.
Sword of the Stars 2 : Project Hiver Modder
Creator of the Work-In-Progress Seimei Visual Novel series.
My dream game: Combination of Sword of the Stars 2, Angels Fall First, Conquest: Frontier Wars and Warzone 2100.

Post Reply

Return to “Modding”

Who is online

Users browsing this forum: No registered users and 2 guests