Page 1 of 20

Another Daylength patch

Posted: 18 Mar 2009 18:58
by pavel1269
Any ideas and reported bugs are welcome.

"True" day length - link to the patch is in my signature.

FS task: #3157

Options avaiable:
Day length factor: 1-50 !!! Can no longed be changed during game. !!!
Day length balance type: None/Running costs/All costs/Payments
Balance factor: 1 - Day length factor (you can have 10 day length, and only balance multiplier of 3)
Include property maintenance into running costs: true/false (if multiply with balance type runnign costs)
Include loan interests into running costs: true/false
Slow down vehicle reliability drop down: true/false (if vehicle is getting old same per game year apart day length)
Slow down town growth with day length factor: true/false
Show original production value of industry: true/false (if you will see productions like 120 even with day length 50, but production is unaffected. Only visible value.)

patchvar 0x14 - returns current day length factor

Todo:
- Nothing.

Known bugs:
- Wrong pricing with autorail.
- Does not support ECS vectors.
- Wrong shown production of industries, which are processing incoming cargo.

Re: Another Daylength patch

Posted: 18 Mar 2009 21:33
by Eddi
so... what about town growth? passenger generation? industry cargo generation? station rating changes? yearly running costs? cargo payment rates?

each of these need careful balancing of being day based vs tick based. and some of these need to be switchable, because preferance will vary between players.

I've been preaching that for years... everybody can splurt out a daylength patch, what it needs is a careful design!

Re: Another Daylength patch

Posted: 18 Mar 2009 21:39
by pavel1269
Eddi wrote:so... what about town growth? passenger generation? industry cargo generation? station rating changes? yearly running costs? cargo payment rates?
town grow, station rating and running costs are simply that many times more, you setup your daylength factor

industry/passanger generation is "same". i mean, that in realtime it produce same. so basicly now, with daylength 2 it produces 2* more per month but shows still the same

income is same whatever setting you have

running costs and payments shouldnt even be solid, the game is in easy mode already

Re: Another Daylength patch

Posted: 18 Mar 2009 21:53
by CommanderZ
town grow, station rating and running costs are simply that many times more, you setup your daylength factor

industry/passanger generation is "same". i mean, that in realtime it produce same. so basicly now, with daylength 2 it produces 2* more per month but shows still the same

income is same whatever setting you have

running costs and payments shouldnt even be solid, the game is in easy mode already
Yeah, I think leaving everything as it is is the way to go. The daylength should imo affect only stuff directly affected by date (vehicle introductions, colour newspaper, NewGRF date-related effects).

Re: Another Daylength patch

Posted: 18 Mar 2009 22:15
by Eddi
I have said this before, but providing a patch is not only a matter of implementing your own wishes, it is about providing the flexibility of adjusting the game for everyone's (or at least multiple people's) preferance, while imposing enough restrictions to keep the game challenging on some levels.

What I want to see in a daylength (or actually more general scale) patch is a focus on transporting without everything just running away. That means for example
  1. Trains should struggle to accelerate over longer times, so scheduling them properly will become a necessity.
  2. Trains should spend more time loading and less time travelling, so scheduling properly is actually possible.
  3. Cargo amounts should be reduced to support the point 2., and to balance out the otherwise increased yearly income because of more arrivals in the same time period.
  4. Towns should not grow like madness, so you actually still have villages and agricultural areas after (8 times) 100 years of gameplay.
  5. Yearly running costs must stay invariant, because it is silly that a vehicle costs 20 times the buying price within one year. To keep the game balanced, cargo payment rates must be adjusted to both the faster delivery time and the increased amount of income (so by (daylength factor)^2) if point 3 is not used.
  6. Station ratings should decay more slowly, because the trains will typically run longer.
and that is only the tip of the iceberg of customisability of such a daylength patch. other people WILL have other preferences, and if your patch is not able to adjust to at least some of these, it is certainly doomed.

PS: how do english speaking (or rather writing) people emphasise "I", when they capitalise it in the first place, and making it bold doesn't really cut it, since it is a single meager black line?

Re: Another Daylength patch

Posted: 19 Mar 2009 05:59
by pavel1269
Eddi wrote:
  1. Trains should struggle to accelerate over longer times, so scheduling them properly will become a necessity.
  2. Trains should spend more time loading and less time travelling, so scheduling properly is actually possible.
  3. Cargo amounts should be reduced to support the point 2., and to balance out the otherwise increased yearly income because of more arrivals in the same time period.
  4. Towns should not grow like madness, so you actually still have villages and agricultural areas after (8 times) 100 years of gameplay.
  5. Yearly running costs must stay invariant, because it is silly that a vehicle costs 20 times the buying price within one year. To keep the game balanced, cargo payment rates must be adjusted to both the faster delivery time and the increased amount of income (so by (daylength factor)^2) if point 3 is not used.
  6. Station ratings should decay more slowly, because the trains will typically run longer.
2.,3. there will absolutely be a switch for this
4. hope so :-)
5. running cost or buying costs? if running, i might do a switch for this, if buying, i will look at it. this is maybye reason, why do i play with inflaction off
6. this should be linked with 2.

at the moment i just created working "base", everythink has same speed, only time is slower :wink:
Eddi wrote: and that is only the tip of the iceberg of customisability of such a daylength patch. other people WILL have other preferences, and if your patch is not able to adjust to at least some of these, it is certainly doomed.

Re: Another Daylength patch

Posted: 19 Mar 2009 07:41
by fonso
Isn't that somewhat overcomplicated? What are the problems we are facing today?
  • Vehicle introduction dates and time periods for houses and industries etc rush past too quickly for some.
  • The time scale for vehicle schedules is in days instead of hours or minutes.
So my proposal: Rename days to hours and other time units accordingly, but only for the GUI and optionally. This means in the code days are still days and months are still months and so on. But when displaying time somewhere in the GUI everything is divided by 24 (or some configurable value). Adjust introduction dates if the option is set. Keep all other internals as they are. This should be really easy to do. Everything else doesn't belong into a daylength patch but should be done as seperate projects.

Re: Another Daylength patch

Posted: 19 Mar 2009 10:42
by Eddi
timetabling is done in a different patch, that need not be touched.

Re: Another Daylength patch

Posted: 21 Mar 2009 09:03
by pavel1269
So here is an update. New option, to slower down economy. n* less cargo produces, town grow rate, inflaction, running costs and so on.
Tested and should work as expected :)
Hope i have slowed down everythink, what should be.
See first post for .patch ;)

Re: Another Daylength patch

Posted: 22 Mar 2009 13:13
by pavel1269
new update, see first post
also attached win32 binary ... hope at least sameone interested :|

Re: Another Daylength patch

Posted: 23 Mar 2009 10:30
by rileyk
Just want to Thank You for the patch mods and especially the Windows binary .

Re: Another Daylength patch

Posted: 23 Mar 2009 19:24
by pavel1269
thanks for feedback, now i know, that at least one player (except me offcourse) play with this one :-)

Re: Another Daylength patch

Posted: 28 Mar 2009 09:37
by Lilman424
I'm getting the following error when I click on the advanced setting menu, whether from the main menu or the in game menu.

Code: Select all

 openttd: /home/evan/ottdsrc/trunk/src/settings_gui.cpp:757: void SettingEntry::Init(byte, bool): 
Assertion `this->d.entry.setting != __null' failed.

Re: Another Daylength patch

Posted: 28 Mar 2009 11:34
by pavel1269
i just compiled with current trunk (15871) and run, everythink okay .... try to delete your .lng files and compile them again ;-)
edit: attached actual build to first post ;-)

Re: Another Daylength patch

Posted: 06 Apr 2009 07:14
by pecX
hi!

thank you for this patch. As im an absolute beginner and non-programmer, i couldnt patch the game with the patch file and SVN (i just didnt get how to do it).
But the other file (patched game) worked.
I just have one problem left. Language now is english. Im not best in english and would like to have my german lagueage back :)

The patch is great! Testet it and worked well! THanks A LOT.

If you could tell me how to change language i would be happiest TTD player ever ;)
In game options is just english choosable.

Re: Another Daylength patch

Posted: 06 Apr 2009 08:04
by pavel1269
pecX wrote: In game options is just english choosable.
That was my problem .... broken language files :-) sorry for that
New update ... see first post

Re: Another Daylength patch

Posted: 06 Apr 2009 19:54
by pecX
after i testet the patch now a bit longer i must say, i love this patch.
But the cities are growing much too fast! I played on 1/20 game speed. After 4 month gametime a well linked city grew from 14k to 23k inhabitants. Is there a way to stop this except of turning city growth out?

edit what does the "production factor" mean?

Re: Another Daylength patch

Posted: 06 Apr 2009 20:56
by pavel1269
there is daylength factor from 1 to ... 250? ... you know what it does do
and production factor ... from 1 to 1/50? ... how much SLOWER will whole economy be ....

EDIT: attached agin new version, now finaly with all working languages ....

Re: Another Daylength patch

Posted: 07 Apr 2009 05:42
by pecX
don know if i understood ^^

but if im playing 1/20 gamespeed, i should have 1/4 production factor for the citys to grow in a normal speed?

Re: Another Daylength patch

Posted: 07 Apr 2009 07:16
by pavel1269
pecX wrote: but if im playing 1/20 gamespeed, i should have 1/4 production factor for the citys to grow in a normal speed?
how you calculated this? :) and no, simply 1/20 production factor, and this does affect whole economy, not just towns ;)