Yet another autoslope patch (in trunk since r11107)
Moderator: OpenTTD Developers
Yet another autoslope patch (in trunk since r11107)
This patch features:
* A new item "Allow terraforming under buildings, tracks, etc. (autoslope)" (english only) in "patch options"->"construction" (second from top, under 'build on slopes'). (enabled by default)
* If enabled: Terraforming under things without removing them. (TTDP calls it autoslope)
The patch increases the savegame version from 74 to 75. That means trunk cannot load savegames created with this patch.
The patch cannot load savegames of versions before r11051 of this patch. So make sure you do not want to continue your old games.
Autoslope is enabled under
* tracks/roads/stations if 'build on slopes' is enabled.
* houses/industries if they allow that. (This is controlled by newgrf properties resp. their default values)
* statues and company headquarters.
Autoslope in disabled
* under transmitters and lighthouses.
* for non-players like towns and industries. (They terraform on expansion/creation)
Autosloping causes terraforming cost to be doubled.
NewGRF related things:
Compliant to TTDP's autoslope behavior, except for houses, where Action 0 house property 09 'flat land required' is checked.
Enjoy it!
* A new item "Allow terraforming under buildings, tracks, etc. (autoslope)" (english only) in "patch options"->"construction" (second from top, under 'build on slopes'). (enabled by default)
* If enabled: Terraforming under things without removing them. (TTDP calls it autoslope)
The patch increases the savegame version from 74 to 75. That means trunk cannot load savegames created with this patch.
The patch cannot load savegames of versions before r11051 of this patch. So make sure you do not want to continue your old games.
Autoslope is enabled under
* tracks/roads/stations if 'build on slopes' is enabled.
* houses/industries if they allow that. (This is controlled by newgrf properties resp. their default values)
* statues and company headquarters.
Autoslope in disabled
* under transmitters and lighthouses.
* for non-players like towns and industries. (They terraform on expansion/creation)
Autosloping causes terraforming cost to be doubled.
NewGRF related things:
Compliant to TTDP's autoslope behavior, except for houses, where Action 0 house property 09 'flat land required' is checked.
Enjoy it!
- Attachments
-
- Autoslope_r11089.patch
- See sticky topics 'Howto apply a patch' and 'BuildOTTD'
- (21.08 KiB) Downloaded 203 times
Last edited by frosch on 19 Sep 2007 20:17, edited 5 times in total.
⢇⡸⢸⠢⡇⡇⢎⡁⢎⡱⢸⡱⢸⣭⠀⢸⢜⢸⢸⣀⢸⣀⢸⣭⢸⡱⠀⢰⠭⡆⣫⠰⣉⢸⢸⠀⢰⠭⡆⡯⡆⢹⠁⠀⢐⠰⡁
Re: Yet another autoslope patch (90 percent complete)
A quick peek at this was a very pleasant experience, looks like you did a fine job here
Code: Select all
if (YouAreHappyAndYouKnowIt) {
ClapYourHands();
}
-
- Transport Coordinator
- Posts: 333
- Joined: 25 Aug 2005 09:44
- Location: Eindhoven, Netherlands
Re: Yet another autoslope patch (90 percent complete)
Without even looking at the patch, I'm very impressed with your approach - you seem to have done your preparation in trying to understand the full implications of this patch - no half work! I'll try to find some time to comment on the patch itself later on.
Re: Yet another autoslope patch (90 percent complete)
first of all, like boekabart said, your post looks really promising for itself. I wish you good luck with this project, i'm definately looking forward to this!
I'll give you my thoughts about the points that are still open.
It's the same annoying thing like signaling/building/clearing a diagonal piece of track with another (occupied) piece of track on the same tile. This was only recently fixed by a patch, and it would IMO be a fun-blocker if this kind of limitation was introduced here again.
[edit]okay, i just noticed that was your patch [/edit]
[edit]ok, i guess you mean what i attached to the post (in reverse as well of course). yes, this tile should get dirty ground, since the actual surface changes. Other than in normal case.
sad that we can't have only half of the tile with dirty ground. That would be awesome. *dreaming* ^^
(maybe your next project?)
[/edit]
I'll keep myself from commenting on the more internal stuff, since i don't really know about that
cheers
edit: played around with it for a bit, and edited my post accordingly
I'll give you my thoughts about the points that are still open.
No. IMO this should only be caused when the track the vehicle is running on would be changed.frosch wrote:[...]
However there are some things open:
* Should terraforming under things cause "Vehicle in the way"? (Currently it does not)
It's the same annoying thing like signaling/building/clearing a diagonal piece of track with another (occupied) piece of track on the same tile. This was only recently fixed by a patch, and it would IMO be a fun-blocker if this kind of limitation was introduced here again.
[edit]okay, i just noticed that was your patch [/edit]
good question. What would happen if it's enabled during these actions? probably needs some testing - if strange things happen, it can be deactivated still.* Should terraforming under things be disabled during world generation, town expansion and industry construction? (Currently it is enabled)
current behavior sounds pretty reasonable. no sloping of tracks (, stations...) afterwards. don't allow anything to be created which you can't clear and then rebuild just like this.* What is the effect of enabled 'autoslope' but disabled 'build on slopes'. (Currently it then allows autosloping only under houses)
maybe some will disagree with me here, but i'd say no. LH/transmitters aren't supposed to stand on a slope. but i'm open for discussion here.* Should terraforming under light houses/transmitters be allowed? (Currently it is enabled with 'build on slopes')
i don't exactly know what you mean here. I'll have a look at the game with your patch right now, maybe that will clear it up for me.* In some cases railroad should get dirty ground if the foundation changes.
[...]
[edit]ok, i guess you mean what i attached to the post (in reverse as well of course). yes, this tile should get dirty ground, since the actual surface changes. Other than in normal case.
sad that we can't have only half of the tile with dirty ground. That would be awesome. *dreaming* ^^
(maybe your next project?)
[/edit]
I'll keep myself from commenting on the more internal stuff, since i don't really know about that
cheers
edit: played around with it for a bit, and edited my post accordingly
- Attachments
-
- You mean this kind of tile, right? This should get dirty ground...
- slope.png (8.44 KiB) Viewed 8077 times
Re: Yet another autoslope patch (90 percent complete)
Updated first post.
First I forgot to mention, that I had to increase the savegame version from 73 to 74. That means trunk cannot load savegames created with this patch.
New questions:
* Currently autosloping has extra-costs of '_price.terraform' (This price is used for terraforming one step on clear land, and for building foundations'. Perhaps add an extra cost like half of the clear-land costs, if the tile is not owned by the player. This will make autosloping under industries and important townbuildings more expensive.
* Should we ask the local authority before autosloping under houses?
Changes:
* Terraforming under railway will make the ground dirty, if the surface slope changes.
* Disable autoslope during world generation. This way a specific 'random seed' will cause the same world independent of 'autoslope'-setting.
Fixes:
* Forgot 'on'/'off' text in patch settings.
* Terraforming showed a red pulsating error square, if only money was not sufficient.
* Removed some bogus whitespace. (Spotted by Rubidium, thanks)
@Roujin:
Thanks for your opinion. I will wait for some more, and then make a decision.
About the dirty halftile: If you find appropiate space in the map array, even mixed track types on one tile are possible (like parallel horizontal/vertical rail and monorail). The code to draw clipped sprites (i.e. the half of a ground sprite) is already in the still unreleased HalftileFoundations patch (see Topic 'Less restrictive rail construction').
First I forgot to mention, that I had to increase the savegame version from 73 to 74. That means trunk cannot load savegames created with this patch.
New questions:
* Currently autosloping has extra-costs of '_price.terraform' (This price is used for terraforming one step on clear land, and for building foundations'. Perhaps add an extra cost like half of the clear-land costs, if the tile is not owned by the player. This will make autosloping under industries and important townbuildings more expensive.
* Should we ask the local authority before autosloping under houses?
Changes:
* Terraforming under railway will make the ground dirty, if the surface slope changes.
* Disable autoslope during world generation. This way a specific 'random seed' will cause the same world independent of 'autoslope'-setting.
Fixes:
* Forgot 'on'/'off' text in patch settings.
* Terraforming showed a red pulsating error square, if only money was not sufficient.
* Removed some bogus whitespace. (Spotted by Rubidium, thanks)
@Roujin:
Thanks for your opinion. I will wait for some more, and then make a decision.
About the dirty halftile: If you find appropiate space in the map array, even mixed track types on one tile are possible (like parallel horizontal/vertical rail and monorail). The code to draw clipped sprites (i.e. the half of a ground sprite) is already in the still unreleased HalftileFoundations patch (see Topic 'Less restrictive rail construction').
⢇⡸⢸⠢⡇⡇⢎⡁⢎⡱⢸⡱⢸⣭⠀⢸⢜⢸⢸⣀⢸⣀⢸⣭⢸⡱⠀⢰⠭⡆⣫⠰⣉⢸⢸⠀⢰⠭⡆⡯⡆⢹⠁⠀⢐⠰⡁
- belugas
- OpenTTD Developer
- Posts: 1507
- Joined: 05 Apr 2005 01:48
- Location: Deep down the deepest blue
- Contact:
Re: Yet another autoslope patch (90 percent complete)
About your questions on newgrf, i wonder why you asked.
From what I can remember, those calls are made during creation of the entity (industry, house, station etc) and therefore, you do not need to perform it after it has been built.
Or maybe there is something else that i have not seem which could very well be.
The fact that you made such extended search in the codebase is very good and pretty uncommun
And it caugh the attention of a lot of people
From what I can remember, those calls are made during creation of the entity (industry, house, station etc) and therefore, you do not need to perform it after it has been built.
Or maybe there is something else that i have not seem which could very well be.
The fact that you made such extended search in the codebase is very good and pretty uncommun
And it caugh the attention of a lot of people
If you are not ready to work a bit for your ideas, it means they don't count much for you.
OpenTTD and Realism? Well... Here are a few thoughs on the matter.
He he he he
------------------------------------------------------------
Music from the Bloody Time Zones
OpenTTD and Realism? Well... Here are a few thoughs on the matter.
He he he he
------------------------------------------------------------
Music from the Bloody Time Zones
Re: Yet another autoslope patch (90 percent complete)
Well, the thing is, that these callback can check the tile slope.
About stations I only have one screenshot by Michael Blunck on the german forum:
(Currently) last post on http://www.tt-ms.de/forum/showthread.ph ... 409&page=7.
What happens if I autoslope a corner under such a custom foundation and get a slope the newgrf does not provide a foundation for.
The same holds for industries.
To check an action 0 property is no problem. But if callback 2F is enabled, I have to call it, to know if a steep slope is allowed. Odd is, that probably all grfs will disable autosloping under their industries.
I once considered to call the callbacks for all 23 slopes on creation, so the callbacks are synchronized over the network. But variable 60 allows to check slopes on completely unrelated tiles (though nobody will use this feature).
So perhaps a solution could be: Call callback 3C 'autoslope allowed' on creation of the industry. If it is allowed use action 0 property 0D to test if a slope is allowed. But if callback 2F is enabled there must be a static decision. Either do not allow autosloping at all, or allow every slope, even steep. (I think the first)
The behaviour of TTDP (though I am not good enough in assembler to fully understand it) seems to call only the autoslope callback, and then allow all non-steep slopes. It does not seem to check the action 0 properties of house and industry slope restrictions. But perhaps I looked at the wrong place in the code.
About stations I only have one screenshot by Michael Blunck on the german forum:
(Currently) last post on http://www.tt-ms.de/forum/showthread.ph ... 409&page=7.
What happens if I autoslope a corner under such a custom foundation and get a slope the newgrf does not provide a foundation for.
The same holds for industries.
To check an action 0 property is no problem. But if callback 2F is enabled, I have to call it, to know if a steep slope is allowed. Odd is, that probably all grfs will disable autosloping under their industries.
I once considered to call the callbacks for all 23 slopes on creation, so the callbacks are synchronized over the network. But variable 60 allows to check slopes on completely unrelated tiles (though nobody will use this feature).
So perhaps a solution could be: Call callback 3C 'autoslope allowed' on creation of the industry. If it is allowed use action 0 property 0D to test if a slope is allowed. But if callback 2F is enabled there must be a static decision. Either do not allow autosloping at all, or allow every slope, even steep. (I think the first)
The behaviour of TTDP (though I am not good enough in assembler to fully understand it) seems to call only the autoslope callback, and then allow all non-steep slopes. It does not seem to check the action 0 properties of house and industry slope restrictions. But perhaps I looked at the wrong place in the code.
⢇⡸⢸⠢⡇⡇⢎⡁⢎⡱⢸⡱⢸⣭⠀⢸⢜⢸⢸⣀⢸⣀⢸⣭⢸⡱⠀⢰⠭⡆⣫⠰⣉⢸⢸⠀⢰⠭⡆⡯⡆⢹⠁⠀⢐⠰⡁
Re: Yet another autoslope patch (90 percent complete)
Here's my input.
Good job by the way, the patch is looking great.
I would say yes, but I don't really have a strong opinion about it.frosch wrote:* Should terraforming under things cause "Vehicle in the way"? (Currently it does not)
Yes.frosch wrote:* Should terraforming under things be disabled for town expansion and industry construction? (Currently it is enabled)
Sounds sensible to me - houses are the only things I can think of that can be built on slopes and have foundations.frosch wrote:* What is the effect of enabled 'autoslope' but disabled 'build on slopes'. (Currently it then allows autosloping only under houses)
No, but again I don't have a strong opinion on this one.frosch wrote:* Should terraforming under light houses/transmitters be allowed? (Currently it is enabled with 'build on slopes')
Yes.frosch wrote:* Should autoslope check Action 0 House Property 09 'flat land required'? (Currently it does.)
No, this callback should only be called when a house is built, as it can check many other things than the tile slope. In TTRS2 (I'm not entirely sure about v3) you can only have 3 hospitals on the map, so if you call it when autosloping and there are 3 hospitals on the map it will always fail.frosch wrote:* Should it call House Callback 17 'can house be build on tile' with the new slope in variable 62 'land info of nearby tiles'? (Currently it does not.)
Probably, but since it isn't implemented yet you probably don't have to worry about it for the moment.frosch wrote:* Should it call Station Callback 149 'custom slope check' with the new slope in variable 67 'land info of nearby tiles'. (Currently not implemented at all.)
I'd say yes.frosch wrote:* Should it check Action 0 Industrytile Property 0D 'land shape flags'? (well newindustries..., but I guess it should check)
By the looks of it, if the callback is not enabled, or it fails, autosloping is allowed. And yes, var 60 should refer to whatever the slope is actually there.frosch wrote:* It surely should call Industry Callback 3C 'allow or deny autosloping', but what is the default value if the callback is not enabled? (I guess allow it.) And should Variable 60 'land info of nearby tiles' refer to the new slope.
I guess not, since there's a callback explicitly for autoslope already.frosch wrote:* Should it call Industry Callback 2F 'check if slope suitable' or Callback 28 'Industry location permissibility' with new slope in variable 60 'land info of nearby tiles' (I guess don't call.)
Yes.frosch wrote:* And if it calls a callback, is it the grf's fault, if it causes desyncs? (Query-cost-only commands are not send over the network.)
Good job by the way, the patch is looking great.
No-one's more important than the earthworm.
Re: Yet another autoslope patch (90 percent complete)
with all theese commets i smell a submission to trunk soon
Re: Yet another autoslope patch (90 percent complete)
Well I'd just like to echo what everybody else has said really, I've been lurking here for a good couple of years and I'm quite amazed at how much thought you are putting into this patch. Excellent work!
...Especially compared to how a certain someone reacted to comments on his related patch...
Also, disallowing autoslopes when a vehicle is on the tile would probably cause annoyance with stations. Forcing someone to wait for a large train to finish loading and leave a station so you can lower some land is not exactly fun gameplay.
...Especially compared to how a certain someone reacted to comments on his related patch...
Well I would say for realism - yes, for gameplay - no. This is the only thing I have a strong opinion on and I personally would always take gameplay over realism in something like this.frosch wrote:* Should terraforming under things cause "Vehicle in the way"? (Currently it does not)
Also, disallowing autoslopes when a vehicle is on the tile would probably cause annoyance with stations. Forcing someone to wait for a large train to finish loading and leave a station so you can lower some land is not exactly fun gameplay.
- NukeBuster
- Traffic Manager
- Posts: 222
- Joined: 04 Jan 2006 18:16
- Location: Alphen aan den Rijn, The Netherlands
- Contact:
Re: Yet another autoslope patch (90 percent complete)
Nice job, on this patch. It looks really promising. I've read the questions, and I like to give my opinion.
I'm really looking forward to seeing more of your work.
Only if the train is on the same side of the track, where you want to change the slope.frosch wrote: However there are some things open:
* Should terraforming under things cause "Vehicle in the way"? (Currently it does not)
Yes. (It should be the same for tunnels. At least directly below the industry.)frosch wrote: * Should terraforming under things be disabled for town expansion and industry construction? (Currently it is enabled)
Only under houses seems reasonable.frosch wrote: * What is the effect of enabled 'autoslope' but disabled 'build on slopes'. (Currently it then allows autosloping only under houses)
No, as they are usually placed to keep mountains from extensive terraforming.frosch wrote: * Should terraforming under light houses/transmitters be allowed? (Currently it is enabled with 'build on slopes')
I'd say, add the extra costs. But It shouldn't be more than you would now when destroying buildings and terraforming.frosch wrote: * Currently autosloping has extra-costs of '_price.terraform' (This price is used for terraforming one step on clear land, and for building foundations). Perhaps add an extra cost like half of the clear-land costs, if the tile is not owned by the player. This will make autosloping under industries and important townbuildings more expensive.
Yes, but it should be more permissive towards autosloping than destroying a city block. As you would do without autoslope.frosch wrote: * Should we ask the local authority before autosloping under houses?
As I don't know anything about grfs. My comments on these questions would probably be useless.frosch wrote: NewGRF related things:
* Should autoslope check Action 0 House Property 09 'flat land required'? (Currently it does.)
* Should it call House Callback 17 'can house be build on tile' with the new slope in variable 62 'land info of nearby tiles'? (Currently it does not.)
* Should it call Station Callback 149 'custom slope check' with the new slope in variable 67 'land info of nearby tiles'. (Currently not implemented at all.)
* Should it check Action 0 Industrytile Property 0D 'land shape flags'? (well newindustries..., but I guess it should check)
* It surely should call Industry Callback 3C 'allow or deny autosloping', but what is the default value if the callback is not enabled? (I guess allow it.) And should Variable 60 'land info of nearby tiles' refer to the new slope
* Should it call Industry Callback 2F 'check if slope suitable' or Callback 28 'Industry location permissibility' with new slope in variable 60 'land info of nearby tiles' (I guess don't call.)
* And if it calls a callback, is it the grf's fault, if it causes desyncs? (Query-cost-only commands are not send over the network.)
But for now, enjoy it!
I'm really looking forward to seeing more of your work.
NukeBuster
Transport Empire: The Transport Empire Linux effort
Join the Transport Empire IRC channel: [url]irc://irc.oftc.net/transportempire[/url] !
OpenTTD patch(es): Password at join
Transport Empire: The Transport Empire Linux effort
Join the Transport Empire IRC channel: [url]irc://irc.oftc.net/transportempire[/url] !
OpenTTD patch(es): Password at join
Re: Yet another autoslope patch (90 percent complete)
Yes.frosch wrote:* Should terraforming under light houses/transmitters be allowed? (Currently it is enabled with 'build on slopes')
NukeBuster: Autoslope doesn't allow changing the foundation-ed height of something. Only the foundation itself.
No.frosch wrote:* Should we ask the local authority before autosloping under houses?
That's half the point. So you can build without disturbing the LA.
Read the docs.frosch wrote:NewGRF related things:
If it's documented as "during construction", then it applies *during* construction. Autoslope happens, by definition, *after* construction.
If it's documented as effecting autoslope, then it effects autoslope.
If it's not documented, test it in TTDPatch (cht:grfdebug is your friend) and then document the results.
No. GRFs cannot cause desyncs. If your query-cost commands are changing things, then they are broken, not any GRF that they may query.frosch wrote:* And if it calls a callback, is it the grf's fault, if it causes desyncs? (Query-cost-only commands are not send over the network.)
To get a good answer, ask a Smart Question. Similarly, if you want a bug fixed, write a Useful Bug Report. No TTDPatch crashlog? Then follow directions.
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
- athanasios
- Tycoon
- Posts: 3138
- Joined: 23 Jun 2005 00:09
- Contact:
Re: Yet another autoslope patch (90 percent complete)
No. It would make the patch useless when terraforming in a city with many road vehicles.frosch wrote:* Should terraforming under things cause "Vehicle in the way"?
I suppose all buildings have basements and foundations (supporting pillars - not the game's slope foundations). OK, this is not implemented in the game yet but it should. We should at least reserve 1 height and more for special buildings and not be able to tunnel there. For special industries like Coal Mine as suggested before it should not be allowed at all to tunnel under. So: For lighthouse reserve 1 height under but allow slope foundations, transmitter doesn't require any deep supports so terraforming under it should be allowed.frosch wrote:* Should terraforming under light houses/transmitters be allowed? (Currently it is enabled with 'build on slopes')
If you mean that allowance will depend on your ratings: yes. But no extra lowering of ratings.frosch wrote:* Should we ask the local authority before autosloping under houses?
Sure!frosch wrote:But for now, enjoy it!
http://members.fortunecity.com/gamesart
"If no one is a fool I am also a fool." -The TTD maniac.
I prefer to be contacted through PMs. Thanks.
"If no one is a fool I am also a fool." -The TTD maniac.
I prefer to be contacted through PMs. Thanks.
Re: Yet another autoslope patch (90 percent complete)
Nope, although that would make it a bit more realistic, it would not be enough to counter the gameplay annoyances.frosch wrote:* Should terraforming under things cause "Vehicle in the way"? (Currently it does not)
I think it should be handled the same way as usual terraforming, it should decrease your ratings, but should be allowed no matter what your ratings are.frosch wrote:* Should we ask the local authority before autosloping under houses?
Yet another great patch I wanna see in the trunk asap!
Re: Yet another autoslope patch (90 percent complete)
@new questions since my post:
My answers of these two plus the question about "vehicle in the way" all have the same reason, like stated above. I'd treat autoslope gameplay-wise like you don't have to work on the occupied tile. (This also corresponds with the look.) Thus, it doesn't matter if there's a vehicle on it, it doesn't matter if there's a building on it from a city who doesn't like you and it won't cost extra if there's an expensive building on it, since you don't actually send your workers on that tile.
Hope that was kind of understandable
and finally one more question: what is the clear tile cost of industries? is there any at all? maybe it would get incredibly expensive then... (thinking about the build costs of industries)
Neutral, tending to no. Well i could live with extra costs, but i personally think of autosloping in a certain way: actually if you lower some edge and a tile would get autosloped because of this, the particular tile is not touched (like, worked on with building vehicles and equipment). Only the other up to three tiles need working on. (I know it's not like this internally, but i mean logically. Of course you'll notice that it's not really like this once the building on this tile is demolished.) Thus, the price should rather be 3/4 of normal than more than normal. But i think normal price is ok, counting in that you would have to stabilize the vertical foundation or something... that costs the price again that would have been preserved by not having to dig out that particular tile.frosch wrote:* Currently autosloping has extra-costs of '_price.terraform' (This price is used for terraforming one step on clear land, and for building foundations'. Perhaps add an extra cost like half of the clear-land costs, if the tile is not owned by the player. This will make autosloping under industries and important townbuildings more expensive.
No, meaning do not forbid if rating is bad. Decrease of rating similar to normal land raising/lowering.* Should we ask the local authority before autosloping under houses?
My answers of these two plus the question about "vehicle in the way" all have the same reason, like stated above. I'd treat autoslope gameplay-wise like you don't have to work on the occupied tile. (This also corresponds with the look.) Thus, it doesn't matter if there's a vehicle on it, it doesn't matter if there's a building on it from a city who doesn't like you and it won't cost extra if there's an expensive building on it, since you don't actually send your workers on that tile.
Hope that was kind of understandable
and finally one more question: what is the clear tile cost of industries? is there any at all? maybe it would get incredibly expensive then... (thinking about the build costs of industries)
Re: Yet another autoslope patch (90 percent complete)
Thanks for the friendly feedback
Ok, now sum up.
Vehicle in the way:
I agree with the majority. The surface is not changed, the grass remains, and vehicles are not in the way.
Towns' and industries' usage of autoslope:
I feel like most did not understood me in this point. When towns expand or a new industry appears they terraform a bit, to create suitable space for their buildings. The question is, if they are allowed to use autoslope to do the terraforming. Theoretically they would be able to break the well known 'elevated tracks' that are build to block towngrowth or building of level-crossings.
Though the town will need some luck to do the right terraforming.
Autoslope without build-on-slopes:
Everyone agreed, that only autosloping under houses should be allowed.
Autoslope under light-houses and transmitters:
I agree that light-houses and transmitters only exist to annoy the player. So leave it this way. Autosloping will be disallowed.
Autoslope cost:
There are not a lot of responses. I will keep the current extra costs for building foundations. No cost depending on the building on the tile.
Local authority:
Hmm, tie. To my knowledge terraforming itself does not affect town ratings. Only killing involved trees does.
For now let it work like normal terraforming.
Technical things:
NewHouses:
Check action 0 slope restrictions.
NewStations:
Decided later.
NewIndustries:
1. Autoslope is enabled by default.
2. If callback 2F is disabled, action 0 slope restrictions can deny autosloping. (In that case callback 3C will not be called)
3. Call callback 3C which can deny autosloping. Variable 60 represents the landscape that would result from the terraform operation (i.e. the new slope of the calling and neighboured tiles). If the callback fails, threat it like not enabled, i.e. allow autoslope.
Alternatively if autoslope is decided by a callback, assume 'allow autoslope' during query-cost/cost-estimation, and later fail during execution.
There are some things that act like this. (Like removing multiple houses at once, where only the first ones are removed, and the rating does not suffer for the remaining.)
Ok, now sum up.
Vehicle in the way:
I agree with the majority. The surface is not changed, the grass remains, and vehicles are not in the way.
Towns' and industries' usage of autoslope:
I feel like most did not understood me in this point. When towns expand or a new industry appears they terraform a bit, to create suitable space for their buildings. The question is, if they are allowed to use autoslope to do the terraforming. Theoretically they would be able to break the well known 'elevated tracks' that are build to block towngrowth or building of level-crossings.
Though the town will need some luck to do the right terraforming.
Autoslope without build-on-slopes:
Everyone agreed, that only autosloping under houses should be allowed.
Autoslope under light-houses and transmitters:
I agree that light-houses and transmitters only exist to annoy the player. So leave it this way. Autosloping will be disallowed.
Autoslope cost:
There are not a lot of responses. I will keep the current extra costs for building foundations. No cost depending on the building on the tile.
Local authority:
Hmm, tie. To my knowledge terraforming itself does not affect town ratings. Only killing involved trees does.
For now let it work like normal terraforming.
Yes, since magic bulldozer. I do not know the exact cost though.Roujin wrote:what is the clear tile cost of industries? is there any at all?
Technical things:
NewHouses:
Check action 0 slope restrictions.
NewStations:
Decided later.
NewIndustries:
1. Autoslope is enabled by default.
2. If callback 2F is disabled, action 0 slope restrictions can deny autosloping. (In that case callback 3C will not be called)
3. Call callback 3C which can deny autosloping. Variable 60 represents the landscape that would result from the terraform operation (i.e. the new slope of the calling and neighboured tiles). If the callback fails, threat it like not enabled, i.e. allow autoslope.
Do you suggest by that, that 7C variables should be treated read-only during query-cost commands?DaleStan wrote:GRFs cannot cause desyncs. If your query-cost commands are changing things, then they are broken, not any GRF that they may query.
Alternatively if autoslope is decided by a callback, assume 'allow autoslope' during query-cost/cost-estimation, and later fail during execution.
There are some things that act like this. (Like removing multiple houses at once, where only the first ones are removed, and the rating does not suffer for the remaining.)
⢇⡸⢸⠢⡇⡇⢎⡁⢎⡱⢸⡱⢸⣭⠀⢸⢜⢸⢸⣀⢸⣀⢸⣭⢸⡱⠀⢰⠭⡆⣫⠰⣉⢸⢸⠀⢰⠭⡆⡯⡆⢹⠁⠀⢐⠰⡁
Re: Yet another autoslope patch (90 percent complete)
Hm... Not quite. That would break things. I'd say that the values should be stored before query, and restored afterward.frosch wrote:Do you suggest by that, that 7C variables should be treated read-only during query-cost commands?DaleStan wrote:GRFs cannot cause desyncs. If your query-cost commands are changing things, then they are broken, not any GRF that they may query.
This prevents a GRF from tracking queries, which I would say is relatively useless anyway, in exchange for making things work elsewhere.
To get a good answer, ask a Smart Question. Similarly, if you want a bug fixed, write a Useful Bug Report. No TTDPatch crashlog? Then follow directions.
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
Re: Yet another autoslope patch (90 percent complete)
The title of this topic says 90% complete - is that still valid? I guess many of us'd be glad to have some kind of autoslope in OTTD - especially those of us who switch from TTDPatch...
Re: Yet another autoslope patch (90 percent complete)
Don't you know that every project is 90% complete 90% of the time - the remaining 90% are needed to finish up...
Re: Yet another autoslope patch (90 percent complete)
Yes, I know... it sounded promising, though, and one can always hope!
Who is online
Users browsing this forum: No registered users and 1 guest