Grapjas Posted November 1, 2021 Report Share Posted November 1, 2021 On 25/10/2021 at 7:12 PM, SciGuy42 said: You can also gift units to your ally. Simply move them to the little palisade pen and they will switch ownership. Your ally may also gift units to you as well. Interesting mechanic. 1 Quote Link to comment Share on other sites More sharing options...
SciGuy42 Posted November 2, 2021 Author Report Share Posted November 2, 2021 Hi folks, it is now time for me to convert this to A25. Does anyone have a pointer to what scripts I need to run? And another silly question, how do I actually installl A25 on Linux (Ubuntu 20.04)? Would this work: sudo add-apt-repository ppa:wfg/0ad sudo apt-get update sudo apt-get install 0ad 2 1 Quote Link to comment Share on other sites More sharing options...
Lion.Kanzen Posted November 2, 2021 Report Share Posted November 2, 2021 @Freagarach Quote Link to comment Share on other sites More sharing options...
Lopess Posted November 2, 2021 Report Share Posted November 2, 2021 2 hours ago, SciGuy42 said: Hi folks, it is now time for me to convert this to A25. Does anyone have a pointer to what scripts I need to run? And another silly question, how do I actually installl A25 on Linux (Ubuntu 20.04)? Would this work: sudo add-apt-repository ppa:wfg/0ad sudo apt-get update sudo apt-get install 0ad With snap is: sudo snap install 0ad On Alpha 24 there was a difficulty in launching the ppa, I'm not sure if it was resolved on this new Alpha. Quote Link to comment Share on other sites More sharing options...
nwtour Posted November 3, 2021 Report Share Posted November 3, 2021 3 hours ago, SciGuy42 said: Hi folks, it is now time for me to convert this to A25. Does anyone have a pointer to what scripts I need to run? I sent a pull request with the conversion results. The first mission launches successfullyhttps://github.com/SciGuy42/Macedonia_0ad/pull/2But some models have been removed from the game and cannot be automatically converted binaries/data/mods/public/simulation/templates/units/mace_support_healer_e.xml binaries/data/mods/public/simulation/templates/units/mace/champion_cavalry_barracks.xml binaries/data/mods/public/simulation/templates/units/gaul/champion_infantry_barracks.xml binaries/data/mods/public/simulation/templates/structures/brit_kennel.xml 2 Quote Link to comment Share on other sites More sharing options...
Lion.Kanzen Posted November 3, 2021 Report Share Posted November 3, 2021 that's why later I tell them not to delete things from the game, leave it as eyecandy. Quote Link to comment Share on other sites More sharing options...
Freagarach Posted November 3, 2021 Report Share Posted November 3, 2021 7 hours ago, nwtour said: I sent a pull request with the conversion results. The first mission launches successfullyhttps://github.com/SciGuy42/Macedonia_0ad/pull/2But some models have been removed from the game and cannot be automatically converted binaries/data/mods/public/simulation/templates/units/mace_support_healer_e.xml binaries/data/mods/public/simulation/templates/units/mace/champion_cavalry_barracks.xml binaries/data/mods/public/simulation/templates/units/gaul/champion_infantry_barracks.xml binaries/data/mods/public/simulation/templates/structures/brit_kennel.xml The mace healer should be good to go? (With the civ dir.) The mace champion can have the "_barracks" part removed. (It'll be spearcavarly then.) The gaul champion can have the "barracks" part changed to "swordsman". If you need the kennel, you'll have to make the template yourself. 11 hours ago, SciGuy42 said: Hi folks, it is now time for me to convert this to A25. Does anyone have a pointer to what scripts I need to run? And another silly question, how do I actually installl A25 on Linux (Ubuntu 20.04)? Would this work: sudo add-apt-repository ppa:wfg/0ad sudo apt-get update sudo apt-get install 0ad That should work, yes. 1 hour ago, Lion.Kanzen said: that's why later I tell them not to delete things from the game, leave it as eyecandy. We didn't remove art, merely some templates. Quote Link to comment Share on other sites More sharing options...
Lion.Kanzen Posted November 3, 2021 Report Share Posted November 3, 2021 9 hours ago, Freagarach said: The mace healer should be good to go? (With the civ dir.) The mace champion can have the "_barracks" part removed. (It'll be spearcavarly then.) The gaul champion can have the "barracks" part changed to "swordsman". If you need the kennel, you'll have to make the template yourself. That should work, yes. We didn't remove art, merely some templates. I thought the Kennel had been removed. Quote Link to comment Share on other sites More sharing options...
nwtour Posted November 3, 2021 Report Share Posted November 3, 2021 10 hours ago, Freagarach said: If you need the kennel, you'll have to make the template yourself. This is to @SciGuy42. I just convert without loss to the 25th version objects from the first three maps. I hope this will help the author hold a full transitionI can also offer a database of renamed files - it is very accelerating the migration process: https://github.com/nwtour/0ad_path_backward_capability/blob/main/24/map_backward_capability_list.json Quote Link to comment Share on other sites More sharing options...
SciGuy42 Posted November 3, 2021 Author Report Share Posted November 3, 2021 1 hour ago, nwtour said: This is to @SciGuy42. I just convert without loss to the 25th version objects from the first three maps. I hope this will help the author hold a full transitionI can also offer a database of renamed files - it is very accelerating the migration process: https://github.com/nwtour/0ad_path_backward_capability/blob/main/24/map_backward_capability_list.json Thanks all for the info. I have successfully installed a25 now. How exactly are you converting the scenarios though? Is there a script you have to run? Seems like a lot of templates have changed, so I will need to verify that any templates used in my javascript code as well as the scenarios themselves are updated. I have also created a branch called "a25" in the repo. If anyone wants to help, let me know your github name and I can add you to the repo. Quote Link to comment Share on other sites More sharing options...
SciGuy42 Posted November 3, 2021 Author Report Share Posted November 3, 2021 19 hours ago, nwtour said: I sent a pull request with the conversion results. The first mission launches successfullyhttps://github.com/SciGuy42/Macedonia_0ad/pull/2But some models have been removed from the game and cannot be automatically converted binaries/data/mods/public/simulation/templates/units/mace_support_healer_e.xml binaries/data/mods/public/simulation/templates/units/mace/champion_cavalry_barracks.xml binaries/data/mods/public/simulation/templates/units/gaul/champion_infantry_barracks.xml binaries/data/mods/public/simulation/templates/structures/brit_kennel.xml Feel free to make a pull request to merge into the a25 branch instead of master and I will approve. But also, how are you actually doing these conversions, what scripts are you running? Quote Link to comment Share on other sites More sharing options...
nwtour Posted November 3, 2021 Report Share Posted November 3, 2021 21 minutes ago, SciGuy42 said: Is there a script you have to run? I have not found a way to do this automaticallyI search in https://github.com/nwtour/0ad_path_backward_capability/blob/main/24/map_backward_capability_list.json and the history of git (example git whatchanged -n 5000 | grep gaul_infantry_javelinist_e) and substitute it into the command line : sed -i 's|other/fence_short|structures/fence_short|' maps/scenarios/* sed -i 's|other/palisades_rocks_watchtower|structures/palisades_watchtower|' maps/scenarios/* sed -i 's|geology_stonemine_tropic_quarry|rock/tropical_large|' maps/scenarios/* sed -i 's|gaia/fauna_hawk|birds/buzzard|' maps/scenarios/* sed -i 's|other/bridge_wooden|structures/bridge_wooden|' maps/scenarios/* sed -i 's|geology_metal_alpine|ore/alpine_small|' maps/scenarios/* sed -i 's|geology_stonemine_temperate_formation|rock/temperate_large_02|' maps/scenarios/* sed -i 's|flora_tree_aleppo_pine|tree/aleppo_pine|' maps/scenarios/* sed -i 's|geology_stonemine_alpine_quarry|rock/alpine_large|' maps/scenarios/* Quote Link to comment Share on other sites More sharing options...
nwtour Posted November 3, 2021 Report Share Posted November 3, 2021 2 minutes ago, SciGuy42 said: Feel free to make a pull request to merge into the a25 branch instead of master and I will approve Changed 3 minutes ago, SciGuy42 said: But also, how are you actually doing these conversions, what scripts are you running? I just start the game and fix the errors that appear on the screen when starting the Macedonia campaign Quote Link to comment Share on other sites More sharing options...
SciGuy42 Posted November 3, 2021 Author Report Share Posted November 3, 2021 12 minutes ago, nwtour said: Changed I just start the game and fix the errors that appear on the screen when starting the Macedonia campaign Thanks. The first error I get when I load Macedonia_1 is: Writing replay to /home/<my user name>/.local/share/0ad/replays/0.0.25/2021-11-03_0001 terminate called after throwing an instance of 'PSERROR_Game_World_MapLoadFailed' what(): Could not load terrain file - too old version! This is more than just replacing template names I think. How do you handle this one? Quote Link to comment Share on other sites More sharing options...
nwtour Posted November 3, 2021 Report Share Posted November 3, 2021 Just now, SciGuy42 said: Thanks. The first error I get when I load Macedonia_1 is: Writing replay to /home/<my user name>/.local/share/0ad/replays/0.0.25/2021-11-03_0001 terminate called after throwing an instance of 'PSERROR_Game_World_MapLoadFailed' what(): Could not load terrain file - too old version! Are you sure you downloaded Branch 25 to your mods folder? Version from https://github.com/nwtour/Macedonia_0ad.git this error should be fixed * (PMP files upgraded to 7 version) Quote Link to comment Share on other sites More sharing options...
SciGuy42 Posted November 3, 2021 Author Report Share Posted November 3, 2021 Just now, nwtour said: Are you sure you downloaded Branch 25 to your mods folder? Version from https://github.com/nwtour/Macedonia_0ad.git this error should be fixed * (PMP files upgraded to 7 version) I haven't done that yet, I mostly want to learn how to do it myself since I have another campaign in waiting as well How do you convert the PMP files? Quote Link to comment Share on other sites More sharing options...
nwtour Posted November 3, 2021 Report Share Posted November 3, 2021 (edited) @SciGuy42 On 27/07/2021 at 12:12 AM, Aoidos said: Hi @SciGuy42first, congratulations on the awesome work in this campaign. Regarding what is need to update these for alpha 25, I did some testing and updated the first scenario to alpha 24, following the instructions here Edited November 3, 2021 by nwtour Quote Link to comment Share on other sites More sharing options...
SciGuy42 Posted November 3, 2021 Author Report Share Posted November 3, 2021 9 minutes ago, nwtour said: @SciGuy42 Thanks, I can now use this script, and I should run it with 7 as the version, right? When I run it on one of my old maps, I get that it was converted successfully but the error when loading the scenaioro isn't particularly useful, it looks like this: Assertion failed: "0 && (L"Invalid map XML data")" Location: MapReader.cpp:768 (ReadEnvironment) Call stack: (0x55819d482e55) /usr/games/pyrogenesis(+0x5f4e55) [0x55819d482e55] (0x55819d422c19) /usr/games/pyrogenesis(+0x594c19) [0x55819d422c19] (0x55819d424291) /usr/games/pyrogenesis(+0x596291) [0x55819d424291] (0x55819d424b1b) /usr/games/pyrogenesis(+0x596b1b) [0x55819d424b1b] (0x55819d220179) /usr/games/pyrogenesis(+0x392179) [0x55819d220179] (0x55819d2281e6) /usr/games/pyrogenesis(+0x39a1e6) [0x55819d2281e6] (0x55819d228414) /usr/games/pyrogenesis(+0x39a414) [0x55819d228414] (0x55819d161cfc) /usr/games/pyrogenesis(+0x2d3cfc) [0x55819d161cfc] (0x55819cf38d80) /usr/games/pyrogenesis(+0xaad80) [0x55819cf38d80] (0x55819cf25f4e) /usr/games/pyrogenesis(+0x97f4e) [0x55819cf25f4e] (0x7f97b1abf0b3) /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf3) [0x7f97b1abf0b3] (0x55819cf365de) /usr/games/pyrogenesis(+0xa85de) [0x55819cf365de] errno = 0 (No error reported here) OS error = ? Yeah, I know that some templates in the xml are no longer in A25 but it doesn't tell me which template it actually got hung on. So how do you figure out when converting error by error which templates to change? Or do you basically assume all of them? Quote Link to comment Share on other sites More sharing options...
nwtour Posted November 3, 2021 Report Share Posted November 3, 2021 3 minutes ago, SciGuy42 said: Invalid map XML data Maybe: python3 script.py 7 Macedonia_1.xml python3 script.py 7 Macedonia_1.pmp Quote Link to comment Share on other sites More sharing options...
SciGuy42 Posted November 3, 2021 Author Report Share Posted November 3, 2021 5 minutes ago, nwtour said: Maybe: python3 script.py 7 Macedonia_1.xml python3 script.py 7 Macedonia_1.pmp Great, thanks, yes, it indeed has to be run on both the xml and pmp file. Now I am getting the template errors. OK, so here is what I will proceed with -- I will need to go over the .js files and test them with your converted versions, I see that there are some small changes to the API and UnitAI specifically that may cause an issue, as well as hardcoded old templates (unless you also replaced those?). I will let you know how far I get over the next few days. Quote Link to comment Share on other sites More sharing options...
nwtour Posted November 3, 2021 Report Share Posted November 3, 2021 5 minutes ago, SciGuy42 said: unless you also replaced those? No. I replaced only the names of the templates inside JS. Change API You need to correct yourselfI can post a patch that corrects errors on the screen of the first mission: - let ai_mult = cmpPlayer.GetGatherRateMultiplier(); + let version = 25; + // GetGatherRateMultiplier removed in https://code.wildfiregames.com/D1011 use hardcode 1.25 + if (typeof cmpPlayer.GetGatherRateMultiplier === 'function') + version = 23; + let ai_mult = (version == 25 ? 1.25 : cmpPlayer.GetGatherRateMultiplier); let tower_garrison_count = 0; let walltower_garrison_count = 0; @@ -328,8 +332,17 @@ Trigger.prototype.SetDifficultyLevel = function(data) tower_garrison_count = 2; //add some tech - cmpTechnologyManager.ResearchTechnology("attack_infantry_ranged_01"); - cmpTechnologyManager.ResearchTechnology("armor_infantry_01"); + //attack_infantry_ranged_01 removed in https://code.wildfiregames.com/rP24725 + //armor_infantry_01 renamed in https://code.wildfiregames.com/D3287 + if (version == 25) + { + cmpTechnologyManager.ResearchTechnology("soldier_attack_ranged_01"); + cmpTechnologyManager.ResearchTechnology("soldier_resistance_hack_01"); + } + else { + cmpTechnologyManager.ResearchTechnology("attack_infantry_ranged_01"); + cmpTechnologyManager.ResearchTechnology("armor_infantry_01"); + } } Quote Link to comment Share on other sites More sharing options...
Freagarach Posted November 4, 2021 Report Share Posted November 4, 2021 Some information: https://trac.wildfiregames.com/wiki/Alpha25 https://trac.wildfiregames.com/wiki/PortA24ToA25 https://code.wildfiregames.com/D2952 and https://code.wildfiregames.com/P225 <- This is a script to move the templates and it has some relevant lines for fixing maps. I hope it helps. 1 Quote Link to comment Share on other sites More sharing options...
SciGuy42 Posted November 4, 2021 Author Report Share Posted November 4, 2021 17 hours ago, nwtour said: No. I replaced only the names of the templates inside JS. Change API You need to correct yourselfI can post a patch that corrects errors on the screen of the first mission: - let ai_mult = cmpPlayer.GetGatherRateMultiplier(); + let version = 25; + // GetGatherRateMultiplier removed in https://code.wildfiregames.com/D1011 use hardcode 1.25 + if (typeof cmpPlayer.GetGatherRateMultiplier === 'function') + version = 23; + let ai_mult = (version == 25 ? 1.25 : cmpPlayer.GetGatherRateMultiplier); let tower_garrison_count = 0; let walltower_garrison_count = 0; @@ -328,8 +332,17 @@ Trigger.prototype.SetDifficultyLevel = function(data) tower_garrison_count = 2; //add some tech - cmpTechnologyManager.ResearchTechnology("attack_infantry_ranged_01"); - cmpTechnologyManager.ResearchTechnology("armor_infantry_01"); + //attack_infantry_ranged_01 removed in https://code.wildfiregames.com/rP24725 + //armor_infantry_01 renamed in https://code.wildfiregames.com/D3287 + if (version == 25) + { + cmpTechnologyManager.ResearchTechnology("soldier_attack_ranged_01"); + cmpTechnologyManager.ResearchTechnology("soldier_resistance_hack_01"); + } + else { + cmpTechnologyManager.ResearchTechnology("attack_infantry_ranged_01"); + cmpTechnologyManager.ResearchTechnology("armor_infantry_01"); + } } Thanks, yes, currently almost every .js will break because it makes some calls to functions that no longer exist and also interval actions have changed. This may take me a bit to go through, once I have fixed the first 5 missions, I'll make a post and ask for some testers. 1 Quote Link to comment Share on other sites More sharing options...
SciGuy42 Posted November 20, 2021 Author Report Share Posted November 20, 2021 (edited) With the help of nwtour, I have now converted the first 6 missions to a25. It went a bit slow initially as I was figuring out what has changed, hopefully it will go faster from now on. Edited November 20, 2021 by SciGuy42 6 Quote Link to comment Share on other sites More sharing options...
SciGuy42 Posted December 16, 2021 Author Report Share Posted December 16, 2021 Missions 8 and 9 have now been converted and remastered for a25. Following are some screen shots from Mission 9, which is largely a naval/coastal adventure of battle and exploration. By the way, it used to be that when you capture a Gaia lighthouse, all coastal areas become revealed. Now that trigger doesn't seem to work, nothing happens when capturing the lighthouse. Was that change intentional? 1 3 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.