[Freeciv-Dev] [bug #19447] Over maximum veteran level assigned initially to unit

2012-02-19 Thread Jacob Nevins
Follow-up Comment #6, bug #19447 (project freeciv):

I think the client just trusts that UNIT_INFO.veteran is correct and indexes
using that. On a quick look I didn't convince myself that unused levels' info
in RULESET_UNIT packets were even initialised, so I doubt there are clues
there either.

___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #19447] Over maximum veteran level assigned initially to unit

2012-02-19 Thread Marko Lindqvist
Follow-up Comment #5, bug #19447 (project freeciv):

Could client determine number of veteran levels from actual veteran levels
information even if the number itself is not explicitly part of the protocol?
Information of effects of different veteran levels is certainly needed
(move_rate of units comes to mind)

___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #19471] add half-remove

2012-02-19 Thread Jacob Nevins
Follow-up Comment #3, bug #19471 (project freeciv):

Sorry, I wasn't clear -- /kill doesn't exist (yet). I was suggesting a name
for this new command.

When a player dies of natural causes but the game continues, I don't know what
data structures are freed up. Is saving memory a primary concern?

___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #19471] add half-remove

2012-02-19 Thread Michal Mazurek
Follow-up Comment #2, bug #19471 (project freeciv):

Does /kill remove all data structures related to the player, as well as
decrease the bitfields required for the map etc?

___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #19468] gtk client shows a black area instead of map

2012-02-19 Thread Jacob Nevins
Update of bug #19468 (project freeciv):

  Status:None => Duplicate  
 Open/Closed:Open => Closed 


___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #18243] Client hangs with with gtk+ 2.24.5 (and Ubuntu Oneiric's 2.24.6) and Freeciv theme

2012-02-19 Thread Jacob Nevins
Follow-up Comment #34, bug #18243 (project freeciv):

User who ran into this in bug #19468 reports these warnings on the console.
Dunno if it's related.

-- 
(freeciv-gtk2:21791): Gtk-WARNING **: Unable to locate theme engine in
module_path: "pixmap",
-- 

(See also comment #5.)

___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


Re: [Freeciv-Dev] [patch #2951] Generalise RoadNative/RiverNative

2012-02-19 Thread Jacob Nevins
In patch #2951, Marko Lindqvist writes:
> I'm playing with the idea of retiring simple specials completely. They all
> could be made in to bases (ones that cover single tile) or roads (ones that
> connect between tiles).

I was thinking the same thing.

If nothing else, the built-in help is going to be a bit odd when each
road type has its own topic, and irrigation/mining are the only
activities left in the main help.
Clearly irrigation/farmland could be "roads" (although we'd need a new
name for the "activity class") and mines could be "bases".

The main obstacle I can think of will be UI, and in particular,
assigning keystrokes to activities. We fudged this for bases with
fortress-like / Type A ("F") and airbase-like / Type B ("E"), but if
we're introducing the same generality to much more frequently built
infrastructure like roads, we need a better solution, I think.

On the one hand, we don't want to restrict rulesets to having at most
one valid road-like activity in a given situation (as with the default
rulesets) -- I think ruleset authors should have the freedom to have a
unit that can build any of five different road types on a given tile at
a given time, if they want. Nor should rulesets be penalised by forcing
players to go through menus to select activities if the ruleset differs
too much from a traditional one -- activities should always be
keyboard-selectable.

On the other hand, available keystrokes are a scarce resource, so we
probably can't give ruleset authors free rein over the entire keyboard
-- we need the freedom to assign new keystrokes in future (for
activities like "convert", or for out-of-game actions). I suspect we'll
have to limit all these activities to using R/I/M/F/E.

I'm not sure what the answer is. The best idea I've thought of so far:
 - each activity gets a keystroke specified in the ruleset from the
   limited pool
 - each activity within the same keystroke group gets assigned a unique
   number from 0 to 9 (by the server, or maybe the ruleset)
 - if a keystroke is ambiguous -- say, "R" is for both Road and, er,
   Cycle-path -- then the player can type "R" followed by "1" for Road
   and "R", "2" for Cycle-path
 - the game pops up a little menu after "R" is pressed listing
   "R,1: Road, R,2: Cycle-path" to remind/introduce the mappings; this
   goes away when a number key (or Esc) is pressed
 - the game tries to spot cases where the keystroke is unambiguous (like
   today's Road / Railroad -- only one is ever valid, at least for a
   single unit or units on the same tile) and enacts the relevant
   activity immediately on pressing "R" (so simple rulesets don't get
   the penalty of the multi-level selection system)
 - keystrokes "0" through "9" do nothing if typed outside of activity
   selection (so if you type "R,1" where Road was the only option, you
   end up with what you wanted -- you don't have to second-guess whether
   you're about to press an ambiguous key)
This satisfies the following criteria:
 - Can have lots of activities (up to 10 per keystroke -- still an
   arbitrary limit, but a much bigger one)
 - Keystrokes for a given ruleset are discoverable (through the menu
   system, or the popup when you press "R")
 - But experienced players don't need to use the menus, and keystrokes
   for a given ruleset can be learned and communicated ("R,1" always
   means the same thing)

One of the trickier parts of the above system will be the logic to spot
unambiguous situations. However, it doesn't matter if it's not perfect.

Would also need to account for "connect-with-X", but that seems do-able
as an extension to the above.

The other awkwardness with bringing the existing irrigation and mines
into this system is the terrain conversions that the "I" and "M"
keystrokes can trigger (e.g., "mining" grassland to forest). So, terrain
conversions would need to be pulled into the above keystroke system, or
whatever else anyone suggests.

With the above system, there would be no need to restrict given
keystrokes to "activity classes" -- R wouldn't have to be only for roads
(although ruleset authors may choose to do it that way). That would
allow the I/M keys to retain their current behaviour in the standard
rulesets (and probably add "O" to the pool of available keystrokes).

Any thoughts on this solution, or alternative ways of solving these
problems?

___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #19468] gtk client shows a black area instead of map

2012-02-19 Thread anonymous
Follow-up Comment #2, bug #19468 (project freeciv):

Yep. That's it. Correct for the (K)Ubuntu Version and the env var fixes ist.
Sorry for reporting a duplicate.

best regards,
klemens

___

Reply to this item at:

  

___
  Nachricht gesendet von/durch Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #19471] add half-remove

2012-02-19 Thread Jacob Nevins
Follow-up Comment #1, bug #19471 (project freeciv):

Sounds like this would be basically a /kill command, as you suggest -- as if
all the player's units and cities were lost simultaneously.

___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #3144] Savegame handling of ACTIVITY_GEN_ROAD and road type pillage targets

2012-02-19 Thread Marko Lindqvist
Follow-up Comment #2, patch #3144 (project freeciv):

Minimally tested patch that implements model described in original submission.

(file #15172)
___

Additional Item Attachment:

File name: SaveActTgtRoad.diffSize:18 KB


___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #19475] ACTIVITY_GEN_ROAD never finishes

2012-02-19 Thread Marko Lindqvist
URL:
  

 Summary: ACTIVITY_GEN_ROAD never finishes
 Project: Freeciv
Submitted by: cazfi
Submitted on: Sun 19 Feb 2012 08:39:46 PM EET
Category: general
Severity: 3 - Normal
Priority: 5 - Normal
  Status: Ready For Test
 Assigned to: None
Originator Email: 
 Open/Closed: Open
 Release: 
 Discussion Lock: Any
Operating System: None
 Planned Release: 2.5.0

___

Details:

Server fails to check how much work towards ACTIVITY_GEN_ROAD has been made,
causing it never to finish.

Fix attached.



___

File Attachments:


---
Date: Sun 19 Feb 2012 08:39:46 PM EET  Name: GenRoadFinish.diff  Size: 486B  
By: cazfi



___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #19468] gtk client shows a black area instead of map

2012-02-19 Thread Jacob Nevins
Follow-up Comment #1, bug #19468 (project freeciv):

Is this on Ubuntu Oneiric, by any chance?

What happens if you set GDK_NATIVE_WINDOWS=1?

If that helps, then this is probably another report of bug #18243.

___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #19474] max_players dual meaning

2012-02-19 Thread Marko Lindqvist
URL:
  

 Summary: max_players dual meaning
 Project: Freeciv
Submitted by: cazfi
Submitted on: Sun 19 Feb 2012 08:17:52 PM EET
Category: None
Severity: 3 - Normal
Priority: 5 - Normal
  Status: None
 Assigned to: None
Originator Email: 
 Open/Closed: Open
 Release: 
 Discussion Lock: Any
Operating System: None
 Planned Release: 

___

Details:

>From still unresolved RT ticket #40226:

Subject: game.info.max_players dual meaning
Date: Fri, 2 May 2008 21:42:20 +0300
To: rep...@rt.freeciv.org
From: "Marko Lindqvist" 

Noticed from metaserver that maxplayers setting in running game is
not what I initially set it. It seems that game.info.max_players is
used as both maxplayers setting, and storing number of players there
has been in the game at max.


---

This seems to be more serious problem nowadays. I tested single player (less
players than default aifill of 5) game with saving and loading. After *second*
save/load-cycle game complained that maxplayers setting (1) is less than
current number of players (5). Savegame file itself correctly has only 1
player, so I assume number of 5 being what server had before starting game
loading, and order of loading goes so that maxplayers setting is checked
before setting number of players to one from savegame.




___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #3144] Savegame handling of ACTIVITY_GEN_ROAD and road type pillage targets

2012-02-19 Thread Marko Lindqvist
Follow-up Comment #1, patch #3144 (project freeciv):

I investigae possibility to make these transitional steps simpler by not doing
any conversions in first phase loading code either - ACTIVITY_ROAD would be
loaded as ACTIVITY_ROAD, ACTIVITY_GEN_ROAD as ACTIVITY_GEN_ROAD.
Problem is that loading code has to do some further handling with road
building activities. If ACTIVITY_ROAD is not first converted to
ACRTIVITY_GEN_ROAD, it should be separately handled in later steps.

___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #19447] Over maximum veteran level assigned initially to unit

2012-02-19 Thread Jacob Nevins
Follow-up Comment #4, bug #19447 (project freeciv):

Unfortunately this patch causes a variety of breakage on S2_3 on the client:
* Where veteran level names should be displayed for individual units
(middle-click popit and city dialog), garbage is displayed instead.
* Middle-click popit doesn't show ongoing activity (guessing because client
thinks veterancy-dependent activity rate is 0/turn?)
* Veteran chevrons not displayed on units.
* Units with less than full HP have a full-HP sprite displayed behind the
correct one. (Perhaps this is from an out-of-bounds access to the array of
veterancy sprites?)

I think this is because the client doesn't know the number of veteran levels
-- it's not formally communicated in the 2.3 network protocol. From
handle_ruleset_unit():

  u->veteran_levels = 0; /* not used in the client */


Thus every unit on the client ends up with veteran level -1.

We could:
* Conditionalise the new check on is_server().
* Roll back the check entirely on S2_3. (With luck, after the fix for bug
#19466 it should be irrelevant anyway?)

(None of this applies to S2_4 or trunk.)

___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #3143] Requirement lists for Disasters to happen

2012-02-19 Thread J. M. Gorbach
Follow-up Comment #1, patch #3143 (project freeciv):

Good work! I read DisasterReqs.diff and it's very useful for patch #1342 :)

___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #19472] Wrong activity icon for ACTIVITY_GEN_ROAD

2012-02-19 Thread Marko Lindqvist
URL:
  

 Summary: Wrong activity icon for ACTIVITY_GEN_ROAD
 Project: Freeciv
Submitted by: cazfi
Submitted on: Sun 19 Feb 2012 01:48:00 PM EET
Category: client
Severity: 3 - Normal
Priority: 5 - Normal
  Status: Ready For Test
 Assigned to: None
Originator Email: 
 Open/Closed: Open
 Release: 
 Discussion Lock: Any
Operating System: None
 Planned Release: 2.5.0

___

Details:

As reported by jtn, ACTIVITY_CONVERT icon is displayed instead of
ACTIVITY_GEN_ROAD icon. Fix attached



___

File Attachments:


---
Date: Sun 19 Feb 2012 01:48:01 PM EET  Name: CorrectGenRoadActIcon.diff  Size:
438B   By: cazfi



___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #3144] Savegame handling of ACTIVITY_GEN_ROAD and road type pillage targets

2012-02-19 Thread Marko Lindqvist
URL:
  

 Summary: Savegame handling of ACTIVITY_GEN_ROAD and road type
pillage targets
 Project: Freeciv
Submitted by: cazfi
Submitted on: Sun 19 Feb 2012 01:06:10 PM EET
Category: general
Priority: 5 - Normal
  Status: In Progress
 Privacy: Public
 Assigned to: None
Originator Email: 
 Open/Closed: Open
 Discussion Lock: Any
 Planned Release: 2.5.0

___

Details:

It's not yet ready to be submitted, but I'm working on patch to add savegame
handling of ACTIVITY_GEN_ROAD and pillaging targeted to road type.

Transitional steps from old "2 road types as specials" to generic road types
are quite complicated, so I explain a bit what happens in this step.

What we have before the patch:
Handling of ACTIVITY_GEN_ROAD and pilaging targeted to road type once unit has
such an activity, should be working short of savegame part. Catch is that
there's no way for user to assign such activities to unit. Client (and ai)
still always use old ACTIVITY_ROAD, ACTIVITY_RAILROAD and specials targeted
pillaging.

Saving part:
This is relatively simple. It just saves activities as they are; ACTIVITY_ROAD
as ACTIVITY_ROAD, and ACTIVITY_GEN_ROAD as ACTIVITY_GEN_ROAD. There's no
conversion from ACTIVITY_ROAD to ACTIVITY_GEN_ROAD here since later versions
will not feed it ACTIVITY_ROAD at all. Same goes for road type targeted
pillaging vs special targeted pillaging.

Loading part:
Even when freeciv uses ACTIVITY_GEN_ROAD exclusively, savegame loding part
must be able to handle ACTIVITY_ROAD from old savegames. Thus it always
converts ACTIVITY_ROAD and ACTIVITY_RAILROAD to appropriate ACTIVITY_GEN_ROAD
activities. That happens even if it was this very same transitional version of
freeciv still saving ACTIVITY_ROAD.

What we end with:
User is still unable to directly assign ACTIVITY_GEN_ROAD for units, but
assigns ACTIVITY_ROAD. As long as one plays in one session, ACTIVITY_ROAD is
used. Once user saves the game, activity gets saved as ACTIVITY_ROAD. But when
user then loads such an saved game, activity is converted to
ACTIVITY_GEN_ROAD, and that's used then on. If user saves again,
ACTIVITY_GEN_ROAD gets saved.
Thus one is likely to encounter bugs related to new ACTIVITY_GEN_ROAD handling
code after saving + loading, but never when playing game from the start.




___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #19471] add half-remove

2012-02-19 Thread Michal Mazurek
URL:
  

 Summary: add half-remove
 Project: Freeciv
Submitted by: akfaew
Submitted on: Sun Feb 19 08:27:28 2012
Category: None
Severity: 3 - Normal
Priority: 5 - Normal
  Status: None
 Assigned to: None
Originator Email: 
 Open/Closed: Open
 Release: 
 Discussion Lock: Any
Operating System: None
 Planned Release: 

___

Details:

/remove is very nice, but would it be possible to add a half-remove command
that frees all the resources, but leaves an entry in the players list? In
fact, can a players death do that automatically?




___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev