Another Daylength patch

Forum for technical discussions regarding development. If you have a general suggestion, problem or comment, please use one of the other forums.

Moderator: OpenTTD Developers

Post Reply
User avatar
pavel1269
Route Supervisor
Route Supervisor
Posts: 473
Joined: 03 Dec 2006 13:22
Location: Czech Republic
Contact:

Another Daylength patch

Post 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.
Attachments
day_length_r18511.zip
win32 binary (compiled on Win 7)
(3.63 MiB) Downloaded 2501 times
day_length_r18598.patch
(36.21 KiB) Downloaded 1935 times
Last edited by pavel1269 on 28 Jun 2013 18:52, edited 39 times in total.
Eddi
Tycoon
Tycoon
Posts: 8258
Joined: 17 Jan 2007 00:14

Re: Another Daylength patch

Post 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!
User avatar
pavel1269
Route Supervisor
Route Supervisor
Posts: 473
Joined: 03 Dec 2006 13:22
Location: Czech Republic
Contact:

Re: Another Daylength patch

Post 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
User avatar
CommanderZ
Tycoon
Tycoon
Posts: 1872
Joined: 07 Apr 2008 18:29
Location: Czech Republic
Contact:

Re: Another Daylength patch

Post 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).
Eddi
Tycoon
Tycoon
Posts: 8258
Joined: 17 Jan 2007 00:14

Re: Another Daylength patch

Post 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?
User avatar
pavel1269
Route Supervisor
Route Supervisor
Posts: 473
Joined: 03 Dec 2006 13:22
Location: Czech Republic
Contact:

Re: Another Daylength patch

Post 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.
User avatar
fonso
President
President
Posts: 945
Joined: 13 Oct 2007 08:28

Re: Another Daylength patch

Post 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.
The guy on the picture is not me, it's Alonso.
Eddi
Tycoon
Tycoon
Posts: 8258
Joined: 17 Jan 2007 00:14

Re: Another Daylength patch

Post by Eddi »

timetabling is done in a different patch, that need not be touched.
User avatar
pavel1269
Route Supervisor
Route Supervisor
Posts: 473
Joined: 03 Dec 2006 13:22
Location: Czech Republic
Contact:

Re: Another Daylength patch

Post 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 ;)
User avatar
pavel1269
Route Supervisor
Route Supervisor
Posts: 473
Joined: 03 Dec 2006 13:22
Location: Czech Republic
Contact:

Re: Another Daylength patch

Post by pavel1269 »

new update, see first post
also attached win32 binary ... hope at least sameone interested :|
rileyk
Engineer
Engineer
Posts: 21
Joined: 22 May 2004 23:16
Location: Canada

Re: Another Daylength patch

Post by rileyk »

Just want to Thank You for the patch mods and especially the Windows binary .
User avatar
pavel1269
Route Supervisor
Route Supervisor
Posts: 473
Joined: 03 Dec 2006 13:22
Location: Czech Republic
Contact:

Re: Another Daylength patch

Post by pavel1269 »

thanks for feedback, now i know, that at least one player (except me offcourse) play with this one :-)
User avatar
Lilman424
Tycoon
Tycoon
Posts: 2743
Joined: 20 Oct 2002 14:55
Location: Georgia
Contact:

Re: Another Daylength patch

Post 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.
Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius -- and a lot of courage -- to move in the opposite direction. - Albert Einstein
User avatar
pavel1269
Route Supervisor
Route Supervisor
Posts: 473
Joined: 03 Dec 2006 13:22
Location: Czech Republic
Contact:

Re: Another Daylength patch

Post 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 ;-)
pecX
Engineer
Engineer
Posts: 23
Joined: 05 Apr 2009 11:25

Re: Another Daylength patch

Post 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.
User avatar
pavel1269
Route Supervisor
Route Supervisor
Posts: 473
Joined: 03 Dec 2006 13:22
Location: Czech Republic
Contact:

Re: Another Daylength patch

Post 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
pecX
Engineer
Engineer
Posts: 23
Joined: 05 Apr 2009 11:25

Re: Another Daylength patch

Post 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?
User avatar
pavel1269
Route Supervisor
Route Supervisor
Posts: 473
Joined: 03 Dec 2006 13:22
Location: Czech Republic
Contact:

Re: Another Daylength patch

Post 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 ....
pecX
Engineer
Engineer
Posts: 23
Joined: 05 Apr 2009 11:25

Re: Another Daylength patch

Post 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?
User avatar
pavel1269
Route Supervisor
Route Supervisor
Posts: 473
Joined: 03 Dec 2006 13:22
Location: Czech Republic
Contact:

Re: Another Daylength patch

Post 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 ;)
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 11 guests