Follow-up Comment #6, patch #1494 (project freeciv):

Maybe my original message was not as clear on C vs. lua as I thought, I'm

Rough idea might be:

1. /reap server command -- implement in C
2. server command or server function to create a new player during the game,
without giving the player anything. Implement in C. Make the function
available in the lua API so scenarios and rulesets can use it.
3. Make many more functions available in lua so that the wanted calcluations
can be carried out

If you look in the patch, it is basically the higher level mechanisms there
that we really want in lua, the rest in various places in C. In Lua we want
to be free to change: selecting the starting tile, giving the player initial
units and giving the player initial gold and tech.

I think new functions we need in lua are things like:

Get player gold
Get player civilization score (not the same as full score)
Create units in boat(?)
Check if units can exist on a tile (for trireme on ocean etc)
Get unit list for tile
city closest to a tile

One open question is what to do with the Newcomer "strength" percentage
server option that was in longturn. If giving units to a new player is
controlled from lua, then a server option for that doesn't make much sense.
The ruleset can of course be reconfigured much more easily in lua than in C.
The ruleset may even choose to expose the strength percent directly in the
functions it defines for creating newcomers.


Reply to this item at:


  Meddelandet skickades via/av Gna!

Freeciv-dev mailing list

Reply via email to