Drones for all ships at game start

So i tried adding the line (See Below) to the Paranoid ability.  So that all the ships would have one fighter at the start of the game.  It works, but instead of giving them one fighter, it gives them 63 fighters.

<Mod>
      <EffectType>InterceptorFightersCap</EffectType>
      <Scope>Global</Scope>
      <Target>
        <TargetType>Ship</TargetType>
      </Target>
      <BonusType>Flat</BonusType>
      <Value>1</Value>
    </Mod>

 

 

29,915 views 23 replies
Reply #1 Top

Huh.

 

 

Wonder what would happen if you made the value 63? :P

Reply #2 Top

Try making it 0.1 and see what happens? Personally I think giving all ships drones is overkill but hey if that's how you want to play GC3? I'm not one to judge.

Reply #4 Top

just a thought but maybe its a bug caused by calculating with binary numbers... try to change the values and see what happens. Try -1, 63 and 65...

Reply #5 Top

Well tried a bunch of different numbers, anything below 1 makes so no fighters show up.  Anything above 1 doesn't change the number of fighters.  If I can find the ideology xml, maybe I can use the Pragmatic ideology that gives ships to all ship.

Reply #6 Top

Its because fighters qualify as ships, I tried to do the same thing, with the same results.

It appears the limit of ships in a fleet is 64 and so the game gives the initial ship its escort and then gives the escort and escort and so on and so forth.

This does not happen with shipyards starbases and colonies because the code for them does not result in a recursive logic effect.

Tried doing this using a target of Fleet but it results in no fighters at all.

Best solution I could come up with is to give the custom race or faction trait special access to a custom carrier module.

+1 Loading…
Reply #7 Top

Oh and the ideology trait code only works because it works on a basis of the Zone of Control and as far as I can tell is the only way to do it as the Fleet target type will only function for this purpose if it is used with a Scope of ZOC when used with a scope of Global it simply fails to work at all.

Reply #8 Top

Quoting Deathwynd, reply 6

Its because fighters qualify as ships, I tried to do the same thing, with the same results.

It appears the limit of ships in a fleet is 64 and so the game gives the initial ship its escort and then gives the escort and escort and so on and so forth.

 

:rofl:

 

Oh gods that is hillarious

Reply #9 Top

Why not just change the tech requirement for one of the drone modules?

Reply #10 Top

Perhaps the <TargetQualifier></TargetQualifier> tag can work here? The tags are used in the definition of trade routes to enable a morale bonus if either trading partner has the Entrepreneur trait, and it's used in the definition of the large empire penalty to remove the penalty from empires with the Patriotic ability. You might be able to use it to exclude Tiny hulls from receiving the bonus fighters or something like that, though I don't know if the tags will take hull sizes as arguments, and I don't know if you can add it to the hull definitions and use Paranoid as an argument. Another thing which might work is to target the fleet rather than all ships, though I suspect that targeting the fleet will, if it works at all, only give X fighters per fleet rather than X fighters per ship in the fleet.

Reply #11 Top

I'm attempting to make the Gallente faction from eve online so they are only using drones and blaster (railguns).  Because I'm having the AI use it, I'm trying to stay away from ship parts as it could really get out of hand.

I guess X per fleet wouldn't be so bad, I'll check it out.  Thanks for the help and advice.

Reply #12 Top

I know you could use a trigger on an improvement ,existing, or created by you for the desired effect like the hyperion buildings. Getting them to build said improvement would most likely still be difficult, possibly easier than a ship module though. Tested quickly that it works just sticking the trigger to the colony capital but that gives it to every player. If you could create a colony unique building that they would build everywhere first then all their constructed ships would have the fighters. Haven't messed with creating improvements from scratch just thought I'd throw this out there if you wanted to mess with it that way.  The trigger is as follows

<Triggers>
      <OnEvent>OnConstructShip</OnEvent>
      <Scope>Queue</Scope>
      <Target>
        <TargetType>Ship</TargetType>
      </Target>
      <Lifetime>Target</Lifetime>
      <Modifier>
        <EffectType>InterceptorFightersCap</EffectType>
        <Target>
          <TargetType>Ship</TargetType>
        </Target>
        <BonusType>Flat</BonusType>
        <Value>1</Value>
      </Modifier>
    </Triggers>

Reply #13 Top

Ok just spotted this and havent tested it but if you add that trigger to a custom ability it should be global for that entire faction, though only for built ships not any awarded or starter ships.

Gonna go do some testing I'll report back when I have some answers.

Reply #14 Top

Oh and the reason I gave my custom race its own custom module is its 1 fighter limit and 1 per ship but costs nothing to add.

Reply #15 Top

Ok so I tested that trigger as a custom ability and no it does not work, though it should work just fine as a planetary improvement.

Reply #16 Top

It absolutely does work as a custom improvement, however it will need to be one that is restricted to one per colony using  <IsColonyUnique>true</IsColonyUnique> and I havent really done anything with the AI system so not sure how you would force your custom faction to build the custom improvement.

Reply #17 Top

Thanks guys.  Now like you said I just have to figure out how to get them to actually build it.  Soaking for a few hundred turn and they still are not building it.  It's a shame you can't set a weight for improvements, like you can with techs.

Just need to find out how to get the building to be placed at game start, like civilization capital and I'll be set.

 

Thanks again :)

Reply #18 Top

What <ImprovementType> and <PlacementType> did you assign it?

Reply #19 Top

<ImprovementType>Military</ImprovementType>
    <PlacementType>MilitaryUnique</PlacementType>

Reply #20 Top

Military buildings only get built on manufacturing planets at least class 10, generic planets at least class 16 and research planets at least class 19. So you will not be seeing it often even if the AI can build it. I would suggest making it a manufacturing building since at least one of those gets built on all planets and I would suggest assigning it some production bonus also, perhaps +50% manufacturing.

Reply #21 Top

This will probably be the last that I mess around and test this but I found what seems to be a decent solution albeit much less than ideal. I made the improvement in question <ImprovementType>Special</ImprovementType>.

I then changed GovernorDefs.xml. For every different governor entry, I inserted <Improvement>Special</Improvement> directly underneath the <PlanetClassMax> tag. Started a soak test with all the default factions that had access to the improvement I made being 5. I was hoping that would make it the 1st construction on all planets but that didn't seem to be the case. Although, about 80% of all planets for each faction had built it and all 5 home worlds had it which is many more than when I messed with it the other day. The home world I was watching did build it 1st before anything else.

I would imagine this would work for as many factions as you would want to create with their own unique building as long as it is the only Special type available to them since I assume they would simply pick 1 at random from those available.

One issue I thought of with this improvement idea is that each ship built would get an interceptor for each planet sponsoring the shipyard I think so you might end up fighting ships with 5 interceptors each.

This whole idea occurred to me when I opened up an ai thread then decided to check out GovernorDefs.xml since I had never opened it before. I usually check the related schema for valid arguments. Although they are placement types in that they seemingly reference improvement types instead and the only Special type improvements are the Colony and Civilization Capitals which are both set to unavailable.

Hopefully this is helpful to you or anyone else reading.

 

Reply #22 Top

forgot to mention, they are not built at all anywhere if you use <PlacementType>Special</PlacementType> in the improvement definition

Reply #23 Top

Cool I will check this out, asap.  Was wondering why you thought that a ship would get fighters based of the number of planets sponsoring the shipyard?

Thanks to Moogle65535 and Deathwynd for testing some of these ideas themselves and everyone else for their ideas.