On Sat, Jul 21, 2007 at 23:12:45 +0200,
  Mark de Wever <[EMAIL PROTECTED]> wrote:
>   I'm not sure what the best approach is to fix this problem so if
> somebody has an idea please post it here or implant it in trunk. Once
> it's fixed in trunk I'll backport the changes to 1.2.

One possible approach is to pass a number that represents the name, that
is decoded into a displayable value using the local locale. This would have
the disadvantage that players with different locales may have trouble
describing the names when chatting with each other, since they would see
different things. For unit names this shouldn't be a big deal, as you can say
where the unit is. The name would be fixed when the unit is created, so that
if later the locale were to change the units would keep that value. There
might be some odd things with doing replays in a different locale where
chat messages might use different names than show up during the replay.

The idea would be to generate several name parts from a fixed number of
random numbers (probably one or two). You want at least a couple of more
bits than minimally needed to do a selection so that the chances of getting
any name is close to that of any other. I think this idea has already
been implemented to fix the worst part of the problem. Though it might
be possible to cut down on the number of random numbers used.

Another option would be to display the unit name using the locale of
the owner. I doubt that locale info is passed around though, and there can be
situations where it could change during a game which would leave corner cases
to be handled.

_______________________________________________
Wesnoth-dev mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-dev

Reply via email to