Author Topic: XML Modding Exclude children,  (Read 13204 times)

Offline Caseycc

  • Newbie Mark II
  • *
  • Posts: 13
XML Modding Exclude children,
« on: March 22, 2021, 11:04:53 am »
I'm playing around with just some basic xml modding and using copy_from to make my own versions of some things but I keep getting an error about unrequested attribute when I try to use exclude_children_from_copy="system" . For instance I want to create an OverloaderCombatFactory that instead of sabo drones it has decoy drones. Is there something I'm missing or was the exclude ability removed?

Quote
  <entity name="WallFactorycc" copy_from="OverloaderCombatFactory"
  display_name="Wall Factorycc"
         description="Mobile facility Flagship. If a Fleet Flagship is on the same or adjacent planet, and is missing ships, then this will automatically produce replacements which'll warp directly to that Flagship. This Factory speeds up allies on the same planet, and also launches drones if enemies are nearby, which act as decoys."
         description_short="Mobile facility that automatically replaces nearby Fleet losses and repairs nearby units. Also speeds up allies and launches drones which draw fire."
  exclude_children_from_copy="system"
  >
   <system name="Launcher" display_name="Launcher"
            category="Weapon" firing_timing="OnlyInRange"
            damage_per_shot="5" range="EssentiallyInfinite" shot_speed="Normal" rate_of_fire="ExtremelyLow"
            shots_per_salvo="7" fires_salvos_sequentially="false"            
            shot_type_data="DecoyDrone"
            system_is_hidden_for_ui="true"
            max_mark_level_to_function="0"
            >
    </system>      
  </entity>



Offline x4000

  • Chris McElligott Park, Arcen Founder and Lead Dev
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 31,651
Re: XML Modding Exclude children,
« Reply #1 on: March 22, 2021, 11:26:27 am »
The exclude ability was removed when I rejiggered the xml.  The reason is kind of complicated, but essentially in order to build the new variant, it builds from the bottom up.  So it has already added the stuff by the time it gets told to exclude it, and in order to do that we'd have to have a new feature that goes back and actively removes those systems.

As a general xml feature, it just didn't work.  Overall there are some ways around this, for systems in particular, like on your variant setting the stuff you don't want to not activate until mark 8, or similar.  That's a bit crude, but it works for now.
Have ideas or bug reports for one of our games?  Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!

Offline Caseycc

  • Newbie Mark II
  • *
  • Posts: 13
Re: XML Modding Exclude children,
« Reply #2 on: March 22, 2021, 12:53:48 pm »
Thanks for the quick response!
It seems with drone launchers it's a bit weird, but I managed to get it working by changing the "fleet_design_template_i_use_for_drones". I couldn't figure out if the launcher was overwritten or not so I left it out just to avoid having 2 launchers and at worst it fires slightly slower than the other decoy launchers.

The other area I was trying to exclude was to remove "fleet_membership name", however looking at the other variants I made for ships/shields they don't seem to have inherited that part, or at least they aren't appearing in the build screen next to what they inherited from so maybe that's just self solved?

Code: [Select]
<entity name="WallFactorycc" copy_from="OverloaderCombatFactory"
  display_name="Wall Factorycc"
description="Mobile facility Flagship. If a Fleet Flagship is on the same or adjacent planet, and is missing ships, then this will automatically produce replacements which'll warp directly to that Flagship. This Factory speeds up allies on the same planet, and also launches drones if enemies are nearby, which act as decoys."
description_short="Mobile facility that automatically replaces nearby Fleet losses and repairs nearby units. Also speeds up allies and launches drones which draw fire."
  fleet_design_template_i_use_for_drones="DecoyDrones"
  >
  </entity>