Page 1 of 1

Can't Build Fortresses in Freeciv-web

Posted: Fri Sep 12, 2014 10:02 pm
by cwf1986
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?

Re: Can't Build Fortresses in Freeciv-web

Posted: Sat Sep 13, 2014 12:41 am
by cazfi
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.

Re: Can't Build Fortresses in Freeciv-web

Posted: Sat Sep 13, 2014 1:52 am
by cazfi
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.

Re: Can't Build Fortresses in Freeciv-web

Posted: Sat Sep 13, 2014 1:57 am
by cwf1986
Do they get a zone of control too!?

Re: Can't Build Fortresses in Freeciv-web

Posted: Sat Sep 13, 2014 10:55 am
by AndreasR
https://play.freeciv.org has been updated now!

Re: Can't Build Fortresses in Freeciv-web

Posted: Sat Sep 13, 2014 1:16 pm
by cazfi
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.

Re: Can't Build Fortresses in Freeciv-web

Posted: Sat Sep 13, 2014 1:39 pm
by AndreasR
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 :)

Re: Can't Build Fortresses in Freeciv-web

Posted: Sat Sep 13, 2014 2:22 pm
by cazfi
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.

Re: Can't Build Fortresses in Freeciv-web

Posted: Sat Sep 13, 2014 3:27 pm
by AndreasR
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.