Great news or perhaps new breath of life for TT_Orig

Talk about the classic original version of Transport Tycoon.
User avatar
SirkoZ
Tycoon
Tycoon
Posts: 1518
Joined: 06 Mar 2004 23:51
Location: The sunny side of Alps

Great news or perhaps new breath of life for TT_Orig

Post by SirkoZ »

Greetings all potential still-TT_Orig players who don't mind to renew your trains by hand and crash an AI train or two! :-)

I'll try to make this short and sweet - success not guarantied;
Perhaps a month ago out of curiosity, I downloaded the file ttddos_ida41.zip from Josef's site (ttdpatch.net/src) and I discovered a nice collection of TTD functions with readable values - still in assembler though - but really easy to understand, if you search the net for explained assembler instructions.
So - I thought - is this it? Will I finally be able to change the TTD the way I always wanted to and not having to use TTDPatch for better functionality? Well - I've also had the OpenTTD 1.0 and checked the functions there - C is more readable to me than assembler... :wink:
So - after some searching and scratching my head I have managed to find and change these essential behaviours in TTD.exe (DOS or windoze - doesn't matter - easily found once you got for one).
These behaviours include, but are not limited to:
1.) Train Mountain climbing speed - you could call it realistic acceleration without the patch. :-)
2.) Consequently - with faster mountain climbing - one needs to up the speed to which the diesel_smoke is emitted when locomotive is stressed.
3.) Changed station ratings - so they are calculated similarly as in TT_Orig.
4.) AI gets no bonus for being more "intelligent" (a setting in "difficulty settings").
5.) With better train hill handling I just couldn't leave road vehicles in a limbo - so better hill handling for them too!
6.) Also - changed the frequency of industry production changes and chances for increase/decrease are bigger with higher/lower station ratings (mainly experimental but interesting).

So - now that we all know how I came to there let's go on.

Since DOSBox 0.7.0 (a great DOS emulator with great (oldie) game compatibility) has been released with the new feature, that adjusts CPU cycles automatically - so the game is always fluent and you can't accidentally up it to 100% that would make your computer stutter, I tried playing TT_Original a bit and I was really happy with it.
So - I said I'd change TT_Original so that it too would have realistic acceleration, the most missing of all features, in my opinion and yesterday evening I succeded.
Now - my accelerated TT_Orig .exe (tycoonac.exe) has:
1.) Nearly realistic train/monorail mountain handling
2.) More diesel_smoke emitted
3.) and of course - realistic road vehicle incline handling.

The functions themselves in TTOrig are somewhat different than in TTD, but one can quite easily navigate them if having the hex code and addresses of TTD written down. Even the industries would be easily change-able to some extent, but so far I would only change the nasty thing of closure if you transport more than 50% in fluctuating economy (except Forest and Oil Rig). A similar demistified TTD memory dump would be of great help, but so far I have no idea of how to get it - I'll ask Mr Patchman...

The actual addresses:
Since the TT_Original (without scenario editor - I'm sure there are the exeact same functions but on slightly different addresses) uses only 1 file (english), there is less files to take care of. :-)
1.) BETTER TRAIN MOUNTAIN HANDLING (realistic accel. of sorts):
A) MONORAIL: Search for the function (in a hex editor) - rought address:
5d830h or -837h

Code: Select all

EA 02 28 56 32 EB 10 8A 56 32 80 C2 02
Now - if you change the two "02" parts to 04 - you will get the realistic behaviour, if however change it to 06 or 08 - monorails won't slow down on hills at all.
Same for
B) RAILWAY: Search for the function - rough addy - 4b040h or -045h

Code: Select all

EA 02 28 56 32 EB 10 8A 56 32 80 C2 02
Again the two "02"'s are the values - 04 for realistic acceleration, 08 for no speed loss on hills - together with high train speeds - for a loco-Tycoon version. :D

2.) More Diesel_smoke - change of the upper speed limit of showing it:
At roughly the address of 4b1a0h (28 @ -1a2h) you'll find the coded function

Code: Select all

80 7E 32 02 0F 82 E0 00 00 00 80 7E 32 28 0F 87 D6
The "02" and "28" are min and max speeds (in hexadecimal system) in km/h between which the diesel_smoke effect will be shown.
That means that normally - travelling between 2 and 40 km/h - the diesel locomotive will emit smoke. I have upped the limit of "28" to "4F" which is 79 km/h which goes well with the new-found "realistic acceleration for TT". :-)

3.) Last but not least - road vehicle mountain handling at 50ca0h (-ca2h):

Code: Select all

77 0A 8A 56 32 C0 EA 02 28 56 32 C3...
The "02" is the value to change to 04 or higher if you want realistic or lossless mountain climbing for road_vehs.

With the changes listed here TT is as stable as before and much more playable.

More to come perhaps.
For now - the nullifying (literally) of advantage of AI/competitor station ratings is also readily available - just search for

Code: Select all

00 00 1F 00 3F 00
- tis somewhere in the beginning of tycoon.exe and you'll find only one instance of it in the whole file. If you change the "1F" and "3F" to "00", the AI will have the same station ratings as you - so more fair competition if you will although their rail connections are simply awful or simple and many times awful. :-)

Anyhow - if anyone wants the modified exe (tycoonac.exe) and a save-game with bidirectional over-the-hill-railways although TTOrig only has two way signals, you can PM me.

Enjoy TT_Orig with the great DOSBox under WinNT! :wink:

S/Z
User avatar
orudge
Administrator
Administrator
Posts: 25225
Joined: 26 Jan 2001 20:18
Skype: orudge
Location: Banchory, UK
Contact:

Post by orudge »

Hmm, I may need to fire up TTO sometime, in Virtual PC, or by investigating dosbox. I did do a little bit of TTO hacking some time ago, as I think I told you in the PM - will be interesting to play with your findings!
User avatar
m3henry
Tycoon
Tycoon
Posts: 1985
Joined: 15 Feb 2006 12:00
Location: Hampshire

Post by m3henry »

DOSbox.
D-Fend DOS program configurator.
The occasional look back at your past can teach you a great many things...
User avatar
SirkoZ
Tycoon
Tycoon
Posts: 1518
Joined: 06 Mar 2004 23:51
Location: The sunny side of Alps

Post by SirkoZ »

orudge wrote:Hmm, I may need to fire up TTO sometime, in Virtual PC, or by investigating dosbox. I did do a little bit of TTO hacking some time ago, as I think I told you in the PM - will be interesting to play with your findings!
Yes - do try them - even though the changes are simple as can be - they really enhance the good old TT - now all we need is autorenew and autoreplace, but I think I can simulate those 2 with setting all the vehicles' "lifetimes" to FF (I really like the engines_persist switch in TTD Patch). :-)
I hope it's stored in such way...

I'll get on it soon-ish. :-)

Yes - DOSBox is in my opinion too - an easier way to get TT running in WinNT than VirtualPC. I gotta try the latter one though - haven't yet. :-)
User avatar
athanasios
Tycoon
Tycoon
Posts: 3138
Joined: 23 Jun 2005 00:09
Contact:

Post by athanasios »

SirkoZ wrote:Yes - DOSBox is in my opinion too - an easier way to get TT running in WinNT than VirtualPC. I gotta try the latter one though - haven't yet. :-)
I wouldn't recommend it. It is somewhat slow.

Nice the patches but I feel no urge to play original as long as there are no one way signals. I rarely play and when I do I rarely use trains. If you could patch this it would be great.
http://members.fortunecity.com/gamesart
"If no one is a fool I am also a fool." -The TTD maniac.


I prefer to be contacted through PMs. Thanks.
User avatar
SirkoZ
Tycoon
Tycoon
Posts: 1518
Joined: 06 Mar 2004 23:51
Location: The sunny side of Alps

Post by SirkoZ »

I see.

Well - with forced servicing lines - you can easily achieve the 1 line up one line down approach with even TT-signals - the second depot is for overflow protection. Oh - I can't really be bothered to make a patch - it's easy enough for you to hex-edit the thing. Here's my save game:
Attachments
TRT04.SV1
TT_savegame
(188.82 KiB) Downloaded 320 times
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Post by DaleStan »

SirkoZ wrote:Oh - I can't really be bothered to make a patch - it's easy enough for you to hex-edit the thing.
For you and for me, sure. But for J. Random User? Who probably doesn't even know what a hex editor is?
To get a good answer, ask a Smart Question. Similarly, if you want a bug fixed, write a Useful Bug Report. No TTDPatch crashlog? Then follow directions.
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
User avatar
Ameecher
Tycoon
Tycoon
Posts: 11919
Joined: 12 Aug 2006 15:39
Contact:

Post by Ameecher »

What's a Hex editor :p ;)
Image
User avatar
SirkoZ
Tycoon
Tycoon
Posts: 1518
Joined: 06 Mar 2004 23:51
Location: The sunny side of Alps

Post by SirkoZ »

DaleStan wrote:
SirkoZ wrote:Oh - I can't really be bothered to make a patch - it's easy enough for you to hex-edit the thing.
For you and for me, sure. But for J. Random User? Who probably doesn't even know what a hex editor is?
Good point, DaleStan. :lol:

Well - all the people who don't know what a hex editor is, you can easily type "hex editor" in google.com or yahoo.com and it will list you some programs of such kind.

To describe it - a hex editor is file-editor program, with which you can only change the already existing "text" of files and not add new lines. Adding new would be hard anyway as the "text" is in machine code and therefore in hexadecimal simbols of which only some values and comments are visible as normal text in the text-mode. Hex editor is therefore a great tool to edit .exe files, if you know what to change of course.
A free hex editor is for example XVI32 - search for the webpage with your search engine.
User avatar
SirkoZ
Tycoon
Tycoon
Posts: 1518
Joined: 06 Mar 2004 23:51
Location: The sunny side of Alps

Who woulda thunk it was that simple

Post by SirkoZ »

You probably remember how I said I need to change the TT industry to be perhaps more responsive and to not close industries in "Fluctuating" mode...
Well - I have done it.
I have known for weeks now that there are _only_ _three_ "55 55" addresses in tycoon.exe and quite close together - especially the latter two. I also knew that they are probably the industry specific "Chance" type statements/functions to decide certain industry behaviour and wouldn't you know it - they are! :lol:
I just couldn't believe it's so beautifully simple here in TT_Original (throughout the TTD.exe you have at least 6 such "55 55" chances used if not more).

Anyhow - the first "55 55" at the address 3C1B0h (more specifically at 3C1BAh) is the chance for industry to close in the "Fluctuating economy" if it is not a Forest or an Oil Rig and if you try and transport over 50% of its sweets. :-)

Brief explanation: That 55 55 corresponds to 21845 in decimal numbers and if you look at the fraction 21845/65535 (or 5555/FFFF in hexadecimal) you get 1/3 or one third of the chance for something to happen. ;-)

Next stop is the the second "55 55" hex number in the tycoon.exe - this one proved to be the chance for industry increase if one uses it (I would guess if more than 60% transported - nevertheless I did see some increases with less % transported - again TT's sweet simplicity). :-)
This 55 55 is at address 3D330h (-33Bh).

The third chance is very near to the second one - two lines down - at 3D350h (-35Bh).

Now - here's what I changed:
1.) The first one to 00 00 - that is 0 in FFFF chance (= 0%) for the nasty closures in Fluctuating economy. ;-)
2.) The second 55 55 to AA AA - that increases the chances for change to 2/3 or two thirds or 66.67% for something to happen with one industry per one month..
3.) The third chance has also been set to AA AA - that is 2/3 or 66.67% that industry decreases if the service is bad.

Of course - at the end I also couldn't stand anymore the insanely high station ratings the stupid AI can reach - change the
"00 00 1F 00 3F 00" at the location E100h (almost at the beginning of the file) to the "00 00 00 00 00 00" and the AI will no matter how "intellingent" you set it to be under "Difficulty settings" have the same station ratings as you - even in a "Hard" game. A trully blissful TT enjoyment - with the great DOSBox. ;-)
User avatar
SirkoZ
Tycoon
Tycoon
Posts: 1518
Joined: 06 Mar 2004 23:51
Location: The sunny side of Alps

Post by SirkoZ »

Upon some more playing I noticed some further development...
As much as the first 55 55 to 00 00 is useful, it doesn't completely rule out the closures. :-(

I would really need the memory dump of the DOS-TTOrig's tycoon.exe so I could once and for all solve this one...
Gurluas2000
Chief Executive
Chief Executive
Posts: 660
Joined: 31 May 2004 08:22

Post by Gurluas2000 »

Perhaps you can hack the old demos(especially the first one that looks alpha-ish) to remove the time limit?(game crashes in 1932)
User avatar
SirkoZ
Tycoon
Tycoon
Posts: 1518
Joined: 06 Mar 2004 23:51
Location: The sunny side of Alps

Post by SirkoZ »

Well - Gurluas2000 - I could try if I had them...
Any location to get them?
User avatar
WWTBAM
Moderator
Moderator
Posts: 3689
Joined: 02 Apr 2005 07:01
Location: Sydney NSW Antipodea
Contact:

Post by WWTBAM »

http://www.tt-ms.de/downloads/ is your friend SirkoZ.
Formerly known as r0b0t_b0y2003, robotboy, roboboy and beclawat. The best place to get the most recent nightly builds of TTDPatch is: http://roboboy.users.tt-forums.net/TTDPatch/nightlies/
User avatar
Raichase
Moderizzle
Moderizzle
Posts: 11509
Joined: 15 Dec 2002 00:58
Location: Sydney, Australia. Usually at work in the underground railway station...
Contact:

Post by Raichase »

Gurluas2000 wrote:Perhaps you can hack the old demos(especially the first one that looks alpha-ish) to remove the time limit?(game crashes in 1932)
Why make the demo play forever, when you can play the full version...
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
User avatar
WWTBAM
Moderator
Moderator
Posts: 3689
Joined: 02 Apr 2005 07:01
Location: Sydney NSW Antipodea
Contact:

Post by WWTBAM »

I think especially the first demo, because it has slightly different graphics and he wants to find out if there were any other differences after the game crashes.
Formerly known as r0b0t_b0y2003, robotboy, roboboy and beclawat. The best place to get the most recent nightly builds of TTDPatch is: http://roboboy.users.tt-forums.net/TTDPatch/nightlies/
User avatar
SirkoZ
Tycoon
Tycoon
Posts: 1518
Joined: 06 Mar 2004 23:51
Location: The sunny side of Alps

Post by SirkoZ »

Yes - thank you - robotboy - that TT/D webpage is simply amazing - so much of TT - all in one place. ;-)

Well - I surely will give it a try with that demo, Gurluas2000.
Gurluas2000
Chief Executive
Chief Executive
Posts: 660
Joined: 31 May 2004 08:22

Post by Gurluas2000 »

Thank you

Raichase: Because the earliest demo had A LOT of different graphics and different features, there is a thread here somewhere with it
User avatar
SirkoZ
Tycoon
Tycoon
Posts: 1518
Joined: 06 Mar 2004 23:51
Location: The sunny side of Alps

Re: Great news or perhaps new breath of life for TT_Orig

Post by SirkoZ »

I haven't yet looked at that demo, Gurluas - however I have a hunch it doesn't even have all the trains' and planes' graphics for the whole game (1930-20xx) - I mean only 3 files - so don't get your hopes up too much.

The good news is - more hex-editing goodies:

1.) Industry/ratings:
a) (I don't know if I posted this one already...) AI doesn't get higher station ratings anymore on "Medium" or "High" intelligence setting.

Change: 00 00 1F 00 3F 00 to 00 00 00 00 00 00 - this is at the location (0x)E104(h) in the version 1.06.11 of the TTO exe.

b)Industry doesn't close anymore if more than 50% is transported and economy is set to "Fluctuating".

Change: 0F 87 to 90 E9 - this is at the location (0x)3D1A2(h).
Of course this tweak makes the industry function literally "jump over" the closures code - so no more closures what soever (JA to JMP in assembler language).


2.) The last one for now but somewhat the sweetest - equivalent of autoreplace/autorenew - at least partially in behaviour - in vehicle array - for new games - one can change the vehicle's life (2nd byte (xx)) and time on the market (3rd byte (xx)).
Since the array holds all vehicles' data - there is around or over 100 5-byte entries from Jinty Class to Sikorsky Helicopter. I will only show those two because the same numbers should be applied to all of them (at any vehicle's 2nd and 3rd byte).

The array starts (in TTO.exe v1.06.11) at (0x)17884(h).
The first 2 signs are "B5 05" but that is only the start.
Right after that one is the data of Jinty "Class" (Steam) locomotive and it looks like that:

14 0E 1E EE 0F (the 0E stands for Jinty's 14-year life - after that it has to be renewed and 1E stands for its 30 year availability to all players) then we go through all 100 or so of them and we come to the last one

- for the Sikorsky Helicopter and it looks like this: 14 14 5A 00 46 - this one is at the address (0x)17A84(h) if I'm not mistaken.

Now - the change - change the second and the third byte (2-digit hexadecimal number) at every vehicles' entry.
Example:
Jinty: 14 B3 FF EE 0F,
Sikorsky Helicopter: 14 B3 FF 00 46.

All to do is to basically change 2nd and 3rd byte of every vehicle to B3 (179 years - otherwise calculation overflows) and FF (255 years) - and vehicles will always be available and never nag that they are old and need to be replaced.
I think this is the next best thing from autoreplace and autorenew that are present in e.g. OpenTTD.

Many thanks to Marcin Grzegorczyk without whom much if not all of this would still be hidden in plain view.

Enjoy!
I4ko
Engineer
Engineer
Posts: 7
Joined: 25 Jul 2007 13:42

Re: Great news or perhaps new breath of life for TT_Orig

Post by I4ko »

There was a russian adjusting program aroung 1996 that allowed to change every vehichle paramether - mass, speed, hp, etc. I cannot remember wheter it had more options.
Post Reply

Return to “Transport Tycoon (Original)”

Who is online

Users browsing this forum: No registered users and 1 guest