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

pecX
Engineer
Engineer
Posts: 23
Joined: 05 Apr 2009 11:25

Re: Another Daylength patch

Post by pecX »

Is there a version of the daylenght patch where the production can be adjusted?

regards!
User avatar
DC-1
Engineer
Engineer
Posts: 88
Joined: 13 Mar 2013 13:53

Re: Another Daylength patch

Post by DC-1 »

pecX wrote:Is there a version of the daylenght patch where the production can be adjusted?

regards!
I'm currently working on it. Just reading values from config file is failed. Anyone has any idea?
Attachments
daylength_dc-1.3.2.diff
Daylength patch for OpenTTD-1.3.2 with cargo production toggle
(13.16 KiB) Downloaded 161 times
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 »

That looks horrible to be honest. If you don't cross the "Divide monthly cargo production by day length factor", then you have ordinary day length patch. Just look for different author (or my first concept) and you will have it, just more stable! And furthermore, you changed the DAY_TICKS, which will cause all kinds of problems no matter the settings. If I would use yours patch, day length factor 10 and I would like to divide cargo production, I can see that the game will run 100x slower.

EDIT: I am wrong with the last statement.
pecX
Engineer
Engineer
Posts: 23
Joined: 05 Apr 2009 11:25

Re: Another Daylength patch

Post by pecX »

is there a zipped/compiled version of the "first" daylenght patch with adjusted production?
Unfortunately i can´t compile :(
User avatar
DC-1
Engineer
Engineer
Posts: 88
Joined: 13 Mar 2013 13:53

Re: Another Daylength patch

Post by DC-1 »

pecX wrote:is there a zipped/compiled version of the "first" daylenght patch with adjusted production?
Unfortunately i can´t compile :(
Make a try with my very fresh patchpack :YAPP . Be the first beta tester and please report any bugs! :) (You can disable all extra features if you want the stock game.)
User avatar
DC-1
Engineer
Engineer
Posts: 88
Joined: 13 Mar 2013 13:53

Re: Another Daylength patch

Post by DC-1 »

pavel1269 wrote:That looks horrible to be honest. If you don't cross the "Divide monthly cargo production by day length factor", then you have ordinary day length patch. Just look for different author (or my first concept) and you will have it, just more stable! And furthermore, you changed the DAY_TICKS, which will cause all kinds of problems no matter the settings.
Okie, I got it. Then take a look at my second try with cargo production concept heavily based on your patches.
Attachments
day_length_advanced_slowprod-hun-1.3.2.diff
(38.4 KiB) Downloaded 112 times
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 quickly looked at it. From my perspective, it's just updated patch from the first post (my first approach). No need to comment more.
User avatar
DC-1
Engineer
Engineer
Posts: 88
Joined: 13 Mar 2013 13:53

Re: Another Daylength patch

Post by DC-1 »

pavel1269 wrote:I just quickly looked at it. From my perspective, it's just updated patch from the first post (my first approach). No need to comment more.
Yes, but i can't fully update your patch. :( I have a question: The day_length_balance_factor has no effect on buying vehicles, but it multiplies the cost of cloning the same vehicle. Which was the correct concept? Then i'll know what's my fault.
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 »

Honestly I don't know anymore such details about it anymore. But from your description, there's just some bug now, because of some feature in trunk now, I would guess. I abandoned that patch and I don't plan ever on returning to it so I am not going to help you with developing it.
ropier
Engineer
Engineer
Posts: 2
Joined: 23 Jan 2014 05:59

Re: Another Daylength patch

Post by ropier »

DC-1 wrote:
pavel1269 wrote:That looks horrible to be honest. If you don't cross the "Divide monthly cargo production by day length factor", then you have ordinary day length patch. Just look for different author (or my first concept) and you will have it, just more stable! And furthermore, you changed the DAY_TICKS, which will cause all kinds of problems no matter the settings.
Okie, I got it. Then take a look at my second try with cargo production concept heavily based on your patches.
I've updated the patch file to the latest trunk version (1.4.0-beta3/r26274). I haven't edited it beyond making it patch against the newer version of the code but it compiles OK and a quick test shows that it seems to work.
Attachments
daylength-1.4.0-beta3-r26274.patch
apply directly to src directory
(36.74 KiB) Downloaded 149 times
LSky
Traffic Manager
Traffic Manager
Posts: 170
Joined: 25 Jun 2005 10:44
Location: The Netherlands

Re: Another Daylength patch

Post by LSky »

I'm unable to get this to work. I get an error whenever I attempt to connect to a server.

'Could not load savegame' if I compile it myself.

A straight ctd if I receive a compiled Windows version from someone else. Have you managed to get it working, ropier?
ropier
Engineer
Engineer
Posts: 2
Joined: 23 Jan 2014 05:59

Re: Another Daylength patch

Post by ropier »

LSky wrote:I'm unable to get this to work. I get an error whenever I attempt to connect to a server.

'Could not load savegame' if I compile it myself.

A straight ctd if I receive a compiled Windows version from someone else. Have you managed to get it working, ropier?
Nope, I'm having the same issue. I'm going to take some time to figure out how this actually works and how to fix it.
LSky
Traffic Manager
Traffic Manager
Posts: 170
Joined: 25 Jun 2005 10:44
Location: The Netherlands

Re: Another Daylength patch

Post by LSky »

ropier wrote:
LSky wrote:I'm unable to get this to work. I get an error whenever I attempt to connect to a server.

'Could not load savegame' if I compile it myself.

A straight ctd if I receive a compiled Windows version from someone else. Have you managed to get it working, ropier?
Nope, I'm having the same issue. I'm going to take some time to figure out how this actually works and how to fix it.
Thanks for the efforts!
User avatar
BlueEagle_nl
Transport Coordinator
Transport Coordinator
Posts: 352
Joined: 28 Jan 2006 09:44
Skype: tilly5014
Location: Tillywood, The Netherlands

Re: Another Daylength patch

Post by BlueEagle_nl »

In the first post, OP metioned a bug in Autorail pricing. Well, this screws up my game in the YAPP-patchpack by DC-1 a lot...
Is there any chance this bug has been fixed?
gabrielbyrnei
Engineer
Engineer
Posts: 17
Joined: 11 Oct 2013 23:20

Re: Another Daylength patch

Post by gabrielbyrnei »

Hi, Im kind of new into openTTD and absolutely a noob on patching and compiling.

I followed this guide:

http://wiki.openttd.org/Compiling_on_%2 ... x_and_*BSD

I managed to patch the source with an automated timetable patch and i played for a while, but then tried the same with this daylength patch and had no luck.

This is what i did:

Code: Select all

svn checkout svn://svn.openttd.org/trunk openttd
svn update -r 26274
patch -p0 < daylength-1.4.0-beta3-r26274.patch  (also tried -p1)
But im getting:

Code: Select all

gabriel@linux-a7dy:~/openttd2> patch -p0 < daylength-1.4.0-beta3-r26274.patch
(Stripping trailing CRs from patch; use --binary to disable.)
can't find file to patch at input line 5
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|Index: command.cpp
|===================================================================
|--- command.cpp        (revision 26274)
|+++ command.cpp        (working copy)
--------------------------
What am I doing wrong?

Thanks!
Eddi
Tycoon
Tycoon
Posts: 8258
Joined: 17 Jan 2007 00:14

Re: Another Daylength patch

Post by Eddi »

check the first few lines of the patch (with "head"), if the paths start with "a/" and "b/", use "-p1" instead of "-p0"

merging daylength probably needs further touchups in places where DAY_TICKS is used in the timetable patch.
Alberth
OpenTTD Developer
OpenTTD Developer
Posts: 4763
Joined: 09 Sep 2007 05:03
Location: home

Re: Another Daylength patch

Post by Alberth »

Given that -p0 results in trying to find "command.cpp", my guess is you need to run the patch -p0 command from the "src" directory.
gabrielbyrnei
Engineer
Engineer
Posts: 17
Joined: 11 Oct 2013 23:20

Re: Another Daylength patch

Post by gabrielbyrnei »

Eddi wrote:check the first few lines of the patch (with "head"), if the paths start with "a/" and "b/", use "-p1" instead of "-p0"

merging daylength probably needs further touchups in places where DAY_TICKS is used in the timetable patch.
Yeah, tried both p0 and p1, neither one worked.
gabrielbyrnei
Engineer
Engineer
Posts: 17
Joined: 11 Oct 2013 23:20

Re: Another Daylength patch

Post by gabrielbyrnei »

Alberth wrote:Given that -p0 results in trying to find "command.cpp", my guess is you need to run the patch -p0 command from the "src" directory.
Well, that worked hehe. thanks!
gabrielbyrnei
Engineer
Engineer
Posts: 17
Joined: 11 Oct 2013 23:20

Re: Another Daylength patch

Post by gabrielbyrnei »

Eddi wrote:check the first few lines of the patch (with "head"), if the paths start with "a/" and "b/", use "-p1" instead of "-p0"

merging daylength probably needs further touchups in places where DAY_TICKS is used in the timetable patch.
And indeed, patching both, automated timetables and daylength patch gave errors and "make" did not work.
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 14 guests