Jump to content

Campaign: Macedonia - Rise to Power + Balkan Campaign + Into Asia


Recommended Posts

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
  • Like 2
  • Thanks 1
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 successfully
https://github.com/SciGuy42/Macedonia_0ad/pull/2
But 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

 

  • Like 2
Link to comment
Share on other sites

7 hours ago, nwtour said:

I sent a pull request with the conversion results. The first mission launches successfully
https://github.com/SciGuy42/Macedonia_0ad/pull/2
But 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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 transition

I 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

Link to comment
Share on other sites

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 transition

I 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.

Link to comment
Share on other sites

19 hours ago, nwtour said:

I sent a pull request with the conversion results. The first mission launches successfully
https://github.com/SciGuy42/Macedonia_0ad/pull/2
But 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?

Link to comment
Share on other sites

21 minutes ago, SciGuy42 said:

Is there a script you have to run?

I have not found a way to do this automatically
I 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/*

 

 

Link to comment
Share on other sites

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 B)

Link to comment
Share on other sites

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 B)

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?

Link to comment
Share on other sites

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)

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 yourself

I 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");
+               }
        }

 

Link to comment
Share on other sites

17 hours ago, nwtour said:

No. I replaced only the names of the templates inside JS.
Change API You need to correct yourself

I 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.

  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...
  • 4 weeks later...

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?

mace9_1.png

mace9_2.png

mace9_3.png

mace9_4.png

mace9_5.png

mace9_6.png

  • Like 1
  • Thanks 3
Link to comment
Share on other sites

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.

 Share

×
×
  • Create New...