News:

Currently available MegaGlest gameservers are listed on Play.MG.

Main Menu

Problem with "discount_rate" math

Started by Ishmaru, 29 September 2010, 19:58:40

Ishmaru

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!
Annex: Conquer the World Release 4 For Pc Mac + Linux
https://forum.megaglest.org/index.php?topic=9570.0
Annex is now on Facebook!
https://www.facebook.com/AnnexConquer

ChupaReaper

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.

John.d.h

Quote from: 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.
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.

Ishmaru

Annex: Conquer the World Release 4 For Pc Mac + Linux
https://forum.megaglest.org/index.php?topic=9570.0
Annex is now on Facebook!
https://www.facebook.com/AnnexConquer

Omega

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.
Edit the MegaGlest wiki: http://docs.megaglest.org/

My personal projects: http://github.com/KatrinaHoffert

Ishmaru

Annex: Conquer the World Release 4 For Pc Mac + Linux
https://forum.megaglest.org/index.php?topic=9570.0
Annex is now on Facebook!
https://www.facebook.com/AnnexConquer

titi

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.



Try Megaglest! Improved Engine / New factions / New tilesets / New maps / New scenarios

silnarm

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...
Glest Advanced Engine - Code Monkey

Timeline | Downloads