bugFreeciv - Bugs: bug #20063, wrong tech upkeep when...

 
 
Show feedback again

bug #20063: wrong tech upkeep when tech_cost_style = 2 or 4

Submitted by:  David Fernandez <bardo>
Submitted on:  Tue 14 Aug 2012 01:46:04 AM UTC  
 
Category: generalSeverity: 3 - Normal
Priority: 5 - NormalStatus: Fixed
Assigned to: Marko Lindqvist <cazfi>Open/Closed: Closed
Release: Operating System: None
Planned Release: 2.3.4, 2.4.0, 2.5.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)

Sat 16 Feb 2013 02:19:26 PM UTC, comment #8:

Thank you.

David Fernandez <bardo>
Sat 16 Feb 2013 12:47:40 PM UTC, comment #7:

The civ2-3 version for 2.3.x currently available in freeciv-modpack (civ2-3-2.3-2c) has been updated to disable tech upkeep. (Also it now lives on modpack.freeciv.org.)

Jacob Nevins <jtn>
Project Administrator
Sat 19 Jan 2013 10:36:26 PM UTC, comment #6:

I'd thank if you could disable the tech upkeep in both versions of the modpack (2.3 and 2.4).

The current LT31 game is using civ2-3 rules. I was waiting for some more feedback to create a new patch for v2.3.3 (or 2.3.4).
Then I'd like to test v2.4 again and to try to update the modpack with the latest fixes or the new rules.
I have not rebalanced the tech upkeep yet, but I plan to do it.

David Fernandez <bardo>
Sat 19 Jan 2013 04:30:14 PM UTC, comment #5:

> If someone fixes this bug, please remember also to dissable the
> tech upkeep in the modpack civ2civ3, else the upkeep is going to
> be 100 times greater than it was designed.

I've just done this in the version available from modpack.freeciv.org for 2.4.x (new version is 2.4-3).

cazfi, can you update the 2.3.x version before 2.3.4 is released? Current version that freeciv-modpack fetches (http://www.cazfi.net/freeciv/modinst/2.3/civ2-3-2.3-2b/civ2-3/game.ruleset) still has tech upkeep.

(Of course if there's a rebalanced version of the ruleset with tech upkeep re-enabled, we'll take that :)

Jacob Nevins <jtn>
Project Administrator
Tue 18 Dec 2012 12:38:44 AM UTC, SVN revision 22088:

Fixed tech upkeep calculation when some tech uses preset value
(tech cost style 2 or 4). Previously total sum was zeroed always
before addign such value, so this can have huge impact on upkeep
cost (old code could assign cost of cheapest single tech where value
of entire tree was expected)

Patch by David Fernandez

See gna bug #20063

(Browse SVN revision 22088)

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Tue 18 Dec 2012 12:38:41 AM UTC, SVN revision 22087:

Fixed tech upkeep calculation when some tech uses preset value
(tech cost style 2 or 4). Previously total sum was zeroed always
before addign such value, so this can have huge impact on upkeep
cost (old code could assign cost of cheapest single tech where value
of entire tree was expected)

Patch by David Fernandez

See gna bug #20063

(Browse SVN revision 22087)

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Tue 18 Dec 2012 12:38:36 AM UTC, SVN revision 22086:

Fixed tech upkeep calculation when some tech uses preset value
(tech cost style 2 or 4). Previously total sum was zeroed always
before addign such value, so this can have huge impact on upkeep
cost (old code could assign cost of cheapest single tech where value
of entire tree was expected)

Patch by David Fernandez

See gna bug #20063

(Browse SVN revision 22086)

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Sat 15 Dec 2012 10:57:21 PM UTC, comment #1:

- S2_4 & S2_3 version (no civ2cvi3 ruleset)

(file #16845)

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Tue 14 Aug 2012 01:46:04 AM UTC, original submission:

Possible bug in file tech.c.

It says:

>tech_bulb_sum = advances[i].preset_cost;


where it should say:

>tech_bulb_sum += advances[i].preset_cost;


When tech_cost_style is 2 or 4, the bug causes a reduced tech upkeep that take into account only one tech instead of the whole tree.

If someone fixes this bug, please remember also to dissable the tech upkeep in the modpack civ2civ3, else the upkeep is going to be 100 times greater than it was designed.
I attach a .diff with both fixes.

David Fernandez <bardo>

 

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

Attach File(s):
   
   
Comment:
   

Attached Files

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by jtn (Posted a comment)
  • -unavailable- added by cazfi (Updated the item)
  • -unavailable- added by bardo (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 8 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 18 Dec 2012 12:38:58 AM UTCcazfiStatusReady For Test=>Fixed
      Assigned toNone=>cazfi
      Open/ClosedOpen=>Closed
    Sat 15 Dec 2012 10:57:21 PM UTCcazfiAttached File-=>Added FixPresetTechUpkeep-S2_4.patch, #16845
      CategoryNone=>general
      StatusNone=>Ready For Test
      Planned Release=>2.3.4, 2.4.0, 2.5.0
    Tue 14 Aug 2012 01:46:04 AM UTCbardoAttached File-=>Added FixTechUpkeep-Fixciv2civ3.diff, #16391
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup