mattusili Posted December 5, 2011 Report Share Posted December 5, 2011 I would like create couple of new civs, is it possible to do it in 0 A.D.? What files I have to create or edit to make the civ properly? Pleasre about help? Quote Link to comment Share on other sites More sharing options...
MishFTW Posted December 5, 2011 Report Share Posted December 5, 2011 The design document and the artist design document are good places to start. Good luck? And consider applying for an artist or modeler position. Quote Link to comment Share on other sites More sharing options...
fcxSanya Posted December 6, 2011 Report Share Posted December 6, 2011 I propose to look at the Rise of the East mod, you can download it and look how it works. Currently it is impossible to add more civs to extend 0 A.D. properly, so you need to replace existing ones (this is what 'Rise of the East' do) or make your own mod from scratch (not extending 0 A.D.). Quote Link to comment Share on other sites More sharing options...
Spahbod Posted December 6, 2011 Report Share Posted December 6, 2011 I propose to look at the Rise of the East mod, you can download it and look how it works. Currently it is impossible to add more civs to extend 0 A.D. properly, so you need to replace existing ones (this is what 'Rise of the East' do) or make your own mod from scratch (not extending 0 A.D.).Are you sure it is impossible to add more Civs? You can add a new civ file I think. Quote Link to comment Share on other sites More sharing options...
fcxSanya Posted December 6, 2011 Report Share Posted December 6, 2011 Are you sure it is impossible to add more Civs? You can add a new civ file I think.Identity component have the fixed six civilizations (+gaia) in it's schema. This schema used by the templates validator, so if it will encounter some other civ code in templates, the validator will report a error. Quote Link to comment Share on other sites More sharing options...
Mythos_Ruler Posted December 6, 2011 Report Share Posted December 6, 2011 Right, but can't that JS file be edited to include a new civ? Quote Link to comment Share on other sites More sharing options...
fcxSanya Posted December 6, 2011 Report Share Posted December 6, 2011 Right, but can't that JS file be edited to include a new civ? You can edit it in your local copy, but the question is how you will distribute your mod. I think you can copy this file into your mod and it should override standard (0 A.D.'s) one, but in this case it will be compatible with 0 A.D. only until it is unchanged in 0 A.D. and it will be incompatible with other mods which distribute their own version of this file. It is why I said 'Currently it is impossible to add more civs to extend 0 A.D. properly'. You definitely can find some workaround now, but for true support of moddable civilizations list we need to not hardcode it. Quote Link to comment Share on other sites More sharing options...
Mythos_Ruler Posted December 6, 2011 Report Share Posted December 6, 2011 You can edit it in your local copy, but the question is how you will distribute your mod. I think you can copy this file into your mod and it should override standard (0 A.D.'s) one, but in this case it will be compatible with 0 A.D. only until it is unchanged in 0 A.D. and it will be incompatible with other mods which distribute their own version of this file. It is why I said 'Currently it is impossible to add more civs to extend 0 A.D. properly'. You definitely can find some workaround now, but for true support of moddable civilizations list we need to not hardcode it.Gotcha. Quote Link to comment Share on other sites More sharing options...
SMST Posted December 31, 2011 Report Share Posted December 31, 2011 HOOOLD on a second, everypony. Why were civs hardcoded in the first place? Quote Link to comment Share on other sites More sharing options...
Mythos_Ruler Posted December 31, 2011 Report Share Posted December 31, 2011 HOOOLD on a second, everypony. Why were civs hardcoded in the first place?I don't think they're "hard coded," they're just difficult to add at this point by editing a bunch of javascript files. Quote Link to comment Share on other sites More sharing options...
SMST Posted December 31, 2011 Report Share Posted December 31, 2011 (edited) I don't think they're "hard coded," they're just difficult to add at this point by editing a bunch of javascript files.[...]but for true support of moddable civilizations list we need to not hardcode it.What he said. Edited December 31, 2011 by SMST Quote Link to comment Share on other sites More sharing options...
Mythos_Ruler Posted December 31, 2011 Report Share Posted December 31, 2011 What he said.He doesn't mean that it's hard coded in the game's EXE, only that proper mod support for civs is not implemented yet. I could be wrong. Quote Link to comment Share on other sites More sharing options...
Kimball Posted December 31, 2011 Report Share Posted December 31, 2011 Just to set the record straight here, Rise of the East does not replace any current faction (even with the current implementation of mod support), and no mod needs to. It will be simpler in the future, but currently there is one aspect that is "hard-coded."There are two ways of installing the Chinese civilization. Because there are two folders that are automatically recognized by the game (public and internal, hence "hard-coded"), you can download the mod and rename the folder to internal and the game will load the data. Alternatively, if you've got the binaries and not a compiled version, you can run the following script to load any mod folder:./pyrogenesis -mod=FOLDERNAMEThis is only necessary for team members who already have an internal folder anyway. In the future, we plan to have the game recognize any and all folders in the mods folder and allow you through a simple GUI prompt to load or disable certain folders to your liking. I'd like this to happen sooner rather than later, but alas, I'm somewhat biased on the matter. Hope that clears things up. Quote Link to comment Share on other sites More sharing options...
fcxSanya Posted December 31, 2011 Report Share Posted December 31, 2011 HOOOLD on a second, everypony. Why were civs hardcoded in the first place?I don't think they're "hard coded," they're just difficult to add at this point by editing a bunch of javascript files.He doesn't mean that it's hard coded in the game's EXE, only that proper mod support for civs is not implemented yet. I could be wrong.Here is part of the Indentity.js file:11 "<element name='Civ' a:help='Civilisation that this unit is primarily associated with'>" +12 "<choice>" +13 "<value a:help='Gaia (world objects)'>gaia</value>" +14 "<value a:help='Carthaginians'>cart</value>" +15 "<value a:help='Celts'>celt</value>" +16 "<value a:help='Hellenes'>hele</value>" +17 "<value a:help='Iberians'>iber</value>" +18 "<value a:help='Persians'>pers</value>" +19 "<value a:help='Romans'>rome</value>" +20 "</choice>" +This is the definite list in the code file, this is why I said 'hardcoded'. But this is a javascript file, i.e. script, so Michael is right, you don't need to have developer tools and recompile the engine (an executable file) to implement changes, you can just edit this file with a regular text editor and your changes will be in the game. This is not much different from a config file editing. And if we will just move this list into separate config file (to not have it hardcoded in this sense), this still will not solve the discussed issue.More details about engine and mods support: 0 A.D. (as a product) consist from the engine 'pyrogenesis' and the mod ('public'). Engine compiled from C++/C/asm source code into a platform specific executable file. Mods are folders with resources, config files and scripts; they are platform independent and don't require to recompile the engine to implement changes.You can create your own mod with any civs you want. You can fork the public mod and add civs to it.The problem only arise when you want to add civ into existing public mod (i.e. extend public mod with your own mod). Even in this case you can copy the Indentity.js into your mod, add a civ into it and it should work correctly with the public mod. It is just not a perfect solution, because you will need to update your mod when the Identity.js is changed and you will not be able to enable multiple such mods simultaneously. We need a mechanism like what Ben implemented for setup screen: there is a separate json file for each civ (in the civs folder, and the loadCivData function in the functions_civinfo.js, so you can just add corresponding civ files into your mod and this will not conflict with civ files added by another mod.Rise of the East does not replace any current faction (even with the current implementation of mod support)Hm, maybe I misunderstood something, but how do you add new civs in this case and what is this:<Identity> <Civ>celt</Civ> <SelectionGroupName>units/chin_infantry_spearman_b</SelectionGroupName> <SpecificName>Chang Mao Bing</SpecificName> <History></History> <Icon>units/chin_infantry_spearman.png</Icon></Identity> Quote Link to comment Share on other sites More sharing options...
Kimball Posted December 31, 2011 Report Share Posted December 31, 2011 Hm, maybe I misunderstood something, but how do you add new civs in this case and what is this:<Identity> <Civ>celt</Civ> <SelectionGroupName>units/chin_infantry_spearman_b</SelectionGroupName> <SpecificName>Chang Mao Bing</SpecificName> <History></History> <Icon>units/chin_infantry_spearman.png</Icon></Identity>That appears to be a typo. The project has thankfully advanced a little since our initial debut almost a year ago. We may have used 'celt' as our civ code for our demo release for simplicity's sake then, but all of our sim files now use 'chin' as the civ code. Adding a new json file was all we needed to add China as a faction, giving them a civ profile (http://media.moddb.com/images/mods/1/17/16770/civprofile.1.jpg), validating 'chin' as a civ code and defining a faction emblem for when the player is using them. I'm not sure about selecting them for random maps, as at the time, that wasn't really possible with the present state of the game. Perhaps now we would have had to include them in the Identity.js file (which, as you said, would prevent you from using multiple faction mods simultaneously), which would mean we would need to invent a more intuitive way of adding new factions to that list (perhaps automatically populating that list using available json files?). Quote Link to comment Share on other sites More sharing options...
Ykkrosh Posted December 31, 2011 Report Share Posted December 31, 2011 We could just change the schema to allow arbitrary <text/> instead of using a <choice> list. Then it wouldn't automatically detect typos (like someone writing "<Civ>kart</Civ>") but that seems a rare problem and easily detected by other means. Quote Link to comment Share on other sites More sharing options...
mattusili Posted October 19, 2014 Author Report Share Posted October 19, 2014 Just adding civs in folder civs solve the situation, but 0 AD has some already prepared civs. Is it possible to replace them by another one? Quote Link to comment Share on other sites More sharing options...
Stan` Posted October 19, 2014 Report Share Posted October 19, 2014 You can add an remove civs.To add, create a mod folder with a civ.json fileTo remove Add the .DELETED at the end of an existing civ (Don't quote me on that) Quote Link to comment Share on other sites More sharing options...
mattusili Posted October 22, 2014 Author Report Share Posted October 22, 2014 Thx for advice, but during proces of adding new civ I have to edited file Identity.js? When I opened it, it looks a little different from this version which I found on forum. After editing the civ code and loading the game engine crash, because error in file Identity.js. When I delete all my changes everything is working fine. Quote Link to comment Share on other sites More sharing options...
wowgetoffyourcellphone Posted October 24, 2014 Report Share Posted October 24, 2014 Thx for advice, but during proces of adding new civ I have to edited file Identity.js? When I opened it, it looks a little different from this version which I found on forum. After editing the civ code and loading the game engine crash, because error in file Identity.js. When I delete all my changes everything is working fine.This thread seems to be out of date, With some digs I find that you must make a file in the binaries/data/mods/public/civs folder. Quote Link to comment Share on other sites More sharing options...
thamlett Posted October 24, 2014 Report Share Posted October 24, 2014 This thread seems to be out of date, With some digs I find that you must make a file in the binaries/data/mods/public/civs folder. There's no reason to bring it back to life Quote Link to comment Share on other sites More sharing options...
niektb Posted October 24, 2014 Report Share Posted October 24, 2014 The TS has the right I suppose to bring it back. There is no need to modify Identity.js. You could maybe look at some existing mods like Rise of the East: https://github.com/0ADMods/han_chinaIt has some examples on how to add new civs. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.