Installing a patch/diff file
Moderator: OpenTTD Developers
Installing a patch/diff file
I have read many forum posts regarding installing a patch/diff file but I still don't understand how to do it or how it works. What type of knowledge, programs and files do I need? How to do it, step by step? If someone could help me understand it, from start to an end, I will really appreciate it (Also please describe this as you're explaining it to a 5 year old kid, 'cause most of the time while reading posts regarding these topics I find myself very confused)
Re: Installing a patch/diff file
Patches are a tool for programmers to share code modifications with other programmers. And while with some luck you may be able to apply patch without having to understand C++ code it's still a somewhat complicated process for a 5 y/o 
So, basically, first question you should ask yourself when trying to apply a patch is do you really need it. There are plenty of patchpacks that include a lot of useful patches and provide a compiled binary that you can just run without having to do all the hard work yourself. Main two patchpacks atm are:
JGR's (more features, can't be used in mp with vanilla servers): viewtopic.php?f=33&t=73469
CityMania (mostly ui features, can be used in mp): https://citymania.org/downloads

So, basically, first question you should ask yourself when trying to apply a patch is do you really need it. There are plenty of patchpacks that include a lot of useful patches and provide a compiled binary that you can just run without having to do all the hard work yourself. Main two patchpacks atm are:
JGR's (more features, can't be used in mp with vanilla servers): viewtopic.php?f=33&t=73469
CityMania (mostly ui features, can be used in mp): https://citymania.org/downloads
Re: Installing a patch/diff file
I actually have been already playing on JGR's pack, but I've also found a really nice patch that isn't included in this pack, so maybe I should've asked if it's possible to install an additional patch to it
Re: Installing a patch/diff file
A patch is just a suggested change to a program's source code. It is formatted in such a way that special tools can apply this change automatically, but you can also edit the source files manually to the same effect.
Importantly, there is no guarantee that:
Importantly, there is no guarantee that:
- the patched program will work as intended;
- the patched source code can be compiled into an executable file;
- the patch can be applied to your version of source code at all.
My add-ons: • AdmiralAI fix • Persistence for vehicle evolution lines
My pictures: • The animation thread
My pictures: • The animation thread
Re: Installing a patch/diff file
I suppose that with my coding skill (which are non existent), I will not be able to add a patch to a pack, but what if I want to patch a vanilla version of OTTD? How to do it?
Re: Installing a patch/diff file
Most of the time a patch is created and based against a specific version of the nightly OpenTTD source code. This source code is updated very regularly (sometimes every day), so whatever was written at a particular point in time may no longer work on a future version of the code, even if it's just a day old. And, unfortunately, often times a patch file is written by an individual who doesn't stick around forever and keeps the patch updated.
The patch/diff file is a set of instructions that boils down to "find line [x], add/remove this string of text". That's the easy part. The hard part is know what to fix, and how to fix it, if the new code doesn't compile into a binary, or if the new binary doesn't work correctly.
The patch/diff file is a set of instructions that boils down to "find line [x], add/remove this string of text". That's the easy part. The hard part is know what to fix, and how to fix it, if the new code doesn't compile into a binary, or if the new binary doesn't work correctly.
Do you like drones, quadcopters & flying toys? Check out Drone Strike Force!

Base Music Sets: OpenMSX | Scott Joplin Anthology | Traditional Winter Holiday Music | Modern Motion Music
Other Projects: 2CC Trams | Modern Waypoints | Sprite Sandbox & NewGRF Releases | Ideabox | Town Names | Isle of Sodor Scenario | Random Sprite Repository
Misc Topics: My Screenshots | Forgotten NewGRFs | Unfinished Graphics Sets | Stats Shack | GarryG's Auz Sets

Base Music Sets: OpenMSX | Scott Joplin Anthology | Traditional Winter Holiday Music | Modern Motion Music
Other Projects: 2CC Trams | Modern Waypoints | Sprite Sandbox & NewGRF Releases | Ideabox | Town Names | Isle of Sodor Scenario | Random Sprite Repository
Misc Topics: My Screenshots | Forgotten NewGRFs | Unfinished Graphics Sets | Stats Shack | GarryG's Auz Sets
Re: Installing a patch/diff file
Which patch file, specifically, are you looking to use?
Ex TTDPatch Coder
Patch Pack, Github
Patch Pack, Github
Re: Installing a patch/diff file
I wanted to use this one: viewtopic.php?f=33&t=56933
Re: Installing a patch/diff file
There is a fork of my patchpack here which appears to already include this patch and is quite up to date.
It may be easier to try using that instead of doing the integration yourself.
I haven't actually tried that fork, so can't make any guarantees, etc.
Ex TTDPatch Coder
Patch Pack, Github
Patch Pack, Github
Re: Installing a patch/diff file
Thank you! I appreciate it
Who is online
Users browsing this forum: Semrush [Bot] and 14 guests