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
Ottomobeale
Engineer
Engineer
Posts: 43
Joined: 05 Aug 2009 14:21

Re: Another Daylength patch

Post by Ottomobeale »

Much thanks Pavel. It involved a re-installation but I got it working... I think. I have the appropriate menus in advanced settings.

The TTD directories really needed some big time clean up and this forced me to do it. I had my upcoming GRF project stuff all too mixed in with odd lot GRFs... files everywhere...
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 »

Dante123 wrote:once i use the function so industries also get adjusted to day length (second last in the list of options if i say correct)

does this also mean that opening of new industries also will be only once in a lot of days ?
Just looked at that and true. If set to true, than new industries will appear same per game year, apart day length settings.
Ottomobeale wrote:Much thanks Pavel. It involved a re-installation but I got it working... I think. I have the appropriate menus in advanced settings.

The TTD directories really needed some big time clean up and this forced me to do it. I had my upcoming GRF project stuff all too mixed in with odd lot GRFs... files everywhere...
Good to hear ;-)
2007Alain2007
Chief Executive
Chief Executive
Posts: 658
Joined: 11 Nov 2007 12:06
Contact:

Re: Another Daylength patch

Post by 2007Alain2007 »

update to r17532
day_length_r17411(AT17532).patch
For Community Integrated Version http://code.google.com/p/civopenttd/
User avatar
Gedemon
Traffic Manager
Traffic Manager
Posts: 150
Joined: 29 Apr 2004 21:53

Re: Another Daylength patch

Post by Gedemon »

please Pavel, can you check the cost of building railway tracks ?

looks like when you use the draging tool the cost is not the same per tile when making 1 tile or 2 tiles.

for example:

- with a balance factor of 1 building 1 tile of railway cost 180$ and 2 cost 360$ (and with the single section tool 1 tile cost 180$)

- with a balance factor of 2 building 1 tile of railway cost 210$ and 2 cost 840$ (and with the single section tool 1 tile cost 420$)

- with a balance factor of 5 building 1 tile of railway cost 300$ and 2 cost 3000$ (and with the single section tool 1 tile cost 1500$)
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 »

Thats strange. Just checked myself and other results.

- balance 1, railroad 1 piece 180, drag and drop 2 pieces 360
- balance 2, railroad 1 piece 420, d&d 2 pieces 840
- balance 5, railroad 1 piece 1500, d&d 2 pieces 3000
- bal 10, 1 4500, 2 9000

Which seems to be not soo good. Price per one track is getting up :-/ . At balance factor 1, its 180, then 210, 300, 450
User avatar
Gedemon
Traffic Manager
Traffic Manager
Posts: 150
Joined: 29 Apr 2004 21:53

Re: Another Daylength patch

Post by Gedemon »

just try to drag and drop only 1 piece at x5 = 300$
and 1500$ for 1 piece without using the drag and drop tool :?
User avatar
Gremnon
Tycoon
Tycoon
Posts: 1517
Joined: 16 Sep 2005 12:23
Skype: the_gremnon
Location: /home
Contact:

Re: Another Daylength patch

Post by Gremnon »

Little issue, nothing major, but still.
When compiling with this patch, I get the following warning:

Code: Select all

/home/isaac/svn/ottd-civ/src/date.cpp: In function ‘Day DaysInCurrentMonth()’:
/home/isaac/svn/ottd-civ/src/date.cpp:296: warning: statement has no effect
Ottomobeale
Engineer
Engineer
Posts: 43
Joined: 05 Aug 2009 14:21

Re: Another Daylength patch

Post by Ottomobeale »

Just wanted you to know I LOVE this patch Pavel.

Can the daylength variables be changed inside a game? or will that screw up the game somehow? Id like to slow the game down at various levels at various times.

Something like
1850-1900 =4x
1901-1920=6x
1920-1950 =10x
1960+ = 2x
or something similar
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 »

Geddemon: :-/
Ottomobeale: sure you can ;-)
speedy64
Engineer
Engineer
Posts: 26
Joined: 01 Jun 2009 11:30

Re: Another Daylength patch

Post by speedy64 »

hy pavel

past the problems with an old version (outdated vehicles) we just giving this patch a try in multiplayer again - and its running really nice.
also changing the speed within a round is no problem - very nice work :) 50 years and anything seems to run as wanted

(cant say if prices are correct or something - most time its so unimportent as i dont look on a million ;) )

thx :)
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 »

Nice :-)

I am focusing mostly on multiplayer-safe. At the moment I dont have a time to look at the prices, but the problem is only with Balance type: All costs and buidling with auto...
Spartan190
Engineer
Engineer
Posts: 24
Joined: 14 Oct 2009 08:47

Re: Another Daylength patch

Post by Spartan190 »

Hi there,

I did download the patch and compiled the version with the given revision. Created a client and one for server.
I searched for it because my colleagues did want to have it in the game.
First I have to say nice patch and respect for spending all the time in it.
I would like to know if there is to be planned a new version for the current Release (0.7.3) or is there a SVN for newer versions? I did use 17483 the one uploaded in this thread.

An other question is, how can I change the values with rcon in the console?

Spartan190
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 »

Hello,
nice to see, that at least, sameone even play with it.
Spartan190 wrote:I would like to know if there is to be planned a new version for the current Release (0.7.3) or is there a SVN for newer versions? I did use 17483 the one uploaded in this thread.
I dont plan to "update" this patch to 0.7.3. I might get time at the end of the week to update it to current version (trunk). Although I think, that applying this patch to trunk wouldnt be much a problem. Except savegame bumps, which, if you code at least a bit, can be easily fixed by yourselves.
Spartan190 wrote:An other question is, how can I change the values with rcon in the console?
Well, if I understand rigth, you are using a dedicated server. You can run game, setup in main screen what setting do you want, an then copy the settings.cfg to dedicated server folder and start a new game. If you want to change values during play, I cant help, since I have never used it. But searching around forum would help ;-)
Spartan190
Engineer
Engineer
Posts: 24
Joined: 14 Oct 2009 08:47

Re: Another Daylength patch

Post by Spartan190 »

Thx for the answer, yes I do use a dedicated Server, can change the sttings in the config for my own but don't know how to edit it via rcon, I'll try out myself.

I can program a bit but not C++ that goot, but maybe you could tell me how to make it compatible with newer Versions of openTTD and/or how I can compile the new patch. Then I can compile openTTD with the newer patch for my own.
Yexo
Tycoon
Tycoon
Posts: 3663
Joined: 20 Dec 2007 12:49

Re: Another Daylength patch

Post by Yexo »

Spartan190 wrote:Thx for the answer, yes I do use a dedicated Server, can change the sttings in the config for my own but don't know how to edit it via rcon, I'll try out myself.

Code: Select all

rcon rcon_passwd "set setting_name new_value"
Spartan190
Engineer
Engineer
Posts: 24
Joined: 14 Oct 2009 08:47

Re: Another Daylength patch

Post by Spartan190 »

Yexo wrote:
Spartan190 wrote:Thx for the answer, yes I do use a dedicated Server, can change the sttings in the config for my own but don't know how to edit it via rcon, I'll try out myself.

Code: Select all

rcon rcon_passwd "set setting_name new_value"
thx works for some options, but not all for example if I type

Code: Select all

set daylength 2 
'daylength' is an unknown setting. 
Just need to know how I can do the patch compatible with newer versions of openTTD, thx.
Last edited by Spartan190 on 14 Oct 2009 13:31, edited 2 times in total.
Yexo
Tycoon
Tycoon
Posts: 3663
Joined: 20 Dec 2007 12:49

Re: Another Daylength patch

Post by Yexo »

Spartan190 wrote:
Yexo wrote:
Spartan190 wrote:Thx for the answer, yes I do use a dedicated Server, can change the sttings in the config for my own but don't know how to edit it via rcon, I'll try out myself.

Code: Select all

rcon rcon_passwd "set setting_name new_value"
thx works for some options, but not all for example if I type

Code: Select all

set daylength 2 
'daylength' is an unknown setting. 
In the latest patch in this topic the setting name is "day_length_factor", not "daylength".
Just need to know how I can do the patch compatible with newer versions of openTTD, thx.
Basic steps:
1. Download the source of the revision the patch is made for (use svn for this).
2. Apply the patch (see sticky in this subforum).
3. Update the source to the latest revision (using svn) and fix all conflicts (you have to do this manually). This does require knowledge about the code and changes, depending on how many conflicts you get.
4. Create a new diff and upload it here (use svn).
Spartan190
Engineer
Engineer
Posts: 24
Joined: 14 Oct 2009 08:47

Re: Another Daylength patch

Post by Spartan190 »

Just need to know how I can do the patch compatible with newer versions of openTTD, thx.

Basic steps:
1. Download the source of the revision the patch is made for (use svn for this).
2. Apply the patch (see sticky in this subforum).
3. Update the source to the latest revision (using svn) and fix all conflicts (you have to do this manually). This does require knowledge about the code and changes, depending on how many conflicts you get.
4. Create a new diff and upload it here (use svn).
Ok thanks I'll try this.

To daylength option the value can be set in the config file but it cannot be changed in main menu this could be why the set command can't find it.
Last edited by Spartan190 on 14 Oct 2009 14:04, edited 1 time in total.
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 »

If you go in main screen to the "Advanced settings -> Economy", do you see the "Day length" there? Its a "folder" where you can see all the settings described in first post.
Spartan190
Engineer
Engineer
Posts: 24
Joined: 14 Oct 2009 08:47

Re: Another Daylength patch

Post by Spartan190 »

pavel1269 wrote:If you go in main screen to the "Advanced settings -> Economy", do you see the "Day length" there? Its a "folder" where you can see all the settings described in first post.
Yes I can see it, I just did mean that it is no value to set for example like Day Length Balance or something else
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 51 guests