Can't Build Fortresses in Freeciv-web

Smallpox vs. largepox, gen2 vs gen5, early war vs. peaceful alliances. Which is your favourite gaming style?
cwf1986
Posts: 10
Joined: Mon Aug 25, 2014 1:25 pm

Can't Build Fortresses in Freeciv-web

Postby cwf1986 » Fri Sep 12, 2014 10:02 pm

I can't build fortresses with my workers in freeciv-web. I've tried f and b on my keyboard and I can't find a button to do it either. Is this just not an option (yet) in freeciv-web?

cazfi
Elite
Posts: 2027
Joined: Tue Jan 29, 2013 6:54 pm

Re: Can't Build Fortresses in Freeciv-web

Postby cazfi » Sat Sep 13, 2014 12:41 am

cwf1986 wrote:Is this just not an option (yet) in freeciv-web?

I'm working on (limited) bases support for freeciv-web. I think I'll get first version ready tonight.

cazfi
Elite
Posts: 2027
Joined: Tue Jan 29, 2013 6:54 pm

Re: Can't Build Fortresses in Freeciv-web

Postby cazfi » Sat Sep 13, 2014 1:52 am

It's in freeciv-web git repo now, waiting for Andreas to deploy to play.freeciv.org.

Fortresses and Buoys are built with Shift+F, Airbases with Shift+E.

cwf1986
Posts: 10
Joined: Mon Aug 25, 2014 1:25 pm

Re: Can't Build Fortresses in Freeciv-web

Postby cwf1986 » Sat Sep 13, 2014 1:57 am

Do they get a zone of control too!?

User avatar
AndreasR
Elite
Posts: 718
Joined: Thu May 02, 2013 10:26 pm
Location: Norway

Re: Can't Build Fortresses in Freeciv-web

Postby AndreasR » Sat Sep 13, 2014 10:55 am

https://play.freeciv.org has been updated now!

cazfi
Elite
Posts: 2027
Joined: Tue Jan 29, 2013 6:54 pm

Re: Can't Build Fortresses in Freeciv-web

Postby cazfi » Sat Sep 13, 2014 1:16 pm

In the very latest version (in git) of freeciv-web it was suggesting the name already used by the first city for my second one.

User avatar
AndreasR
Elite
Posts: 718
Joined: Thu May 02, 2013 10:26 pm
Location: Norway

Re: Can't Build Fortresses in Freeciv-web

Postby AndreasR » Sat Sep 13, 2014 1:39 pm

cazfi wrote:In the very latest version (in git) of freeciv-web it was suggesting the name already used by the first city for my second one.


Yes, I think there is some bug with detecting duplicate city names when the names contain some special characters or non-ascii characters. Freeciv-web URL-encodes city names. Do you remember the name of the city and the nation?

cazfi: by the way, thanks for all the great work on updating Freeciv-web recently! Let there be more :)

cazfi
Elite
Posts: 2027
Joined: Tue Jan 29, 2013 6:54 pm

Re: Can't Build Fortresses in Freeciv-web

Postby cazfi » Sat Sep 13, 2014 2:22 pm

AndreasR wrote:Freeciv-web URL-encodes city names. Do you remember the name of the city and the nation?

And that encoding cannot take place inside the web-client only as server may send it as part of some message? Then we have a problem.

I guess the obvious hack is to patch server used with freeciv-web to encode all the city names from the beginning so there's no comparison of encoded and not-yet-encoded names giving false negatives.

User avatar
AndreasR
Elite
Posts: 718
Joined: Thu May 02, 2013 10:26 pm
Location: Norway

Re: Can't Build Fortresses in Freeciv-web

Postby AndreasR » Sat Sep 13, 2014 3:27 pm

This doesn't happen for most names, and is only seldomly possible to reproduce. Most of the time creating cities works correctly. I have done several hacks to try to fix this, but more are problably needed.

The problem could also be that the name of a new city in the PACKET_UNIT_BUILD_CITY sent from the client to the server
is encoded slighly differently than the strings of city-names which are already stored in the server. Different browser with different language settings could also be an issue.