Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cost of upgrading #172

Closed
LaughtersGrave opened this issue Nov 17, 2018 · 10 comments
Closed

Cost of upgrading #172

LaughtersGrave opened this issue Nov 17, 2018 · 10 comments
Assignees
Labels
enhancement stale Stale issue with no information added/requested

Comments

@LaughtersGrave
Copy link

I've noticed that some units cost more to upgrade than buying a whole new unit if the same type, but some things are much cheaper.

For example

Upgrading my FW190 A-3 to He219 costs 300ish
But to upgrade my 10.5 LeFH 18 to 21 K38 costs nearly 1800 which is insane

@salexgit
Copy link
Collaborator

Hi

The way it basically works is that the unit price difference (including transports) is multiplied by upgrade penalty, which is 1.25. So, 10.5 leFH is pretty cheap, just 228, and 21 K38 is quite expensive. The price difference is then multiplied by 1.25 yielding quite high a price.
I am not challenging current model but I agree that in some cases upgrading a very cheap unit to a very expensive unit may result in a higher price than just buying a new expensive unit :)

@LaughtersGrave
Copy link
Author

Ouch.

OK thanks.

It does seem weird

@salexgit
Copy link
Collaborator

Hi

A better way to do it would be not to use fixed upgrade penalty, but rather calculate it based on the starting and target price. I can think of a better formula in the airplane on my way back :)

@LaughtersGrave
Copy link
Author

I agree and do hope to hear more on it

@nicupavel
Copy link
Owner

... and factor in the current unit experience, which will transfer to the new unit.

@salexgit
Copy link
Collaborator

Hi all

So, here are my preliminary considerations on how it might work

  • We can assume that if the source unit price is "A", and the target unit price is "B", then upgrade cost should not exceed "B", i.e. it should not be more than just buying a new unit for price B.
  • In other words, what matters is refund you get for selling the source unit, i.e. KA, where K=[0..1] controls how much refund you get.
  • The easiest way would be just to set K to some fixed value, e.g. 0.75, so that you always get some constant refund.
  • A more interesting approach is to calculate K based on the source and target unit prices; for instance K=A/B. The rationale behind is that you get a higher refund when the price difference is small, which can be viewed as a minor upgrade in the real life. Once price difference becomes larger, the refund becomes smaller.

Just my thoughts on how it can be implemented. I am not sure whether we need to account for anything else, such as experience, because both experience and leader attributes will be anyway copied to a new unit.

@LaughtersGrave
Copy link
Author

That sounds like a good formula to me, I assume transport cost is also factored in, so if you're not selling the transport, you're keeping the same one, no refund, but cheaper price upgrade (fractionally) because you don't need to upgrade your transport.... But, if you do upgrade the transport too then that should be additionally deducted from the overall upgrade cost

@salexgit salexgit mentioned this issue Nov 17, 2018
@LaughtersGrave
Copy link
Author

So I took a screen shot... Are you sure you have the formular correct?
He219 1104
Fw190A-3 1008
The difference is 96 x 1.25 = 120 yet, as you can see in the screen shot the price is 372

screenshot_2018-11-18-00-26-24-975_com ecosia android

@salexgit
Copy link
Collaborator

Hi

I did not analyze all the code details - so it could be the case that something else is taken into account.

@nicupavel nicupavel self-assigned this Jan 8, 2019
@stale
Copy link

stale bot commented Oct 19, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale Stale issue with no information added/requested label Oct 19, 2020
@stale stale bot closed this as completed Oct 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement stale Stale issue with no information added/requested
Projects
None yet
Development

No branches or pull requests

3 participants