Daylength Patch [12/09/2008] Compatibility: r14293

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

Which daylength are you playing at?

1-5
53
41%
6-15
27
21%
15+
50
38%
 
Total votes: 130

chrissicom
Route Supervisor
Route Supervisor
Posts: 415
Joined: 07 Oct 2004 10:05

Daylength Patch [12/09/2008] Compatibility: r14293

Post by chrissicom »

Current Version 5

Latest Revision I tested the patch with: r14293 (12/09/2008).
Savegame Compatibility: You can load savegames from the release versions and trunk at least up to revision r14293.
Diff File Compatibility: Compatibility is only given for the trunk revision this patch was released for, you cannot patch older release source code with the supplied .diff.

What does this patch do?
Economy Patches Section:
Daylength can be set from 1 to 31.
Where the value can be seen as a multiplier for the daylength, i.e. 2 doubles the length of a year from 13,5 real minutes to 27 minutes if your computer can run OpenTTD at normal speed.

- Server side setting so it can be used in multiplayer.
- Setting can be changed anytime during a game also during multiplayer with rcon command.
- Industry Production is not affected, which means that production numbers double with a daylength value of 2.
- Cargo payment rates are the same as before, which means you don't get extra money for taking less virtual time for transports.
- Vehicle running costs increase according to the daylength, which means a daylength of 2 makes vehicles twice as expensive per year to run. (This setting was optional before and is now default behaviour)

P.S. I will submit this patch to FlySpray when I feel it should be in trunk too :D
Attachments
r14293-daypatch.diff
.diff file created with TortoiseSVN from current trunk revision.
(10.01 KiB) Downloaded 923 times
r14293-daypatch.zip
Prebuilt Win32 (Windows 2000/XP/Vista) version. Also runs on 64-bit systems!
(988.39 KiB) Downloaded 1165 times
Last edited by chrissicom on 12 Sep 2008 11:33, edited 42 times in total.
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Post by DaleStan »

Don't post that. Use svn diff or TortoiseSVN to create a patch file.
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
chrissicom
Route Supervisor
Route Supervisor
Posts: 415
Joined: 07 Oct 2004 10:05

Post by chrissicom »

[obsolete]
Last edited by chrissicom on 27 Apr 2007 10:59, edited 3 times in total.
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Post by DaleStan »

Create the patch from the root of the checkout, not from any of the subdirectories.
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
chrissicom
Route Supervisor
Route Supervisor
Posts: 415
Joined: 07 Oct 2004 10:05

Post by chrissicom »

[obsolete]
Last edited by chrissicom on 27 Apr 2007 10:59, edited 2 times in total.
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Post by DaleStan »

There you are. And trying, even if it's not in the format that's easiest to use (and, therefore, most likely to get your code used), is definitely better than what some have done. Namely, flat-out refusing to provide source despite tens, if not hundreds, of requests, from similarly large numbers of people.
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
chrissicom
Route Supervisor
Route Supervisor
Posts: 415
Joined: 07 Oct 2004 10:05

Post by chrissicom »

Sorry to bump the topic again, but I've noticed that the patch in miniin integrates a second option saying "daylenth affects economy". I see no obvious effect of this setting in the game though. Does anybody know what this setting is supposed to do?
I don't want to cause a problem I am not aware of with the daylength patch :P
User avatar
bobingabout
Tycoon
Tycoon
Posts: 1850
Joined: 21 May 2005 15:10
Location: Hull, England

Post by bobingabout »

i can't remember, but it changes something, like running costs, or selling prices or something, depending on the daylength speed. the original idea was to simply make the game last 32 times longer, meaning it takes 32 times longer to make the same amount of money, but that wasn't the case.
JPG SUX!!! USE PNG!!!
There are times when JPG is useful, TTD screenshots is not one of them. Please use PNG instead.

[/url]
chrissicom
Route Supervisor
Route Supervisor
Posts: 415
Joined: 07 Oct 2004 10:05

Post by chrissicom »

Well that was not my intention to make the time to earn money longer, I just wanted the time to pass by slower so you can build more networks before all your trains are outdated already when you build your 5th track.

The money earned also doesn't increase with increasing the daylength although earnings are calculated by x amount transported over y tiles in z days. I feared that simply slowing down the days would thus make income explode but apparently it doesn't. I haven't quite figured yet how train/plane etc. income is calculated but when there is no problem I set my priorities elsewhere.

What I am working on:
- The "problem" that industry show huge production jumps after 1 month since days take longer. They should either display these "high"/real production rates from the beginning or the production should be displayed only for a period of time that is relative to the dayspeed. For example for 3 days if you make the game 10 times slower.
- Inflation is not influenced by my patch I believe, meaning that inflation within one year will be enormous, I want to change that with an additional bool switch.
- Same as above for loan interest as far as I could see in my game.

Anyway this is my first patch so I am mostly playing around and trying out things :) I started with this because I thought it's one of the coolest features from MiniIN that should be in the main branch in my opinion. The speed of the game might be fine for many, but I think it's way too fast.
User avatar
Wolf01
Tycoon
Tycoon
Posts: 2016
Joined: 24 Apr 2004 10:43
Location: Venezia - Italia
Contact:

Post by Wolf01 »

give a look at this: http://wolf01.game-host.org/OTTD_relate ... ength.diff
this is the daylength patch which is in MiniIN and ported to trunk

- is not multiplayer safe, because i used a flag which now is removed because it never worked
- there's some work to do with the costs, and i don't have time to chech all because it's a pain in the @
- is limited to 32x but it can be estended very easily
- needs a big work to be optimized
- there is a patch setting to make the costs/incomes affected by daylength (if a train runs 1000 tiles at month with 1x, it has to run 32000 tiles at month with 32x, so pay 32x more)
chrissicom
Route Supervisor
Route Supervisor
Posts: 415
Joined: 07 Oct 2004 10:05

Post by chrissicom »

Thanks :) that's a good start to see what all needs to be considered with changing the speed of the days :)
I think there shouldn't really be an additional bool switch as I planned first because it's pretty obvious that when you slow down the days vehicles should go to depot earlier. An extra switch for that is needless weight in the code.
User avatar
Wolf01
Tycoon
Tycoon
Posts: 2016
Joined: 24 Apr 2004 10:43
Location: Venezia - Italia
Contact:

Post by Wolf01 »

chrissicom wrote:I think there shouldn't really be an additional bool switch as I planned first because it's pretty obvious that when you slow down the days vehicles should go to depot earlier.
i thought it so, but many players requested 2 different behaviours, and i put the switch
chrissicom
Route Supervisor
Route Supervisor
Posts: 415
Joined: 07 Oct 2004 10:05

Post by chrissicom »

Wolf01 wrote:
chrissicom wrote:I think there shouldn't really be an additional bool switch as I planned first because it's pretty obvious that when you slow down the days vehicles should go to depot earlier.
i thought it so, but many players requested 2 different behaviours, and i put the switch
I put it again also :) ...sorry if I ask so late but you are the author of the patch in the MiniIN? I hope it's ok for you that I work on this for the current trunk by using most of your code as a template :)
User avatar
Wolf01
Tycoon
Tycoon
Posts: 2016
Joined: 24 Apr 2004 10:43
Location: Venezia - Italia
Contact:

Post by Wolf01 »

use it as you want, i'm no more interested on it as it will become part of the gamebalanche patch and my help has no sense :D
chrissicom
Route Supervisor
Route Supervisor
Posts: 415
Joined: 07 Oct 2004 10:05

Post by chrissicom »

Wolf01 wrote:use it as you want, i'm no more interested on it as it will become part of the gamebalanche patch and my help has no sense :D
Gamebalance patch? Haven't heard of that yet, so there's even more people working on this feature :D?
User avatar
Wolf01
Tycoon
Tycoon
Posts: 2016
Joined: 24 Apr 2004 10:43
Location: Venezia - Italia
Contact:

Post by Wolf01 »

its topic is pinned on top of this section "project economy and balancing"
chrissicom
Route Supervisor
Route Supervisor
Posts: 415
Joined: 07 Oct 2004 10:05

Post by chrissicom »

Maybe you can help me wolf or somebody else... I want to change the industry GUI so the production is displayed for the last 10 days instead of month for high dalyength multipliers. But I don't quite know where the amount an industry produces is calculated. Can somebody give me a hint maybe?
User avatar
antichaos
Engineer
Engineer
Posts: 42
Joined: 13 Feb 2007 21:51
Location: UK

Post by antichaos »

chrissicom wrote:Maybe you can help me wolf or somebody else... I want to change the industry GUI so the production is displayed for the last 10 days instead of month for high dalyength multipliers. But I don't quite know where the amount an industry produces is calculated. Can somebody give me a hint maybe?
Look in industry_cmd.cpp at TransportIndustryGoods (which updates last_mo_production, which is the running total for the month) and UpdateIndustryStatistics (which sets total_production, which is what is shown in the GUI).

One option might be to change IncreaseDate in date.cpp to call IndustryMonthlyLoop (which calls UpdateIndustryStatistics) every 10 days.
chrissicom
Route Supervisor
Route Supervisor
Posts: 415
Joined: 07 Oct 2004 10:05

Post by chrissicom »

Just updated this to make it compatible for the latest version :-) I'll keep it updated when necessary.
Solomon555
Engineer
Engineer
Posts: 27
Joined: 23 Oct 2006 17:15

Post by Solomon555 »

Awesome job! This was one of only two patches (the other being the plane crash reducing patch)I was waiting for to make the nightly more playable (to me, so don't flame!) than 0.5.2 or the last MiniIN.

Is there anyone who would be so nice as to send me an .exe with this patch? I can apply the patches but have yet to sucessfully compile afterwards. Still working on figuring that out.
A Planeset Painter
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 6 guests