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

Add: Allow autoreplace with same model vehicle #7729

Open
wants to merge 1 commit into
base: master
from

Conversation

@nielsmh
Copy link
Contributor

nielsmh commented Sep 8, 2019

This is not what #7525 asks for, but I think it's just as good, or better. Remove the old restriction on autoreplacing vehicles with the same model, but instead add a check so autoreplace with same model only ever occurs when the vehicle is nearing end of life.

@ldpl
Copy link
Contributor

ldpl commented Sep 8, 2019

There is actually a use for autoreplacing with same model before the end of life. Because of stupid cargo rating calculations it's sometimes beneficial to just autoreplace everything every few years.
Also makes me wonder if it's possible for newgrf to make a vehicle with such a short life that it will constantly autoreplace with this patch xD

@Eddi-z
Copy link
Contributor

Eddi-z commented Sep 8, 2019

i'd say we should rather change that rating calculation, like give the boost only to vehicles bought in the prototype phase

@nielsmh
Copy link
Contributor Author

nielsmh commented Sep 8, 2019

Or change it so the effect diminishes based on years from vehicle model introduction date.

@Eddi-z
Copy link
Contributor

Eddi-z commented Sep 8, 2019

... the details are open for discussion, but i think we should rather fix an exploit rather than design game mechanics to facilitate them.

@nielsmh
Copy link
Contributor Author

nielsmh commented Sep 8, 2019

Well I did a separate PR to fix that exploit then, #7730 :)

@LordAro
Copy link
Member

LordAro commented Oct 25, 2019

I feel like there's some helptext somewhere that could be expanded with this fact...

@nielsmh
Copy link
Contributor Author

nielsmh commented Dec 1, 2019

Also to clarify: This PR does not enable the above exploit. It protects against it by converting any "replace now" into "replace when old" when the replacement vehicle is the same model. Of course that doesn't prevent the player from manually doing a "replace all vehicles now" to a similar model once every year or two.

@nielsmh nielsmh added this to the 1.10.0 milestone Jan 12, 2020
@LordAro
Copy link
Member

LordAro commented Jan 12, 2020

Can you explain (again) why autoreplace with same engine (when old) is different/beneficial to autorenew? To me it just seems like adding a 2nd (confusing) way of doing the same thing

@nielsmh
Copy link
Contributor Author

nielsmh commented Jan 12, 2020

I see two advantages, one is that it might be easier to discover. It doesn't require digging around in the Settings UI. (I haven't been able to think of a good place to put the auto-renew option in the regular GUI.)
The other is that it more directly lets the player be selective about which vehicles they want to renew.

@sheepo99
Copy link

sheepo99 commented Jan 12, 2020

Agreed with @nielsmh. Autoreplace and autorenew should be same, since they do practically the same function that is replacing vehicles, whether it is a different one or the same. That one has to navigate into the settings menu to activate specifically autorenew is highly user unfriendly and confusing to new players alike.

@LordAro
Copy link
Member

LordAro commented Jan 13, 2020

So perhaps autorenew should be removed/deprecated/converted in favour of this?

@auge8472
Copy link
Contributor

auge8472 commented Jan 13, 2020

Can you explain (again) why autoreplace with same engine (when old) is different/beneficial to autorenew? To me it just seems like adding a 2nd (confusing) way of doing the same thing

For me it is confusing not to be able to replace a vehicle with a new vehicle of the same type in the same way as replacing the vehicle with another one of a different type. There is technically no difference except for the type I want to replace the vehicle with. So the similar handling of both cases is IMHO an advantage.

So perhaps autorenew should be removed/deprecated/converted in favour of this?

There is a difference in the way the functions work. With "autorenew" all vehicles get replaced with the same type when they get old. For (classic) autoreplace you as the player have to take action. Maybe the functions are mergable so that one can set autorenew (or not) but can override it in the autoreplace-GUI.

@nielsmh nielsmh force-pushed the nielsmh:selective-autorenew branch from d060ffd to 1d07a1c Feb 6, 2020
@LordAro
Copy link
Member

LordAro commented Feb 6, 2020

I maintain that having both autorenew and autoreplace-the-same-vehicle is confusing, and only one or the other should exist

@nielsmh nielsmh removed this from the 1.10.0 milestone Feb 7, 2020
@nielsmh nielsmh force-pushed the nielsmh:selective-autorenew branch from 1d07a1c to d91eaca Feb 7, 2020
@nielsmh nielsmh changed the title Add #7525: Allow autoreplace with same model vehicle Add: Allow autoreplace with same model vehicle Feb 7, 2020
@frosch123
Copy link
Member

frosch123 commented Feb 7, 2020

Suggestion:

  • Turn the engine_renew setting into a "default autoreplace selection" setting. That is, if enabled, the autoreplace GUI actually shows that each engine is replaced by itself when old.
  • The user can then explicitly change the replacement to "also when not old" or to "no replacement". Both choices would be stored as explicit user-choice in _enginerenew_pool.
    • Essentially: _enginerenew_pool stores whatever differs from default.
    • Changing the default during game does not immediately affect the _enginerenew_pool, so that toggling the setting twice does not change anything.
    • CmdSetAutoReplace removes entries from _enginerenew_pool, when the user selects a replacement matching the default setting.
  • The "replacement indicator" in the vehicle list would also have to change, and display "explicit autoreplace setting differs from default".

(Note, we did similar in the past, when global settings were turned into vehicle specific settings, like for sg_new_nonstop/new_nonstop or sg_full_load_any)

@giordy
Copy link

giordy commented Apr 17, 2020

This feature is very important, in my opinion. Imagine this scenario, which just happened in a game I'm playing:

  • money is very tight because of inflation, infrastructure maintenance, etc...
  • my company owns
    • 40 trucks model A
    • 50 trucks model B
    • 20 trains model T (very expensive)

Let's say that the 50 trucks model B work very well for me and I need to keep using them: "Model B" still has great reliability and just the cargo capacity that I need.

As it is now, I simply have no easy way to renew them because:

  1. if I enable auto-renew in the settings, the game will also replace trains and other vehicles (f.e. trucks model A) that I might not want to renew, right now or ever, because I might want to upgrade them to some newer model, dismiss the route entirely or because I might want to save the money for other things. Quite a few times a train being unexpectedly automatically renewed destroyed my finances.
  2. if I don't enable auto-renew, I'm forced to waste a lot of time in manually renewing 50 trucks by sending them to the depot and manually buying new ones, copying orders, etc... The job is even more tedious because I cannot even do it all at once since my finances are tight. Also tracking down all the vehicles is extremely tedious.

Please implement this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

8 participants
You can’t perform that action at this time.