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

Lock price for when built on sloped river and bare land tiles #6233

Closed
DorpsGek opened this issue Feb 21, 2015 · 1 comment
Closed

Lock price for when built on sloped river and bare land tiles #6233

DorpsGek opened this issue Feb 21, 2015 · 1 comment

Comments

@DorpsGek
Copy link

@DorpsGek DorpsGek commented Feb 21, 2015

Samu opened the ticket and wrote:

This is a patch that attempts to fix two things:

1 - Pricing calculations for building locks on a sloped river tile, without taking into account the cost for clearing a river tile.
2 - Pricing calculations for building and demolishing locks on a sloped bare land tile, taking into account the cost for building, demolishing and maintaining a canal tile. This canal tile isn't actually built or demolished, but its associated costs are simulated, much in the sense to mimic what happens on the upper and lower tiles of a lock. Objective here is to achieve pricing consistency.

Why do I think this patch is needed:

1 - First issue doesn't become apparent when using default prices without the help of a NewGRF. I used BaseCostsMod 5.0 to expose the problem more clearly. The issue becomes apparent when the parameter setting "build canal, also affects 'canal maintenance'" is set to a much lower value. I used 1/8 for my testings.

2 - Second issue is actually more like an "opinionated fix", to maintaining a consistent pricing scheme. If the value for building a canal was instead so blatantly much higher than the cost for building a lock itself, the flaw would become exposed: building several locks in a row would be cheaper than building a single contiguous canal line.

Refer - #4711
http://dev.openttdcoop.org/projects/basecosts

Attachments

Reported version: 1.5.0-beta1
Operating system: All


This issue was imported from FlySpray: https://bugs.openttd.org/task/6233
@frosch123 frosch123 removed the Core label Apr 14, 2018
SamuXarick added a commit to SamuXarick/OpenTTD that referenced this issue Oct 6, 2018
…o achieve better consistency

When building lock:
- don't add the cost for clearing river
- if not building on a river, simulate canal build price and add it to the landscape clearing cost
- if not building on a river, simulate canal maintenance count

When removing lock:
- if it was not built on a river, simulate the cost for clearing a canal tile and add it to the cost for clearing the lock itself
- if it was not built on a river, subtract canal maintenance count

When transfering ownership:
- old owner: subtract canal maintenance count if it was not built on a river
- new owner: simulate canal maintenance count if it was not built on a river

After loading a savegame:
- simulate canal maintenance count if it was not built on a river
SamuXarick added a commit to SamuXarick/OpenTTD that referenced this issue Oct 6, 2018
…o achieve better consistency

When building lock:
- don't add the cost for clearing river
- if not building on a river, simulate canal build price and add it to the landscape clearing cost
- if not building on a river, simulate canal maintenance count

When removing lock:
- if it was not built on a river, simulate the cost for clearing a canal tile and add it to the cost for clearing the lock itself
- if it was not built on a river, subtract canal maintenance count

When transfering ownership:
- old owner: subtract canal maintenance count if it was not built on a river
- new owner: simulate canal maintenance count if it was not built on a river

After loading a savegame:
- simulate canal maintenance count if it was not built on a river
SamuXarick added a commit to SamuXarick/OpenTTD that referenced this issue Oct 6, 2018
…o achieve better consistency

When building lock:
- don't add the cost for clearing river
- if not building on a river, simulate canal build price and add it to the landscape clearing cost
- if not building on a river, simulate canal maintenance count

When removing lock:
- if it was not built on a river, simulate the cost for clearing a canal tile and add it to the cost for clearing the lock itself
- if it was not built on a river, subtract canal maintenance count

When transfering ownership:
- old owner: subtract canal maintenance count if it was not built on a river
- new owner: simulate canal maintenance count if it was not built on a river

After loading a savegame:
- simulate canal maintenance count if it was not built on a river
SamuXarick added a commit to SamuXarick/OpenTTD that referenced this issue Jan 12, 2019
…o achieve better consistency

When building lock:
- don't add the cost for clearing river
- if not building on a river, simulate canal build price and add it to the landscape clearing cost
- if not building on a river, simulate canal maintenance count

When removing lock:
- if it was not built on a river, simulate the cost for clearing a canal tile and add it to the cost for clearing the lock itself
- if it was not built on a river, subtract canal maintenance count

When transfering ownership:
- old owner: subtract canal maintenance count if it was not built on a river
- new owner: simulate canal maintenance count if it was not built on a river

After loading a savegame:
- simulate canal maintenance count if it was not built on a river
@stale

This comment has been minimized.

Copy link

@stale stale bot commented Jan 24, 2019

This issue has been automatically marked as stale because it has not had any activity in the last two months.
If you believe the issue is still relevant, please test on the latest nightly and report back.
It will be closed if no further activity occurs within 7 days.
Thank you for your contributions.

@stale stale bot added the stale label Jan 24, 2019
@stale stale bot closed this Jan 31, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.