[Freeciv-Dev] [bug #14515] Behaviour of hydro/nuclear/solar plants etc doesn't match documentation

2010-10-30 Thread Matthias Pfafferodt

Follow-up Comment #11, bug #14515 (project freeciv):

 (This would be easier to express in the ruleset if the effects
 system could combine numbers in more ways than just addition,
 such as min() and max(). But that's probably a separate bug.)

Perhaps an additional field could be added to the effects definition. It
could define how the numbers should be combined. But this raises the problem
of the order of the effects, i.e


[effect_test1]
  name  = test
  operation = ADD
  value = 16

[effect_test2]
  name  = test
  operation = MIN
  value = 20

[effect_test3]
  name  = test
  operation = DIV
  value = 2


depending on the order this could result in

min((0 + 16), 20) / 2 = 8
min(0, 20) / 2 + 16 = 26
min((0 / 2), 20) + 16 = 36
... (and some more combinations)





___

Reply to this item at:

  http://gna.org/bugs/?14515

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


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


[Freeciv-Dev] [bug #14515] Behaviour of hydro/nuclear/solar plants etc doesn't match documentation

2010-10-30 Thread Matthias Pfafferodt

Follow-up Comment #13, bug #14515 (project freeciv):

perhaps an additional 'priority' flag could be used? On ruleset load there
must be a check that for each effect no priority is duplicated. Furthermore,
the effects must be saved in the corresponding order.

___

Reply to this item at:

  http://gna.org/bugs/?14515

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


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


[Freeciv-Dev] [bug #14515] Behaviour of hydro/nuclear/solar plants etc doesn't match documentation

2009-10-28 Thread pepeto

Update of bug #14515 (project freeciv):

  Status: In Progress = Fixed  
 Open/Closed:Open = Closed 


___

Reply to this item at:

  http://gna.org/bugs/?14515

___
  Message posté via/par Gna!
  http://gna.org/


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


[Freeciv-Dev] [bug #14515] Behaviour of hydro/nuclear/solar plants etc doesn't match documentation

2009-10-26 Thread pepeto

Update of bug #14515 (project freeciv):

  Status:  Ready For Test = Fixed  
 Open/Closed:Open = Closed 


___

Reply to this item at:

  http://gna.org/bugs/?14515

___
  Message posté via/par Gna!
  http://gna.org/


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


[Freeciv-Dev] [bug #14515] Behaviour of hydro/nuclear/solar plants etc doesn't match documentation

2009-10-26 Thread Jacob Nevins

Follow-up Comment #6, bug #14515 (project freeciv):

Sorry to comment on a closed bug, but there are a couple of loose ends on
this subject:

Firstly, the docs for S2_1 need the same fix as S2_2/trunk (but the behaviour
is fine). I've attached a patch for that.

Secondly, the same priority problem affects the civ2 ruleset on S2_2/trunk,
which I can easily write a patch for, except:

In the civ2 ruleset (unlike the default ruleset), the pollution effects of
Hydro/Hoover/Nuclear really are always reduce-to-50%, regardless of whether
you have a Factory, Mfg. Plant, neither, or both.
However, the Solar Plant behaves the same in civ2 and default ruleset (i.e.
no bonus with neither of Factory/Mfg. Plant, 50% with only one, 100% with
both).
Is that correct? (I don't know the real civ2 rules.) If so, my trunk/civ2
patch will need to fix the Solar help as well; if not, it'll have to fix the
behaviour. So, I haven't written the patch yet.

(I'm assuming the priority behaviour in the civ2 ruleset isn't a deliberate
bug-compatibility decision.)

(For completeness: the civ1 ruleset is affected by none of this, as it
doesn't have a Solar Plant.)

(file #7124)
___

Additional Item Attachment:

File name: plant-doc-fix-S2_1.diffSize:3 KB


___

Reply to this item at:

  http://gna.org/bugs/?14515

___
  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 #14515] Behaviour of hydro/nuclear/solar plants etc doesn't match documentation

2009-10-26 Thread pepeto

Update of bug #14515 (project freeciv):

  Status:   Fixed = In Progress
 Open/Closed:  Closed = Open   

___

Follow-up Comment #7:

Reopening this ticket...

 Firstly, the docs for S2_1 need the same fix as S2_2/trunk (but
 the behaviour is fine). I've attached a patch for that.

We cannot change S2_1 documentation because it would require translation
jobs.

 Is that correct? (I don't know the real civ2 rules.)

Me neither, but I think you are right.


___

Reply to this item at:

  http://gna.org/bugs/?14515

___
  Message posté via/par Gna!
  http://gna.org/


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


[Freeciv-Dev] [bug #14515] Behaviour of hydro/nuclear/solar plants etc doesn't match documentation

2009-10-26 Thread Jacob Nevins

Follow-up Comment #8, bug #14515 (project freeciv):

 We cannot change S2_1 documentation because it would require translation
jobs.

Boo. Well, I've updated the wiki
http://freeciv.wikia.com/index.php?title=Buildings_catalogcurid=1764diff=15079oldid=14601.

 Me neither, but I think you are right.

Attached a patch on the assumption that civ2 Solar Plant should behave like
the other Plants.
Here's some questionable evidence
http://www.mahalo.com/civilization-ii-walkthrough#Solar_Plant for that
change.

(file #7126)
___

Additional Item Attachment:

File name: plant-consistency-civ2-trunk.diff Size:4 KB


___

Reply to this item at:

  http://gna.org/bugs/?14515

___
  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 #14515] Behaviour of hydro/nuclear/solar plants etc doesn't match documentation

2009-10-25 Thread pepeto

Update of bug #14515 (project freeciv):

  Status:None = Ready For Test 

___

Follow-up Comment #3:

Your patch looks to fix all the issues. However, I'm uncertain about the
effect_recycling_center_1 and effect_recycling_center_2.  Their value looks
tricky.  But I tried to find a better way, without success.  I will keep this
version.


___

Reply to this item at:

  http://gna.org/bugs/?14515

___
  Message posté via/par Gna!
  http://gna.org/


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


[Freeciv-Dev] [bug #14515] Behaviour of hydro/nuclear/solar plants etc doesn't match documentation

2009-10-23 Thread Jacob Nevins

Follow-up Comment #2, bug #14515 (project freeciv):

cazfi writes:
 Yes, it's deliberate rule change.

OK, thanks.

I'm assuming the principle that you should always get the single best
pollution bonus from all your buildings you have, since no-one's objected.

So, here's a second version of my patch, that's like the first except that it
fixes the documentation to reflect the rule change and addresses the Solar +
Recycling + (Factory OR Mfg. Plant) issue in my original patch -- in this
case you get a 66% reduction, from the recycling plant.

(This would be easier to express in the ruleset if the effects system could
combine numbers in more ways than just addition, such as min() and max(). But
that's probably a separate bug.)

(file #7084)
___

Additional Item Attachment:

File name: plant-consistency-bis-trunk.diff Size:10 KB


___

Reply to this item at:

  http://gna.org/bugs/?14515

___
  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 #14515] Behaviour of hydro/nuclear/solar plants etc doesn't match documentation

2009-10-22 Thread Marko Lindqvist

Follow-up Comment #1, bug #14515 (project freeciv):

 This is particularly obvious with Solar Plant -- if you only
 have a Factory, pollution is only reduced to half, not
 eliminated.
 Is this deliberate? If so, the documentation needs patching; if
 not, the ruleset. 

Yes, it's deliberate rule change. Obviously documentation has not been
updated when rules got changed.

___

Reply to this item at:

  http://gna.org/bugs/?14515

___
  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 #14515] Behaviour of hydro/nuclear/solar plants etc doesn't match documentation

2009-10-21 Thread pepeto

Update of bug #14515 (project freeciv):

 Assigned to:None = pepeto 


___

Reply to this item at:

  http://gna.org/bugs/?14515

___
  Message posté via/par Gna!
  http://gna.org/


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


[Freeciv-Dev] [bug #14515] Behaviour of hydro/nuclear/solar plants etc doesn't match documentation

2009-10-13 Thread Jacob Nevins

URL:
  http://gna.org/bugs/?14515

 Summary: Behaviour of hydro/nuclear/solar plants etc doesn't
match documentation
 Project: Freeciv
Submitted by: jtn
Submitted on: Wednesday 14/10/09 at 00:02
Category: rulesets
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: None

___

Details:

This mainly concerns the Solar Plant in the trunk build, but not entirely.
Sorry there are multiple issues here, but they're related.

How I got into this: with a trunk build, I noticed that my Solar Plant wasn't
eliminating all shield pollution as advertised. I found that my Recycling
Center was inhibiting this effect; selling the latter gave the desired effect
from the former.

Then I dug deeper into the ruleset and found a bunch of what seem to me like
inconsistencies. I don't know what the right answers are here yet, but if
someone can give a consensus I can write patches.

(I was in two minds as to whether to post this here or in the forum. Sorry if
I picked wrong.)

(1) The effect when a Solar Plant is present in a city at the same time as
another pollution-reducing building seems unhelpful. A Solar Plant's
pollution effects are neutralised by the presence of any of a Recycling
Center, Nuclear Plant, Hydro Plant, or the Hoover Dam -- you get the (almost
always, see below) lesser effect of the less advanced building. This is in
contrast to the interaction between Recycling Center and (non-solar) Plants,
where you get the better (66%) effect from the R.C.
I can imagine this being particularly annoying for the Hoover Dam -- if
you've got that wonder, Solar Plants are of no use to you and there's nothing
you can do about it. (Unless that case is a deliberate balancing strategy? If
so, it should be documented, and preferably, starting to build a Solar Plant
should be disallowed.)

(2) More generally, the priority of the various plants in effects.ruleset
seems inconsistent. For instance, Hydro Plant wins over Power Plant wrt
Output_Bonus, but Power Plant wins over Solar Plant.
All the Output_Bonuses are the same, so this has no effect on gameplay, but
if they followed a consistent ordering then is_building_replaced(), and hence
the city dialog, could mark buildings as redundant, which is cosmetic but nice
(it's a reminder that you should consider selling these useless buildings).

The attached patch (for discussion purposes) addresses points (1) and (2) in
the default ruleset, by establishing consistent priority orders:
 - for Output_Bonus, in order of increasing priority: Power Plant; Hydro
Plant; Nuclear Plant; Hoover Dam; Solar Plant.
 - for Pollu_Prod_Pct, in order of increasing priority: Hydro Plant; Nuclear
Plant; Hoover Dam; Recycling Center Solar Plant.

The effect of the latter is that you almost always get the biggest single
pollution bonus of your buildings, but never a cumulative effect.
(If desired, it would be possible to arrange the opposite effect -- not
getting a pollution bonus from a higher tech until you actually get rid of
your dirty, expensive old Power Plant. Hoover Dam would need special
treatment, though, and it's not obvious that it adds to gameplay.)

The patch leaves one lacuna -- if you have a Solar Plant, a Recycling Center,
and only one of Factory and Mfg. Plant, you get 50% pollution bonus from your
Solar Plant rather than the better 66% you could get from your Recycling
Center. I could also fix this, but want to settle point (3) below first.

(3) The help for each Plant claims a single blanket pollution reduction
(e.g., Nuclear Plant reduces the amount of pollution generated by production
in a city by 50% and Solar Plant eliminates all pollution generated by
production in a city), but in fact you only get the advertised effect when
you have both a Factory and a Mfg. Plant -- when you have only one, you get
half the pollution effect (e.g., 25% for Nuclear Plant). This is particularly
obvious with Solar Plant -- if you only have a Factory, pollution is only
reduced to half, not eliminated.
Is this deliberate? If so, the documentation needs patching; if not, the
ruleset.
(This part also affects S2_1.)



___

File Attachments:


---
Date: Wednesday 14/10/09 at 00:02  Name: plant-consistency-trunk.diff  Size:
5kB   By: jtn
Tweak effects.ruleset so that better Plants (etc) have precedence
http://gna.org/bugs/download.php?file_id=6987

___

Reply to this item at:

  http://gna.org/bugs/?14515

___
  Message sent