New Industries for TTDPatch
Moderator: Graphics Moderators
I think that I am smelling the bouquet of a fine wine made at the winery with grapes from the vineyard over in the French Set.Snail wrote:I agree, this thing seems to be extremely promising and could really add a lot to out games.
As DaleStan pointed out tho, at this time the NewCargoes features will become essential...

Potential ...potential ... potential ...

wallyweb on tt-forums: Screenshots - Wallyweb World - Projects & Releases
wallyweb on Simuscape: Projects - Releases
Other Stuff: TTDPatch 2.6 "Nightly" download - cirdan's OpenTTD branch (New Map Features)
Screenshot Of The Month Contest Winner: August 2015 - Tied May 2016 - January 2018 - December 2018 - May 2019
wallyweb on Simuscape: Projects - Releases
Other Stuff: TTDPatch 2.6 "Nightly" download - cirdan's OpenTTD branch (New Map Features)
Screenshot Of The Month Contest Winner: August 2015 - Tied May 2016 - January 2018 - December 2018 - May 2019
Not only wine, we could finally have food, cars, steel mills requiring iron and coal... we could think of anything 
A question, with the NewCargoes feature, will it be possible to make cities accept stuff other than passengers, mail and goods? Or will we be forced to introduce the "fake" industry which accepts other stuff (cars, for instance) and place it next to a town?

A question, with the NewCargoes feature, will it be possible to make cities accept stuff other than passengers, mail and goods? Or will we be forced to introduce the "fake" industry which accepts other stuff (cars, for instance) and place it next to a town?
- Raichase
- Moderizzle
- Posts: 11509
- Joined: 15 Dec 2002 00:58
- Location: Sydney, Australia. Usually at work in the underground railway station...
- Contact:
Wallyweb - move the station sign down closer to the steel mill, and they will get the coal 

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


Official TT-Dave Worley Fan Club
Official TT-Andel-in-a-pink-hat Fan Club
Raichase - Perfect timing, all the time: [13:37] * Now talking in #tycoon


Official TT-Dave Worley Fan Club
Official TT-Andel-in-a-pink-hat Fan Club
Snail: I don't know how the newcargoes code works, but I suppose the answer will be no. A station accepts what tiles in its catchment area accept. This means, if you want towns to accept cars, you would need houses that have "car acceptance". This would mean touching house definitions, and don't forget that no tile can accept more than three types of cargo. It is just easier (and more realistic) to make a car shop that appears inside towns and accepts cars.
Or, as an alternative solution, new cargoes could have flags like "towns accept this as if it were goods" and "towns accept this as if it were food", so towns that accept goods would automatically accept cars/plasic toys/ whatever you come up with later.
Or, as an alternative solution, new cargoes could have flags like "towns accept this as if it were goods" and "towns accept this as if it were food", so towns that accept goods would automatically accept cars/plasic toys/ whatever you come up with later.
Reality is that which, when you stop believing in it, doesn't go away.—Philip K. Dick
What a difference a tile makesRaichase wrote:Wallyweb - move the station sign down closer to the steel mill, and they will get the coal


Too bad the AI doesn't build industries

Csaboka and Snail ... an interesting concept ... single tile industries for a player to build inside a town.
As it is now, a town tile can accept/produce a mix of pax and mail and depending upon climate, accept goods or food.
A car dealership could accept new cars, pax and mail and produce pax and mail ... a bistro could accept beer, wine and pax and produce pax and a restaurant could accept food, wine and pax and produce pax.
The mind boggles ... won't be long before the new industry limit is challenged .. I will definitely need more RAM and a faster CPU

wallyweb on tt-forums: Screenshots - Wallyweb World - Projects & Releases
wallyweb on Simuscape: Projects - Releases
Other Stuff: TTDPatch 2.6 "Nightly" download - cirdan's OpenTTD branch (New Map Features)
Screenshot Of The Month Contest Winner: August 2015 - Tied May 2016 - January 2018 - December 2018 - May 2019
wallyweb on Simuscape: Projects - Releases
Other Stuff: TTDPatch 2.6 "Nightly" download - cirdan's OpenTTD branch (New Map Features)
Screenshot Of The Month Contest Winner: August 2015 - Tied May 2016 - January 2018 - December 2018 - May 2019
What do you think would be the "correct" solution in this case? Should always the closest secondary industry win over the "swallowing" ones if there's any? Or should the coal be distributed evenly, even if you want the steel mill to get the full amount? What if there are two secondary industries in the catchment area?wallyweb wrote:I won't reveal the magic position -- the player will have to spend some money on stations to find the tile that does the trick ... of course then the Power Station will be starved.![]()
I thought "the closest one always wins" is fair enough, but I'm open to suggestions about improving it.
Reality is that which, when you stop believing in it, doesn't go away.—Philip K. Dick
I would say that the most profitable industry should win out. E.g. if the power plant gets the coal, that's the end of it, the coal is burnt and disappears. Whereas if the steel mill gets the coal, it can be turned into another cargo to be carried elsewhere, hence more profit. So the steel mill should get it.
If you wanted to be complex, you could put a max limit on the goods-in-inventory counter for the steel mill, so if it had too much coal it handn't yet used, it would start letting the power plant have any more that came in. But that isn't necessary.
If you wanted to be complex, you could put a max limit on the goods-in-inventory counter for the steel mill, so if it had too much coal it handn't yet used, it would start letting the power plant have any more that came in. But that isn't necessary.
Development Projects Site:
http://www.as-st.com/ttd
Japan, American Transition, Planeset, and Project Generic Stations available there
http://www.as-st.com/ttd
Japan, American Transition, Planeset, and Project Generic Stations available there
- George
- Tycoon
- Posts: 4364
- Joined: 16 Apr 2003 16:09
- Skype: george-vb
- Location: Varna, Bulgaria
- Contact:
Suggestion:Csaboka wrote:I thought "the closest one always wins" is fair enough, but I'm open to suggestions about improving it.
The nearby industries are one of two classes – ones, which produce something (let we call them type A) and ones, which not (Type B). And let’s say that M is the max grow factor for raw material industries (it is 2 now?) and V is the amount of arrived cargo.
For all the industries of the type A (1..n) we have a{i} – the amount of produced cargo last month and c{i} amount of cargo waiting to be processed, d{i} usage multiplier (how much of accepted cargo is required for producing 1 ton of new cargo). Then, we shall say, that every industry of type A requires about e{i}=a{i}*d{i}*M cargo a month. Then if c{i} is bigger than e{i}, we can say, that the industry do not require a cargo on the first step. Let’s say that first m (m not bigger than n) industries of type A require cargo on the first step.
Then, for all the industries of type A we can calculate the first level acceptance as A=sum(e{i} –c{i}). Then if V<A, the cargo should be distributed between m industries of type A, and the amount should be (e{i} –c{i})*V/A else (e{i} –c{i})
Than for the W=V-A we start the second step of distribution. Let we say, that a{i}+ 255 is the additional amount of stored cargo. Than if c{i} less than e{i}+a{i}+255, the industry takes part in the second level of distribution. The distribution passes between whose industries the same way as on the first step (but e{i}+a{i}+255 is used instead of e{i}).
If some cargo stayed undistributed, it can be given to any industry of type B. It does not matter which one, because they do not use this cargo for any production.
If there is no industry of type B around, the cargo can be distributed to the nearest one or stay at station.
As we can see, the industries with no production, takes part only on the second level of distribution. They also store max 255 units of cargo unless production starts.
Last edited by George on 04 Jul 2005 05:23, edited 2 times in total.
That is definitely the best option.Csaboka wrote:I thought "the closest one always wins" is fair enough, but I'm open to suggestions about improving it.
If another competing industry should encroach and somehow steal your source of supply, then you spend big bucks and dynamite it in the dark of the night.

The way it is now, it adds another twist to the competion in the game.
Don't change a thing!

By the way, in my little test, I found that even if the station name tile was adjacent to the power station, as long as it touched a steel mill tile (corner to corner) the steel mill got the coal. Obviously there will be a lot of experimenting with this and we will have the fun of discovery.
Great job Csaboka and thank you.

wallyweb on tt-forums: Screenshots - Wallyweb World - Projects & Releases
wallyweb on Simuscape: Projects - Releases
Other Stuff: TTDPatch 2.6 "Nightly" download - cirdan's OpenTTD branch (New Map Features)
Screenshot Of The Month Contest Winner: August 2015 - Tied May 2016 - January 2018 - December 2018 - May 2019
wallyweb on Simuscape: Projects - Releases
Other Stuff: TTDPatch 2.6 "Nightly" download - cirdan's OpenTTD branch (New Map Features)
Screenshot Of The Month Contest Winner: August 2015 - Tied May 2016 - January 2018 - December 2018 - May 2019
George: Your proposal is IMO too complicated for this matter. Writing code for this algorithm would be difficult and would probably use too much CPU time. Furthermore, you can't access d{i} because GRFs don't tell it to TTDPatch, they aren't even required to do it this way. (For example, a farm that increases its wheat output if fed with fertilizer. The fertilizer isn't turned into anything, so there's no d{i}.
A more peaceful approach is moving your station so that only one of the industries is in its catchment area.wallyweb wrote: If another competing industry should encroach and somehow steal your source of supply, then you spend big bucks and dynamite it in the dark of the night.![]()
TTD calculates the distance between the station sign and the north corner of the industry, so "closest" is not always what it seems to be. Maybe I should change this so the distance is calculated between the station sign and the central tile of the industry, so the closest one will be obvious for the player as well.wallyweb wrote:By the way, in my little test, I found that even if the station name tile was adjacent to the power station, as long as it touched a steel mill tile (corner to corner) the steel mill got the coal. Obviously there will be a lot of experimenting with this and we will have the fun of discovery.
Reality is that which, when you stop believing in it, doesn't go away.—Philip K. Dick
Yes and less costly as well but not nearly as funCsaboka wrote:A more peaceful approach is moving your station so that only one of the industries is in its catchment area.

This might be difficult as many industry buildings are multiples of two tiles. Agreed that there are some 3x3 and 5x5 but not all. Your North corner is probably the best option in that the player has to really plan where to build.wallyweb wrote:TTD calculates the distance between the station sign and the north corner of the industry, so "closest" is not always what it seems to be. Maybe I should change this so the distance is calculated between the station sign and the central tile of the industry, so the closest one will be obvious for the player as well.
Does my single tile industry sound workable? And could it be located in a town? I think so because one can build the current industries in a town and their cargos are added to a local station catchment area.
New Industries and New Cargos ... what a powerful enhancement to game play!

wallyweb on tt-forums: Screenshots - Wallyweb World - Projects & Releases
wallyweb on Simuscape: Projects - Releases
Other Stuff: TTDPatch 2.6 "Nightly" download - cirdan's OpenTTD branch (New Map Features)
Screenshot Of The Month Contest Winner: August 2015 - Tied May 2016 - January 2018 - December 2018 - May 2019
wallyweb on Simuscape: Projects - Releases
Other Stuff: TTDPatch 2.6 "Nightly" download - cirdan's OpenTTD branch (New Map Features)
Screenshot Of The Month Contest Winner: August 2015 - Tied May 2016 - January 2018 - December 2018 - May 2019
Even sizes aren't really a problem, you just choose one of the two coordinates arbitrarily, but consequently. I don't think that would be the problem, and it would give more reasonable results that way.wallyweb wrote:This might be difficult as many industry buildings are multiples of two tiles. Agreed that there are some 3x3 and 5x5 but not all. Your North corner is probably the best option in that the player has to really plan where to build.
These would be quite possible. Just like the tropic bank, these could appear in towns (maybe with a minimum required population). After they were built, they wouldn't go away as a town house, though. The other problem is the limit of 90 industries on the map. These two would prevent your one-tile industries from showing up in every town.wallyweb wrote:Does my single tile industry sound workable? And could it be located in a town? I think so because one can build the current industries in a town and their cargos are added to a local station catchment area.
Reality is that which, when you stop believing in it, doesn't go away.—Philip K. Dick
- George
- Tycoon
- Posts: 4364
- Joined: 16 Apr 2003 16:09
- Skype: george-vb
- Location: Varna, Bulgaria
- Contact:
In that case it should be considered as type BCsaboka wrote:George: Your proposal is IMO too complicated for this matter. Writing code for this algorithm would be difficult and would probably use too much CPU time. Furthermore, you can't access d{i} because GRFs don't tell it to TTDPatch, they aren't even required to do it this way. (For example, a farm that increases its wheat output if fed with fertilizer. The fertilizer isn't turned into anything, so there's no d{i}.
There's still the problem of not knowing d{i}.
Frankly, I'd like to spend my time on more important things. A simple approach should do the trick here IMO, something like krtaylor's idea (industries that produce something win over those that don't).
Frankly, I'd like to spend my time on more important things. A simple approach should do the trick here IMO, something like krtaylor's idea (industries that produce something win over those that don't).
Reality is that which, when you stop believing in it, doesn't go away.—Philip K. Dick
- George
- Tycoon
- Posts: 4364
- Joined: 16 Apr 2003 16:09
- Skype: george-vb
- Location: Varna, Bulgaria
- Contact:
Why? Well, it is not important here, we can considerate it as 1.Csaboka wrote:There's still the problem of not knowing d{i}.
New cargos with Mek?Csaboka wrote:Frankly, I'd like to spend my time on more important things. A simple approach should do the trick here IMO, something like krtaylor's idea (industries that produce something win over those that don't).
Because of the way custom production works. TTDPatch simply tells the GRF something like "You have 120 tons of coal and 50 tons of iron ore, what would you like to do with it?", then the GRF answers something like "remove 50 tons of coal and 50 tons of iron ore, produce 50 tons of steel". You don't know how the GRF came to this decision, and it may be more complicated than just multiplying by a constant.George wrote:Why?
This is among my plans. I've already asked Mek to show me his source changes, and he promised he will. This was two days ago, and he haven't sent it yet, but I'm sure he will soon.George wrote:New cargos with Mek?
Reality is that which, when you stop believing in it, doesn't go away.—Philip K. Dick
As promised:DaleStan wrote:Expect new versions of the New Industry GRFs (they don't use any of these features, though) by July 10.
(Not much has changed, but there are a few more checks (specifically: "newindustries on"), and the factory shouldn't smoke anymore)
I've got a new factory production scheme up my sleve, but haven't coded it yet.
- Attachments
-
- New Industries.zip
- (24.61 KiB) Downloaded 886 times
-
- New Industriesw.zip
- (24.86 KiB) Downloaded 1903 times
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
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
New Science?
Now I know why the steel mill doesn't work in the tropics.
Our curious engineers tried it just to see.
It accepted shipments of copper ore and rubber.
Apparently if mixed, blended and processed in the right crucible it produces copious amounts of water as a by-product.
The water has a rubbery/copperish taste to it (The stupid marketing guy actually tasted it) so we were worried about how to dispose of it. At first we were just going to dump it into the environment. But then the maybe not so stupid marketing guy sold it to the stupid citizens of San Rafael. The maybe not so stupid citizens of San Rafael created a scenario and apparently forgot to turn off the jcroads and so they froze the water and made snow to cool their sidewalks so they can now walk barefoot without broiling their feet.
PS - They want to know if we could build them a cold fusion power plant.
EDIT: Further testing showed it wasn't the snow line but rather jcroads that caused snow to appear on the sidewalks.
Our curious engineers tried it just to see.
It accepted shipments of copper ore and rubber.
Apparently if mixed, blended and processed in the right crucible it produces copious amounts of water as a by-product.
The water has a rubbery/copperish taste to it (The stupid marketing guy actually tasted it) so we were worried about how to dispose of it. At first we were just going to dump it into the environment. But then the maybe not so stupid marketing guy sold it to the stupid citizens of San Rafael. The maybe not so stupid citizens of San Rafael created a scenario and apparently forgot to turn off the jcroads and so they froze the water and made snow to cool their sidewalks so they can now walk barefoot without broiling their feet.

PS - They want to know if we could build them a cold fusion power plant.

EDIT: Further testing showed it wasn't the snow line but rather jcroads that caused snow to appear on the sidewalks.
- Attachments
-
- San Rafael Buys Putrid Water And Lines Their Streets With Snow!
- San Rafael.png (33.47 KiB) Viewed 21677 times
Last edited by wallyweb on 06 Jul 2005 22:16, edited 1 time in total.
wallyweb on tt-forums: Screenshots - Wallyweb World - Projects & Releases
wallyweb on Simuscape: Projects - Releases
Other Stuff: TTDPatch 2.6 "Nightly" download - cirdan's OpenTTD branch (New Map Features)
Screenshot Of The Month Contest Winner: August 2015 - Tied May 2016 - January 2018 - December 2018 - May 2019
wallyweb on Simuscape: Projects - Releases
Other Stuff: TTDPatch 2.6 "Nightly" download - cirdan's OpenTTD branch (New Map Features)
Screenshot Of The Month Contest Winner: August 2015 - Tied May 2016 - January 2018 - December 2018 - May 2019
Re: New Science?
wallyweb wrote:Now I know why the steel mill doesn't work in the tropics.

BTW, this may change sometime soon. Mek sent me his work on newcargos yesterday, I'm working on it since then. It's currently unplayable, but I think it will start working in one or two week's time.
Reality is that which, when you stop believing in it, doesn't go away.—Philip K. Dick
Who is online
Users browsing this forum: No registered users and 5 guests