andy5995 Posted February 22, 2021 Report Share Posted February 22, 2021 (edited) When I reported on IRC that my skirmish maps weren't working, @Stan`gave me a link to this script https://code.wildfiregames.com/P232 I've attached the python script it to this post. python3 <scriptname> <version> <path> The correct version to use is "7". For the path, I used "." (single dot) while in the directory containing my custom skirmish maps. After that, you may have to edit your xml. I still get errors such as the following when opening most maps into Atlas Quote ERROR: Failed to load entity template 'gaia/flora_tree_cretan_date_palm_tall' ERROR: Failed to load entity template 'gaia/flora_tree_cretan_date_palm_tall' ERROR: CCacheLoader failed to find archived or source file for: "simulation/templates/gaia/flora_tree_cretan_date_palm_tall.xml" ERROR: Failed to load entity template 'gaia/flora_tree_cretan_date_palm_tall' ERROR: Failed to load entity template 'gaia/flora_tree_cretan_date_palm_tall' ERROR: CCacheLoader failed to find archived or source file for: "simulation/templates/gaia/flora_tree_cretan_date_palm_tall.xml" ERROR: Failed to load entity template 'gaia/flora_tree_cretan_date_palm_tall' ERROR: Failed to load entity template 'gaia/flora_tree_cretan_date_palm_tall' ERROR: CCacheLoader failed to find archived or source file for: "simulation/templates/gaia/flora_tree_cretan_date_palm_tall.xml" ERROR: Failed to load entity template 'gaia/flora_tree_cretan_date_palm_tall' ERROR: Failed to load entity template 'gaia/flora_tree_cretan_date_palm_tall' ERROR: CCacheLoader failed to find archived or source file for: "simulation/templates/gaia/flora_tree_cretan_date_palm_tall.xml" ERROR: Failed to load entity template 'gaia/flora_tree_cretan_date_palm_tall' ERROR: Failed to load entity template 'gaia/flora_tree_cretan_date_palm_tall' GAME STARTED, ALL INIT COMPLETE 0ad-map-upgrade-20210222-01.py Edited February 22, 2021 by andy5995 2 1 Quote Link to comment Share on other sites More sharing options...
wowgetoffyourcellphone Posted February 22, 2021 Report Share Posted February 22, 2021 1 hour ago, andy5995 said: gaia/flora_tree_cretan_date_palm_tall With these errors you can just use Notepad++ or your favorite text editor and do a ctrl-H replace all gaia/tree/cretan_date_palm_tall 1 Quote Link to comment Share on other sites More sharing options...
andy5995 Posted February 22, 2021 Author Report Share Posted February 22, 2021 Thanks. I also want to give it some thought and see if it could be done with something like find . -name '*' -print -exec sed -i 's/gaia\/tree\/cretan_date_palm_tall/replacement-text/g' {} \; to fix all the files at once. I'll take a closer look later. Quote Link to comment Share on other sites More sharing options...
Nescio Posted February 22, 2021 Report Share Posted February 22, 2021 (edited) 21 hours ago, andy5995 said: Thanks. I also want to give it some thought and see if it could be done with something like find . -name '*' -print -exec sed -i 's/gaia\/tree\/cretan_date_palm_tall/replacement-text/g' {} \; to fix all the files at once. I'll take a closer look later. You should have a look at the patches that broke your maps, they have sed scripts to fix things: https://code.wildfiregames.com/D1009 https://code.wildfiregames.com/D1010 https://code.wildfiregames.com/D2234 https://code.wildfiregames.com/D2254 https://code.wildfiregames.com/D2774 https://code.wildfiregames.com/D3012 https://code.wildfiregames.com/D3097 Furthermore, you need to replace {civ}_* with {civ}/* (for structures and units). https://code.wildfiregames.com/P225 was used for that, though that script does more than you need, so it's probably better to write a sed script for that (there are only 13 civs). [EDIT] Here you go: Spoiler find binaries/data/mods/public/maps/ \( -name '*.js' -o -name '*.json' -o -name '*.xml' \) -print0 | xargs -0 sed -i \ -e 's,structures/athen_,structures/athen/,g' \ -e 's,structures/brit_,structures/brit/,g' \ -e 's,structures/cart_,structures/cart/,g' \ -e 's,structures/gaul_,structures/gaul/,g' \ -e 's,structures/iber_,structures/iber/,g' \ -e 's,structures/kush_,structures/kush/,g' \ -e 's,structures/mace_,structures/mace/,g' \ -e 's,structures/maur_,structures/maur/,g' \ -e 's,structures/pers_,structures/pers/,g' \ -e 's,structures/ptol_,structures/ptol/,g' \ -e 's,structures/rome_,structures/rome/,g' \ -e 's,structures/sele_,structures/sele/,g' \ -e 's,structures/spart_,structures/spart/,g' \ -e 's,units/athen_,units/athen/,g' \ -e 's,units/brit_,units/brit/,g' \ -e 's,units/cart_,units/cart/,g' \ -e 's,units/gaul_,units/gaul/,g' \ -e 's,units/iber_,units/iber/,g' \ -e 's,units/kush_,units/kush/,g' \ -e 's,units/mace_,units/mace/,g' \ -e 's,units/maur_,units/maur/,g' \ -e 's,units/pers_,units/pers/,g' \ -e 's,units/ptol_,units/ptol/,g' \ -e 's,units/rome_,units/rome/,g' \ -e 's,units/sele_,units/sele/,g' \ -e 's,units/spart_,units/spart/,g' And insert any other civs your mod has. [EDIT] There are probably some other things I forgot. Edited February 23, 2021 by Nescio forgot D2234, D3012, D3097 1 Quote Link to comment Share on other sites More sharing options...
Grapjas Posted February 22, 2021 Report Share Posted February 22, 2021 (edited) If people need a little more guidance on how to convert their maps from a23 to a24 on windows: click start, type "cmd" type "python3" inside the command prompt and hit enter, it will open the microsoft app store directing you to the python app. Download and install that. Go to the directory where your skirmish map is. Put the file @andy5995 provided in there. Click the directory bar Spoiler Type cmd and hit enter Spoiler copy the following line and paste it inside the command prompt (including the dot at the end): python3 0ad-map-upgrade-20210222-01.py 7 . Done. Now you can open up your map again. Edited February 23, 2021 by Grapjas 4 Quote Link to comment Share on other sites More sharing options...
andy5995 Posted February 23, 2021 Author Report Share Posted February 23, 2021 19 hours ago, Nescio said: You should have a look at the patches that broke your maps, they have sed scripts to fix things: https://code.wildfiregames.com/D1009 https://code.wildfiregames.com/D1010 https://code.wildfiregames.com/D2254 https://code.wildfiregames.com/D2774 https://code.wildfiregames.com/D3012 Furthermore, you need to replace {civ}_* with {civ}/* (for structures and units). https://code.wildfiregames.com/P225 was used for that, though that script does more than you need, so it's probably better to write a sed script for that (there are only 13 civs). [EDIT] There are probably some other things I forgot. I ran all of these scripts. So far the only things I've noticed are a missing bench ERROR: Failed to load entity template 'other/bench' ERROR: CCacheLoader failed to find archived or source file for: "simulation/templates/other/bench.xml" (which I couldn't figure out how to fix) And the civs can't be changed from the game setup menu. When I uncheck the player name and civ from within Atlas, changes to the civ name are not saved. Quote Link to comment Share on other sites More sharing options...
Grapjas Posted February 23, 2021 Report Share Posted February 23, 2021 1 hour ago, andy5995 said: And the civs can't be changed from the game setup menu. When I uncheck the player name and civ from within Atlas, changes to the civ name are not saved. I noticed this too. I simply deleted them in the xml file and then you can change settings again @ game setup. Same story for teams, cant be changed either unless deleted in xml. "PlayerData": [ { }, { }, { }, { }, { }, { }, { }, { } ], 1 Quote Link to comment Share on other sites More sharing options...
Nescio Posted February 23, 2021 Report Share Posted February 23, 2021 1 hour ago, andy5995 said: I ran all of these scripts. So far the only things I've noticed are a missing bench ERROR: Failed to load entity template 'other/bench' ERROR: CCacheLoader failed to find archived or source file for: "simulation/templates/other/bench.xml" (which I couldn't figure out how to fix) That was D3097. I've now updated the previous post. 1 hour ago, andy5995 said: And the civs can't be changed from the game setup menu. When I uncheck the player name and civ from within Atlas, changes to the civ name are not saved. I'm not sure what you mean. 1 Quote Link to comment Share on other sites More sharing options...
Stan` Posted February 23, 2021 Report Share Posted February 23, 2021 2 minutes ago, Nescio said: And the civs can't be changed from the game setup menu. When I uncheck the player name and civ from within Atlas, changes to the civ name are not saved. Yeah I noticed that. Changing them work though unnasigning them doesn't. Quote Link to comment Share on other sites More sharing options...
Grapjas Posted February 23, 2021 Report Share Posted February 23, 2021 7 minutes ago, Nescio said: I'm not sure what you mean. If a civ has been set for a player inside Atlas you cannot change them ingame at the gamesetup. As if it were a scenario map even though it's a skirmish map. 1 Quote Link to comment Share on other sites More sharing options...
wowgetoffyourcellphone Posted February 23, 2021 Report Share Posted February 23, 2021 27 minutes ago, Grapjas said: If a civ has been set for a player inside Atlas you cannot change them ingame at the gamesetup. As if it were a scenario map even though it's a skirmish map. Not only that, but in Atlas you can uncheck the civs and save the map, but Atlas bugs and assigns default civs anyway. Quite annoying. 45 minutes ago, Grapjas said: noticed this too. I simply deleted them in the xml file and then you can change settings again @ game setup. Same story for teams, cant be changed either unless deleted in xml Yeah, I've had to do this as well. 2 Quote Link to comment Share on other sites More sharing options...
andy5995 Posted February 23, 2021 Author Report Share Posted February 23, 2021 40 minutes ago, wowgetoffyourcellphone said: Not only that, but in Atlas you can uncheck the civs and save the map, but Atlas bugs and assigns default civs anyway. Quite annoying. Yeah, I've had to do this as well. I've noticed too that when editing the xml directly and removing the civ names, everything is fine. Then I open it in Atlas, make no changes, and click save. The civ names return. 2 Quote Link to comment Share on other sites More sharing options...
Stan` Posted February 23, 2021 Report Share Posted February 23, 2021 Not sure there is a ticket for it. Should be somewhat easy to debug and patch if someone has the time Quote Link to comment Share on other sites More sharing options...
Lopess Posted April 4, 2021 Report Share Posted April 4, 2021 How can I do this procedure in linux? Quote Link to comment Share on other sites More sharing options...
andy5995 Posted April 5, 2021 Author Report Share Posted April 5, 2021 (edited) 16 hours ago, Lopess said: How can I do this procedure in linux? @LopessFirst use the python script as mentioned in the first post. Then use the 7 scripts I've attached, that are based on the 7 patches mentioned by @Nescio None of these 7 scripts require an argument. Just use sh D????.sh Each script will look in a "maps" directory relative to your current directory, and change all maps it finds. There will be no messages output by the scripts (unless there's an error). D1009.sh D1010.sh D2234.sh D2254.sh D2774.sh D3012.sh D3097.sh Edited April 5, 2021 by andy5995 3 Quote Link to comment Share on other sites More sharing options...
happyconcepts Posted April 13, 2021 Report Share Posted April 13, 2021 (edited) On 22/02/2021 at 6:45 AM, andy5995 said: gaia/flora_tree_cretan_date_palm_tall What ... is this palm tree deleted in A24? And would these scripts also update scenario maps or only skirmish maps? Edited April 13, 2021 by happyconcepts About scenario maps Quote Link to comment Share on other sites More sharing options...
Lion.Kanzen Posted April 13, 2021 Report Share Posted April 13, 2021 @Trinketos 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.