AI ?

is some1 noticed that AI don't use shield and armor? they just put max weapons they can put and go kamikadze, is there any way to force them to use more shields/armor?

158 views 6 replies
Reply #1 Top

Not your imagination, and the reason is in how AI ships get built. They are not put together component by component the way you build yours. Each one comes from a blueprint that lists a few required parts, then a list of component types, then a filler type that soaks up whatever mass is left over.

Most of the combat blueprints do ask for armor, shields and point defense in that middle list. The lopsidedness comes from the filler. On a big hull there is a lot of spare mass, so the filler repeats a lot, and on most of the combat blueprints the filler is a weapon type. You end up with one or two defensive parts and then weapons the rest of the way down.

There is no setting in the game that changes that, so what you are looking at is the data rather than the AI making a call each time.

If you want to shift it, the file is ShipBlueprintDefs.xml in the game's Data\Gameplay folder. Open it and look at the FillerComponentType lines. Changing those from a weapon type to BestDefense on the combat blueprints is the one edit that moves the balance.

Do it as a mod in your Mods folder rather than editing the shipped file. Mod data layers over the base entries, so the change survives updates. BestDefense also picks the best defensive part that player has actually researched, so it will not hand the AI anything it has not earned.

Reply #3 Top

not works, they still use weapons only 

 

its not this file, I deleted it complitly and blueprints are still in game

Reply #4 Top

is there any way to delete developers blueprints? I would delete them and make my own designs for ai 

Reply #5 Top

It is that file, but it is not the only one. There is a second blueprint file sitting next to it called StaticShipBlueprintDefs.xml, and that one holds the fixed pre-built designs rather than the assembled ones. Deleting one leaves the other in place, which is what you are running into.

The bigger reason your test showed nothing is the save. Ship designs get built once when a game starts and are then stored in that save. Load an existing game afterwards and you get the designs it already had, whatever you changed in the data.

So any edit here has to be tested on a new game. That one catches people out constantly.

On deleting the developer blueprints, do not delete the shipped files. Put a mod in Documents\My Games\GalCiv4\Mods and redefine the blueprint there using the same InternalName as the base entry. Yours takes the place of the original that way, and nothing breaks when the game updates or verifies its files.

Check the mod is actually switched on in game as well. If no mod is enabled the game does not look at that folder at all, so a perfectly good mod file will sit there doing nothing.

If you want to hand-build designs rather than nudge the assembly rules, the static file is the better one to copy from. Its entries list their components explicitly instead of naming component types and letting the game fill in the rest.

Reply #6 Top

I made test on new game after files editing and it was not working

 

I deleted blue print and static blue print from steam files and developers designs was still there

I edited file and moved it to mod and it was on in mod manager and didn;t deleted developers desigs and didn't edit them when I edited files

 

no matter what I do there desigs stay in game and won't change 

 

should I use bestshield and bestarmor insted bestdefence ?

 

there are also:

RequiredComponentType

ComponentType

FillerComponentType

 

  <ShipBlueprint>

    <InternalName>RangerBlueprint</InternalName>

    <ShipDesignPresetCategory>Cruiser</ShipDesignPresetCategory>

    <ShipHullType>Medium</ShipHullType>

    <Role>Cruiser</Role>

    <ShipGroup>Ranger</ShipGroup>

    <RequiredComponentType>BestDefense</RequiredComponentType>

    <RequiredComponentType>MissileWeapon</RequiredComponentType>

    <RequiredComponentType>BeamWeapon</RequiredComponentType>

    <RequiredComponentType>KineticWeapon</RequiredComponentType>

    <ComponentType>BestDefense</ComponentType>

    <ComponentType>MissileWeapon</ComponentType>

    <ComponentType>BestDefense</ComponentType>

    <FillerComponentType>BestDefense</FillerComponentType>

    <FillerComponentType>BeamWeapon</FillerComponentType>

    <FillerComponentType>BestDefense</FillerComponentType>

    <FillerComponentType>KineticWeapon</FillerComponentType>

    <FillerComponentType>BestDefense</FillerComponentType>

    <SpecialComponentType>TKSpecializedDefense</SpecialComponentType> <!--Design Placeholder-->

    <SpecialComponentType>TKSpecializedDefenseSupport</SpecialComponentType> <!--Design Placeholder-->

    <SpecialComponentType>TKSpecializedWeaponSupport</SpecialComponentType> <!--Design Placeholder-->

  </ShipBlueprint>

 

this is example of one entry

 

if there are 4 componet type I use 2 for weapons and 2 for defs, I also tried 2 for weapons and 2 for shields/armor, it not work, bots still use weapons only