Jump to content

Modding Tutorials - I'm having difficulty following them.


LordStark
 Share

Recommended Posts

Hi team,

I've run in to a few problems. I was reading the guide here: https://trac.wildfiregames.com/wiki/Modding_Guide 

Quote

Mods distributed with, or as part of, 0 A.D. are located within the game's installation directory, under binaries/data/mods/.

But then it says:

Quote
  • User created mods should be located in a user's mods directory. The exact location differs depending on which Operating System you're running:

  • On Windows (Vista or newer): C:\Users\{name_of_user}\Documents\My Games\0ad\mods\

So it is unclear whether I should create my mod in binaries or in the my games folder. I thought I had figured out the answer to this because I was able to use the millenium mod by putting it in the documents\my games\0ad\mods\ folder. However, when I tried to edit the mod to change the cost of the support_female-citizen of the anglo-saxon side, the female citizen vanished from the game. The code I used was:

Quote

<?xml version="1.0" encoding="utf-8"?>
<Entity parent="template_unit_support_female_citizen">
  <Attack>
    <Melee>
      <Damage>
        <Hack op="mul">1.5</Hack>
      </Damage>

<cost>

<food>10</food>

</cost>
    </Melee>
  </Attack>
  <Health>
    <Max>75</Max>
  </Health>
  <Identity>
    <Civ>anglo</Civ>
    <SpecificName>Cwene</SpecificName>
    <GenericName>Woman</GenericName>
    <Icon>units/celt_support_female_citizen.png</Icon>
  </Identity>
  <VisualActor>
    <Actor>units/norse/female_citizen.xml</Actor>
  </VisualActor>
</Entity>
 

I'm not sure if the issue is to do with me needing to have the <cost> and </cost> in a very specific position - does the position of the words matter? I mean I notice in some of the code it is written like this:

Example words 1
       Example words to the right

Does it matter if I write it like this:

Example words 1
Example words to the right

If the position of the words matter, can someone tell me how to format them correctly in visual basic (which I know nothing about - it is just some folders opened up in visual basic). I tried pressing tab but the words don't allign.

What is the purpose of "Binaries"?


 

Edited by LordStark
Link to comment
Share on other sites

Your mod is a user mod.

The indentation doesn't really matter, but you'll need to embed the resource cost in a "resources" tag, like can be seen in other templates.

Spoiler
  <Cost>
    <Resources>
      <food>300</food>
    </Resources>
  </Cost>

(And mind capitalisation.)

 

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...