TTDPatch - The Transport Tycoon Deluxe Patch

Development versions

(see below for the list of files)

Current version: 2.5 beta 9 from October 29, 2006.

You can read the announcement with any instructions or notices about this version in the mailing list archives.

Terminology:

  • Alpha is a development version not tested by anyone but myself, and may or may not contain serious bugs. Please be aware that it might crash or hang TTD, or your computer. It probably won't, though.
  • Beta has already gone through a fair amount of testing by other people, and should be fairly stable, but might still have some rare bugs or crashes.
  • Nightly is the current state of patch development, compiled each night. These versions are extremely cutting edge, they contain the code as it is being developed and may be very unstable. These builds are available on nightly.ttdpatch.net (thanks to Patric Stout & Miham Kerekes for providing them).

For even more cutting edge code, feel free to browse or check out the TTDPatch Subversion repository (graciously hosted by Owen Rudge).

Recent Changes:

  • In 2.5 beta 9 (r1170; October 29, 2006):
  • by Csaboka:
    • bug fixed: turning newindustries on reintroduced the "temperate banks on tropic" TTD bug
    • fixed crash when enabling new industries in existing game
  • fixed cargo type FE not working in action 3
  • debug switch 'r' to not run TTDLOAD(W).OVL directly
  • fixed crash when running out of memory
  • fixed crash while processing action 1/5 blocks with pseudo-sprites shorter than 8 bytes
  • fixed bug reserving several pieces on a tile when train fails to reverse
  • fix base graphics not getting loaded unless another .grf was loaded as well
  • fix pathfinding issues with irregular station if north tile not part of station
  • fix missing cargo type suffix in train info window
  • by DaleStan:
    • Fix bitswitches with all bits set off being read as if the switch was off.
    • Fix gamespeed switch being written to ttdpatch.cfg as unsigned.
    • Make Cht:Face work without a space between the : and the F.
    • Fix Cht:Face potentially returning "Cht:Face h".
    • Fix Cht:Face and Cht:Used overwriting their names with the returned value.
    • Make Cht: XXXX ? always show cost even for cheats that don't cost.
    • Make Cht: XXXX ? not set the bit in Cht: Used.
    • Use zlib to compress ttdprot?.bin.
  • correctly display non-ASCII characters in directory names
  • fix crash with directory names containing characters with no glyphs in Unicode mode
  • by Lakie:
    • fixed a bug in resizing depot windows when 32px mode was on
  • fixed bogus sprite error when calling a procedure beyond sprite 255
  • by JGR:
    • split first line of land info window as necessary
    • fix window resizing code with >127 entries
  • fixed station overbuilding to adjust the overwritten tile's numtiles
  • by stevenh:
    • miscellaneous tram fixes
    • show tram depot graphics in tram construction window
    • fixed incorrect display of tram tracks on bridge with adjacent level crossing
    • fix bug causing some newly built roads to also have tram tracks
    • change message for first vehicle arriving at station to indicate trams correctly
  • add "name" property in addition to "desc" for switches.xml categories
  • prevent loading multiple GRFs with identical GRFID (except for FFFFFFFF)
  • fix lockup when reversing train with multiple reserved pieces on a custom bridge head
  • fix consist variables/callbacks not being updated when selling wagon
  • add bridge sounds to callback 33 (via generic feature 6 callback)
  • fix "line too long" warning if it's a bit switch description (or any other comment)
  • correctly translate characters B9, BC and BD in UTF-8 mode
  • don't crash when trying to display a text ID that's out of range
  • allow action 12 to overwrite unicode characters 9E..BD
  • calculate speed for new vehicle after var 40+x cache is initialized
  • ensure map and news history windows are not larger than screen when loading game
  • fix news history sometimes having wrong number of items after loading game
  • don't abort grf initialization due to resource conflict
  • prevent trains from reserving a path out of a depot if the surrounding signals are manually set non-PBS signals
  • fix new aircraft getting wrong cargo type
  • prevent cursor keys from interfering with hotkeys in DOS
  • fix new freight aircraft having incorrect capacity, and try use callback 15 to determine capacity if enabled
  • fix draggable diagonal track building track across the entire map when moving cursor into different window or outside of map
  • fix no-fail GRM operations not working
  • remove miscmods.loaduntilgreen, it was never actually implemented
  • allow CB18 to use the cargo translation table

  • In 2.5 beta 8 (r781; August 7, 2006):
  • fixed UTF-8 characters 7B..7F having zero width
  • ignore action 3 and action A if GRFID is FFFFFFFF and given ID/sprite already has a definition/replacement
  • fixed broken vehicle windows or crashes when buying vehicles
  • allow specifying debug switches multiple times to increase value
  • change switches.xml to have category tree
  • implement grf debugger sign cheat
  • by Lakie:
    • make Landinfo cheat available outside of debug compiles
    • fixed a crash in cht:landinfo which happens if a Landscape isn't enabled
  • fixed trains trying to leave a PBS depot reserving the depot tile even if they can't find a path
  • fixed GRM conflict not actually deactivating conflicting file
  • show conflicting resource for vehicle GRM
  • move town growth switches to their own category
  • fixed ship and aircraft lists not changing the number of displayed items when changing window size in DOS
  • in German DOS TTD, <tab> is now used by default to toggle the bulldozer
  • show patch version in GRF Status debug file
  • fixed hang when building road bridge adjacent to rail tunnel with trams on
  • make sure broken down aircraft are no slower than 80 mph to prevent them from getting stuck
  • check that ttdpbase(w).grf is loaded and is the right version
  • fix problem if followvehicle is active while loading a game
  • fix AI companies being sold off not clearing all their tiles
  • fixed problem building tram stops when newstations is off
  • fix tunnels in cooperative play with enhancetunnels on
  • fix cargo in all but first vehicle of articulated wagons having no weight
  • improve display of articulated vehicles in train info window

  • In 2.5 beta 7 (r631; July 16, 2006):
  • by Oskar:
    • fixed display of dikes with seelevel canals and cliffs
    • make enhancetunnels depend on higherbridges to avoid jumping vehicles at tunnels
  • updated Polish, Russian, Norwegian, Finnish, Danish, Spanish and Catalan translations
  • by Lakie:
    • fixed canals at sealevel not being saved when building a buoy
    • fixed drawing of buoys on canals
    • fixed bug in flooding diagonally
    • prevent flooding diagonally through canals
    • fixed the train list window to use the new train counter
  • add var 7E to allow procedure calls in var.action 2
  • fixed crash in train grfs using var 42
  • AI player's vehicles no longer count for persistentengines
  • allow wagons to expire
  • allow action D variables to be set during initialization as well (in addition to activation)
  • by Csaba:
    • fixed memory overwrite in moreanimation code
    • fixed hangars being possible to add to schedules for types other than aircraft
  • fixed incorrect station display if >4095 cargo units
  • fixed crash if mouse cursor sprite is larger than 6400 pixels

  • In 2.5 beta 6 (r472; June 16, 2006):
  • updated Czech, Spanish, French translations, added Catalan translation
  • fixed action D global variables getting set as soon as flag is green
  • by steven_h:
    • implemented truck stops
    • made plane speed in callback 36 update whenever movementstat changes
  • by Csaba:
    • fixed FIFO data being stuck if an order is skipped manually
    • fixed station trigger 3 and animation trigger 4; now they should work even without gradualloading
    • fixed Unicode crash if non-ASCII manager initials were used
    • added industry variable 64 for checking the distance of closest industry with given type
    • fixed TTD bug: halving max. production causes zero production
    • fixed TTD bug: vehicles stopped then restarted again retained their old speed
    • fixed displaytownsize breaking newtownnames, causing duplicate names and incorrect order
    • fixed bug: cargo cost multipliers were applied incorrectly, sometimes causing a crash
    • fixed bug: ships sometimes had incorrect default cargoes and refittability
  • by Oskar:
    • fixed display of coast under higherbridges if canals is off
    • fixed canals/higherbridges coast code, reduced size
    • changed the diagonal flood code by Lakie, less code called by tick, bridges use the action 5 coast sprites aswell
    • new routine for the company vehicle summary so it allows more then 255 vehicles
    • fixed clicking train refit/reverse button, refit wrong button gets pressed, reverse button not at all
    • added hack to generalfixes to show long directory names in WinTTD
  • fixed bug where entering à opens the "Quit game" window
  • stop action D sprite GRM from allocating sprite in main menu GRF status window
  • added categories to all switches (shown in switches.xml output)
  • loadallgraphics switch has been obsolete for a while; marked it as such
  • fixed veh.var 45 having inconsistent values
  • make callback 36 support train prop 25
  • by Lakie:
    • now flooding diagonally from slopes into the sharp corners as well
    • implement 32px vehicle separation in train depot (grf var 9E bit 3)
    • fixed a TTD bug which allowed tiles under a bridge to flood with a vehicle on them
  • support for 64bit cash values

  • In 2.5 beta 5 (r352; May 28, 2006):
  • by Csaba:
    • added callbacks 140, 141 and 142 for station animations
    • fixed electrifiedrail patch code overwriting some random memory (this fixes a crash on startup with enhancegui off)
    • fixed some incorrect cargo type handling for GRFs with version 7
    • the language of the EXE is now restored correctly when all translation GRFs are disabled
    • industries now can request random bits for the production callback
  • by Lakie:
    • allow water to flood diagonally (disable with miscmods.nodiagonalflooding on) and support graphics for resulting coasts
  • by eis_os:
    • fixed crash while creating grf debug log if grf had error condition
    • new switch "forcegameoptions" to set default game options
  • renamed -Z switch to -XZ to later allow -Z? extended switches
  • when fragment search fails show name of failed fragment and its patch proc
  • fixed zeppelin crash bug getting patched twice
  • updated German, Dutch, Italian and Hungarian translations
  • fixed train reversing problems with PBS in DOS
  • update consist callback variables when train reverses and in depot
  • changed station var.45 bits 4..7 to refer to connection to neighbouring platform not further along platform direction
  • fixed bit switch descriptions not being written with correct charset
  • fixed problem finding AI buy vehicle code if not all newvehicles switches are on
  • fixed problem with wrong variables being available in purchase window
  • fixed cargo types without cargo labels not being available for refit
  • action 7/9 check 0A now jumps if the GRFID is not found at all
  • fixed tenders errorneously appearing in purchase list

  • In 2.5 beta 4 (r130; April 30, 2006):
  • prevent "ignore signals" button from working in depot unless entire train is in depot
  • fixed ghost depots appearing after removing track from railroad crossing over town roads
  • fixed crash when too many station sets were activated
  • fixed morestatistics showing Manage button even with subsidiaries off
  • by eis_os:
    • changed onewayroads to only show markers when road building is active
    • added "debug" button to grf status window, writes info to grfdebug.txt
  • fixed hang when loading game if save had too many animation tiles
  • fixed handling of language ID bytes with bits 6 and 7 set
  • by Csaba:
    • fixed wrong industries appearing with newindustries on but newhouses off
    • text modifications are now applied to GRF texts as well
    • text modifications now handle UTF-8 correctly
    • fixed incorrect rail menu with unifiedmaglev=2 and electrifiedrails off
    • fixed crash if langID is changed via a GRF
    • fixed: callback 3D put the cargo type into the wrong variable
    • fixed toy factory breaking with newindustries (animation is reduced now)
  • (devel) ensure all sprite blocks always have a valid cargo translation table
  • fixed bug with "freighttrains off" still applying default multiplier of 5
  • fixed crash in industry production callback
  • grf language ID handling changed; grf version up to 6 use bit mask, from 7 on use language numbers
  • change value 00 in action F language ID to be american language if it is the first entry
  • fixed ship/plane vars 40+x getting wrong values after loading a game
  • fixed broken glyphs when disabling a font grf
  • (devel) makelang now checks for duplicate entries
  • fix PBS train crashes if train tries to reserve looping route
  • fix PBS train crashes if train cannot reverse
  • by steven_h:
    • fixed LocoGui build station from resetting 'station highlight area' to 1x1 when double-clicking on build station button.
    • tram/road depots now respect transparent buildings
  • fixed crash with enhancetunnels on but manuconv off
  • fixed status bar news messages are missing first char and having wrong colour in unicode mode

  • In 2.5 beta 3 (r50; April 10, 2006):
  • fixed "OK" button in text input window in unicode mode corrupting characters
  • fixed messed up F800+x text IDs, added check to prevent this in the future
  • fixed bug with secondary industries constantly closing down
  • default state of "experimentalfeatures on" no longer includes mandatory GRM
  • by steven_h:
    • fixed "rename" button in RV purchase list renaming wrong vehicle
    • fixed bus stops being drawn as tram stops when tram-stop-build window is opened
  • fixed crash in verbose switch display
  • fixed crash when right clicking statistics button in player window
  • by Oskar:
    • prevent duplicate manual track type conversion of enhanced tunnels
    • enabled screenshot grfid function for DOS
    • (devel) dump grf status debug info
  • by Csaba:
    • allow merging foundations for houses
    • added callback 3C to disable autosloping for certain industry tiles
    • added industry tile var 61 and industry var 63 to get animation stages for nearby tiles
    • fixed wrong offsets of text in news messages
    • fixed crash when typing too much into an edit box in Unicode mode
    • added industry tile var 61 and industry var 63 to get animation stages for nearby tiles
  • when station is permanently removed, clear cargo from all vehicle transporting its cargo as well as cargo waiting at other industries to prevent crash
  • increased max.number of refit options to 256
  • fixed crash when using obsolete sign cheats
  • changed "too many sprites" error message to more elaborate grf conflict message also showing which resource and sprite are giving trouble

  • In 2.5 beta 2 (r10; April 2, 2006):
  • prevent crash if grf file forgets to set running cost base
  • by stevenh:
    • fixed hang when removing certain road tiles
    • truck button on tram bar disabled
    • standard bus stops disabled in build tram stop
    • texts fixed on tram toolbar and windows
    • building tram tracks over a depot no longer gives you ~$4,000,000,000
    • trees in desert repaired
    • custombridgeheads now works with tram tracks
    • misc tunnel/bridge infinite loops repaired
    • added more tram texts
    • tram depots only show trams and RV depots only show RVs
    • fixed problem when removing rail track from level crossings
  • with newindustries, the last industry of any type (except temperate oil wells) will never close down to preserve the full variety of industries
  • vehicle var FF bit 0 is toggled whenever train reverses
  • by Csaba:
    • bugfix: GRF version 7 support didn't work for callback 2F (mostrecentgrfversion wasn't loaded correctly)
    • bugfix: callback 2e didn't support GRF version 7
    • (devel) removed leftover code of moreindustriesperclimate
    • From now on, the middle height of the tile is considered when deciding snowyness, not the lowest. (Can be turned off by miscmods.dontchangesow)
    • Animation callbacks can now request random bits for randomizing animations
    • Bounding boxes are now limited to FFh instead of overflowing if a high building is built on high land.
    • changes to station property 12: now it either means cargo bits, or respects the cargo translation table
    • bounding box offsets are now considered signed, and values other than 0..Fh are now accepted
    • (devel) Centralized terrain type calculation. Now everything uses gettileterrain in newhouses.asm instead of three independent implementations.
    • New industry tile animation trigger 4 for starting animation when cargo is distributed from the industry
    • new returnable values for callback 29/35 to multiply/divide by 4/8/16/32
    • the screen is now updated every time the snow line height changes
    • new station variable 65 to get cargo acceptance
    • station variables 60..65 now respect cargo translation tables in GRF version 7
    • (devel) the load/unload patch is now applied always, a lot of stuff needs it anyway
    • Increased the amount of checked tiles while redrawing an area, hopefully fixes graphic glitches with high building built on high altitudes
  • by Oskar: store active GRFIDs in screenshot
  • fixed vehicle property for "not allowed" cargo classes
  • fixed possible crash when building locks on unsuitable slope
  • made it possible to translate bit switch descriptions
  • fixed incorrect max. tractive effort calculation
  • fixed window title in UTF-8 mode having invalid characters
  • allow certain 40+x/60+x vars to be used in purchase list
  • (devel) eliminate tons of conditional jumps in var.action 2 code by unrolling it, should be quite a bit faster now
  • fixed slowdown when train window open
  • (devel) fixed bug in newgrf performance profiler, added profiling of random/var.action 2 overhead
  • fixed unicode input in non-latin1 system codepages

  • In 2.5 beta 1 (r9; February 26, 2006):
  • fix problems/crashes related to town grfs (fixed text problems too)
  • fixed crash with rv/tram tunnels with abandonedroads off
  • added missing switches to grf var 85
  • new experimental switch "mandatorygrm" to require that grfs reserve the IDs they use (will break many old grf files; only for authors)
  • fixed PBS with enhancetunnel bridge pieces
  • by Oskar: show reserved PBS pieces on enhancetunnel bridges
  • fixed newsounds crash if no sound hardware present
  • allow autoreplace to choose model with wrong refittability as long as default cargo type matches
  • by stevenh: fixed tunnel lockups when a tunnel was placed on top of another tunnel
  • by Csaba:
    • fixed newcargo price factors being calculated incorrectly
    • new global variable 10: snow line height table (give a snow line height for every day of the year)
    • (devel) renamed gethouseterrain to gettileterrain since it works for all tiles, not just for houses
    • industry variable 61 now contains the terrain type as well
    • added var. action 2 global variable 20 to get the snow line height
    • added action 5 type 0C * snowy versions of temperate trees
    • the snowline variable is now set to FFh for non*snowy games to make GRF coders' lives easier
    • (revert) industry variable 61 no longer contains the terrain type
    • added parametrized industry variable 62 to get landscape info about nearby tiles
    • bugfix: callback 3B didn't work correctly for effect 0; it was always planting fields no matter what the callback returned
    • bugfix: callback 22 is now enforced when building the industry as well
    • new industry variable B3h (byte), shows how the industry got built
    • industry variable A7h (byte) now contains the funder of the industry
  • fixed bug with plane colour schemes not considering cargo classes for passenger/freight determination
  • fixed early retirement for planes and ships setting train retirement instead
  • by Lakie: added train props 0B and 1F to callback 36
  • fixed(?) early retirement property breaking persistentengines
  • made ai boost and moreindustriesperclimate obsolete
  • fixed font size and newhistory problem in utf8 mode

  • In 2.0.1 alpha 73 (r8; February 13, 2006):
  • made callback 33 takeoff sound work for helicopters
  • fixed vehicles being unable to enter enhanced tunnels
  • fixed bug in DOS crash logger occasionally writing giant crash log
  • by stevenh:
    • fixed crash when displaying tram bridges
    • fixed bridge display problem if trams on but buildonslopes off
    • when removing a bridge, tram tracks under it stay
    • repaired rv and tram depot finding
    • misc. graphical fixes for tram tracks on bridges and in tunnels
  • (devel) added -xt option to OpenWatcom to prevent DGROUP overflow
  • by Csaba:
    • added industry variable 60 to get tile IDs
    • added industry variable 23: industry remove cost multiplier
    • allow lumber mill to have two output types
    • added callback 3B to control special industry effects
    • new industry var 61 to get random bits of an industry tile
    • allow industry production callback to have some state information
  • defined language ID 3F to match any language setting
  • finished UTF-8 support and font glyph loading (action 12)
  • made higherbridges and grf helper window texts translatable
  • fixed crash with enhancetunnels on if no newgrf files loaded
  • fixed crash with multiple station IDs in one action 3
  • reduced newplanes/newships/newhouses sprite limits to stay within 64K sprite limit

  • In 2.0.1 alpha 72 (r7; February 6, 2006):
  • by Csaba:
    • added possiblity to disable old house types by setting property 8 to FFh
    • added cargo properties 18 and 19 to allow changing how the cargo affects town growth
    • cargo callback 39 allows fine *tuning how much income the player gets from delivery
    • changed industry var. 60 to include landscape class info
    • added house variable 62, which works the same as industry variable 60
    • added industry callbacks 38 (show extra info in fund window) and 3A (show extra info in industry window)
    • bugfix: disabling default industry types didn't work always
    • widened the new industry fund window so text fits better
    • bugfix: opening the industry fund window caused graphics glitches and crashes
    • added var 8D (square of Euclidean distance from town) to callback 28
    • modified the vehicle list sorting code, hopefully it will become faster
  • fixed crash in callback 2E
  • by stevenh:
    • fixed RVs not overtaking
    • fixed tram tunnels... (build tram tracks against a tunnel and they automatically choose to be tram only or road only or both)
    • fixed tram tunnels with enhanced tunnels
    • fixed towns building crap around tram tracks
    • fixed masses of trees
  • Cht: Used now shows cheat bits>31 (and omits leading zeroes)
  • veh var 47 now holds info about cargo unit weight
  • moved noregistry and newsounds code into ttdpatch.dll (this fixes the noregistry stuff for 2k/XP where it sometimes didn't work)
  • enhanced tunnel fixes by Oskar:
    • prevent removing tunnels with train on bridge above tunnel entrance
    • fixed some graphical glitches
    • fixed cht: tracks
  • (devel) added last patch proc to crash log
  • fixed bug with mixed-power trains breaking when entering a non-electrified tunnel
  • fixed crash/glitches in vehicle colours (2cc code) if enhancegui was off
  • fixed 2cc vehicles being all black if no ccol2.grf loaded

  • In 2.0.1 alpha 71 (r6; January 23, 2006):
  • fixed grf files not activating correctly
  • fixed callback 36 not working in DOS

  • (older change log available here)

Here you find the latest development versions of TTDPatch.

Scroll to the bottom of the page to see a verbose description of each file.


../
diffs/                                            2013-Jul-28 22:07                   -
newgrfdemo/                                       2006-Apr-17 17:04                   -
old/                                              2013-Jul-28 22:07                   -
COPYING                                           2004-Jan-04 16:01               17984
Changelog                                         2006-Oct-30 04:10              201403
latest.zip                                        2006-Oct-30 04:10              484399
latestw.zip                                       2006-Oct-30 04:10              468167
oldchanges.html                                   2006-May-19 03:05              203675
todonow.txt                                       2006-Oct-30 04:10               24486
ttddos_ida41.zip                                  2006-Aug-09 23:08             2148947
ttdwin_ida41.zip                                  2006-Aug-09 23:08             2091307


Copyright © 1999-2006 by Josef Drexler.
 
Last changed on Oct 31 2004 20:47 EST by Josef Drexler