Follow-up Comment #3, patch #1494 (project freeciv): Here is a port of Maho's newcomers code to C. In C, we can finally read and understand it :-) It is a diff against trunk rev 17191
It seems to work well now. The critical parts come when the player list is already full and dead players have to be replaced. The process consists mainly of two parts: 1. Creating a new player, possibly taking a dead slot. Reset everything (map, diplomacy, etc) 2. Creating new units according to the strength of the average player. So it looks at civ score etc. A possible plan of attack might be: 1. A /reap server command to make a dead player's slot and nation free 2. A server command to create a new player during the game, without giving the player anything (or put this in lua) 3. A lua trigger or lua activation method where the script will give the player its starting units. To port this to lua lot of accessors are needed. Of course, it could be interesting to be able to create new players from a scenario or ruleset script, so that action can be made available. But I guess the specific /reap server action has to be a ALLOW_ADMIN command to be carried out from the server. The code I ported was taken from a svn clone of longturn, and I hope it corresponds to the latest code.. I haven't compared with your diff. (file #8738) _______________________________________________________ Additional Item Attachment: File name: newcomers_trunk_r17191.diff Size:16 KB _______________________________________________________ Reply to this item at: <http://gna.org/patch/?1494> _______________________________________________ Meddelandet skickades via/av Gna! http://gna.org/ _______________________________________________ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev