Phalanx Posted July 11, 2017 Report Share Posted July 11, 2017 I'm trying to create a civ json for the Parthians, but every time I open up Pyrogenesis, it claims that their is an error at line 30 col 12, which is an indented space before "Heroes": "Heroes": [ { "Name": "Pacorus II", "Class": "", "Armament": "", "Emblem": "", "History": "Pacorus gave some stuff to China." }, { "Name": "Mithridates III", "Class": "", "Armament": "", "Emblem": "". "History": "He done did @#$%." } ] } ], Quote Link to comment Share on other sites More sharing options...
Itms Posted July 11, 2017 Report Share Posted July 11, 2017 The issue probably comes from the line just before (it would be a missing comma or something like this). Additionally you have a wrong period instead of comma for Mithridates' emblem. 1 Quote Link to comment Share on other sites More sharing options...
Phalanx Posted July 11, 2017 Author Report Share Posted July 11, 2017 hmmm..... The line before is ], and I fixed the period, but it still gives me an error.. The exact error is: JParse expected "," or "]" after array element in line 30 column 12. Quote Link to comment Share on other sites More sharing options...
Itms Posted July 11, 2017 Report Share Posted July 11, 2017 Please post the full file so we have the complete JSON hierarchy. Sometimes one forgets to close a single-element object or array, or make other small mistakes like this 1 Quote Link to comment Share on other sites More sharing options...
Phalanx Posted July 11, 2017 Author Report Share Posted July 11, 2017 parth.json Quote Link to comment Share on other sites More sharing options...
Stan` Posted July 11, 2017 Report Share Posted July 11, 2017 (edited) Opening it in VSCode I can see you forgot a ] before line 29 If you can't use something like that, use online Json Validators they are generally good at detecting errors. Edited July 11, 2017 by stanislas69 1 Quote Link to comment Share on other sites More sharing options...
Phalanx Posted July 11, 2017 Author Report Share Posted July 11, 2017 4 minutes ago, stanislas69 said: Opening it in VSCode I can see you forgot a ] before line 29 If you can't use something like that, use online Json Validators they are generally good at detecting errors. Found it! Thanks, now it gives me a different error, but I'm assuming it's because I've referenced techs and units and probably other files that don't exist yet.. 1 Quote Link to comment Share on other sites More sharing options...
leper Posted July 11, 2017 Report Share Posted July 11, 2017 As always posting full error messages (starting from and including the first one) does help. 1 Quote Link to comment Share on other sites More sharing options...
Phalanx Posted July 11, 2017 Author Report Share Posted July 11, 2017 So... I tried to create a unit for a new faction. I believe I filled out all the correct files, but when I try to place it in Atlas, I get the following error message: CXeromyces: Failed to parse XML file simulation/templates/units/par_infantry_spearman.xml Failed to load entity template 'units/par_infantry_spearman' Is there a checklist of stuff that needs to be filled out when creating a faction? Quote Link to comment Share on other sites More sharing options...
Itms Posted July 11, 2017 Report Share Posted July 11, 2017 "Failed to parse XML" means your XML is malformed. You probably have a typo in that file too, care to attach it? Or open it in a nice editor like Stan suggested Quote Link to comment Share on other sites More sharing options...
Phalanx Posted July 11, 2017 Author Report Share Posted July 11, 2017 infantry_spearman_b.xml parth_infantry_spearman.xml Quote Link to comment Share on other sites More sharing options...
Itms Posted July 11, 2017 Report Share Posted July 11, 2017 Why is the file called 'parth_infantry_spearman' but the map tries to load 'par_infantry_spearman'? Quote Link to comment Share on other sites More sharing options...
Phalanx Posted July 11, 2017 Author Report Share Posted July 11, 2017 8 minutes ago, Itms said: Why is the file called 'parth_infantry_spearman' but the map tries to load 'par_infantry_spearman'? 'par' was the old name, I thought I changed it to parth. Atlas claims to be trying to load parth... Quote Link to comment Share on other sites More sharing options...
Itms Posted July 11, 2017 Report Share Posted July 11, 2017 If the map was saved with a reference to the old 'par_' name you will have to edit the map XML file yourself. Use Find + Replace. Quote Link to comment Share on other sites More sharing options...
Phalanx Posted July 11, 2017 Author Report Share Posted July 11, 2017 4 minutes ago, Itms said: If the map was saved with a reference to the old 'par_' name you will have to edit the map XML file yourself. Use Find + Replace. I'm sorry, which file would this be in? Quote Link to comment Share on other sites More sharing options...
Itms Posted July 11, 2017 Report Share Posted July 11, 2017 Depending on the mods activated when you started Atlas, it should be in a mod directory under maps/ (if it's the public mod, it's binaries/data/mods/public/maps/). It's likely to be a scenario map, so saved under scenarios/. There will be an XML and PMP file, open the XML one. Quote Link to comment Share on other sites More sharing options...
Phalanx Posted July 11, 2017 Author Report Share Posted July 11, 2017 No, sorry. I'm trying to place the unit in Atlas, and Atlas is giving me the error. I haven't saved a scenario. I'm just trying to get my unit to physically show up in Atlas. Quote Link to comment Share on other sites More sharing options...
Itms Posted July 11, 2017 Report Share Posted July 11, 2017 Ah that sounds strange then. Just to be sure, did you restart Atlas so it loads the new template file names? Quote Link to comment Share on other sites More sharing options...
Phalanx Posted July 11, 2017 Author Report Share Posted July 11, 2017 2 minutes ago, Itms said: Ah that sounds strange then. Just to be sure, did you restart Atlas so it loads the new template file names? yep Quote Link to comment Share on other sites More sharing options...
Itms Posted July 11, 2017 Report Share Posted July 11, 2017 Alright, I am surprised by the error message then. But in any case, the template you attached has a typo, the closing </VisualActor> tag is malformed and misses the forward slash. Quote Link to comment Share on other sites More sharing options...
Phalanx Posted July 11, 2017 Author Report Share Posted July 11, 2017 Quote Link to comment Share on other sites More sharing options...
Lion.Kanzen Posted July 11, 2017 Report Share Posted July 11, 2017 Post the error from interest log. https://trac.wildfiregames.com/wiki/GameDataPaths Quote Link to comment Share on other sites More sharing options...
Stan` Posted July 12, 2017 Report Share Posted July 12, 2017 I'm what folder is that file on the second line ? Quote Link to comment Share on other sites More sharing options...
Itms Posted July 12, 2017 Report Share Posted July 12, 2017 13 hours ago, Itms said: the template you attached has a typo, the closing </VisualActor> tag is malformed and misses the forward slash. 3 Quote Link to comment Share on other sites More sharing options...
Phalanx Posted July 12, 2017 Author Report Share Posted July 12, 2017 19 hours ago, Itms said: But in any case, the template you attached has a typo, the closing </VisualActor> tag is malformed and misses the forward slash. Thanks! I fixed that! Now I just have to figure out why i FLIPS OUT over the shield. If I try to place the unit in Atlas, the units shows up sans shield, but I get like 7 messages about how it can't find the xml file for the shield (I edited a Persian rectangle shield) 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.