Powerful Industry 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

Haukinger
Engineer
Engineer
Posts: 110
Joined: 15 Mar 2006 16:38

Powerful Industry Patch

Post by Haukinger »

Hi all !

I've made a patch that makes cargo-trains more competitive compared to passenger trains. It's running on my server (a slightly modified version, will change to the one posted below on the next restart), so feel free to try it out - http://haukinger.dyndns.org/ottd.
Raw material production can now get much higher than in normal OpenTTD. In the past, production was limited to about 2300 - now it can be 12500. This way goods-trains are as desirable in late-game as passengers. Production will never decrease. It will grow if you transport more than about 55%. If you transport more than 80%, large increases are possible.
Unserviced industries will close down. Normal industries start closing 3 years after the last train left, and raw material industries start one year later. Don't expect unserviced industries to live more than 5 or 6 years! On the other hand, the rate of new industries emerging is increased, too.
Loading/unloading-time is always zero, that is, if the train fits into the station. This way you don't need to build stations that are larger than the town they're serving...
Conversion from normal to electrified tracks with trains present is enabled, too.
EDIT: updated patch - got switch in patch-settings
EDIT: updated patch - got three-way switch in patch-settings
EDIT: updated patch to be at least syntactically savegame-compatible to normal ottd.
EDIT: updated MiniIN-diff according to official procedure
EDIT: removed easy_convert_tracks, changed to SLE_CONDVAR, savegame bump to 30 (normal) or 35 (MiniIN). can load old savegames. defaults to smooth economy.
Attachments
PowerOTTD3_5450.diff
powerful industry patch v3 for 5450
(15.26 KiB) Downloaded 354 times
PowerOTTD3_5450_MiniIN.diff
powerful industry patch for MiniIN 5450
(17.25 KiB) Downloaded 286 times
Last edited by Haukinger on 03 Jul 2006 08:32, edited 11 times in total.
User avatar
graphics_master
Tycoon
Tycoon
Posts: 978
Joined: 28 May 2006 09:54

Post by graphics_master »

How do u install this patch ?
User avatar
XeryusTC
Tycoon
Tycoon
Posts: 15415
Joined: 02 May 2005 11:05
Skype: XeryusTC
Location: localhost

Post by XeryusTC »

Don't panic - My YouTube channel - Follow me on twitter (@XeryusTC) - Play Tribes: Ascend - Tired of Dropbox? Try SpiderOak (use this link and we both get 1GB extra space)
Image
OpenTTD: manual #openttdcoop: blog | wiki | public server | NewGRF pack | DevZone
Image Image Image Image Image Image Image
User avatar
graphics_master
Tycoon
Tycoon
Posts: 978
Joined: 28 May 2006 09:54

Post by graphics_master »

could someone post the ready files nessicary for installing this patch because it is too confusing.
User avatar
mart3p
Tycoon
Tycoon
Posts: 1030
Joined: 31 Oct 2005 21:00
Location: UK

Post by mart3p »

Download the exe from Haukinger’s link in the first post.
Image
User avatar
SirkoZ
Tycoon
Tycoon
Posts: 1518
Joined: 06 Mar 2004 23:51
Location: The sunny side of Alps

Re: Powerful Industry Patch

Post by SirkoZ »

Haukinger wrote:Hi all !

I've made a patch that makes cargo-trains more competitive compared to passenger trains. It's running on my server (a slightly modified version, will change to the one posted below on the next restart), so feel free to try it out - http://haukinger.dyndns.org/ottd.
Raw material production can now get much higher than in normal OpenTTD. In the past, production was limited to about 2300 - now it can be 63000. This way goods-trains are as desirable in late-game as passengers. Production will never decrease. It will grow if you transport more than about 55%. If you transport more than 80%, large increases are possible.
Unserviced industries will close down. Normal industries start closing 3 years after the last train left, and raw material industries start one year later. Don't expect unserviced industries to live more than 5 or 6 years! On the other hand, the rate of new industries emerging is increased, too.
Loading/unloading-time is always zero, that is, if the train fits into the station. This way you don't need to build stations that are larger than the town they're serving...
Conversion from normal to electrified tracks with trains present is enabled, too.
In the currently running game we have two coal mines nearing 10000, and a factory at 15000. By far not every corner of the map is connected to the network. The server has a hard time, though, and everything's a bit slow...
Powerful? No.

Totally unrealistic and way too easy? Probably - it's like playing with LeG0 technic and then downgrading to duplo.

A viable 3rd option (apart from TTD_ and smooth_economy)? Perhaps.
Haukinger
Engineer
Engineer
Posts: 110
Joined: 15 Mar 2006 16:38

Re: Powerful Industry Patch

Post by Haukinger »

SirkoZ wrote: Powerful? No.
Call it what you like...
SirkoZ wrote: Totally unrealistic and way too easy? Probably - it's like playing with LeG0 technic and then downgrading to duplo.
What do you mean with 'easy' ? Easy to make money ? That has always been easy. Easy to transport much ? That depends on what you call much. It's different from normal transport tycoon. The quest is to build an effective network that can handle much cargo. That is, more cargo that normally, considering the largest factory I've seen so far (with standard rules) generated about 9000 goods. With normal trains, no monorail or maglev.
SirkoZ wrote: A viable 3rd option (apart from TTD_ and smooth_economy)? Perhaps.
Of course. It's not meant to replace smooth_economy. It's for those who lile myself want to experience a different ottd. If someone explains the patches-configuration-gui to me (or I explore it myself), I'll add a switch for it, nor unlike that for smooth_economy.
Nobody is forced to use this...
sc79
Director
Director
Posts: 586
Joined: 22 Feb 2005 09:51

Post by sc79 »

Not to start an arguement but.... :)

I do think you've gone a bit overboard on your numbers. One of the stations feeding the factory in the SS has 6 tracks/18 platforms, and can barely hold > 60% of 17000 total production from 6 farms. You're looking at 50+ platforms per industry with this patch (less with longer trains, obiviously, but its still a massive volume).

You barely touched the potential of your numbers on any individual industry, let alone the map as a whole, and the server is already hurting.

But, as you say, noone has to use it. If it works, more power to you :)
Attachments
Untitled.png
Untitled.png (286.86 KiB) Viewed 9553 times
Haukinger
Engineer
Engineer
Posts: 110
Joined: 15 Mar 2006 16:38

Post by Haukinger »

The server is a crappy duron 1300, that doesn't count :)
In fact, noone needs 63000 production per industry, it could even be around 500000 with uint16 production_rate. More important is the behaviour of the industries. They don't shrink leaving you with unneeded trains that just hang around and block crossings and stations. They don't stop growing as long as your network is capable of handling the traffic. They grow linearly, not exponentially, so you can use a newly built coal mine in 2010 and have it reach reasonable output before the game ends.
Nice screenshot, btw :)
User avatar
gkirilov
Chief Executive
Chief Executive
Posts: 696
Joined: 03 May 2005 09:32
Location: Othala

Post by gkirilov »

The only useful thing here (for me) is the increased capacity of the primary/secondary industries. THis is really good because I don't have to build several mines next to each other to get high capacity.

Anyway I'll try it. Thanks for the effort. :D
OTTDCoop NewGRF Pack|Different sets of GRFs for TTDPatch (some of them work in OTTD) - 1|- 2|GRF sets for OTTD|OTTD nightly
Image
I hooked up my accelerator to my brake lights. I hit the gas, people behind me stop, and I'm gone.
Understeer is when you hit the wall with the front of the car. Oversteer is when you hit the wall with the rear of the car. Horsepower is how fast you hit the wall. Torque is how far you take the wall with you. Spoilers and bodykits are how much of the wall you take with you. Rollcages and windownets are how much of a mess you leave on the wall.
User avatar
Born Acorn
Tycoon
Tycoon
Posts: 7597
Joined: 10 Dec 2002 20:36
Skype: bornacorn
Location: Wrexham, Wales
Contact:

Post by Born Acorn »

This would be good for a true sandbox mode. (The cheat menu seems to me more of a hackish solution due to the fact its called cheats).
Image
User avatar
SirkoZ
Tycoon
Tycoon
Posts: 1518
Joined: 06 Mar 2004 23:51
Location: The sunny side of Alps

Re: Powerful Industry Patch

Post by SirkoZ »

Haukinger wrote:
SirkoZ wrote: A viable 3rd option (apart from TTD_ and smooth_economy)? Perhaps.
Of course. It's not meant to replace smooth_economy. It's for those who lile myself want to experience a different ottd. If someone explains the patches-configuration-gui to me (or I explore it myself), I'll add a switch for it, nor unlike that for smooth_economy.
Nobody is forced to use this...
'Tell you what - if you would be so kind and:
1.) Look at my and existing smooth_economy patch for pointers how to make a GUI switch - it's really easy (observe the variables.h, settings.c and settings_gui.c files) :) ,
2.) patch the nightly code with my patch (PM me if it needs updating),
3.) then write in beside existing your code, link up the switches in the GUI and we then got the normal, smooth and powerful/overkill :) patches which can be included in the next mini_Integrated nightly.

Of course you could also check out the latest mini_Integrated_nightly which already contains my patch and just add your code to that one and make a patch...
Hazelrah
Traffic Manager
Traffic Manager
Posts: 196
Joined: 13 Apr 2005 05:41

Post by Hazelrah »

Not to be a stick in the mud, but if your going to put the two together, then they should probably be one option in the patches. I haven't figured out how to do it yet, but take a look at "Review vehicles' orders:" under the Vehicles patches. You press the arrow keys and it switches through the 3 options. That's how I'd envision something like this working too, as I don't think it makes sense to have smoot_economy and powerful_economy at the same time... does it?

-Hazelrah
User avatar
SirkoZ
Tycoon
Tycoon
Posts: 1518
Joined: 06 Mar 2004 23:51
Location: The sunny side of Alps

Post by SirkoZ »

Hazelrah wrote:Not to be a stick in the mud, but if your going to put the two together, then they should probably be one option in the patches. I haven't figured out how to do it yet, but take a look at "Review vehicles' orders:" under the Vehicles patches. You press the arrow keys and it switches through the 3 options. That's how I'd envision something like this working too, as I don't think it makes sense to have smoot_economy and powerful_economy at the same time... does it?

-Hazelrah
Indeed - one switch to choose among all 3.
Haukinger
Engineer
Engineer
Posts: 110
Joined: 15 Mar 2006 16:38

Post by Haukinger »

I've updated the patch and added two switches - one for the powerful industry and one for the track-conversion. It was really easy :) The powerful-industry-switch overrides the one for smooth economy. I agree that a three-way switch would be optimal, though.
BTW - is there a reason that the amount of cargo moved in MoveIndustryGoods() is limited to 255 ? I've raised it to 1023 and it seems to work. Otherwise production of mines/oil-wells is limited to about 13500, regardless of production_rate.
What happens if produced_last_mo overflows ? I've limited it to 65535 to avoid this. Or should it become uint32 ?
Applying it to the MiniIN-branch looks like a bit of work. We'll see...

EDIT: three-way switch for economy is done
User avatar
SirkoZ
Tycoon
Tycoon
Posts: 1518
Joined: 06 Mar 2004 23:51
Location: The sunny side of Alps

Post by SirkoZ »

Wow cool! :D

I don't know why the amount of cargo moved in MoveIndustryGoods() is limited to 255 - which file is that BTW?
The "old" TTD economy has had production_rate limited to 255 and total_production is production_rate * 8 or 9 or 10 (at 74 for day_ticks) - depends on day_ticks - to have TTOriginal behaviour, day_ticks should be set to 112...

If produced_last_mo overflows, probably a crash would occur - which file again (I don't have much time right now)? :)

Well - in any case - please try to make your patch compatible with my improved_smooth_economy already integrated in both nightly (you have to do it) and mini_IN (already merged).

Thanks.

After you're done - we'll talk to richk67 to get it into the mini_IN. 8)
Haukinger
Engineer
Engineer
Posts: 110
Joined: 15 Mar 2006 16:38

Post by Haukinger »

It's TransportIndustryGoods... (embarrassing) in industry_cmd.c.

Code: Select all

i->last_mo_production[0] += cw;
is there, too. It could just wrap around and result in a hellishly low rating... anyway, as it is now, if 65535 is reached, no more goods are transported this month.
The patch works with the current head-revision from trunk. Expect the version for MiniIN tomorrow.
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 - I didn't have the time to check out the file before - in any case - post patches somewhere here, so we can review/test them...
User avatar
webfreakz.nl
Director
Director
Posts: 627
Joined: 11 Aug 2005 08:22
Location: Localhost, 127.0.0.1, [The Netherlands: South Holland-> Westland]
Contact:

Post by webfreakz.nl »

Hmm, this sounds great, but as usual i've got a couple questions: does this affect your savegame *in any way*? So i will play with a game including this patch, next day, i can still open it with e.g. a new nightly?
# Programming is like sex, one mistake and you have to support it for the rest of your life. (Michael Sinz)
User avatar
SirkoZ
Tycoon
Tycoon
Posts: 1518
Joined: 06 Mar 2004 23:51
Location: The sunny side of Alps

Post by SirkoZ »

I think it won't - well at least any and all of my patches don't affect the savegame in a way it wouldn't work without them...
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 2 guests