Can I split up Weapon Categories without breaking Automatic design?

Please post here for questions and discussion about data, event, art and sound modding and the game editor for Distant Worlds.

Moderator: MOD_DW2

Post Reply
zgrssd
Posts: 5101
Joined: Tue Jun 09, 2020 1:02 pm

Can I split up Weapon Categories without breaking Automatic design?

Post by zgrssd »

I am very unhappy with how the Designers Upgrade Button and the "Latest by Category" filtering works. I think what the game needs, is more Categories. Particularly for weapons. So the filter and Button stop being a liability
I found those categories easy enough. They are just defined in \data\ComponentDefinitions.xml.

However, with those names I fear like they may be used by the Autodesigner as well.
Like, the autodesigner is trying to pick a "close in" or "standoff" weapon. If so, changing the names could result in utterly unarmed AI ships.

Has anybody tested this?
Or could the developers confirm it?
User avatar
Miletkir
Posts: 654
Joined: Tue Jul 07, 2020 4:15 am
Location: Eastern Nebula

Re: Can I split up Weapon Categories without breaking Automatic design?

Post by Miletkir »

Changing category names could also simply crash your game if the autodesign script is looking for one that doesn't exist anymore. I haven't tried myself, but I'd be interested to know the result if you run a trial and error investigation.
Image
Mercbeast
Posts: 16
Joined: Mon Mar 21, 2022 7:06 am

Re: Can I split up Weapon Categories without breaking Automatic design?

Post by Mercbeast »

I believe you can change the auto-design behavior for each race through the race policies. Zenox are especially bad at auto design. Their heaviest weight seems to be on point defense weapons. So you end up with fun scenarios where your stations and ships equip 75% of their weapon slots with point defense. I imagine this applies to the AI as well.

So, perhaps tweaking those files would allow you to force the auto-designer to pick weapon upgrades more along the lines of what you would like them to pick?
zgrssd
Posts: 5101
Joined: Tue Jun 09, 2020 1:02 pm

Re: Can I split up Weapon Categories without breaking Automatic design?

Post by zgrssd »

Mercbeast wrote: Tue Mar 22, 2022 12:10 am I believe you can change the auto-design behavior for each race through the race policies. Zenox are especially bad at auto design. Their heaviest weight seems to be on point defense weapons. So you end up with fun scenarios where your stations and ships equip 75% of their weapon slots with point defense. I imagine this applies to the AI as well.

So, perhaps tweaking those files would allow you to force the auto-designer to pick weapon upgrades more along the lines of what you would like them to pick?
You mean these entries in "\data\Races.xml"?

Code: Select all

<PreferredWeaponComponentIds>
  <short>5</short>
  <short>197</short>
  <short>17</short>
  <short>201</short>
  <short>203</short>
  <short>228</short>
  <short>20</short>
  <short>27</short>
  <short>202</short>
  <short>204</short>
  <short>301</short>
  <short>39</short>
  <short>50</short>
  <short>45</short>
  <short>298</short>
</PreferredWeaponComponentIds>
Component ID 5 for example stands for the "Seeking Missile [S]"

The problem is, that I would guess game picks the Category (a Standoff Weapon) first, then tries to find a specific a specific component ID from that list. So changing the Autodesigner categories might still break stuff.
It is a part of the puzzle, but the important part is missing - how does the designer select weapons if no preference is in play?
Mercbeast
Posts: 16
Joined: Mon Mar 21, 2022 7:06 am

Re: Can I split up Weapon Categories without breaking Automatic design?

Post by Mercbeast »

No. It's the policy folder inside the data folder. That defines their component preferences for autodesign I think.
zgrssd
Posts: 5101
Joined: Tue Jun 09, 2020 1:02 pm

Re: Can I split up Weapon Categories without breaking Automatic design?

Post by zgrssd »

Mercbeast wrote: Wed Mar 23, 2022 3:25 am No. It's the policy folder inside the data folder. That defines their component preferences for autodesign I think.
Ah, I see it now. And it is as bad as I feared:

Code: Select all

<ComponentSelectionFactors>
<WeaponCloseInFactor>1</WeaponCloseInFactor>
<WeaponStandoffFactor>1</WeaponStandoffFactor>
<WeaponInterceptFactor>1</WeaponInterceptFactor>
<WeaponIonFactor>1</WeaponIonFactor>
<WeaponBombardFactor>1</WeaponBombardFactor>
<WeaponAreaFactor>1</WeaponAreaFactor>
<FighterFactor>1.5</FighterFactor>
<ShieldFactor>1.25</ShieldFactor>
<ArmorFactor>1</ArmorFactor>
<AssaultPodFactor>1</AssaultPodFactor>
<EngineFactor>1</EngineFactor>
<TractorBeamFactor>1</TractorBeamFactor>
<ScannerLongFactor>1</ScannerLongFactor>
<ScannerTraceFactor>1</ScannerTraceFactor>
<HyperDenyFactor>1</HyperDenyFactor>
<HyperStopFactor>1</HyperStopFactor>
<CountermeasuresFactor>1</CountermeasuresFactor>
<TargetingFactor>1</TargetingFactor>
<DamageControlFactor>1</DamageControlFactor>
<EngineManeuveringFactor>1</EngineManeuveringFactor>
<IonDefenseFactor>1</IonDefenseFactor>
<StealthFactor>1</StealthFactor>
<TroopCompartmentFactor>1</TroopCompartmentFactor>
<ConstructionYardFactor>1</ConstructionYardFactor>
<ResearchLabFactor>1.5</ResearchLabFactor>
<SmallSizeFactor>1</SmallSizeFactor>
<WeaponCloseInRangeFactor>1</WeaponCloseInRangeFactor>
<WeaponCloseInDamageRawFactor>1.5</WeaponCloseInDamageRawFactor>
<WeaponCloseInDamageAtRangeFactor>1.5</WeaponCloseInDamageAtRangeFactor>
<WeaponCloseInDamageRateFactor>1</WeaponCloseInDamageRateFactor>
<WeaponCloseInDamageAtRangeRateFactor>1</WeaponCloseInDamageAtRangeRateFactor>
<WeaponCloseInFireRateFactor>1</WeaponCloseInFireRateFactor>
<WeaponCloseInEnergyUsageFactor>1</WeaponCloseInEnergyUsageFactor>
<WeaponStandoffRangeFactor>1</WeaponStandoffRangeFactor>
<WeaponStandoffDamageRawFactor>1.5</WeaponStandoffDamageRawFactor>
<WeaponStandoffDamageAtRangeFactor>1.5</WeaponStandoffDamageAtRangeFactor>
<WeaponStandoffDamageRateFactor>1</WeaponStandoffDamageRateFactor>
<WeaponStandoffDamageAtRangeRateFactor>1</WeaponStandoffDamageAtRangeRateFactor>
<WeaponStandoffFireRateFactor>1</WeaponStandoffFireRateFactor>
<WeaponStandoffEnergyUsageFactor>1</WeaponStandoffEnergyUsageFactor>
<WeaponInterceptRangeFactor>1</WeaponInterceptRangeFactor>
<WeaponInterceptDamageFactor>1.5</WeaponInterceptDamageFactor>
<WeaponInterceptDamageRateFactor>1</WeaponInterceptDamageRateFactor>
<WeaponInterceptFireRateFactor>1</WeaponInterceptFireRateFactor>
<WeaponInterceptEnergyUsageFactor>1</WeaponInterceptEnergyUsageFactor>
<WeaponIonRangeFactor>1</WeaponIonRangeFactor>
<WeaponIonEngineDamageFactor>1</WeaponIonEngineDamageFactor>
<WeaponIonWeaponDamageFactor>1</WeaponIonWeaponDamageFactor>
<WeaponIonGeneralDamageFactor>1</WeaponIonGeneralDamageFactor>
<WeaponIonHyperDriveDamageFactor>1</WeaponIonHyperDriveDamageFactor>
<WeaponIonSensorDamageFactor>1</WeaponIonSensorDamageFactor>
<WeaponIonShieldDamageFactor>1</WeaponIonShieldDamageFactor>
<WeaponIonEngineDamageRateFactor>1</WeaponIonEngineDamageRateFactor>
<WeaponIonHyperDriveDamageRateFactor>1</WeaponIonHyperDriveDamageRateFactor>
<WeaponIonSensorDamageRateFactor>1</WeaponIonSensorDamageRateFactor>
<WeaponIonShieldDamageRateFactor>1</WeaponIonShieldDamageRateFactor>
<WeaponIonWeaponDamageRateFactor>1</WeaponIonWeaponDamageRateFactor>
<WeaponIonGeneralDamageRateFactor>1</WeaponIonGeneralDamageRateFactor>
<WeaponIonFireRateFactor>1</WeaponIonFireRateFactor>
<WeaponIonEnergyUsageFactor>1</WeaponIonEnergyUsageFactor>
<WeaponBombardRangeFactor>1</WeaponBombardRangeFactor>
<WeaponBombardDamageInfrastructureFactor>1</WeaponBombardDamageInfrastructureFactor>
<WeaponBombardDamageMilitaryFactor>1</WeaponBombardDamageMilitaryFactor>
<WeaponBombardDamagePopulationFactor>1</WeaponBombardDamagePopulationFactor>
<WeaponBombardDamageQualityFactor>1</WeaponBombardDamageQualityFactor>
<WeaponBombardDamageRateInfrastructureFactor>1</WeaponBombardDamageRateInfrastructureFactor>
<WeaponBombardDamageRateMilitaryFactor>1</WeaponBombardDamageRateMilitaryFactor>
<WeaponBombardDamageRatePopulationFactor>1</WeaponBombardDamageRatePopulationFactor>
<WeaponBombardDamageRateQualityFactor>1</WeaponBombardDamageRateQualityFactor>
<WeaponBombardFireRateFactor>1</WeaponBombardFireRateFactor>
<WeaponBombardEnergyUsageFactor>1</WeaponBombardEnergyUsageFactor>
<WeaponAreaRangeFactor>1</WeaponAreaRangeFactor>
<WeaponAreaDamageFactor>1</WeaponAreaDamageFactor>
<WeaponAreaDamageRateFactor>1</WeaponAreaDamageRateFactor>
<WeaponAreaFireRateFactor>1</WeaponAreaFireRateFactor>
<WeaponAreaEnergyUsageFactor>1</WeaponAreaEnergyUsageFactor>
<ArmorStrengthFactor>1</ArmorStrengthFactor>
<ArmorReactiveFactor>1</ArmorReactiveFactor>
<ShieldStrengthFactor>2</ShieldStrengthFactor>
<ShieldRechargeFactor>1.5</ShieldRechargeFactor>
<ShieldResistanceFactor>1</ShieldResistanceFactor>
<ShieldPenetrationChanceFactor>1</ShieldPenetrationChanceFactor>
<ShieldPenetrationRatioFactor>1</ShieldPenetrationRatioFactor>
<HyperDriveSpeedFactor>1</HyperDriveSpeedFactor>
<HyperDriveEnergyUsageFactor>1</HyperDriveEnergyUsageFactor>
<HyperDriveJumpRangeFactor>1</HyperDriveJumpRangeFactor>
<HyperDriveInitiationTimeFactor>1</HyperDriveInitiationTimeFactor>
<HyperDriveRechargeTimeFactor>1</HyperDriveRechargeTimeFactor>
<AreaShieldRangeFactor>1</AreaShieldRangeFactor>
<AreaShieldPowerFactor>1</AreaShieldPowerFactor>
<AreaShieldEnergyUsageFactor>1</AreaShieldEnergyUsageFactor>
<AssaultPodStrengthFactor>1</AssaultPodStrengthFactor>
<AssaultPodRangeFactor>1</AssaultPodRangeFactor>
<AssaultPodEnergyUsageFactor>1</AssaultPodEnergyUsageFactor>
<AssaultPodShieldPenetrationFactor>1</AssaultPodShieldPenetrationFactor>
<AssaultPodLaunchRateFactor>1</AssaultPodLaunchRateFactor>
<AssaultDefenseFactor>1</AssaultDefenseFactor>
<DamageReductionFactor>1</DamageReductionFactor>
<DamageRepairFactor>1</DamageRepairFactor>
<DockingBayThroughputFactor>1</DockingBayThroughputFactor>
<DockingBayShipCountFactor>1</DockingBayShipCountFactor>
<EngineMaximumThrustFactor>1.5</EngineMaximumThrustFactor>
<EngineCruiseThrustFactor>1.5</EngineCruiseThrustFactor>
<EngineEnergyUsageFactor>1.5</EngineEnergyUsageFactor>
<EngineVectoringFactor>1</EngineVectoringFactor>
<FighterBayCapacityFactor>1.5</FighterBayCapacityFactor>
<FighterBayBuildRateFactor>1</FighterBayBuildRateFactor>
<FighterBayRepairRateFactor>1</FighterBayRepairRateFactor>
<HyperStopRangeFactor>1</HyperStopRangeFactor>
<HyperStopStrengthFactor>1</HyperStopStrengthFactor>
<HyperDenyRangeFactor>1</HyperDenyRangeFactor>
<HyperDenyStrengthFactor>1</HyperDenyStrengthFactor>
<ScannerLongRangeFactor>1</ScannerLongRangeFactor>
<ScannerLongPowerFactor>1</ScannerLongPowerFactor>
<ScannerExplorationRangeFactor>1</ScannerExplorationRangeFactor>
<ScannerExplorationPowerFactor>1</ScannerExplorationPowerFactor>
<ScannerExplorationSurveyAmountFactor>1</ScannerExplorationSurveyAmountFactor>
<ScannerExplorationSurveyMaximumLevelFactor>1</ScannerExplorationSurveyMaximumLevelFactor>
<ScannerExplorationSurveyTimeFactor>1</ScannerExplorationSurveyTimeFactor>
<ScannerExplorationTimeFactor>1</ScannerExplorationTimeFactor>
<ScannerTraceRangeFactor>1</ScannerTraceRangeFactor>
<ScannerTracePowerFactor>1</ScannerTracePowerFactor>
<ScannerEmpireMaskingFactor>1</ScannerEmpireMaskingFactor>
<ScannerRoleMaskingFactor>1</ScannerRoleMaskingFactor>
<ReactorOutputFactor>1.3</ReactorOutputFactor>
<ReactorStorageFactor>1</ReactorStorageFactor>
<ReactorFuelUsageFactor>1</ReactorFuelUsageFactor>
<TractorBeamPowerFactor>1</TractorBeamPowerFactor>
<TractorBeamRangeFactor>1</TractorBeamRangeFactor>
<TractorBeamEnergyUsageFactor>1</TractorBeamEnergyUsageFactor>
</ComponentSelectionFactors>
The designer definitely uses the categories. And I am guessing the categories the game looks for are Hardcoded.
zgrssd
Posts: 5101
Joined: Tue Jun 09, 2020 1:02 pm

Re: Can I split up Weapon Categories without breaking Automatic design?

Post by zgrssd »

I am giving up my attempts to do this via modding. Honestly, I did not even try.
It is a perfectly fine design and propably how I would have done it - but it entirely locks out adding categories.

If I had some way to add categories?
Then I would still have to rewrite the category, component and AI Policies. Every patch.

This is just not something I can do.
Post Reply

Return to “Design and Modding”