Jump to content

Modding .xml files - Remove Requirements of parent


DesertRose
 Share

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...