Author Topic: Trait Mod help.  (Read 819 times)

Trickey

  • Newbie
  • *
  • Posts: 9
  • Karma: +0/-0
    • View Profile
Trait Mod help.
« on: April 23, 2015, 02:13:34 PM »
Hey Forum,

So, I got a friend of mine interested in Star Ruler. Last night, he posed an interesting question which I tried to solve, myself, and came up with no cigar for my efforts. The question is fairly simple in concept, but - with my attempt last night - I fear more complex in nature.

I introduced him to the Amaar shipset, and after tinkering with that for a few days, he decided to attempt to make a trait - a 'race trait'. Figured he could make an "Amaar" trait, massively overturn some of the advantages (Lasers, Armor, etc.) and stunt the growth in others (Shield Strength, Fuel Capacity, Cargo Space, and no other weapon types.), then completely shut off all the other traits from being taken to fully compensate.

I thought it to be a decent undertaking, but after four hours of screwing around with it, I got nowhere, and gained nothing but a migraine for my efforts. I would appreciate some help, guidance or advice - because as it is, the one time it actually appeared in-game, it boosted shields, and none of the restricted techs were restricted.

Code: [Select]
<trait_id=”Amaar_Ment”
name=”Amaar Mentality”
flavor=”Focusing heavily in optical and particle based weaponry, with a moderate specialty of using their armor efficiently, those that follow the Amaar philosophy will smite the heretics from the galaxy. ”
desc=”10% less Fuel and Ammo used; Increase Laser Range by 30% and Damage by 45%; Increase Armor and Hull HP by 20% and Mass by 5%” Cost=”5”; Decrease Shield Capacity and Cargo capacity by 50%.>
<hook type="alter" func="GATraits::resourceUsage" arg0="1.15"/>
<!-- Implented in GATraits.as -->
<hook type="alter" func="GATraits::improveEnergyWeapons" arg0="1.30" arg1="1.45" /> <!--Implemented in GATraits.as -->
<hook type="alter" func="GATraits::ultraDense" arg0="1.20" arg1="1.35" /> <!--Implemented in GATraits.as -->
<hook type="alter" func="subSysAlterations::increaseShieldAbsorption" arg0="0.50" />
<hook type="alter" func="Traits::increaseCargoSpace" arg0="0.50" />
<tag id="no_ballistics"/> <!--implemented in Available -->
    <tag id="no_missile"/> <!-- Implemented in Available -->
<conflict id="hard_project"/>
<conflict id="soft_project" />
<conflict id="super_rail"/>
<conflict id="weak_rail"/>
<conflict id="no_energy"/>
<conflict id="no_missile"/>
<conflict id="adv_warhead"/>
<conflict id="imp_torps"/>
<conflict id="dumb_torps" />
<conflict id="poor_warhead" />
<conflict id="no_ballistics"/>
<conflict id="no_energy"/>
<conflict id="economical"/>
<conflict id="ultra_dense" />
<conflict id="heavyweight" />
</trait>

Trickey

  • Newbie
  • *
  • Posts: 9
  • Karma: +0/-0
    • View Profile
Re: Trait Mod help.
« Reply #1 on: April 26, 2015, 04:37:01 PM »
Hey Forum,

So, I got a friend of mine interested in Star Ruler. Last night, he posed an interesting question which I tried to solve, myself, and came up with no cigar for my efforts. The question is fairly simple in concept, but - with my attempt last night - I fear more complex in nature.

I introduced him to the Amaar shipset, and after tinkering with that for a few days, he decided to attempt to make a trait - a 'race trait'. Figured he could make an "Amaar" trait, massively overturn some of the advantages (Lasers, Armor, etc.) and stunt the growth in others (Shield Strength, Fuel Capacity, Cargo Space, and no other weapon types.), then completely shut off all the other traits from being taken to fully compensate.

I thought it to be a decent undertaking, but after four hours of screwing around with it, I got nowhere, and gained nothing but a migraine for my efforts. I would appreciate some help, guidance or advice - because as it is, the one time it actually appeared in-game, it boosted shields, and none of the restricted techs were restricted.

Code: [Select]
<trait_id=”Amaar_Ment”
name=”Amaar Mentality”
flavor=”Focusing heavily in optical and particle based weaponry, with a moderate specialty of using their armor efficiently, those that follow the Amaar philosophy will smite the heretics from the galaxy. ”
desc=”10% less Fuel and Ammo used; Increase Laser Range by 30% and Damage by 45%; Increase Armor and Hull HP by 20% and Mass by 5%” Cost=”5”; Decrease Shield Capacity and Cargo capacity by 50%.>
<hook type="alter" func="GATraits::resourceUsage" arg0="1.15"/>
<!-- Implented in GATraits.as -->
<hook type="alter" func="GATraits::improveEnergyWeapons" arg0="1.30" arg1="1.45" /> <!--Implemented in GATraits.as -->
<hook type="alter" func="GATraits::ultraDense" arg0="1.20" arg1="1.35" /> <!--Implemented in GATraits.as -->
<hook type="alter" func="subSysAlterations::increaseShieldAbsorption" arg0="0.50" />
<hook type="alter" func="Traits::increaseCargoSpace" arg0="0.50" />
<tag id="no_ballistics"/> <!--implemented in Available -->
    <tag id="no_missile"/> <!-- Implemented in Available -->
<conflict id="hard_project"/>
<conflict id="soft_project" />
<conflict id="super_rail"/>
<conflict id="weak_rail"/>
<conflict id="no_energy"/>
<conflict id="no_missile"/>
<conflict id="adv_warhead"/>
<conflict id="imp_torps"/>
<conflict id="dumb_torps" />
<conflict id="poor_warhead" />
<conflict id="no_ballistics"/>
<conflict id="no_energy"/>
<conflict id="economical"/>
<conflict id="ultra_dense" />
<conflict id="heavyweight" />
</trait>

I have to assume that either A) There is simply no way to fix this, or B) I'm doing something so trivially wrong that this forum find this topic not worth commenting on. I haven't made further progress yet, due to work, but I intend to work more on it today. Will post once again if I find a solution.

antibor

  • Newbie
  • *
  • Posts: 44
  • Karma: +5/-0
    • View Profile
Re: Trait Mod help.
« Reply #2 on: May 12, 2015, 03:27:24 PM »
I assume you are further modding GA.
I am not a modder but maybe I would go into research.txt, look for a technology to stunt and change its cost from say
   Cost: (5000 + (10000 * pow(RES_COST_CURVE, NextLevel))) * RES_COST_MULT
to    Cost: if(Traits.tag id of your trait,(50000 + (100000 * pow(RES_COST_CURVE, NextLevel))) * RES_COST_MULT,(5000 + (10000 * pow(RES_COST_CURVE, NextLevel))) * RES_COST_MULT)
And see whether it gets more expensive.
But it is only a wild guess.