View Issue Details

IDProjectCategoryLast Update
0022136AI War 2Bug - OtherDec 27, 2019 4:35 pm
ReporterFlypaste Assigned ToChris_McElligottPark  
Status resolvedResolutionfixed 
Product Version1.007 The Player/AI Arms Race Intensifies 
Fixed in VersionBETA 1.1 So Much Stuff We Can't Even, But More Is Still Coming 
Summary0022136: Modloader isn't overriding existing entries with is_partial
DescriptionWhen using is_partial, the modloader is supposed to override the existing entry's data with the new data. It is not doing this. It is instead appending the new data to the end of the entry. This is causing duplicates.

For example, trying to change the parasitic starting fleet's mugger line size from 4 to 2 instead creates a new mugger line with 2 ships.
This results in the fleet now having a line of 4, AND a line of 2 muggers.
TagsNo tags attached.

Relationships

related to 0021849 resolvedChris_McElligottPark XML editing existing units issue 
related to 0022433 resolvedChris_McElligottPark Flag is_partial_record="true" seemingly does not apply to all properties 

Activities

Chris_McElligottPark

Dec 3, 2019 4:40 pm

administrator   ~0054783

So, it apparently needs to be is_partial_record="true" for that to work. Does it work when it's that wording?

Flypaste

Dec 5, 2019 6:21 pm

reporter   ~0054836

Yes, that is what I used and it did not work. Here is the file:
CMP_StartingFleetDesigns.xml (6,000 bytes)   
<?xml version="1.0" encoding="utf-8"?>
<root>
  <fleet_design name="ClassicStartingFleet" is_partial_record="true"
        display_name="Classic Fleet">
    <ship_membership name="TransportFlagship_Starter" ship_cap_group="Centerpiece" weight="100" min="1" max="1"/>
    <ship_membership name="VWing" ship_cap_group="Strike" weight="100" min="30" max="30"/>
    <ship_membership name="FusionBomber" ship_cap_group="Strike" weight="100" min="30" max="30"/>
    <ship_membership name="ConcussionCorvette" ship_cap_group="Strike" weight="100" min="30" max="30"/>
    <ship_membership name="ForcefieldFrigate" ship_cap_group="Frigate" weight="100" min="1" max="1"/>
  </fleet_design>
  
  
  
  <fleet_design name="CloakedStartingFleet" is_partial_record="true"
        display_name="Cloaked Fleet">
    <ship_membership name="TransportFlagship_Cloaked" ship_cap_group="Centerpiece" weight="100" min="1" max="1"/>
    <ship_membership name="Raptor" ship_cap_group="Strike" weight="100" min="30" max="30"/>
    <ship_membership name="AgravicPod" ship_cap_group="Strike" weight="100" min="30" max="30"/>
    <ship_membership name="Gunbot" ship_cap_group="Strike" weight="100" min="50" max="50"/>
    <ship_membership name="WarbirdFrigate" ship_cap_group="Frigate" weight="100" min="2" max="2"/>
  </fleet_design>

  
  
  <fleet_design name="ParasiticStartingFleet" is_partial_record="true"
        display_name="Parasitic Fleet">
    <ship_membership name="TransportFlagship_Starter" ship_cap_group="Centerpiece" weight="100" min="1" max="1"/>
    <ship_membership name="Parasite" ship_cap_group="Strike" weight="100" min="30" max="30"/>
    <ship_membership name="ParasiticPikeCorvette" ship_cap_group="Strike" weight="100" min="20" max="20"/>
    <ship_membership name="Mugger" ship_cap_group="Frigate" weight="100" min="2" max="2"/>
  </fleet_design>



  <fleet_design name="RaidStartingFleet" is_partial_record="true"
        display_name="Raid Fleet">
    <ship_membership name="TransportFlagship_Agile" ship_cap_group="Centerpiece" weight="100" min="1" max="1"/>
    <ship_membership name="Velociraptor" ship_cap_group="Strike" weight="100" min="30" max="30"/>
    <ship_membership name="Dagger" ship_cap_group="Strike" weight="100" min="30" max="30"/>
    <ship_membership name="TurboStingray" ship_cap_group="Strike" weight="100" min="50" max="50"/>
    <ship_membership name="RaidFrigate" ship_cap_group="Frigate" weight="100" min="2" max="2"/>
  </fleet_design>



  <fleet_design name="DoorkickerStartingFleet" is_partial_record="true"
        display_name="Doorkicker Fleet">
    <ship_membership name="TransportFlagship_Starter" ship_cap_group="Centerpiece" weight="100" min="1" max="1"/>
    <ship_membership name="PulsarTank" ship_cap_group="Strike" weight="100" min="16" max="16"/>
    <ship_membership name="Vanguard" ship_cap_group="Strike" weight="100" min="16" max="16"/>
    <ship_membership name="InhibitingTeslaCorvette" ship_cap_group="Strike" weight="100" min="14" max="14"/>
    <ship_membership name="SiegeFrigate" ship_cap_group="Frigate" weight="100" min="2" max="2"/>
  </fleet_design>
  


  <fleet_design name="ConsumerStartingFleet" is_partial_record="true"
        display_name="Consumer Fleet">
    <ship_membership name="TransportFlagship_Starter" ship_cap_group="Centerpiece" weight="100" min="1" max="1"/>
    <ship_membership name="ViciousMetabolizingGangsaw" ship_cap_group="Strike" weight="100" min="35" max="35"/>
    <ship_membership name="Absorber" ship_cap_group="Strike" weight="100" min="30" max="30"/>
    <ship_membership name="FusionBomber" ship_cap_group="Strike" weight="100" min="30" max="30"/>
    <ship_membership name="TritiumSniperFrigate" ship_cap_group="Frigate" weight="100" min="2" max="2"/>
  </fleet_design>
  
  
  
  <fleet_design name="BomberStartingFleet" is_partial_record="true"
        display_name="Bomber Fleet">
    <ship_membership name="TransportFlagship_Starter" ship_cap_group="Centerpiece" weight="100" min="1" max="1"/>
    <ship_membership name="FusionBomber" ship_cap_group="Strike" weight="100" min="30" max="30"/>
    <ship_membership name="FusionBomber" ship_cap_group="Strike" weight="100" min="30" max="30"/>
    <ship_membership name="ParasiticFusionBomber" ship_cap_group="Strike" weight="100" min="20" max="20"/>
  </fleet_design>
  
  
  
  <fleet_design name="HydraStartingFleet"
        display_name="Hydra Fleet"
        description="Distract enemies with this well rounded hydra fleet, scaling very well with improved production speed."
        design_logic="InitialPlayerFleet" weight="100" include_full_cap_of_each_type="true"
        append_each_ship_description_to_main_description="true"
        >
    <ship_membership name="TransportFlagship_Starter" ship_cap_group="Centerpiece" weight="100" min="1" max="1"/>
    <ship_membership name="StingrayHydra" ship_cap_group="Strike" weight="100" min="50" max="50"/>
    <ship_membership name="VanguardHydra" ship_cap_group="Strike" weight="100" min="14" max="14"/>
    <ship_membership name="WarbirdFrigateHydra" ship_cap_group="Frigate" weight="100" min="2" max="2"/>
  </fleet_design>
  
  
  
  <fleet_design name="MedicStartingFleet"
        display_name="Medic Fleet"
        description="Although initially weak these rare medic gunboats can be a valuable asset."
        design_logic="InitialPlayerFleet" weight="100" include_full_cap_of_each_type="true"
        append_each_ship_description_to_main_description="true"
        >
    <ship_membership name="TransportFlagship_Starter" ship_cap_group="Centerpiece" weight="100" min="1" max="1"/>
    <ship_membership name="VWing" ship_cap_group="Strike" weight="100" min="30" max="30"/>
    <ship_membership name="MedicGunboat" ship_cap_group="Strike" weight="100" min="14" max="14"/>
    <ship_membership name="Brawler" ship_cap_group="Frigate" weight="100" min="2" max="2"/>
  </fleet_design>
</root>
CMP_StartingFleetDesigns.xml (6,000 bytes)   

Chris_McElligottPark

Dec 27, 2019 3:52 pm

administrator   ~0055190

Last edited: Dec 27, 2019 3:54 pm

Related to this, but not exactly this:

* Both ai_ship_group_membership and fleet_membership now properly adjust the existing membership when there is a duplicate entry entered for them (from a mod or whatever else) linking a given ship type to a given template or group. It now adjusts the weight and so on in the template or group, rather than adding a duplicate entry.
** Note that if you change the category for a template, it will assume you mean it to be a duplicate and will add that accordingly. There really should never be any valid reason to mod the category of a ship, but if you must then you can just 0 out the min and max of the old one maybe?

Thanks!

Chris_McElligottPark

Dec 27, 2019 4:35 pm

administrator   ~0055191

Thanks! The mod that you posted the xml for here now works as you would expect.

* Creating a mod to replace or redefine parts of the fleet design templates (like the starting fleets) now works properly rather than creating duplicate entries or extra counts or both.
** Note that if you choose to change the category of ships from HERE, that will work fine. You just can't change categories of fleet template items from within the game entity side.
** Also please note that this change now prevents you from having duplicate lines of the exact same type of ship in a starting fleet. So something with two lines of fusion bombers would not work anymore, for instance, even with no mods in play, and would just take the count of the last fusion bomber entry and use that.
*** This doesn't stop you from using multiple duplicate ship lines in-game of course, but it does stop it in the starting fleet designs, none of which (that are still active) were using that function anyhow.

Issue History

Date Modified Username Field Change
Nov 8, 2019 6:01 pm Flypaste New Issue
Nov 8, 2019 6:02 pm Flypaste Description Updated
Nov 8, 2019 6:27 pm Flypaste Summary Modloader isn't overriding existing entires with is_partial => Modloader isn't overriding existing entries with is_partial
Dec 3, 2019 4:40 pm Chris_McElligottPark Assigned To => Chris_McElligottPark
Dec 3, 2019 4:40 pm Chris_McElligottPark Status new => feedback
Dec 3, 2019 4:40 pm Chris_McElligottPark Note Added: 0054783
Dec 5, 2019 6:21 pm Flypaste File Added: CMP_StartingFleetDesigns.xml
Dec 5, 2019 6:21 pm Flypaste Note Added: 0054836
Dec 5, 2019 6:21 pm Flypaste Status feedback => assigned
Dec 27, 2019 2:52 pm Chris_McElligottPark Relationship added related to 0021849
Dec 27, 2019 2:52 pm Chris_McElligottPark Relationship added related to 0022433
Dec 27, 2019 3:52 pm Chris_McElligottPark Note Added: 0055190
Dec 27, 2019 3:54 pm Chris_McElligottPark Note Edited: 0055190
Dec 27, 2019 4:35 pm Chris_McElligottPark Status assigned => resolved
Dec 27, 2019 4:35 pm Chris_McElligottPark Resolution open => fixed
Dec 27, 2019 4:35 pm Chris_McElligottPark Fixed in Version => BETA 1.1 So Much Stuff We Can't Even, But More Is Still Coming
Dec 27, 2019 4:35 pm Chris_McElligottPark Note Added: 0055191