Sacros day length 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

User avatar
Wolf01
Tycoon
Tycoon
Posts: 2016
Joined: 24 Apr 2004 10:43
Location: Venezia - Italia
Contact:

Post by Wolf01 »

i fixed most of the economy problems (running costs and interest rate) and red signal wait time

i need more time to study the code, any other suggestion is accepted
Attachments
daylength_miniIN_fixed_most.diff
(4.84 KiB) Downloaded 316 times
Shorty
Engineer
Engineer
Posts: 114
Joined: 18 Jul 2006 15:43

Post by Shorty »

i would suggest having all time-based costs (maintainance, running costs, loan interest, 'other' costs) multiplied by the daylength - as it stands, its just too easy to make money with longer days, since youre dividing all those costs by whatever you increase the daylength by.
"And if i close my mind in fear, Please pry it open
And if my face becomes sincere, beware!
And if i start to come undone, Stitch me together
And if you see me strut, Remind me of what left this outlaw torn..."
-Metallica Lyrics
Electric Rails for all Tilesets
~A Talented Fool~
User avatar
Wolf01
Tycoon
Tycoon
Posts: 2016
Joined: 24 Apr 2004 10:43
Location: Venezia - Italia
Contact:

Post by Wolf01 »

if you are able to do this you can do it, i already tried but since i broke the whole economy i won't put my hands on the economy section
klogg
Traffic Manager
Traffic Manager
Posts: 248
Joined: 10 May 2006 13:55

Post by klogg »

Sorry if this is obvious...

What happens currently when I use the daylength patch?

klogg
gigajum
Route Supervisor
Route Supervisor
Posts: 511
Joined: 08 Mar 2006 08:33
Location: Germany

Post by gigajum »

klogg wrote:Sorry if this is obvious...

What happens currently when I use the daylength patch?

klogg
Silly answer: try it
More then crashing the game should not happen. I would expect that the whole game prices get crazy. That should be all.
User avatar
Wolf01
Tycoon
Tycoon
Posts: 2016
Joined: 24 Apr 2004 10:43
Location: Venezia - Italia
Contact:

Post by Wolf01 »

only running costs are affected by daylength
all the production is checked every day as before but you will notice an increment of production because industries produces the same quantity in the same time
this is the normal behaviour, if you can read 1 book in 24 hours and i change the daylength to 96 hours you can read 4 books in a day
suit
Engineer
Engineer
Posts: 42
Joined: 22 Jul 2006 12:29
Location: Austria

Post by suit »

*bump*

so, whats about the daylenth patch now? i read lots of topics - but in the mini in thread i found nothing interresting

i wonder if this patch makes it into the trunk or not ?!
User avatar
Wolf01
Tycoon
Tycoon
Posts: 2016
Joined: 24 Apr 2004 10:43
Location: Venezia - Italia
Contact:

Post by Wolf01 »

the patch is waiting in miniIN and i think it has no clue to be merged in trunk as it changes a lot the game behaviour
peter1138
OpenTTD Developer
OpenTTD Developer
Posts: 1734
Joined: 30 Mar 2005 09:43

Post by peter1138 »

Isn't the game behaviour the same when the daylength is set to normal?

(I've not tested it, though...)
He's like, some kind of OpenTTD developer.
Sacro
Tycoon
Tycoon
Posts: 1145
Joined: 18 Jun 2005 21:08
Location: Here
Contact:

Post by Sacro »

No, with 32x daylength, you can make 32x as much money, (or the same amount, only 32x quicker!)

I have just started a MiniIN game, and gone from £0, to -£500k, to £100k in around 6 weeks!

It all depends on what behavoir people want.

peter1138: you thinking about having it in trunk?
We Am De Best

Host of ThroughTheTube site
User avatar
gkirilov
Chief Executive
Chief Executive
Posts: 696
Joined: 03 May 2005 09:32
Location: Othala

Post by gkirilov »

I would vote for that :D
I also think that there is an option to switch it off and therefore it does not change the (basic)gameplay at all.
OTTDCoop NewGRF Pack|Different sets of GRFs for TTDPatch (some of them work in OTTD) - 1|- 2|GRF sets for OTTD|OTTD nightly
Image
I hooked up my accelerator to my brake lights. I hit the gas, people behind me stop, and I'm gone.
Understeer is when you hit the wall with the front of the car. Oversteer is when you hit the wall with the rear of the car. Horsepower is how fast you hit the wall. Torque is how far you take the wall with you. Spoilers and bodykits are how much of the wall you take with you. Rollcages and windownets are how much of a mess you leave on the wall.
suit
Engineer
Engineer
Posts: 42
Joined: 22 Jul 2006 12:29
Location: Austria

Post by suit »

i played with 10x daylength yesterday and it worked pretty fine

its true that you make 10 times more money in the same amount of "ingame time" - but compared to the realtime there is no difference

the interresting part is, that new vehicles and stuff become available 10 times slower

an interresting aspect for 24/7 dedicated servers with infinite gametime

usualy the game is over after 20 hours playtime and every player can build everything - thats not very interresting

maybe the production-cruves should be lowered a bit (i'm thinking of a logarithmic curve)

so if the game is 10 times slower you make 100% more profit - if the game is 100 times slower you make 200 % more profit

so its like in browser games - you build one track and wait 10 hours, log in again and build another track or just manage you system a bit

but a higher player and/or companylimit is important too

an open game wich lasts over 3 weeks instead of 1 day needs 21 times more players/companys - or i'm wrong at this point?
Sacro
Tycoon
Tycoon
Posts: 1145
Joined: 18 Jun 2005 21:08
Location: Here
Contact:

Post by Sacro »

Doesn't exactly need an off switch, just set it to 1x and it does nothing (except divide/multiply various value by 1 a few times)
We Am De Best

Host of ThroughTheTube site
LSky
Traffic Manager
Traffic Manager
Posts: 170
Joined: 25 Jun 2005 10:44
Location: The Netherlands

Post by LSky »

Just for clarity, if i want to have companies be reset on my server after people havent logged in for say 12 hours being 10 ingame years, I have to put day length on 6?
User avatar
Wolf01
Tycoon
Tycoon
Posts: 2016
Joined: 24 Apr 2004 10:43
Location: Venezia - Italia
Contact:

Post by Wolf01 »

~2 seconds 1 day at normal speed
10 years = 3650 days = ~2 hours

if you set for example the day length at 32x, you have the length of about 65 seconds, so a year is 365*65 ~= 6 hours, 12 hours are 2 years
User avatar
Ricki
Engineer
Engineer
Posts: 8
Joined: 14 Jul 2005 19:48
Location: Ciudad Real, Spain

Post by Ricki »

Hi all. I've just tried this patch in a recent MiniIN and the result of it is that the game works exactly the same as before. The only difference is that the date goes slower and so vehicles become available at a slower pace, but you still earn money as if there was no patch. My idea for a slow game would be that you earn the same money in the same ingame time, so I've coded a different patch that tries to achive that by reducing the output of industries and cities.

Of course, if set to 1x it makes no changes to the game.
Attachments
day_length_r7031.diff
(15.66 KiB) Downloaded 295 times
User avatar
Maedhros
OpenTTD Developer
OpenTTD Developer
Posts: 603
Joined: 30 Mar 2006 18:24
Location: Durham, UK

Post by Maedhros »

Something I noticed:

Code: Select all

+	 SDT_VAR(Patches, day_length, SLE_UINT8, 0, NS, 1, 1, 32, 1, STR_CONFIG_PATCHES_DAY_LENGTH, NULL),
Despite NS being available, you can't actually used it since it only syncs values when they change, not when players start a game. The setting has to be saved in the savegame so that every network player gets the same value, or you'll get huge desyncs everywhere. You need a savegame bump and to use SDT_CONDVAR instead.

Edit: In fact, NS isn't valid for guiflags at all...
No-one's more important than the earthworm.
User avatar
Wolf01
Tycoon
Tycoon
Posts: 2016
Joined: 24 Apr 2004 10:43
Location: Venezia - Italia
Contact:

Post by Wolf01 »

see my patch for the settings about the multiplayer games
and please, try to provide patches in english, i'm italian but i never provided a patch in italian only
User avatar
Wolf01
Tycoon
Tycoon
Posts: 2016
Joined: 24 Apr 2004 10:43
Location: Venezia - Italia
Contact:

Post by Wolf01 »

mmm i just thought about the daylength and i remember you said that only the time is slowed but all economy is the same
how does this work?
in normal game, i say, you earn 1M in one month
with length set to 32x you earn 1M in one month

how much time you have to wait to earn enough money to build something?
the costs are only divided visually to show the same ammount of money and internally is always tick related (so at 1x is 1M and at 32x is 32M) or is really divided per 32 so you must wait 32 times longer to build anything?
heppers
Engineer
Engineer
Posts: 108
Joined: 10 Jun 2004 07:09
Location: Staffordshire, UK

Post by heppers »

Daylength + AI
I find that using the latest MiniIN having the day length set to anything other than the normal 1 causes the game to crash.
Any ideas?
Pedro The Fisherman
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 6 guests