Minimalistic Patchpack [1.4, 2017-05-20]

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
coherently_olive
Engineer
Engineer
Posts: 14
Joined: 24 Apr 2015 17:16

Minimalistic Patchpack [1.4, 2017-05-20]

Post by coherently_olive »

Hey there,

I know there's already a lot of patchpacks out there, but I was asked to make the version of the game that I'm playing publicly available, so I thought I may as well post it here. See below for a list of features.

Binaries

Note: Normally this goes without saying, but I can't stress it enough: No warranty for absolutely anything. These work on my own machine, but that does not necessarily mean they will work on yours. I don't know if I packaged all the correct files and I'm grateful for any feedback that you can provide. If anybody can provide support for additional architectures please let me know, I appreciate all the help I can get.

Windows: openttd-minipatch-1.4-win32.tar.bz2 (Checksums: MD5 SHA-1 SHA-256 SHA-512)
32-bit binary included. Tested on a Windows 7 64-bit installation. Known issues:
  • Says in the main menu that some strings are missing. If you find them, let me know.

Linux: openttd-minipatch-1.4-lin64.tar.bz2 (Checksums: MD5 SHA-1 SHA-256 SHA-512)
64-bit binary included. Tested on a 64-bit gentoo linux installation. Currently no known issues.


Source

Link to the Repository

Please note that I tried making vanilla savegames loadable by the patchpack, but I give no guarantees. I do guarantee that further versions of the patchpack will be savegame-compatible to the current version. I did not try network capabilities of the patchpack at all, since I don't currently need them. Your mileage with networking may vary, a lot.


Changelog

Version 1.4, Corresponding OpenTTD Version: 1.7.1-RC1 (r27874)
Corresponding SV Magic Number: KK_PATCHPACK_SV_2_196 = 5004

Features:
  • Migrated to OpenTTD 1.7.1-RC1 (r27874)
Fixes:
  • Fixed an issue crashing the game when drag-removing signals on a segment with wormhole tiles (tunnels or bridges) without a signal immediately after the wormhole exit
  • Fixed an issue where no signal would be placed before a wormhole entry when drag-adding signals despite the 'fixed distance between signals' option being disabled
  • Fixed a small memory leak that could happen when creating template trains
  • Fixed an issue that would show wrong template train sprites after loading an older savegame
  • Fixed an issue that would not show any version number in the main menu in the win32 binary
Version 1.3
No change in OpenTTD version
  • Fixed a bug in the cheat GUI where changing the current year would not introduce new engines until the final cycle of the year to which we changed was reached
  • Fixed a bug where the wrong template would be selected for replacement, leading to GUI bugs and possible crashes when a vehicle with wrong template was replaced
  • Fixed a bug where it was not possible to refit template trains
  • Fixed a bug where trying to open the template refit window with no vehicles in the template train would crash the game


Version 1.2
No change in OpenTTD version
  • Some small fixes to allow building in VisualStudio


Version 1.1
No change in OpenTTD version
  • Updated to the newest version (v3) of my linear coastline bias patch. Details are available in this post: viewtopic.php?f=33&t=75411


Version 1.0, Corresponding OpenTTD trunk version: 27669

Patches by other contributors (shortening the descriptions because these are probably very well known):
  • chunnel (by HackaLittleBit): Allows building tunnels crossing water (viewtopic.php?f=33&t=41775)
  • polyline (by adf88): Allows building tracks with a polyline tool from graphics programs (viewtopic.php?t=57080)
  • towncargo (by dbkblk): Allows multiplying how much passengers / mail towns generate by positive / negative powers of two (viewtopic.php?t=69839)
  • automated timetables and separation (by Gathers): Allows automatically updating timetables of shared orders and keeping vehicles spaced out evenly according to their shared timetables (viewtopic.php?f=33&t=46391).
  • group info (by MagicBuzz / mtm2207946034): Shows profit and current usage of groups in the group window (viewtopic.php?f=33&t=72855)
  • tbtr (by ffpp): Allows asigning template trains to groups, where manipulating the template trains will replace all trains in the group on their next depot visit (viewtopic.php?t=58904)
    This patch has been modified to include some additional features / fixes. The list of updates can be seen in this post: viewtopic.php?f=33&t=58904&start=100#p1178577
  • rating-town-label (by Terkhen): Shows colored population count in towns depending on the local company's rating with the local authority (viewtopic.php?f=33&t=42598)
  • signals in tunnels and on bridges (by HackaLittleBit): Allows treating (evenly spaced) squares in tunnels / on bridges as block signals by placing a block signal on the tunnel / bridge entry square (viewtopic.php?f=33&t=41260&)
  • collapsable groups (by KeldorKatarn): Lets users collapse groups in the group window (Manually merged changesets from his repo)


Patches by yours truly:
  • Always show wagon speed limit
    2cc trainset contains a feature that lets users run wagons above their original speed limit. For this, OpenTTD's wagon speed limit has to be disabled. If this is done, then maintenance costs of the wagons will be increased (a little bit or a whole lot, depending on the speed at which they are used). OpenTTD would not show wagon speed limit in the new vehicle dialog when speed limit was disabled, which was rather annoying in combination with 2cc's dynamic maintenance cost feature, so we made the buy vehicle dialog always show the wagon speed limit.
  • Permissive station building
    Generally, towns will allow to build rails and roads, but not stations if a company's ratings are very poor or less, which would make it extremely annoying building rails or roads first and then stations (i.e. in case rails were built near a town previously), but the town is to be included in the network only now. This patch adds a setting to always allow companies to build stations in towns no matter the ratings. The (in)ability to demolish town buildings with poor ratings remains unaffected.
  • Remove water animations
    Added a setting (environment) that allows to disable the water animations (which would cause the screen to flicker annoyingly when fast-forwarding)
  • Inflation remover
    Added a cheat option to remove inflation even if it already occurred (i.e. reset everything to base price)
  • Daylength hack
    An alternative daylength hack. Instead of increasing the ticks per day (which may lead to things like extended subsidy times, or extended timeframe to deliver multiple products / supplies to an industry to increase production), this hack will go through a year a configurable amount of times until advancing to the next one. Stuff that should happen once a year at a specific point in time (introduction of new vehicles, offer of preview of vehicles, applying inflation, aging houses, deciding whether to use new semaphores) will happen in the last repetition of that year. Other stuff (aging of cargo and individual vehicles) will still happen normally.
    One thing of note should be how display of different values is handled that normally address a year. Generally, anything that will be accumulated over a year and reset at its end (i.e. moving vehicle profits) will be accumulated over all repetitions of a year and reset after the last repetition. To ease calculating amortized costs for vehicles, the profits _last year_ will not refer to the accumulated costs of the last year. Rather, all profits that the vehicle accumulated over all repetitions of the last year will be averaged over the number of repetitions, so this number will show the average profit that the vehicle made.
  • Linear coastline bias
    Improves the -kind of- lacking "force water on map edge" function contained in OpenTTD's TGP terrain generator. Instead of just cutting into the readily generated map from the edges after water height level has already been selected, we apply a linear bias to the map height before the water level is selected. The linear bias has two configurable values: Strength and range. The strength determines the maximum height (before any smoothing or companding takes place) that is ever added to or removed from a single field's height. The strength is configured as a value from 0 to 80, where 40 represents no strength at all. Selecting a value above 40 will decrease altitude towards the map edge, selecting a value below 40 will increase it. The exact maximum value is determined by subtracting 40 from the configured value and dividing it by 10. The result is multiplied to the difference between average and minimum altitude on the generated map to obtain the maximum value that is subtracted from or added to the map's altitude.
    The range determines how far from the map edge we must go for the bias to lose its effect (configured in 1/16th of the length of the axis perpendicular to the map edge in question). At the map edge, the maximum value of the bias is applied. From there, the value decreases linearly until the distance configured by the range option is reached.
    It is guaranteed that if two adjacent edges are selected as coastline, the bias will only be applied once to each field (even if the areas where the individual biases for both edges overlap).
    This can generate (using a strength above 40) even rough and hilly maps where a proper shoreline exists on the selected map edges. With a strength below 40, it is possible to generate maps with valley-like features, where the water is concentrated in some lakes in the middle of the map. Thread: viewtopic.php?f=33&t=75411
Last edited by coherently_olive on 20 May 2017 15:25, edited 5 times in total.
User avatar
NekoMaster
Tycoon
Tycoon
Posts: 4001
Joined: 16 Aug 2008 22:26
Skype: neko-master
Location: Oshawa, Ontario, CANADA

Re: Minimalistic Patchpack [1.0, 03-11-2016]

Post by NekoMaster »

I would like a Windows binary my self, and while I have MinGW set up for NML, I have yet been able to get it to work with C++ for patching and compiling OpenTTD binaries.

I tried compiling this myself but I get a bunch of errors.

Code: Select all

bash-3.1$ make -b -r -R
make[1]: Entering directory `/d/USERS/MATTHEW/Downloads/ploewner-openttd-minimalistic-patchpack-edfc96dbcfe5/objs/lang'
[LANG] Compiling string.cpp
d:/USERS/MATTHEW/Downloads/ploewner-openttd-minimalistic-patchpack-edfc96dbcfe5/src/string.cpp: In function 'char* strcasestr(const char*, const char*)':
d:/USERS/MATTHEW/Downloads/ploewner-openttd-minimalistic-patchpack-edfc96dbcfe5/src/string.cpp:537:47: error: 'strncasecmp' was not declared in this scope
   if (strncasecmp(haystack, needle, needle_len) == 0) return const_cast<char *>(haystack);
                                               ^
d:/USERS/MATTHEW/Downloads/ploewner-openttd-minimalistic-patchpack-edfc96dbcfe5/src/string.cpp: In function 'int strnatcmp(const char*, const char*, bool)':
d:/USERS/MATTHEW/Downloads/ploewner-openttd-minimalistic-patchpack-edfc96dbcfe5/src/string.cpp:585:26: error: 'strcasecmp' was not declared in this scope
  return strcasecmp(s1, s2);
                          ^
d:/USERS/MATTHEW/Downloads/ploewner-openttd-minimalistic-patchpack-edfc96dbcfe5/src/string.cpp:586:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
make[1]: *** [string.o] Error 1
make[1]: Leaving directory `/d/USERS/MATTHEW/Downloads/ploewner-openttd-minimalistic-patchpack-edfc96dbcfe5/objs/lang'
make: *** [all] Error 1
bash-3.1$
Image Proud Canadian Image
Nekomasters Projects! (Downloads available on BaNaNaS!) \(>^w^<)/
# NARS ADD-ON SET 2CC | 2cc Rapid Transit For Me! (2ccRTFM) | 2cc Wagons In NML (2ccWIN)
# NML Category System (Organize your GRFS!) <- TT-Forums Exclusive Download!
coherently_olive
Engineer
Engineer
Posts: 14
Joined: 24 Apr 2015 17:16

Re: Minimalistic Patchpack [1.0, 03-11-2016]

Post by coherently_olive »

NekoMaster wrote:I would like a Windows binary my self, and while I have MinGW set up for NML, I have yet been able to get it to work with C++ for patching and compiling OpenTTD binaries.

I tried compiling this myself but I get a bunch of errors.
Thanks a lot for trying! Seems very similar to an error i hit the last time I tried compiling OpenTTD on my windows box, if i remember correctly. I might actually try and sort it out over the weekend when I have some time on my hands, or maybe someone can get it to work before then.
Just out of interest, have you tried compiling it on a linux machine? The usual autotools / GCC worked on my end, I'm just worried that I pushed a defunct version to the bitbucket by accident...
User avatar
NekoMaster
Tycoon
Tycoon
Posts: 4001
Joined: 16 Aug 2008 22:26
Skype: neko-master
Location: Oshawa, Ontario, CANADA

Re: Minimalistic Patchpack [1.0, 03-11-2016]

Post by NekoMaster »

coherently_olive wrote:
NekoMaster wrote:I would like a Windows binary my self, and while I have MinGW set up for NML, I have yet been able to get it to work with C++ for patching and compiling OpenTTD binaries.

I tried compiling this myself but I get a bunch of errors.
Thanks a lot for trying! Seems very similar to an error i hit the last time I tried compiling OpenTTD on my windows box, if i remember correctly. I might actually try and sort it out over the weekend when I have some time on my hands, or maybe someone can get it to work before then.
Just out of interest, have you tried compiling it on a linux machine? The usual autotools / GCC worked on my end, I'm just worried that I pushed a defunct version to the bitbucket by accident...
No I have not tried compiling on linux and I'm pretty sure the information on how to cross compile is outdated and useless now. Also I don't like how Linux handles multiple monitors and verticle task bars these days, everythings way too fancy and thus a lot of performance and function has been lost in my opinion. Last time I really used linux as my daily driver was when 10.04 Ubuntu/Xubuntu was just released and going strong.
Image Proud Canadian Image
Nekomasters Projects! (Downloads available on BaNaNaS!) \(>^w^<)/
# NARS ADD-ON SET 2CC | 2cc Rapid Transit For Me! (2ccRTFM) | 2cc Wagons In NML (2ccWIN)
# NML Category System (Organize your GRFS!) <- TT-Forums Exclusive Download!
coherently_olive
Engineer
Engineer
Posts: 14
Joined: 24 Apr 2015 17:16

Re: Minimalistic Patchpack [1.0, 03-11-2016]

Post by coherently_olive »

NekoMaster wrote:I would like a Windows binary my self, and while I have MinGW set up for NML, I have yet been able to get it to work with C++ for patching and compiling OpenTTD binaries.

I tried compiling this myself but I get a bunch of errors.
I think I got it now. Updated the first post with binaries for Windows (32-bit, so it should work on 64-bit as well) and Linux (64-bit only). This is my first binary release so I don't really know if I included all the right files, if there's something wrong with it let me know.

By the way, I tried using MinGW, but that was not very successful. Got it to compile with a few warnings in Visual Studio after a few obvious code changes and to link after re-running 'generate'.
Martin066s
Engineer
Engineer
Posts: 1
Joined: 24 Jun 2016 16:35

Re: Minimalistic Patchpack [1.3, 2016-11-13]

Post by Martin066s »

Hallo cosherently_olive,
zunächst einmal danke dass du dir die Mühe gemacht hast für die Zuschauer und vielleicht auch andere dein Patchpack zu veröffentlichen.
Leider weiß ich nicht, wie ich das Patchpack verwende. Ich kann einmal nicht so gut Englisch, zum anderen verstehe ich leider nicht so viel von C++ (sorry wennn ich mich irre) habe aber schon eineinhalb Jahre Informatik Unterricht (wöchentlich 2 Stunden). Ein bisschen verstehe ich also schon. Schreib bitte eine Antwort(oder mach ein Video wenn es zu kompliziert ist) in der du mir erklärst welche Schritte ich machen muss damit ich deine Version benutzen kann. Ich benutze Windows 7 32 bit als Betriebssystem. Ich wollte noch loswerden dass ich auf Youtube leider nicht angemeldet bin und mich auch nicht anmelden kann(da ich kein Handy oder Smartphone besitze), und ich deswegen keinen Kommentar schreiben kann oder dich abonieren kann, ich aber trotzdem deine Videos schätze.
Also danke für die Antwort schon mal
Last edited by Martin066s on 16 Nov 2016 18:34, edited 1 time in total.
coherently_olive
Engineer
Engineer
Posts: 14
Joined: 24 Apr 2015 17:16

Re: Minimalistic Patchpack [1.3, 2016-11-13]

Post by coherently_olive »

Martin066s wrote: Schreib bitte eine Antwort(oder mach ein Video wenn es zu kompliziert ist) in der du mir erklärst welche Schritte ich machen muss damit ich deine Version benutzen kann.
Hey, habe dir eine Antwort in einer privaten Nachricht geschrieben.

For people not speaking German: The question was less about features or bugs in the patchpack and more about how to obtain and install it. We'll be continuing the conversation in private.
coherently_olive
Engineer
Engineer
Posts: 14
Joined: 24 Apr 2015 17:16

Re: Minimalistic Patchpack [1.4, 2017-05-20]

Post by coherently_olive »

Giving the thread a little bump because of updated information in the original post. Released v1.4, which is now based on OpenTTD-1.7.1-RC1 and fixed a few bugs (one of which could potentially crash the game).
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: Google [Bot] and 11 guests