Complete.Org: Mailing Lists: Archives: freeciv-dev: February 2003:
[Freeciv-Dev] Re: (PR#2327) Preselecting government
Home

[Freeciv-Dev] Re: (PR#2327) Preselecting government

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: ChrisK@xxxxxxxx
Cc: rt@xxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#2327) Preselecting government
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 12 Feb 2003 17:21:22 -0800

Arnstein Lindgard via RT wrote:
> 
> I have a suggestion patch for this ticket. Applies to GTK1, with two
> mostly empty inserted functions in the other clients to maintain
> compatibility.

Oops.  I should have linked this ticket to PR#2923 earlier.  Now I have: 
take a look at that one.  It provides for gui-gtk-2.0 a pretty slick 
interface for choosing governments and avoiding the popup dialog.  I 
have just applied it - you can probably backport that to gui-gtk if you 
want.  In any case, it looks like it will conflict with the changes 
you've done (which is why I put it in before you go any further).

> You can preselect gov't from radio buttons at revolt time.
> 
> There is a magic number: menu space for 6 gov'ts to allow for
> Fundamentalism or modpacks. I don't know if you can have a variable number
> of radio buttons. Unused slots are blanked out and made insensitive.
> At game start the name of the gov't rado buttons are defined.

Not good.  See how the other patch avoids this.

> Introduced client/automation.ch. I thought that would be a good place
> to hold simple auto-stuff unlike intelligent agents. I also have a patch
> for preselecting diplomat actions that could go here if it is desired.
> 
> 
> Examples of output:
>   (popup) "Revolution!" - "Change to Republic?" (yes/no)
> 
> If you change radio button during anarchy, still no more popups occur:
>   "Game: The Romans are planning to form a Monarchy!"
> 
> And if you don't have that tech, while in anarchy:
>   "Game: Warning! You don't have the required technology for Monarchy!"
> 
> Then a popup will occur unless you change it, or gain the tech while in
> anarchy.
> 
> If you preselect a gov't before you actually have the technology, still
> no popups:
>   "Game: The Romans demand Democracy!"
>   "Game: Revolution will start when the required technology is available!"
> 
> When the tech is gained:
>   "Game: The Romans demand Democracy immediately!"
>   (auto-revolt)
> 
> If you change it back to current gov't before revolution:
>   "Game: The Revolution has been cancelled! The Romans are happy with 
> Republic!"
> 
> 
> The old way of revolting still works as before.
> This is a client-side player aid.
> I wonder, do y'all think this is a good way of doing things?

Yes, I like your method of doing it (for the most part).  Vasco and I 
discussed using radio buttons in the menus to choose the target 
government (but he never wrote any code for it).  Adding auto-revolting 
is just an added bonus.  And, I agree this should be left at the client 
side.  We also agreed in our discussion that you cannot get rid of the 
"Choose government" popup without breaking savegame compatability, and 
unless we do that there's no reason to move this to the server side.

But, auto-revolt should be an option (see client/options.c).  (While 
you're at it, "confirm revolution" should probably also be an option.) 
And you need to fix the hard-coded number of governments.  It may be 
possible to do this in steps steps to keep the complexity level low.

jason




[Prev in Thread] Current Thread [Next in Thread]