HostedRedmine.com has moved to the Planio platform. All logins and passwords remained the same. All users will be able to login and use Redmine just as before. Read more...
Server command(s) to create players and assign nations
At longturn.net the player list for a game is known before it starts. Players can register and choose their nation from the website weeks before the server is started. When the game eventually starts the admin checks the list of players in the database and uses a custom server command to setup the teams and players. It reads a special file format and sets up the game state. The implementation is poor and can leave the server in an inconsistent state.
Currently adding players on the command line is possible using a combination of
/team. Setting the nation is only possible through the
/lua command (eg
/lua edit.create_player('louis94', find.nation_type('...'))).
I see two possible solutions:
- Extend the
/createcommand as follows:
create <username> [AI type|human] [nation] [team]
This would break compatibility for any AI module called "human". I'd say that naming an AI this way was a bad idea to begin with :P
- Add player management to fcdb. It's not as scary as it sounds: it would require two new lua functions (
player:set_ai(bool)) and exposing the edit module.
I would strongly prefer something that can land in the 2.6 branch already, since longturn.net will likely be using it for a while. If not possible I can still provide patches for newer versions -- and evaluate how their 2.6 counterpart behaves in production.
#4 Updated by Marko Lindqvist over 2 years ago
Louis Moureaux wrote:
Right. The discussion here is a bit more general ("what's the best solution" rather than proposing a specific one), so I don't think it's a pure duplicate.
I just updated Feature #768292 with a patch version that could be commit candidate. Now we need to decide if it's the way to go. You know the use-case better than I do, so please comment.
In a way, now one of the pros of Feature #768292 approach is that the patch exist, and there's no need to wait for someone to implement it.