Better handling of 'This map requires widelands Version >x'

Bug #1833662 reported by kaputtnik
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Widelands Website
Fix Released
Undecided
Unassigned
widelands
Won't Fix
Undecided
Unassigned

Bug Description

Just saw that we have already a map which needs a widelands version > 20. See comments in https://wl.widelands.org/maps/struggling-for-a-new-home-again/

Currently the distinction regarding the needed widelands version is made from the amount of possible players. I think we need another way to get the needed version. Maybe the packet version can do the trick?

The model wlmaps has to be changed then accordingly.

Tags: map

Related branches

kaputtnik (franku)
description: updated
Revision history for this message
GunChleoc (gunchleoc) wrote :

This is distinct from the amount of players. We changed the name of a map entity and did not bump any packet numbers.

I have another one of those - let me make a merge request and bump the version number there.

tags: added: map
Revision history for this message
kaputtnik (franku) wrote :

Bumping the version number does not change the string on the website.

It would be bad if a player downloads a map (announced for > build19) and after trying to start a game he get an errormessage.

Or do i miss some thing?

Revision history for this message
hessenfarmer (stephan-lutz) wrote :

the map itself is compatible with b20. Only the scripting is not as it uses the ware descriptions changed in bzr9119. So this is a bit misleading. the map and the scripting is the second atl mision to come

Revision history for this message
kaputtnik (franku) wrote :

Thanks for clarification :)

Changed in widelands-website:
status: New → Invalid
Revision history for this message
kaputtnik (franku) wrote :

Hm, maybe there will be some more maps with incompatible scripting on the website. How should we handle that?

Revision history for this message
GunChleoc (gunchleoc) wrote :

We have a scripting packet that is versioned. We could bump the version number.

This can get pretty complicated though to keep compatibility here, because the scripting API still changes all the time.

Revision history for this message
GunChleoc (gunchleoc) wrote :

In the attached branch, I have introduced a map version property "needs_widelands_version_after" for the website. This will of course only work for Maps that write this entry, so you will have to keep the code for older maps as it is.

I decided to go for release versioning only - use development versions at your own risk.

Revision history for this message
GunChleoc (gunchleoc) wrote :

P.S: actually, if you rerun wl_map_info for all maps, the JSON will include the info and you can get rid of handling stuff in the website code.

Revision history for this message
GunChleoc (gunchleoc) wrote :

The Widelands part has just hit trunk.

Changed in widelands:
milestone: none → build21-rc1
Changed in widelands-website:
status: Invalid → Confirmed
Changed in widelands:
status: New → Fix Committed
Revision history for this message
kaputtnik (franku) wrote :

> P.S: actually, if you rerun wl_map_info for all maps, the JSON will include the info and you can get rid of handling stuff in the website code.

Running wl_map_info on old maps produces an error. I think what needs to be done to prevent the error is to resave each map with a recent widelands revision and upload a again. Too much work, imho.

Handling the stuff in the website code isn't problematic, so i did that.

Revision history for this message
GunChleoc (gunchleoc) wrote :

Running wl_map_info should not produce an error, we should fix that.

Changed in widelands:
status: Fix Committed → Confirmed
Revision history for this message
kaputtnik (franku) wrote :

> P.S: actually, if you rerun wl_map_info for all maps, the JSON will include the info and you can get rid of handling stuff in the website code.

As far i understand the info is only added when a map get saved in the editor. So only rerunning wl_map_info is not sufficient.

Revision history for this message
GunChleoc (gunchleoc) wrote :

OK, too much work then.

kaputtnik (franku)
Changed in widelands:
status: Confirmed → Fix Released
status: Fix Released → Confirmed
Changed in widelands-website:
status: Confirmed → Fix Released
GunChleoc (gunchleoc)
Changed in widelands:
status: Confirmed → Fix Committed
Revision history for this message
GunChleoc (gunchleoc) wrote :
Changed in widelands:
status: Fix Committed → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.