Another Daylength patch
Moderator: OpenTTD Developers
-
- Chief Executive
- Posts: 658
- Joined: 11 Nov 2007 12:06
- Contact:
Re: Another Daylength patch
Hi pavel1269
I love this patch but could we see some eye candy like a night and day sort of thing
I asking this becuse see the day lengths are longer you could see trainsing runing at night and day
Just an idea
I love this patch but could we see some eye candy like a night and day sort of thing
I asking this becuse see the day lengths are longer you could see trainsing runing at night and day
Just an idea
For Community Integrated Version http://code.google.com/p/civopenttd/
Re: Another Daylength patch
That's a LOT of work. You have to redraw every sprite in the game or maybe make an overlay thingy that makes all sprites darker.
-
- Chief Executive
- Posts: 658
- Joined: 11 Nov 2007 12:06
- Contact:
Re: Another Daylength patch
I know it was done befor years ago but i did not know if it can be codeing in with this patch
but it have to be redone becuse of all the changes
but it have to be redone becuse of all the changes
For Community Integrated Version http://code.google.com/p/civopenttd/
Re: Another Daylength patch
I don't think it was ever done, every night screenshot you might've seen was either with a special night grf or was a mockup.
Don't panic - My YouTube channel - Follow me on twitter (@XeryusTC) - Play Tribes: Ascend - Tired of Dropbox? Try SpiderOak (use this link and we both get 1GB extra space)
OpenTTD: manual #openttdcoop: blog | wiki | public server | NewGRF pack | DevZone
OpenTTD: manual #openttdcoop: blog | wiki | public server | NewGRF pack | DevZone
-
- Chief Executive
- Posts: 658
- Joined: 11 Nov 2007 12:06
- Contact:
Re: Another Daylength patch
For Community Integrated Version http://code.google.com/p/civopenttd/
Re: Another Daylength patch
Hello
Tschö, Auge
Whow, a 4 years old thread. But yes, it was done. If you see the screensots, especially the animated one from the second page of the thread, you will see, that it was done with an overlay (like Bennythen00b said).
I don't think that it is very usefull. It is overcomplicated with any daylengthpatch too. You have to set the daylength and the night-day-cycle in a usefull way (to short daylengths ends in flickering, longer daylengths are maybe boring). A similar idea that I like more: altering seasons. That would be usefull in normal speed too.Bennythen00b wrote:You have to redraw every sprite in the game or maybe make an overlay thingy that makes all sprites darker.
Tschö, Auge
Re: Another Daylength patch
Altering seasons is kinda possible with the arctic climate and temperate snow tiles mewGRFs. It's basically just the snowline that changes all the time to simulate winter and summer.
Re: Another Daylength patch
Hello
As an example: longer breaking distance and lower acceleration traction during fall and winter (wet and cold). There are some trainsets wich including locomotives for mountains (slow but with good traction for hilly areas). With changes like above they get more attention.
Tschö, Auge
I know, but this is more or less eye candy (I know about town growth in snow). It's more a concept for seasons and physical behaviour of vehicles what's (not only) in my mind.Bennythen00b wrote:Altering seasons is kinda possible with the arctic climate and temperate snow tiles mewGRFs. It's basically just the snowline that changes all the time to simulate winter and summer.
As an example: longer breaking distance and lower acceleration traction during fall and winter (wet and cold). There are some trainsets wich including locomotives for mountains (slow but with good traction for hilly areas). With changes like above they get more attention.
Tschö, Auge
Re: Another Daylength patch
It would be cool if the train tracks were covered in snow and you HAD to use a snow plow to clear the way. And also make the snowplow go slower when driving into snow covered tracks compared to when driving on normal rails.
-
- Chief Executive
- Posts: 658
- Joined: 11 Nov 2007 12:06
- Contact:
Re: Another Daylength patch
I looked it up on the net there was a GRF for night and day but i think it dose not work with new sets but dose with the old ttd ones
http://users2.tt-forums.net/ttdur/ttdur.htm
http://users2.tt-forums.net/ttdur/ttdur.htm
Last edited by 2007Alain2007 on 03 Jul 2009 22:59, edited 1 time in total.
For Community Integrated Version http://code.google.com/p/civopenttd/
Re: Another Daylength patch
That's a redraw of every single sprite, which is a LOOOT of work as you have to use the TTD palette.
Re: Another Daylength patch
I wanted to try pavel1269's patch but since it was made from a rather old version of the sources (from April), it wouldn't apply against the latest nightlies. I updated the patch and now it works cleanly with r16889.
I think I also managed to fix the bug where a high daylength factor and 1/1 production factor make vehicles be retired before new ones are introduced. I simply multiplied all 3 of the duration_phase_1, duration_phase_2 and duration_phase_3 initialization algorithms (in engine.cpp) by daylength_factor/production_factor. I noticed there was also another bug that this happens to fix; the increase of vehicle's reliability after introduction and decrease of vehicle's reliability before retirement were happening too fast.
I haven't done any real testing, this just happens to work for me so maybe someone else will also find it useful while we wait for pavel1269 to have time for this again. I do hope he'll continue developing the patch and submit it for inclusion into trunk.
Edit: removed patch. No need for it now that Pavel has posted updated and improved versions.
I think I also managed to fix the bug where a high daylength factor and 1/1 production factor make vehicles be retired before new ones are introduced. I simply multiplied all 3 of the duration_phase_1, duration_phase_2 and duration_phase_3 initialization algorithms (in engine.cpp) by daylength_factor/production_factor. I noticed there was also another bug that this happens to fix; the increase of vehicle's reliability after introduction and decrease of vehicle's reliability before retirement were happening too fast.
I haven't done any real testing, this just happens to work for me so maybe someone else will also find it useful while we wait for pavel1269 to have time for this again. I do hope he'll continue developing the patch and submit it for inclusion into trunk.
Edit: removed patch. No need for it now that Pavel has posted updated and improved versions.
Last edited by laurijh on 17 Aug 2009 04:48, edited 1 time in total.
Re: Another Daylength patch
Update
Removed secondish patch (slow down economy). Added balance type (see first post). And completely rewrite (no saving values).
Tested and hope, hope no bugs. Any found, please report.
Removed secondish patch (slow down economy). Added balance type (see first post). And completely rewrite (no saving values).
Tested and hope, hope no bugs. Any found, please report.
My patches: Day length (new concept), Conditional loading, Auto separation, Unload all adds Leave empty, Better statue placement (in trunk)
My abandoned patches: Speed limits for RVs, Day length (old concept)
My abandoned patches: Speed limits for RVs, Day length (old concept)
Re: Another Daylength patch
Thanks for the update Pavel But I think there are a few bugs.
- (Cosmetic): the displayed production value of industries is a little funny when "Slow down industry changes with daylength factor" is "On". For example, a forest which normally has a production of 170 tonnes a month shows a production of 306 tonnes with daylength factor 2 even when "Show original production value of industry" is "On". When it's "Off", the production shows as 612 tonnes. With higher daylength factors you get quite absurd production values...
- This is related to what you and W_neun discussed earlier about the loan interest. When "Balancing of daylength" is set to "Running costs", all of the following costs are multiplied by the daylength factor: "Property Maintenance", "Loan Interest" and "Other". Shouldn't they only be multiplied when using the "All costs" option? By the way, is it intentional that the running costs are multiplied twice, in other words by (daylength factor)^2 ?
- With high daylength factors, vehicles seem to be losing their reliability very fast and they don't obey the service intervals (I'm using daylength 10 and service interval 15 days). Additionally, they get old too fast; I've only played for a couple of years in game-time and my vehicles' ages are something like 16 years.
Last edited by laurijh on 07 Aug 2009 19:42, edited 1 time in total.
Re: Another Daylength patch
Thanks for a feedback!laurijh wrote:Thanks for the update Pavel
Tested and really strange, but only cosmetic bug. Mine with production of 176, Slow down ... On, factor 50, at 1st of the february -> 9834. When i turn show orig values off. 491 700 ... but cargo generated at station was same. At 1st of March it went down to 8900. Have to take a look at it.laurijh wrote:I think there are a couple of bugs. The first one seems to be just cosmetic; the displayed production value of industries is a little funny when "Slow down industry changes with daylength factor" is "On". For example, a forest which normally has a production of 170 tonnes a month shows a production of 306 tonnes with daylength factor 2 even when "Show original production value of industry" is "On". When it's "Off", the production shows as 612 tonnes. With higher daylength factors you get quite absurd values...
In my opinion, this is "linked" to running cost. But i think, making a new patch option (include property maintenance a loan interests in running costs) will solve everythinglaurijh wrote:The second bug is related to what you and W_neun discussed earlier about the loan interest. When "Balancing of daylength" is set to "Running costs", all of the following costs are multiplied by the daylength factor: "Property Maintenance", "Loan Interest" and "Other". Shouldn't they only be multiplied when using the "All costs" option?
So, they are loosing their reliability the same, but 15 days flow 10times more? Or what do you mean?laurijh wrote:One more thing; with high daylength factors, vehicles seem to be losing their reliability very fast and they don't obey the service intervals (I'm using daylength 10 and service interval 15 days).
EDIT:
Yes. If you dont want to balance the runnign costs and you set factor to 10, then your vehicle spends 10more times at road and pay the same. So at building and info guis this needs to be multiplied. Also if you choose a Running costs it needs to be once more multiplied, but not only gui, but even the amountslaurijh wrote:By the way, is it intentional that the running costs are multiplied twice, in other words by (daylength factor)^2 ?
Does vehicles also disappear or the only get faster older in-game?laurijh wrote:I've only played for a couple of years in game-time and my vehicles' ages are something like 16 years.
My patches: Day length (new concept), Conditional loading, Auto separation, Unload all adds Leave empty, Better statue placement (in trunk)
My abandoned patches: Speed limits for RVs, Day length (old concept)
My abandoned patches: Speed limits for RVs, Day length (old concept)
Re: Another Daylength patch
Reliability drops in the same real-time, so you have to service more frequently in game-time. I guess this can be considered a feature, but then with higher daylengths it's necessary for user to set service intervals to something else than the defaults. But never mind what I said about vehicles not obeying the service intervals, I had actually set it wrong myself...pavel1269 wrote:So, they are loosing their reliability the same, but 15 days flow 10times more? Or what do you mean?laurijh wrote:One more thing; with high daylength factors, vehicles seem to be losing their reliability very fast and they don't obey the service intervals (I'm using daylength 10 and service interval 15 days).
The available vehicles don't disappear. Only the vehicles I have built are getting old at an "accelerated" speed.pavel1269 wrote:Does vehicles also disappear or the only get faster older in-game?laurijh wrote:I've only played for a couple of years in game-time and my vehicles' ages are something like 16 years.
Re: Another Daylength patch
Thanks, at least some bug from old version disappear
And another todo: patch option ... vehicle reliability drops down with daylength, if true, interval set to 15, with day length factor 3, will mean, vehicle will service in 5 days
And another todo: patch option ... vehicle reliability drops down with daylength, if true, interval set to 15, with day length factor 3, will mean, vehicle will service in 5 days
My patches: Day length (new concept), Conditional loading, Auto separation, Unload all adds Leave empty, Better statue placement (in trunk)
My abandoned patches: Speed limits for RVs, Day length (old concept)
My abandoned patches: Speed limits for RVs, Day length (old concept)
Re: Another Daylength patch
Great patch, Pavel! And thanks especially for the new payment reducing option.
There is one thing I think isn't right though: why is the running cost increased even at the 'no balancing' and 'payments' settings? I read your explanation above:
And I would request a new feature: please make a separate variable for the balancing options (I mean it wouldn't be the same as the 'daylength factor'). I would like to play with 4x daylength + halved payments, what isn't possible now.
There is one thing I think isn't right though: why is the running cost increased even at the 'no balancing' and 'payments' settings? I read your explanation above:
but I think you're wrong here. In the case of no balancing, the idea is that the expenses aren't changed at all (while the vehicles would make much higher profits per year, thus making the game very easy indeed), right? If someone does want to lower the profit, he can use one of the other options. And in the case of the 'payments' option, higher running costs aren't needed for balancing (and just make the game stupidly hard). Running costs should be increased only if the 'more expenses' method is used for balancing - that means the 'running costs' and 'all costs' settings. (By the way, I don't really understand why is there a setting for just the runnning costs.)pavel1269 wrote:If you dont want to balance the runnign costs and you set factor to 10, then your vehicle spends 10more times at road and pay the same. So at building and info guis this needs to be multiplied.
And I would request a new feature: please make a separate variable for the balancing options (I mean it wouldn't be the same as the 'daylength factor'). I would like to play with 4x daylength + halved payments, what isn't possible now.
Re: Another Daylength patch
Thanks.W_neun wrote:Great patch, Pavel! And thanks especially for the new payment reducing option.
Simple answer: if you touch only one line of code, the day_ticks, lets say, 5x more. You will simply pay 5x more per year for running costs, only the "gui" will show wrong value. So actually, I multiply it only one time, when going to pay.W_neun wrote:There is one thing I think isn't right though: why is the running cost increased even at the 'no balancing' and 'payments' settings? I read your explanation above:but I think you're wrong here. In the case of no balancing, the idea is that the expenses aren't changed at all (while the vehicles would make much higher profits per year, thus making the game very easy indeed), right? If someone does want to lower the profit, he can use one of the other options. And in the case of the 'payments' option, higher running costs aren't needed for balancing (and just make the game stupidly hard). Running costs should be increased only if the 'more expenses' method is used for balancing - that means the 'running costs' and 'all costs' settings. (By the way, I don't really understand why is there a setting for just the runnning costs.)pavel1269 wrote:If you dont want to balance the runnign costs and you set factor to 10, then your vehicle spends 10more times at road and pay the same. So at building and info guis this needs to be multiplied.
ANd why is it there? I dont know, but actually i use it myselft
New patch option ... day length balance multiplier ( 1 (no balance type ),2 ... day length factor ) ...W_neun wrote:And I would request a new feature: please make a separate variable for the balancing options (I mean it wouldn't be the same as the 'daylength factor'). I would like to play with 4x daylength + halved payments, what isn't possible now.
My patches: Day length (new concept), Conditional loading, Auto separation, Unload all adds Leave empty, Better statue placement (in trunk)
My abandoned patches: Speed limits for RVs, Day length (old concept)
My abandoned patches: Speed limits for RVs, Day length (old concept)
Re: Another Daylength patch
Hmm, well even if you think multiplying running costs twice is the right behaviour, there's one thing that I would consider a bug; an inconsistency between displayed vehicle profits and the total sum of income - running costs.
Example: I'm currently playing (at daylength factor 5 and balancing with running costs) with only 1 Airship, which shows "Profit this year: €3,536", yet in the Company Finances window for current year it shows "Aircraft running costs -€103,160" and "Aircraft Income +€24,168".
This might not otherwise be a big deal but now you can't see which vehicle makes a profit and which makes a loss in the vehicle list window.
Example: I'm currently playing (at daylength factor 5 and balancing with running costs) with only 1 Airship, which shows "Profit this year: €3,536", yet in the Company Finances window for current year it shows "Aircraft running costs -€103,160" and "Aircraft Income +€24,168".
This might not otherwise be a big deal but now you can't see which vehicle makes a profit and which makes a loss in the vehicle list window.
Who is online
Users browsing this forum: No registered users and 15 guests