MegaGlest Forum

Archives (read only) => Vanilla Glest => Bug report => Topic started by: Ishmaru on 29 September 2010, 19:58:40

Title: Problem with "discount_rate" math
Post by: Ishmaru on 29 September 2010, 19:58:40
Ive noticed that when morphing to a unit with a discount rate that the discount rate is not applied for an initial cost. Instead after the unit is morphed the discount rate is then refunded to the player.

EX:

UNIT_A can morph into UNIT_B
discount rate = 50%
Unit_B = 100 gold

instead of costing the player 50 gold for the morph instead it cost 100 gold to start the morph, when morph is completed 50 gold is given back to the player.

This is problematic when you have for example 300 gold and 6 UNIT_A's instead of being able to morph all 6 at once, you would have to morph 3 at a time.

You can test this while morphing swordsman to guards.

This problem has been with Glest for a while and is also present in Megaglest as well. Not sure about GAE.

I hope that I explained this properly. Thanks for listening... err reading I mean!
Title: Re: Problem with "discount_rate" math
Post by: ChupaReaper on 29 September 2010, 20:49:40
I don't think it's a problem, the discount rate pays you back some at the end of the morph so that while the unit is morphing you don't have that money, if it was paid back straight away there would be no point as you might as well just decrease the morph cost itself.
Title: Re: Problem with "discount_rate" math
Post by: John.d.h on 29 September 2010, 21:12:16
I don't think it's a problem, the discount rate pays you back some at the end of the morph so that while the unit is morphing you don't have that money, if it was paid back straight away there would be no point as you might as well just decrease the morph cost itself.
Not so.  The cost of the morph is the cost of the unit, so if there are multiple methods of making that unit (i.e. recruit it at the Barracks or morph it from the Swordman), then you need a discount to change the price of the morph without changing the price of recruiting.
Title: Re: Problem with "discount_rate" math
Post by: Ishmaru on 4 October 2010, 03:24:48
Would this be too difficult to fix?
Title: Re: Problem with "discount_rate" math
Post by: Omega on 5 October 2010, 02:51:34
It's on the to-do list in GAE. It will not happen in vanilla glest, though, as that is no longer actively developed. No news for MegaGlest.
Title: Re: Problem with "discount_rate" math
Post by: Ishmaru on 9 October 2010, 18:22:20
Thanks!
Title: Re: Problem with "discount_rate" math
Post by: titi on 10 December 2010, 10:56:03
You all talk about fixing it, but what is the behaviour you would expect?

In the magic faction you need 2 energy points to morph an initiate to a battlemage. If its done you get the 2 energy points back, but the new battlemage also consumes one energy. So in fact you only get one energy back after morphing. I think its an interisting behaviour and I am not really shure if its wrong or right! For me it always looked like it is meant like this, so I don't really see a bug here.
Title: Re: Problem with "discount_rate" math
Post by: silnarm on 11 December 2010, 07:45:26
Well, it got posted in 'bug reports',  but I don't think any one called it a bug.

As used in magitech, there is no problem, that is indeed as it was intended.

It's a 'problem' for modder's because it's not really what it say it is, it claims to be a 'discount' but it isn't a discount, it's a refund.

Modder's should be given the option of either behaviour (a proper discount, and a refund like the discount param currently gives).

Unfortunately we can't just use 'discount' and 'refund', because discount means refund already...