More diesel_smoke patch

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

Singaporekid
Tycoon
Tycoon
Posts: 1966
Joined: 21 May 2004 07:39
Location: Singapore

Post by Singaporekid »

Just something from the Singaporekid Archive of Unposted Graphics, for you people! :)
Attachments
Cause diesel smoke isn't supposed to be brown
Cause diesel smoke isn't supposed to be brown
Exhaust_Sprites.PNG (902 Bytes) Viewed 10717 times
<+Raichase> ugh, I just ate some of my beard D:
User avatar
SirkoZ
Tycoon
Tycoon
Posts: 1518
Joined: 06 Mar 2004 23:51
Location: The sunny side of Alps

Post by SirkoZ »

Interesting posts the last 4. :)

Well - for now there will only be more brown (current) smoke and more steam baloons. I think it's better to add the other neat effects, if and when the grf's and graphics engine have been improved...

Oh BTW - Singaporekid - diesel_smoke can be brown because of "diluted" carbon particles and of course the nitrous dioxide (NO2), that forms after exaust touches air (gets more oxigen), but then becomes the colourless N2O4 under 125°C.

NO + 1/2 O2-> NO2 -> 1/2 N2O4
User avatar
SirkoZ
Tycoon
Tycoon
Posts: 1518
Joined: 06 Mar 2004 23:51
Location: The sunny side of Alps

Post by SirkoZ »

Well - here are screenies of Ginzu and Wills steam locomotive with 2x and 4x more frequent steam_pufs. :)

The locomotives are at top speed (128km/h and 88km/h respectively).

Which do you prefer?
Attachments
4x_more_steam.jpg
4x_more_steam.jpg (38.35 KiB) Viewed 10670 times
2x_more_steam.jpg
2x_more_steam.jpg (25.68 KiB) Viewed 10667 times
peter1138
OpenTTD Developer
OpenTTD Developer
Posts: 1732
Joined: 30 Mar 2005 09:43

Post by peter1138 »

SirkoZ, I think two is better than four times.

As for the sparks, can they be dependent on the time of year it is then, instead of age... hmm :)
MeusH
Tycoon
Tycoon
Posts: 4349
Joined: 25 Oct 2004 15:39
Location: Mississauga

Post by MeusH »

Two times is better. This will also look much better with new graphics...

About sparks, I think these should appear on:
slope changes (flat to uphill, downhill to flat etc), curves, tunnel and bridge enterances, junctions.

Also these should appear randomly on straight pieces of track, and just like Peter wrote, more frequent on winter
User avatar
Killer 11
Tycoon
Tycoon
Posts: 2463
Joined: 06 Jan 2004 18:38
Location: Kaunas, Lithuania
Contact:

Post by Killer 11 »

and ofcourse more frequent above the snowline in arctic climate :wink:
User avatar
SirkoZ
Tycoon
Tycoon
Posts: 1518
Joined: 06 Mar 2004 23:51
Location: The sunny side of Alps

Post by SirkoZ »

Slow down there Tex - there are no electric locos for snowland. :lol:

I can put a future switch for snowland though...
User avatar
Arsenal
Traffic Manager
Traffic Manager
Posts: 227
Joined: 06 Jan 2004 21:25

Post by Arsenal »

x2 8)
Bjarni
Tycoon
Tycoon
Posts: 2088
Joined: 08 Mar 2004 13:10

Post by Bjarni »

SirkoZ wrote:Slow down there Tex - there are no electric locos for snowland. :lol:

I can put a future switch for snowland though...
OTTD supports the arctic train set, so electric locos in snowland is possible :wink:
User avatar
SirkoZ
Tycoon
Tycoon
Posts: 1518
Joined: 06 Mar 2004 23:51
Location: The sunny side of Alps

Post by SirkoZ »

I know I know - new grf's. :)

Well - here's the updated patch with more sparks, smoke and steam_puf. :)
Attachments
diesel_smoke_sz_1-2_r2653.patch
(1.51 KiB) Downloaded 392 times
User avatar
SirkoZ
Tycoon
Tycoon
Posts: 1518
Joined: 06 Mar 2004 23:51
Location: The sunny side of Alps

Post by SirkoZ »

Well - I made it - now it behaves as it should - it was a simple matter of u and v - guess how long it took me. :oops: :lol:
Last edited by SirkoZ on 14 Aug 2005 22:23, edited 1 time in total.
User avatar
SirkoZ
Tycoon
Tycoon
Posts: 1518
Joined: 06 Mar 2004 23:51
Location: The sunny side of Alps

Post by SirkoZ »

Here it is the 1.3 version of my more_DIESEL/Other_SMOKE patch and compatible with source r2866 and up. :D
Attachments
diesel_smoke_sz_1-3_r2866.patch
Test it, you'll love it. :)
(1.97 KiB) Downloaded 413 times
User avatar
SirkoZ
Tycoon
Tycoon
Posts: 1518
Joined: 06 Mar 2004 23:51
Location: The sunny side of Alps

Post by SirkoZ »

Again, some tweaking & testing has been done. :)
Attachments
diesel_smoke_sz_1-4_r2866.patch
(1.98 KiB) Downloaded 411 times
diesel_smoke_sz_1-4_r2354-0401.patch
Diff for OpenTTD 0.4.0.1 (r2354)
(1.83 KiB) Downloaded 407 times
Last edited by SirkoZ on 31 Aug 2005 09:26, edited 1 time in total.
User avatar
Hadez
Traffic Manager
Traffic Manager
Posts: 217
Joined: 22 Jul 2004 21:25
Location: Jablonec nad Nisou, Czech republic
Contact:

Post by Hadez »

As Cygwin reported to me,

Code: Select all

u->cur_speed >= 0
on line 1766 is always true, due to fact that cur_speed is unsigned. Has this expression any other effect? I think I can remove it safely.
User avatar
SirkoZ
Tycoon
Tycoon
Posts: 1518
Joined: 06 Mar 2004 23:51
Location: The sunny side of Alps

Post by SirkoZ »

Well - the speed is taken into account in the

Code: Select all

(uint16)Random() = ....

equation, but for some strange reason, it still has to be there on the beginning - OTTD crashes, if it's not. (original is <= 40, so with this I just set it at >= 0, as it's always used.

EDIT/UPDATE: You can safely remove that line ( u->cur_speed >= 0 ), it's no longer necessary with v1.4 - infact - I have changed the patch ----> v1.4c (without that unnecessary line). :)
User avatar
SirkoZ
Tycoon
Tycoon
Posts: 1518
Joined: 06 Mar 2004 23:51
Location: The sunny side of Alps

Post by SirkoZ »

Here it is (without the unnecessary u->cur_speed >= 0):
Attachments
diesel_smoke_sz_1-4c_r3091.patch
diff for the latest nightly (r3091 and up)
(1.82 KiB) Downloaded 411 times
diesel_smoke_sz_1-4c_r2354-0401.patch
diff for OTTD 0.4.0.1 release
(1.81 KiB) Downloaded 363 times
Last edited by SirkoZ on 27 Oct 2005 21:31, edited 1 time in total.
User avatar
Jim Starluck
Traffic Manager
Traffic Manager
Posts: 135
Joined: 26 Jun 2005 20:12
Location: Cincinnati, OH
Contact:

Post by Jim Starluck »

Minor question: Is this compatible with trainset patches? Does it affect the locomotives themselves at all, or is it changing global values?

Edit: Also, I feel stupid for asking this...but how do I get a .patch file to work? I know how to do .grf, but not .patch...
If at first you don't succeed, get a bigger locomotive and try again.
User avatar
SirkoZ
Tycoon
Tycoon
Posts: 1518
Joined: 06 Mar 2004 23:51
Location: The sunny side of Alps

Post by SirkoZ »

Jim Starluck wrote:Minor question: Is this compatible with trainset patches? Does it affect the locomotives themselves at all, or is it changing global values?
This patch affects general steam/diesel/electric emissions and is therefore compatible with all possible train-sets. I wouldn't want in any other way. ;)
Edit: Also, I feel stupid for asking this...but how do I get a .patch file to work? I know how to do .grf, but not .patch...
Oh please - feel free to ask anything. OpenTTD unfortunately doesn't yet have a patch-system implemented, that would allow inclusion of user "mods" the way Quake or UnrealTournament game do. Presently these .patch-es or rather .diff-s mean only the changes to the source code, which can be applied to the original source with a program like TortoiseSVN.
After applying the patch you have to compile the source into executable file for your OS (.exe in Windows).
User avatar
SirkoZ
Tycoon
Tycoon
Posts: 1518
Joined: 06 Mar 2004 23:51
Location: The sunny side of Alps

Post by SirkoZ »

New version - apart from some adjustments for the new source and better behaviour, there is a new switch in the "Vehicles" "Patches" control panel where you can choose the amount of smoke the locomotives emit (0= v1.4c equal amount, 1 and 2 = less/much less).

Again - the text beside the switch is english for all languages, for better compatibility with Integrated nightly build, you can translate it at any time. ;-)

The 0.4.0.1 equvalent of the patch can be found some posts up (v1.4c) - behaviour is like with the switch set to "0" - smoke galore. :)
Attachments
diesel_smoke_sz_2-0_r3328.patch
diff
(24.76 KiB) Downloaded 459 times
pic
pic
diesel_smoke_sz_2-0_r3256.gif (4.07 KiB) Viewed 9759 times
User avatar
SirkoZ
Tycoon
Tycoon
Posts: 1518
Joined: 06 Mar 2004 23:51
Location: The sunny side of Alps

----> r5478

Post by SirkoZ »

New update......to source r5478.

P.S.: Translation-correctness update: I have removed all the english from non-english language files as per peter1138's request. No behaviour and none visible changes in-game though.
Attachments
diesel_smoke_sz_2-0b_r5478_NS.patch
diff for nightly source
(4.49 KiB) Downloaded 384 times
diesel_smoke_sz_2-0b_r5147_mini-IN.patch
diff for mini-IN source
(4.49 KiB) Downloaded 343 times
Last edited by SirkoZ on 09 Jul 2006 22:38, edited 10 times in total.
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 17 guests