Jump to content

Modding .xml files - Remove Requirements of parent


Recommended Posts

4 minutes ago, DesertRose said:

Is it possible to remove a requirement of a parent template?

I want to create a champion unit that does not have the requirement of "phase_city".

Take a look at this template. Is the Cimbrian Clubman (German Champion), available from the start. ( phase_village)
https://gitea.wildfiregames.com/0ad/0ad/src/branch/main/binaries/data/mods/public/simulation/templates/units/germ/champion_infantry_maceman.xml

  • Thanks 1
Link to comment
Share on other sites

 @real_tabasco_saucecorrect me if i'm wrong but

You can try specify same way is done on that template and it should override parent's requirements:

  <Identity>
    <Civ>germ</Civ>
    <GenericName>Cimbrian Clubman</GenericName>
    <SpecificName>Kulbawigô</SpecificName>
    <VisibleClasses datatype="tokens">Champion</VisibleClasses>
    <Requirements>
      <Techs datatype="tokens">phase_village</Techs>
    </Requirements>
    <Icon>units/germ/infantry_clubman.png</Icon>
  </Identity>

 

Link to comment
Share on other sites

37 minutes ago, guerringuerrin said:

Take a look at this template. Is the Cimbrian Clubman (German Champion), available from the start. ( phase_village)
https://gitea.wildfiregames.com/0ad/0ad/src/branch/main/binaries/data/mods/public/simulation/templates/units/germ/champion_infantry_maceman.xml

Seeing what a roundabout method they took I fear a dumb a approach such as

"-phase_city"

is not possible.

edit:

I stand corrected, my dumb idea actually works.

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...