Jump to content

How can I add a new civ to 0 A.D. via modding?


Recommended Posts

I can't find any tutorials out there about how to create a new civ. I downloaded Delenda_Est Mod and look through it's files. I saw a civs folder within simulation/data/, I copied one of their civs into my mod and modified. I can open the game normally but when I press Singleplayer > Matches, it stuck in "Loading map data. Please wait..." and with bunch of errors on the top-left side.

Capture.PNG

Link to post
Share on other sites

First of all, which version of 0 A.D. are you using, the latest stable (A23) or the svn development version (A24)? If you take files from a A24 mod and apply them on A23, or vice versa, you're very likely to encounter errors. It's best to disable all other mods and take files directly from the default (public) game. You can browse the latest stable files at https://github.com/0ad/0ad/tree/eb2fc5c53d0c55de308be6dc5bb7f952cfbc210d/binaries/data/mods/public and files of the svn development version at https://trac.wildfiregames.com/browser/ps/trunk/binaries/data/mods/public .

To introduce a new civilization, you need to add a simulation/data/civs/{civ}.json file, yes. You can copy one from elsewhere and edit it, or write a new one from scratch. Open the file in a text editor. The crucial thing is the civ code (line 2), e.g. 

    "Code": "athen",

This should match the file name (hence athen.json), is used for civ-bonuses and technologies (under simulation/data/technologies), and entity templates (under simulation/templates). Now if view the rest of your {civ}.json file, you'll see many fields (e.g. "Emblem", "Music", "WallSets", "StartEntities", "Formations", SkirmishReplacements") include file names. Make sure those files actually exist, and verify they're correct! Otherwise you will get errors.

You also might want to have a look at https://wildfiregames.com/forum/topic/21083-how-to-modify-0-ad/ , a thread containing a lot of questions and answers about modifying the game.

  • Like 2
Link to post
Share on other sites

Welcome to the Forum, Lunari8546.

Learning to create mods requires alot of patience and knowledge that one must build up first.

A civilisation is hooked up with many factors such as; 3D models, textures, actors and templates, meaning that just copying one folder won't do you much good.


Delenda represents a very complex mod which changes the whole gameplay. I'd advise you to start with something smaller to explore the basics.

If you require help, feel free to DM me.

 

  • Like 1
Link to post
Share on other sites

@Nescio @Panther

Thanks for your replies, I figured it out why the errors occurred. It's because I created many civ.xmls but it was empty inside.

The main problem now is that "StartEntities": [] seems to be not working. When I start the game using my civ. It said that it cannot load the unit file, but the unit file exists. Also removing the units in StartEntities, only leaving civil_centre not work as well. 

Link to post
Share on other sites
  • 2 weeks later...

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.

×
×
  • Create New...