[Freeciv-Dev] [bug #20521] Government Upkeep_Factor help wrong

2014-01-26 Thread Jacob Nevins
Update of bug #20521 (project freeciv):

  Status:  Ready For Test => Fixed  
 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 #20521] Government Upkeep_Factor help wrong

2014-01-26 Thread Jacob Nevins
Follow-up Comment #9, bug #20521 (project freeciv):

> What kind of relation this ticket has to bug #17841?
I think this patch fixes that bug.

___

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 #20521] Government Upkeep_Factor help wrong

2014-01-26 Thread Marko Lindqvist
Follow-up Comment #8, bug #20521 (project freeciv):

What kind of relation this ticket has to bug #17841?

___

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 #20521] Government Upkeep_Factor help wrong

2014-01-25 Thread Jacob Nevins
Additional Item Attachment, bug #20521 (project freeciv):

File name: S2_5-gov-help-worldbonus-ter-output.diff Size:62 KB
File name: S2_4-gov-help-worldbonus-ter-output.diff Size:52 KB
File name: S2_3-gov-help-worldbonus-ter-output.diff Size:50 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 #20521] Government Upkeep_Factor help wrong

2014-01-25 Thread Jacob Nevins
Follow-up Comment #7, bug #20521 (project freeciv):

Patches for older branches, plus output diffs.

Testing ancients ruleset (on S2_5) threw up a couple more changes, but again
I'm happy that the result is more accurate.

(file #19857, file #19858, file #19859)
___

Additional Item Attachment:

File name: S2_5-gov-help-worldbonus-ter.patch Size:31 KB
File name: S2_4-gov-help-worldbonus-ter.patch Size:31 KB
File name: S2_3-gov-help-worldbonus-ter.patch Size:34 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 #20521] Government Upkeep_Factor help wrong

2014-01-24 Thread Jacob Nevins
Update of bug #20521 (project freeciv):

  Status: In Progress => Ready For Test 
 Planned Release:2.4.2,2.5.0,.6.0 => 2.3.5,2.4.2,2.5.0,.6.0 

___

Follow-up Comment #6:

Commit candidate version (for trunk -- haven't checked if it applies to older
branches yet).

> probably some of these should be split to separate patches
String changes split to patch #4450.

As a result, a version of this patch should apply to S2_3.

> I haven't investigated the following unexpected diffs
I have now and am happy with them.

(file #19846, file #19847)
___

Additional Item Attachment:

File name: trunk-gov-help-worldbonus-ter.patch Size:32 KB
File name: trunk-gov-help-worldbonus-ter-output.diff Size:66 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 #20521] Government Upkeep_Factor help wrong

2014-01-19 Thread Jacob Nevins
Follow-up Comment #5, bug #20521 (project freeciv):

> Changing the civ2 food upkeep factors [...] to be the subject of 
> new tickets.
Now bug #21519.

___

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 #20521] Government Upkeep_Factor help wrong

2014-01-19 Thread Jacob Nevins
Follow-up Comment #4, bug #20521 (project freeciv):

Second WIP version -- quite different.

Notable changes from first version (probably some of these should be split to
separate patches):
* discard present=FALSE reqs
* more asserts for things that should have been caught during ruleset loading
* cope with effects with both output type and unit type reqs
silence output in more cases in the presence of extra requirements (otherwise
could lie)
* add PL_() i18n where it was missing
* substantially rework veterans help:
** remain silent if more than one (class, flag, type) req (longstanding
FIXME)
** add i18n disambiguation for class/flag/type output (longstanding FIXME)
** in the case of a type req, output the specific veteran rank name
** reword to make it clearer that it applies to newly built units

Also attached is the current difference it makes to government help with
supplied rulesets + variant2. I haven't investigated the following unexpected
diffs, but suspect they are more accurate rather than less:
* civ2civ3 waste/corruption
* alien max tax rates

(file #19791, file #19792)
___

Additional Item Attachment:

File name: trunk-gov-help-worldbonus-wip-bis.patch Size:35 KB
File name: trunk-gov-help-worldbonus-wip-bis-output.diff Size:66 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 #20521] Government Upkeep_Factor help wrong

2014-01-14 Thread Jacob Nevins
Follow-up Comment #3, bug #20521 (project freeciv):

> Here's my first go
Er, here it is.

(file #19746)
___

Additional Item Attachment:

File name: trunk-gov-help-worldbonus-wip.patch Size:15 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 #20521] Government Upkeep_Factor help wrong

2014-01-13 Thread Jacob Nevins
Update of bug #20521 (project freeciv):

  Status:None => In Progress
 Assigned to:None => jtn
 Planned Release: => 2.4.2,2.5.0,.6.0   

___

Follow-up Comment #2:

> A fix that would help here would be to explicitly look for and 
> take account of completely unqualified effects like 
> base_unit_upkeep here. 
Here's my first go at reworking government help to take into account global
effects (not just for Upkeep_Factor). It fixes at least the original reported
problem.

(Might try to backport this to S2_3 if I can hack it in a way that doesn't
break string freeze.)

> Noticed with civ2 ruleset, but will affect others.
civ2 is worst affected, as the help outright lies. In other rulesets like the
default where Upkeep_Factor = 1(world)+1(gov), the gov help simply doesn't
mention that settlers eat twice the food under Republic/Democracy.

Haven't spotted any other existing ruleset structures which trigger this class
of issue; should diff gov help before/after with all rulesets.

> Did we make this up?
Changing the civ2 food upkeep factors (and/or adding more upkeep graphics) to
be the subject of new tickets.

___

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 #20521] Government Upkeep_Factor help wrong

2013-04-01 Thread Jacob Nevins
Follow-up Comment #1, bug #20521 (project freeciv):

> However, the help for [civ2] Settlers says:
> "Settlers in a Republic or Democracy require twice as much 
> food per turn, and in Communist or Fundamentalist societies, 
> three times as much."
I haven't checked the original game, but two references I've found (1
, 2
) don't mention it,
and the first indicates that food upkeep is 1 for these govs.

Did we make this up?
* The "three times as much" text came from me in patch #1390. I presume I was
just updating docs to match the ruleset, so we can't take that as intention.
* Going back, I think r11293
 (when
effects were added) bumped it from 2 to 3, and that this was probably
inadvertent.
* Going back further, upkeep=2 seems to have been deliberate; r4517
 deliberately
changed it for Communism, and r3761
 implemented
Fundamentalism in this state.

So I think we should at least reduce it to 2 (under a new ticket), and
possibly back to 1 (depending on whether we can find out what commercial Civ2
did).

(I can see a possible game balance argument for having high settler upkeep, to
balance the military advantages of these governments, but the civ2 ruleset
isn't the place for such tweaks.)

> (Incidentally, if we are intentionally shipping rulesets with 
> upkeep 3, it's not ideal that the upkeep icon can only go up 
> to 2 -- I only noticed this by hovering over the unit icon to 
> get the upkeep numbers.)
Patch #3824 will address this limitation.

___

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 #20521] Government Upkeep_Factor help wrong

2013-02-17 Thread Jacob Nevins
URL:
  

 Summary: Government Upkeep_Factor help wrong
 Project: Freeciv
Submitted by: jtn
Submitted on: Sun Feb 17 15:16:48 2013
Category: docs
Severity: 3 - Normal
Priority: 5 - Normal
  Status: None
 Assigned to: None
Originator Email: 
 Open/Closed: Open
 Release: S2_4 r22361
 Discussion Lock: Any
Operating System: None
 Planned Release: 

___

Details:

Noticed with civ2 ruleset, but will affect others.

In the autogenerated help for civ2 Fundamentalism and Communism we have:
* "You pay 2 times normal Food upkeep for your units."
No other government types mention this.

However, the help for Settlers says:
"Settlers in a Republic or Democracy require twice as much food per turn, and
in Communist or Fundamentalist societies, three times as much."

And by experiment, this appears to be accurate.

(Incidentally, if we are intentionally shipping rulesets with upkeep 3, it's
not ideal that the upkeep icon can only go up to 2 -- I only noticed this by
hovering over the unit icon to get the upkeep numbers.)

Root cause is that the government help (helptext_government()) cherry-picks
effects that apply to the current government, but doesn't consider effects
that aren't government-specific. The effect structure in civ2/effects.ruleset
looks like:


[effect_base_unit_upkeep]
name  = "Upkeep_Factor"
value = 1

[effect_communism_unit_upkeep]
name  = "Upkeep_Factor"
value = 2
reqs   =
{ "type", "name", "range"
  "Gov", "Communism", "Player"
  "OutputType", "Food", "Local"
}

...


So "effect_base_unit_upkeep" is not taken into account. For many descriptions
that sort of thing doesn't matter, but for Upkeep_Factor which is
multiplicative it's very misleading.

This explains why no help text is seen for Republic/Democracy: the resultant
factor is 1, which isn't seen as worth mentioning.

A fix that would help here would be to explicitly look for and take account of
completely unqualified effects like base_unit_upkeep here.
That doesn't catch more complicated interactions, but most of those would
hopefully be specific enough that it's reasonable to say "gov X pays 2x
upkeep" and expect the player to know that in condition Y that's a base level
that's modified. (In general, this generated help text will never cope with
all these circumstances; the best we can hope for is to remain silent when
things get complicated.)

(This is with S2_4; haven't checked other branches yet.)




___

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