Backport tool?

Discussion and development of scenarios and campaigns for the game.

Moderator: Forum Moderators

Post Reply
User avatar
Spannerbag
Posts: 760
Joined: December 18th, 2016, 6:14 pm
Location: Yes

Backport tool?

Post by Spannerbag »

Hi,
Are there any tools to help authors backport campaigns to older versions of BfW?
I understand that android users are restricted to 1.14 and would like to explore the possibility of backporting campaigns for these players if:
  1. Sufficient demand exists and
  2. There is some level of automation available.
I understand that lua code will need changing, units/sprites will change and significant rebalancing will be required plus some WML features may be lost.
I won't be even seriously considering this for some time yet but it would be good to know my options (if any).
So if anyone has done this (ideally a backport from 1.18 -> 1.14) I'd be interested to hear their experiences.

Thanks in advance for your time and trouble.

Cheers!
-- Spannerbag
SP Campaigns: After EI (v1.14) Leafsea Burning (v1.18, v1.16)
I suspect the universe is simpler than we think and stranger than we can know.
Also, I fear that beyond a certain point more intelligence does not necessarily benefit a species...
User avatar
Lord-Knightmare
Discord Moderator
Posts: 2476
Joined: May 24th, 2010, 5:26 pm
Location: Somewhere in the depths of Irdya, gathering my army to eventually destroy the known world.
Contact:

Re: Backport tool?

Post by Lord-Knightmare »

Well, the only multi-version support add-on I have seen so far is probably Lea's Alter Era add-on which supports from 1.10 to 1.18. I think you can do this with #ifver defines to split code blocks.
Creator of "War of Legends"
Creator of the Isle of Mists survival scenario.
Maintainer of Forward They Cried
User:Knyghtmare | My Medium
User avatar
Ravana
Forum Moderator
Posts: 3313
Joined: January 29th, 2012, 12:49 am
Location: Estonia
Contact:

Re: Backport tool?

Post by Ravana »

Usually you start this from the opposite side, having 1.14 code with minimal adjustments to have it valid in higher version.
User avatar
Spannerbag
Posts: 760
Joined: December 18th, 2016, 6:14 pm
Location: Yes

Re: Backport tool?

Post by Spannerbag »

Ravana wrote: January 19th, 2025, 4:30 pm Usually you start this from the opposite side, having 1.14 code with minimal adjustments to have it valid in higher version.
Understood, however in this case I started development on 1.16 (now 1.18 for LSB, plus another campaign still way off publication) with no intention to backport.
However I didn't realise some players were forced to stay on 1.14 hence my post.
If it's too difficult fair enough but I'd be interested in scoping out the hurdles and tools available.

Cheers,
-- Spannerbag
SP Campaigns: After EI (v1.14) Leafsea Burning (v1.18, v1.16)
I suspect the universe is simpler than we think and stranger than we can know.
Also, I fear that beyond a certain point more intelligence does not necessarily benefit a species...
User avatar
Ravana
Forum Moderator
Posts: 3313
Joined: January 29th, 2012, 12:49 am
Location: Estonia
Contact:

Re: Backport tool?

Post by Ravana »

No tools.
User avatar
Spannerbag
Posts: 760
Joined: December 18th, 2016, 6:14 pm
Location: Yes

Re: Backport tool?

Post by Spannerbag »

Ravana wrote: January 20th, 2025, 9:50 amNo tools.
Ah. Oh well, thanks for the clarification, much appreciated.
(I'd hoped it might be possible to use the migration tools "in reverse".)

Cheers!
-- Spannerbag
SP Campaigns: After EI (v1.14) Leafsea Burning (v1.18, v1.16)
I suspect the universe is simpler than we think and stranger than we can know.
Also, I fear that beyond a certain point more intelligence does not necessarily benefit a species...
gnombat
Posts: 892
Joined: June 10th, 2010, 8:49 pm

Re: Backport tool?

Post by gnombat »

Spannerbag wrote: January 19th, 2025, 11:36 am I understand that android users are restricted to 1.14 and would like to explore the possibility of backporting campaigns for these players
I'm not entirely sure this is a good idea, as the add-on server administrators might perhaps be planning to shut down the 1.14 add-on server at some point?

Normally old versions of the add-on server are shut down routinely - they usually have the add-on server running for the current stable version of Wesnoth and the previous stable version, and that's all. It looks like they have made an exception for the 1.14 add-on server because Android/iOS users are stuck with that version, but I don't know if they plan to keep 1.14 running forever.

I'm just thinking that it would be unfortunate if you were to spend a lot of time working on porting your campaigns to 1.14, and then after, say, a couple of months of hard work, you are ready to upload to the server - only to find out that they already shut down the server in February or something :augh:
User avatar
Pentarctagon
Project Manager
Posts: 5730
Joined: March 22nd, 2009, 10:50 pm
Location: Earth (occasionally)

Re: Backport tool?

Post by Pentarctagon »

With 1.20 the plan is to get back to how things were done previously - only the add-on and multiplayer servers for the current and previous stable release will be available. So a bit after 1.20 is released, the 1.14 and 1.16 add-on and multiplayer servers will be turned off. That is over a year away as of right now though.
99 little bugs in the code, 99 little bugs
take one down, patch it around
-2,147,483,648 little bugs in the code
User avatar
Atreides
Posts: 1243
Joined: March 30th, 2019, 10:38 pm
Location: On the 2nd story of the centre village in Merwuerdigliebe turning the lights on and off

Re: Backport tool?

Post by Atreides »

I'm keeping up to 4 versions of the addons I maintain up to date with all the latest bug fixes. For example the Extended Armies Era (EAE) I have 1.12/14/16/18 versions.

Alas they were not backported but what happened was that I ported them forward in stages. 1 version at a time. It sounds like it might be a lot of work but really it sort of helps to only have to make minor changes at each step.

As mentioned #ifver is a useful bit of WML to help keep the versions similar. A tool I use to make it easier is called Kompare which is a KDE Linux diff GUI. It finds and highlights differences betwen two files (.cfg, .lua, .pbl files) or even entire addons. I can copy any changes backwards or forwards between the versions as needed.

P.S. I'm glad to hear that my 1.14 versions might still be useful to some players.
User avatar
Spannerbag
Posts: 760
Joined: December 18th, 2016, 6:14 pm
Location: Yes

Re: Backport tool?

Post by Spannerbag »

Thanks gnombat and Pentarctagon for your advice and clarification, much appreciated.
Sounds like by the time I actually get round to doing anything there won't be an add-on server to publish on! :doh:
Oh well, at least I understand the situation now.
Thanks again.
Cheers!
-- Spannerbag
SP Campaigns: After EI (v1.14) Leafsea Burning (v1.18, v1.16)
I suspect the universe is simpler than we think and stranger than we can know.
Also, I fear that beyond a certain point more intelligence does not necessarily benefit a species...
User avatar
Spannerbag
Posts: 760
Joined: December 18th, 2016, 6:14 pm
Location: Yes

Re: Backport tool?

Post by Spannerbag »

Atreides wrote: January 20th, 2025, 6:02 pm ...P.S. I'm glad to hear that my 1.14 versions might still be useful to some players.
Not for too much longer I fear, unless you host your own add-on server...?
I suppose that add-ons might still be available via http://campaigns.wesnoth.org/?
Cheers!
-- Spannerbag
SP Campaigns: After EI (v1.14) Leafsea Burning (v1.18, v1.16)
I suspect the universe is simpler than we think and stranger than we can know.
Also, I fear that beyond a certain point more intelligence does not necessarily benefit a species...
User avatar
Pentarctagon
Project Manager
Posts: 5730
Joined: March 22nd, 2009, 10:50 pm
Location: Earth (occasionally)

Re: Backport tool?

Post by Pentarctagon »

You should probably use https://addons.wesnoth.org/, but yes that will stay available as usual.
99 little bugs in the code, 99 little bugs
take one down, patch it around
-2,147,483,648 little bugs in the code
gnombat
Posts: 892
Joined: June 10th, 2010, 8:49 pm

Re: Backport tool?

Post by gnombat »

Spannerbag wrote: January 20th, 2025, 6:16 pm
Atreides wrote: January 20th, 2025, 6:02 pm ...P.S. I'm glad to hear that my 1.14 versions might still be useful to some players.
Not for too much longer I fear, unless you host your own add-on server...?
I suppose that add-ons might still be available via http://campaigns.wesnoth.org/?
It is still possible to download add-ons for old Wesnoth versions using the web interface. However:
  1. It is not possible to upload anything using the web interface - for uploading, you need to use the real add-on server.
  2. It is difficult or impossible to actually install add-ons using the web interface on mobile devices. On Android I think it might be possible but tricky to do; on iOS I think it actually is impossible unless your device is jailbroken.
Hosting your own add-on server does seem like a viable possibility, since you can enter the domain name of a different server from within Wesnoth (so in theory this should work even on mobile devices). But as far as I know no one actually does this...
User avatar
Spannerbag
Posts: 760
Joined: December 18th, 2016, 6:14 pm
Location: Yes

Re: Backport tool?

Post by Spannerbag »

Pentarctagon wrote: January 20th, 2025, 7:53 pm You should probably use https://addons.wesnoth.org/, but yes that will stay available as usual.
Thanks!

gnombat wrote: January 20th, 2025, 9:24 pm It is still possible to download add-ons for old Wesnoth versions using the web interface. However:
  1. It is not possible to upload anything using the web interface - for uploading, you need to use the real add-on server.
  2. It is difficult or impossible to actually install add-ons using the web interface on mobile devices...
Hosting your own add-on server does seem like a viable possibility, since you can enter the domain name of a different server from within Wesnoth (so in theory this should work even on mobile devices). But as far as I know no one actually does this...
Mmm... will file "Backporting to 1.14" under SWOT (Supreme Waste Of Time) and not bother. :)

Thanks to everyone who replied, very helpful and much appreciated.

Cheers!
-- Spannerbag
SP Campaigns: After EI (v1.14) Leafsea Burning (v1.18, v1.16)
I suspect the universe is simpler than we think and stranger than we can know.
Also, I fear that beyond a certain point more intelligence does not necessarily benefit a species...
Post Reply