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
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) patch from FlySpray This issue is in fact a Patch, but imported from FlySrpay stale Stale issues

Comments

@DorpsGek
Copy link
Member

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
@DorpsGek DorpsGek added Core flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) patch from FlySpray This issue is in fact a Patch, but imported from FlySrpay labels Apr 7, 2018
@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
Copy link

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 Stale issues label Jan 24, 2019
@stale stale bot closed this as completed Jan 31, 2019
SamuXarick added a commit to SamuXarick/OpenTTD that referenced this issue Jan 2, 2020
…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 3, 2020
…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 8, 2020
…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 8, 2020
…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 11, 2020
…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 11, 2020
…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, 2020
…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 19, 2020
…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 Feb 6, 2020
…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 Feb 23, 2020
…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 Feb 23, 2020
…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 Dec 24, 2020
…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) patch from FlySpray This issue is in fact a Patch, but imported from FlySrpay stale Stale issues
Projects
None yet
Development

No branches or pull requests

2 participants