patchFreeciv - Patches: patch #1494, [Metaticket] merge longturn into...

 
 
Show feedback again

patch #1494: [Metaticket] merge longturn into mainline

Submitted by:  Matthias Pfafferodt <syntron>
Submitted on:  Sun 28 Feb 2010 04:31:04 PM UTC  
 
Category: generalPriority: 1 - Later
Status: DonePrivacy: Public
Assigned to: Matthias Pfafferodt <syntron>Open/Closed: Closed
Planned Release: 2.4.0

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

(Jump to the original submission Jump to the original submission)

Fri 28 Oct 2011 10:15:09 PM UTC, comment #11:

all of the subtickets are done and longturn was restarted with freeciv 2.3. There are new differences which will be handled in new tickets.

Matthias Pfafferodt <syntron>
Project MemberIn charge of this item.
Mon 17 Jan 2011 03:14:23 PM UTC, comment #10:

Most of it is done ... (but there are still differences and, thus, this ticket is still open)

Matthias Pfafferodt <syntron>
Project MemberIn charge of this item.
Sun 02 Jan 2011 09:35:30 PM UTC, comment #9:

change planned release to 2.4.0

Matthias Pfafferodt <syntron>
Project MemberIn charge of this item.
Sun 04 Jul 2010 07:01:44 PM UTC, comment #8:

I did a check the longturn code base and did a cleanup. Doing this I tried to uses as many code from trunk as possible. Looking at the patches it is clearly visible, what needs to be done till longturn can use the mainline freeciv version. The list of patches includes:

longturn c++ files (newcommers and postgres authentication):
5966b21... [c++] newcommers
dfcc14c... [c++] longturn authentication (postgres)
57b2062... [cleanup for c++] fix color in featured_text
eee70dd... [cleanup for c++] do not use 'class'
b09c016... [cleanup for c++] some magic in specenum
eff3ed1... [cleanup for c++] move struct cf_sequence into c file

longturn 'specials':
69fa738... longturn command level
0d4cbef... start positions
b66d242... rename command
95321a6... player placement hacks
e5c6687... first find unused team

backports from trunk:
3fa4f9d... [backport for S2_2] possibility to lose a tech if it is transfered
0780f01... [backport for S2_2] different checks if a tech is lost
4e35044... [backport for S2_2] Settings to disable the trade of gold, cities and technologies ported from warclient.
acd42fe... [backport for S2_2] Added 'killunhomed' setting.
8ed6618... [backport for S2_2] Added unitwaittime setting.
aa60b72... [backport for S2_2] Added convenience function for formatting a time string.

(file #9426)

Matthias Pfafferodt <syntron>
Project MemberIn charge of this item.
Wed 31 Mar 2010 07:32:59 PM UTC, comment #7:

I don't know any lua so I will focus on the c part. I think it should be something like /newplayer. This command should create a new player on a empty slot or (re)use the slot of a dead player.

Matthias Pfafferodt <syntron>
Project MemberIn charge of this item.
Tue 30 Mar 2010 11:48:05 PM UTC, comment #6:

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

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.

Engla <englabenny>
Project Member
Tue 30 Mar 2010 11:05:36 PM UTC, comment #5:

The C version can lets us see what we move to lua easily and what not. But my previous message already has a proposed "plan of attack" which mentions which parts could be implemented in lua and which not.

If maho himself has any input it'd great as well of course. I guess everyone would prefer to make the oft-configured stuff (unit/resource allocation) easily configured in lua.

Engla <englabenny>
Project Member
Tue 30 Mar 2010 10:00:21 PM UTC, comment #4:

> 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


I will check it. It should be the current version as there are nearly no commits in the longturn branch.

Do you plan to do this in lua or is an implementation directly in the server the better approach?

Matthias Pfafferodt <syntron>
Project MemberIn charge of this item.
Tue 30 Mar 2010 01:34:08 PM UTC, comment #3:

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)

Engla <englabenny>
Project Member
Sat 20 Mar 2010 04:39:10 PM UTC, comment #2:

> (c++) adding new player and changes to ./server/generator/startpos.c


this could possible be done in lua; see bug #15644

Matthias Pfafferodt <syntron>
Project MemberIn charge of this item.
Mon 01 Mar 2010 11:02:46 PM UTC, comment #1:

I added some patches; leftovers:

Matthias Pfafferodt <syntron>
Project MemberIn charge of this item.
Sun 28 Feb 2010 04:31:04 PM UTC, original submission:

I did a diff between longturn (master) and freeciv 2.1.8. The diff file cleaned by unimportant changes is attached (ca. 100kB).

changes added to longturn (TODO list):

  • setting: unitwaittime by book
  • setting: (slowly) kill unhomed units
  • setting: techloosing (patch available)
  • setting: citytrading
  • command: rename
  • longturn command level (equal to info?)
  • (c++) adding new player

changes to ./server/generator/startpos.c

  • (c++) updated mysql connection

ported changes (done):

  • setting: foggedborders
  • setting: trademindist

I think the hardest part would be the c++ files.

Matthias Pfafferodt <syntron>
Project MemberIn charge of this item.

 

(Note: upload size limit is set to 1024 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #9426:  S2_2-longturn.tar.bz2 added by syntron (29kB - application/x-tbz)
file #8326:  lt.diff added by syntron (97kB - text/x-diff)

 

Digest:
   bug dependencies, patch dependencies.

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by englabenny (Updated the item)
  • -unavailable- added by englabenny
  • -unavailable- added by syntron (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 25 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 28 Oct 2011 10:15:09 PM UTCsyntronStatusIn Progress=>Done
      Open/ClosedOpen=>Closed
    Fri 14 Jan 2011 12:11:28 PM UTCsyntronDependencies-=>Depends on patch #2276
      Dependencies-=>Depends on patch #2275
      Dependencies-=>Depends on patch #2273
      Dependencies-=>Depends on patch #2272
      Dependencies-=>Depends on patch #2121
    Sun 02 Jan 2011 09:35:30 PM UTCsyntronPlanned Release2.3.0=>2.4.0
    Sun 04 Jul 2010 07:01:44 PM UTCsyntronAttached File-=>Added S2_2-longturn.tar.bz2, #9426
      StatusNone=>In Progress
      Assigned toNone=>syntron
    Wed 14 Apr 2010 08:56:09 PM UTCenglabennyDependencies-=>Depends on patch #1601
    Thu 08 Apr 2010 08:35:30 PM UTCsyntronDependencies-=>Depends on bugs #13643
    Sat 03 Apr 2010 11:10:21 PM UTCsyntronDependencies-=>Depends on patch #1506
    Wed 31 Mar 2010 09:54:50 PM UTCsyntronDependencies-=>Depends on patch #1574
    Tue 30 Mar 2010 01:34:08 PM UTCenglabennyAttached File-=>Added newcomers_trunk_r17191.diff, #8738
      Carbon-Copy-=>Added englabenny
    Sat 06 Mar 2010 12:12:13 AM UTCsyntronDependencies-=>Depends on patch #1504
    Mon 01 Mar 2010 11:00:53 PM UTCsyntronDependencies-=>Depends on patch #1263
    Mon 01 Mar 2010 10:59:33 PM UTCsyntronDependencies-=>Depends on patch #1501
    Mon 01 Mar 2010 10:57:41 PM UTCsyntronDependencies-=>Depends on patch #1500
    Mon 01 Mar 2010 10:56:09 PM UTCsyntronDependencies-=>Depends on patch #1499
    Mon 01 Mar 2010 09:36:12 PM UTCsyntronDependencies-=>Depends on patch #1258
    Mon 01 Mar 2010 09:33:58 PM UTCsyntronDependencies-=>Depends on patch #1201
    Sun 28 Feb 2010 04:31:04 PM UTCsyntronAttached File-=>Added lt.diff, #8326
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup