Complete.Org: Mailing Lists: Archives: freeciv-dev: August 2005:
[Freeciv-Dev] (PR#13683) Reducing the upgrade cost
Home

[Freeciv-Dev] (PR#13683) Reducing the upgrade cost

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: sayenko@xxxxxxxxx
Subject: [Freeciv-Dev] (PR#13683) Reducing the upgrade cost
From: "Guest" <rt-guest@xxxxxxxxxxx>
Date: Thu, 18 Aug 2005 00:06:12 -0700
Reply-to: bugs@xxxxxxxxxxx

<URL: http://bugs.freeciv.org/Ticket/Display.html?id=13683 >

Thanks for all the replies and comments.

I would like to make sure that I have understood the point of the 
developers correctly.

> This should use entirely effects, not unit/tech flags.

and

> Tying the bonus to techs seems like a good solution to me.  These 
> bonuses are pretty small and should act to just decrease costs slowly 
> over time.

So, is it OK to attach a bonus to a technology? As I have explained 
before, at the moment, we can attach effects only to the wonders since 
there is no way to access a city and, as a result, bonuses that may be 
provided by city improvements.

> 
> However the bonus should not affect the 2*missing part of the upgrade 
> cost.  It should never be possible to drop the cost below (2 gold) * 
> (the difference in shield costs).  The bonus should only affect the 
> squared part of the calculation.  We could even make it affect the 
> *exponent* of this calculation so it became
> 
>    eft = get_player_bonus(pplayer, EFT_UPGRADE_COST);
>    cost = 2 * missing + 20 * power(missing, (double)eft / 100.0);
> 
> or for extra points the 20 could be put into the ruleset as well.
> 
>    eft = get_player_bonus(pplayer, EFT_UPGRADE_EXPONENT);
>    eft2 = get_player_bonus(pplayer, EFT_UPGRADE_MULTIPLIER);
>    cost = 2 * missing + eft2 * power(missing, (double)eft / 100.0);
> 
> Note that these values are actually inside unit_buy_gold_cost and 
> should probably remain there - so changes here will decrease unit 
> purchase costs too.

Hm... is there a difference between buying a unit and upgrading it ? If 
there is no difference, then all the calculations should be done in 
unit_buy_gold_cost(), and unit_upgrade_price () may add only some small 
bonuses from wonders, etc. However, unit_buy_gold_cost (), which is 
called from many places, has no pointer to a player, so it is somewhat 
problematic to analyse the existent technolgies here. So, maybe 
unit_buy_gold_cost() should be as it is at the moment so as not make 
conceptual changes, and unit_upgrade_price () should add some small 
bonus based on the technologies. I can also think a little bit about 
final formulas.

Sincerely,
Sayenko Alexander



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