Transport Tycoon Forums

The place to talk about Transport Tycoon
It is currently Sun Sep 24, 2017 8:57 pm

All times are UTC




Post new topic  Reply to topic  [ 219 posts ]  Go to page 1 2 3 4 511 Next
Author Message
PostPosted: Sun Dec 20, 2009 3:45 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Thu Nov 13, 2003 8:26 pm
Posts: 1108
Location: Finland
This is a collection of small patches intended to be used in conjunction with cargodist.

The most significant change is the introduction of an adjustable DAY_TICKS value (along with some related tweaks), and the possibility to scale down the passenger/mail amounts generated by towns.

The combined builds here additionally contain the timetable-based vehicle autoseparation patche(s).


Windows binaries:
There are combined win32 builds/binaries (with cargodist and autosep) to be found in this thread. The most recent version is found at the end of the topic:

--> openttd-cargodist-sprinkles-r19964-win32 <--

Please report any and all crashes from this build in this thread. See the per-build post for more specific notes.



Variable daylength:

This patch lets you adjust Economy >> Day length factor to linearly increase the number of ticks in a day. Most visibly, this will increase the amount of real-time it takes for the game-time to tick forward into the next day. If you are playing with a factor of 4x, then in the time that it takes you to play from 1921 to, say, 1935 (the golden era of DBSetXL steam), you would normally already be in 1977, wondering when you're going to have the time to replace all those 40-year-old steam engines...

After that, things get more complicated. Changing the daylength causes different things to behave differently.
Town growth, Industry production, Town passenger/mail generation, Cargo payment (by duration transported), your profit - stay the same in real-time.
Running costs, Servicing intervals - stay the same in game-time.
Others - unknown.

The towngrowthfreq patch ties the town growth rate to the daylength. The goal here is that the towns will grow the same amount per given game-time (and hence more slowly in real-time). The towns growing too fast (i.e. at the same real-time rate) was my only major issue so far - you're in 1925, only have the BR38 and tiny pre-war coaches - and your towns have 8k pop and more passengers than you can handle. The adjustment is kind of crude, so the towns may actually grow slightly more slowly overall. This requires some more work.

The autofill-roundoff patch separates the timetable autofill roundoff interval from the daylength setting, having it use the same roundoff interval as trunk (74 ticks). This means that you'll no longer get ~10s wait times at each station when using timetable autofill at 4x daylength. Instead, you're more likely to get wait times that display as "0 days" in the GUI - I suggest you change Interface >> Show timetable in ticks rather than days to compensate. Fixing the timetable GUI to display fractional days is beyond the scope of this patch.

These trivial patches (~10 LOC) provide a usable and enjoyable increased-daylength gameplay experience for me. At the default settings, they do not influence the gameplay at all.




Adjust town passenger/cargo rates:

This patch lets you adjust the amount of cargo (pax/mail) generated by a town using Economy >> Towns >> Town cargo generation factor. With the default value of 0, amounts remain unchanged. Set it to a negative number to decrease town cargo, or a positive number to increase it. Adjust carefully.

When playing with cargodist (or cargodest), you end up with a far higher load on your vehicles (due to passengers not getting off at stations along the way), and usually with large cities, one finds it impossible to sanely transport enough passengers to keep the stations from continuously overflowing.

This patch aims to resolve that by applying an exponential function to reduce the number of passengers and mail generated by town houses. The function is approximately amount = amount × 2^cf, where cf is an adjustable parameter. For negative cf values, this is equal to amount = amount / 2^–cf, and hence reduces the amount of cargo. I suggest a value of -1x to provide some relief, or a value of -2x if your aim is to keep your stations from filling up, and your trains less than 100% full.

The actual calculation is slightly different to adjust for integer math. Since this is calculated per-house, and the production will never drop to zero, the actual aggregate town production is slightly higher. There is a minimum limit on a town's pax/mail generation rate that is approximately equal to the number of house-tiles in the town. Referr to this table of values to see how the function behaves.



Daily autosave:

This patch implements a daily autosave loop in addition to the normal monthly autosave loop, and provides "daily" and "weekly" autosave options in addition to the previous monthly ones. This was adapted from a similar feature in an earlier daylength patch, and is intended as a quick fix for the daylength/autosave issue, although better solutions may exist...



Vehicle name length:

This trivial patch raises the effective limit on vehicle names from 150px to 250px, or 30 bytes, whichever is greater. Note that long vehicle names with wide glyphs may cause the vehicle window to stretch.



Aggregate Patches (outdated; r18913):

Patches are simple enough that they should apply against a wide range of trunk versions. Patches do not modify gameplay when at default values. All standard daylength disclaimers apply. No guarantees about savegame compatibility.

_________________
#tycoon logs


Last edited by SpComb on Mon Jul 05, 2010 6:36 am, edited 22 times in total.

Top
   
PostPosted: Sun Dec 20, 2009 3:56 pm 
Offline
Tycoon
Tycoon

Joined: Thu Apr 02, 2009 10:43 pm
Posts: 3008
Location: Massachusetts, USA
Outdated, see viewtopic.php?p=843125#p843125

Hey,
I just moved this post from the CargoDist thread over to here. It is a compiled (mini-pack) of the patches. Built on MSVC for win32. Have fun!

Contains:
  • CargoDist
  • Varible DayLength
  • Town Growth Frequency
  • Town Cargo Factor

Disclaimer:
If the CargoDist Mini-Pack crashes, do not report it to the OpenTTD developers. Report it to this thread. When making your post about the crash, please upload the crash.dmp, crash.log, crash.sav, and crash.png (only available as of r18184, so if you are using a build older than that, don't bother). These files are vital to finding what happened during the crash. Also note that the PDB file attached is not needed when testing the CargoDist Mini-Pack, it is mainly for developers.

Peter


Attachments:
cargodist_mini-pack_r18533.diff [238.89 KiB]
Downloaded 198 times
cargodist_mini-pack_r18533.rar [3.36 MiB]
Downloaded 454 times
cargodist_mini-pack_PDB_win32_r18533.rar [2.78 MiB]
Downloaded 205 times


Last edited by petert on Thu Dec 31, 2009 1:17 am, edited 1 time in total.
Top
   
PostPosted: Mon Dec 21, 2009 6:24 am 
Offline
Moderizzle
Moderizzle
User avatar

Joined: Sun Dec 15, 2002 12:58 am
Posts: 11592
Location: Sydney, Australia. Usually at work in the underground railway station...
SpComb and petert - thanks for putting the effort in to this, it certainly sounds like an interesting challenge, and a way to make large maps (as well as a lot of the early DBXL vehicles) more playable for me. Thanks for the time to put this together, I look forward to having a go!

_________________
Posted by Raichase. Visit my Flickr! Gallery, Blog (get a feed of everyone at once at Planet TT-Forums).
Raichase - Perfect timing, all the time: [13:37] * Now talking in #tycoon
ImageImage
Official TT-Dave Worley Fan Club
Official TT-Andel-in-a-pink-hat Fan Club


Top
   
PostPosted: Mon Dec 21, 2009 7:13 am 
Offline
Traffic Manager
Traffic Manager

Joined: Fri Sep 29, 2006 7:28 am
Posts: 224
Location: Copenhagen, Denmark
Thank you very much for this build :)

It would be very interesting if it was posible to put the timetable patch in here too.

I have found a bug in this build.
Sadly I did not read what files to send back to you, but i think i can describe how the bug appered.

It appered when i had build my first line, first train and wanted to clone the train with shared orders (CTRL+clone train).
The bug did not apper when i buy just the locomotive, and then try to clone it. But if i buy one loco and some waggons, and then clone it, the game crashes.

I hope that this info is enough to help you, and I'm sorry that i do not have the files.
Maybe someone else can reproduce the bug, and then send the files to you.
If not, i will send the files to you as soon as possible.

Hope it's possible to solve this bug, because this minipack is very nice :D

_________________
Jimi Okstoft


Top
   
PostPosted: Mon Dec 21, 2009 11:12 am 
Offline
Tycoon
Tycoon
User avatar

Joined: Thu Nov 13, 2003 8:26 pm
Posts: 1108
Location: Finland
Jimbow wrote:
It appered when i had build my first line, first train and wanted to clone the train with shared orders (CTRL+clone train).
The bug did not apper when i buy just the locomotive, and then try to clone it. But if i buy one loco and some waggons, and then clone it, the game crashes.


Reproducible in vanilla trunk r18533 and r18582. I'll report it to the OpenTTD devs.

EDIT: Fixed in r18590. It'll be in the next cargodist update/build.

Reproduce: Load DBSetXL; New temperate game; Build Depot, Build BR18 + local mail + local pass; clone; crash.
Assert: src/vehicle_gui.cpp:184: byte GetBestFittingSubType(Vehicle*, Vehicle*): Assertion `HasBit(e_for->info.refit_mask, v_from->cargo_type)' failed

Stacktrace:
Code:
 [07] /lib/libc.so.6(__assert_fail+0xef) [0x7f583cbc92df]
 [08] ./openttd [0x78f1d6]
 [09] ./openttd(_Z15CmdCloneVehiclej13DoCommandFlagjjPKc+0x447) [0x782dc7]
 [10] ./openttd(_Z10DoCommandPjjjjPFvbjjjEPKcb+0x413) [0x57de33]
 [11] ./openttd(_ZN11DepotWindow11OnMouseLoopEv+0xbb) [0x59e4eb]
 [12] ./openttd(_Z17HandleMouseEventsv+0x81) [0x7b0331]
 [13] ./openttd(_Z9InputLoopv+0xf0) [0x7b0eb0]
 [14] ./openttd(_Z8GameLoopv+0xad) [0x664d1d]
 [15] ./openttd(_ZN15VideoDriver_SDL8MainLoopEv+0x411) [0x795ad1]
 [16] ./openttd(_Z8ttd_mainiPPc+0xf7a) [0x665dfa]

_________________
#tycoon logs


Last edited by SpComb on Tue Dec 22, 2009 5:38 pm, edited 1 time in total.

Top
   
PostPosted: Mon Dec 21, 2009 11:26 am 
Offline
Tycoon
Tycoon

Joined: Thu Apr 02, 2009 10:43 pm
Posts: 3008
Location: Massachusetts, USA
Jimbow wrote:
I have found a bug in this build.

Linking to the post would be better, especially when the topic gets longer with more total posts.
Jimbow wrote:
Sadly I did not read what files to send back to you, but i think i can describe how the bug appered.

Read my disclaimer in this post (viewtopic.php?p=842067#p842067). Basically you need crash.dmp, crash.log, crash.png, and crash.sav (created when you press Emergency Save at the crash window). The crash window should tell you the location of these files.


Top
   
PostPosted: Tue Dec 22, 2009 9:38 pm 
Offline
Tycoon
Tycoon

Joined: Thu Apr 02, 2009 10:43 pm
Posts: 3008
Location: Massachusetts, USA
Do people want individual binaries for each patch? Should I get them here?


Top
   
PostPosted: Wed Dec 23, 2009 2:58 pm 
Offline
Traffic Manager
Traffic Manager

Joined: Mon Oct 26, 2009 4:33 pm
Posts: 141
petert wrote:
Do people want individual binaries for each patch? Should I get them here?

Quite frankly I wouldn't bother, as both patches are gameplay-neutral in their default settings. If someone just needs one of them he/she can just leave the other settings alone to achieve the desired result.
Creating three versions every time would just more or less flood this thread (or elongate the binary-posts at the very least). If someone actually requests a separate build this would be a different story though I think (as there would be a known demand) :)


Top
   
PostPosted: Thu Dec 24, 2009 9:53 pm 
Offline
Tycoon
Tycoon

Joined: Thu Apr 02, 2009 10:43 pm
Posts: 3008
Location: Massachusetts, USA
Outdated, see viewtopic.php?p=844800#p844800

Hello all,
I've just compiled another build with MSVC for win32 because the bug in this post was fixed (viewtopic.php?p=842199#p842199).

Disclaimer:
If the CargoDist Mini-Pack crashes, do not report it to the OpenTTD developers. Report it to this thread. When making your post about the crash, please upload the crash.dmp, crash.log, crash.sav, and crash.png (only available as of r18184, so if you are using a build older than that, don't bother). These files are vital to finding what happened during the crash. Also note that the PDB file attached is not needed when testing the CargoDist Mini-Pack, it is mainly for developers.


Attachments:
cargodist_mini-pack_win32_r18625.rar [3.38 MiB]
Downloaded 296 times
cargodist_mini-pack_PDB_win32_r18625.rar [2.85 MiB]
Downloaded 196 times
cargodist_mini-pack_r18625.diff [240.9 KiB]
Downloaded 202 times


Last edited by petert on Sat Jan 09, 2010 10:20 pm, edited 3 times in total.
Top
   
PostPosted: Sun Dec 27, 2009 2:52 pm 
Offline
Engineer
Engineer
User avatar

Joined: Wed Apr 29, 2009 1:17 pm
Posts: 22
Location: NL
First, I want to say I really appreciate your attempts to merge the cargodist and daylength patches. :bow: I've been playing OpenTTD with cargodist for a while, and I've been waiting for a version with daylength patch for a long time.

It does work great for me, but I've just had a error, and since I would like you to help with the development of the patch, I've tried to make a bug-report. I haven't done this before, so I don't know if it's usefull to you, but if you need some more files, just shout :wink:


Attachments:
crash.sav [306.09 KiB]
Downloaded 147 times
crash.txt [9.48 KiB]
Downloaded 143 times
Top
   
PostPosted: Sun Dec 27, 2009 3:16 pm 
Offline
Tycoon
Tycoon

Joined: Thu Apr 02, 2009 10:43 pm
Posts: 3008
Location: Massachusetts, USA
michielh wrote:
but if you need some more files, just shout :wink:

Do you have a crash.dmp and a crash.log? If yes, could you please upload them?


Top
   
PostPosted: Sun Dec 27, 2009 5:57 pm 
Offline
Traffic Manager
Traffic Manager

Joined: Fri Sep 29, 2006 7:28 am
Posts: 224
Location: Copenhagen, Denmark
I will also like to thank all developers for this build :)

I downloaded the new build and i did not find any problems so far :D

Cargodist and the daylength patch makes the game more fun!
Great work! :D

_________________
Jimi Okstoft


Top
   
PostPosted: Sun Dec 27, 2009 7:41 pm 
Offline
Engineer
Engineer
User avatar

Joined: Wed Apr 29, 2009 1:17 pm
Posts: 22
Location: NL
I get this message when I try to upload the dmp file: The extension dmp is not allowed. How can I solve this? :)

And I've uploaded the log file in my previous post.


Top
   
PostPosted: Sun Dec 27, 2009 9:41 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Sat Oct 04, 2008 11:05 pm
Posts: 2622
Location: Lost in spaces
Quote:
I get this message when I try to upload the dmp file: The extension dmp is not allowed. How can I solve this? :)

Solution 1: Put your files in a zip.
Solution 2: Add .txt extension and tell people to remove it after downloading.

_________________
-- .- -.-- / - .... . / ..-. --- .-. -.-. . / -... . / .-- .. - .... / -.-- --- ..- .-.-.-
--- .... / -.-- . .- .... --..-- / .- -. -.. / .--. .-. .- .. ... . / - .... . / .-.. --- .-. -.. / ..-. --- .-. / .... . / --. .- ...- . / ..- ... / -.-. .... --- --- -.-. .... --- --- ... .-.-.- / ---... .--.

Playing with my patchpack? Ask questions on usage and report bugs in the correct thread first, please.
All included patches have been modified and are no longer 100% original.


Top
   
PostPosted: Sun Dec 27, 2009 9:47 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Thu Nov 13, 2003 8:26 pm
Posts: 1108
Location: Finland
michielh wrote:
First, I want to say I really appreciate your attempts to merge the cargodist and daylength patches.


Small detail for accuracy: the "daylength" patch here is actually one that I wrote myself, not some daylength patch from elsewhere.

crash.txt wrote:
Assertion failed at line 1145 of ..\src\economy.cpp: v->time_counter != 0


The code here is pretty spaghetti, so it's difficult to see what causes this. It might be some kind of obscure increased-daylength related overflow - but on the other hand, it happens in code that cargodist touches. I'll have to take a closer look at it once I'm back home for new year's, but I suspect it's a cargodist bug.

Unrelated note to self: high values of pf.wait_for_pbs_path (<255) might cause overflows with high values of DAY_TICKS.

_________________
#tycoon logs


Last edited by SpComb on Sun Dec 27, 2009 10:13 pm, edited 1 time in total.

Top
   
PostPosted: Sun Dec 27, 2009 9:55 pm 
Offline
Tycoon
Tycoon

Joined: Thu Apr 02, 2009 10:43 pm
Posts: 3008
Location: Massachusetts, USA
ChillCore wrote:
Solution 2: Add .txt extension and tell people to remove it after downloading.

The first option is far more superior, it allows all the files to be together, rather than separate, in different posts and such.


Top
   
PostPosted: Sun Dec 27, 2009 10:10 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Sat Oct 04, 2008 11:05 pm
Posts: 2622
Location: Lost in spaces
Yes petert, but that is asuming the reporter has a zipper. (Lol, sorry.)
Solution 2 is not recommended but sometimes zipping makes files bigger. Also one may assume that reporter will place all files in one post when reporting?

Solution 3: Kindly ask Mr orudge to allow .dmp extentions.

And now back to our regular show: Daylenght, Cargodist with sprinkles ...

_________________
-- .- -.-- / - .... . / ..-. --- .-. -.-. . / -... . / .-- .. - .... / -.-- --- ..- .-.-.-
--- .... / -.-- . .- .... --..-- / .- -. -.. / .--. .-. .- .. ... . / - .... . / .-.. --- .-. -.. / ..-. --- .-. / .... . / --. .- ...- . / ..- ... / -.-. .... --- --- -.-. .... --- --- ... .-.-.- / ---... .--.

Playing with my patchpack? Ask questions on usage and report bugs in the correct thread first, please.
All included patches have been modified and are no longer 100% original.


Top
   
PostPosted: Mon Dec 28, 2009 7:43 am 
Offline
Tycoon
Tycoon

Joined: Wed Aug 26, 2009 6:33 am
Posts: 2493
Location: Poland
Thanks for binary!

_________________
Correct me If I am wrong - PM me if my English is bad
AIAI - AI for OpenTTD


Top
   
PostPosted: Tue Dec 29, 2009 6:23 pm 
Offline
Tycoon
Tycoon

Joined: Thu Apr 02, 2009 10:43 pm
Posts: 3008
Location: Massachusetts, USA
If you don't mind SpComb^, could you please write in your main post where binaries can be obtained, either via link or at latest posts?


Top
   
PostPosted: Wed Dec 30, 2009 7:33 pm 
Offline
Engineer
Engineer

Joined: Fri Feb 08, 2008 1:02 pm
Posts: 31
Any chance to see auto-seperation or anything like that in your patch pack?


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 219 posts ]  Go to page 1 2 3 4 511 Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000-2017 phpBB Limited

Copyright © Owen Rudge/The Transport Tycoon Forums 2001-2017.
Hosted by Zernebok Hosting.