Improved Town Industries

Find and discuss all the latest NewGRF releases for TTDPatch and OpenTTD here.

Moderator: Graphics Moderators

Tsylatac
Engineer
Engineer
Posts: 50
Joined: 26 Dec 2015 01:04

Re: Improved Town Industries

Post by Tsylatac »

2TallTyler wrote: 19 Jul 2020 20:31 1.2.0
  • Fix: Redefine cargo IDs for proper ordering in the Cargo Flow Legend
Ahh yes, the "Cottage Industries" update. Houses (at least with Improved Town Layouts) now produce Goods instead of Mail. :lol:
User avatar
2TallTyler
Route Supervisor
Route Supervisor
Posts: 490
Joined: 11 Aug 2019 18:15
Contact:

Re: Improved Town Industries

Post by 2TallTyler »

Tsylatac wrote: 22 Jul 2020 03:54 Ahh yes, the "Cottage Industries" update. Houses (at least with Improved Town Layouts) now produce Goods instead of Mail. :lol:
Oops. Apparently house mail production (using the mail_multiplier property) uses the cargo ID 0x02, not the cargo label MAIL.

1.2.1
  • Fix: Houses now produce Mail properly, instead of Goods
Tsylatac
Engineer
Engineer
Posts: 50
Joined: 26 Dec 2015 01:04

Re: Improved Town Industries

Post by Tsylatac »

Thanks for the quick responses to bug reports! I'm enjoying my game so far. :D

I know part of the aim is to keep things simple, but would you consider (optionally) adding the few remaining industries from vanilla Temperate? I think Banks and Oil Rigs would fit in nicely (though with Banks there's the slight problem of ITL reusing the sprites), but I don't see the need to remove the Logging Camp in favor of having a separate Forest and Sawmill.
User avatar
2TallTyler
Route Supervisor
Route Supervisor
Posts: 490
Joined: 11 Aug 2019 18:15
Contact:

Re: Improved Town Industries

Post by 2TallTyler »

I'll consider it if/when I rework the algorithm which limits industry numbers to reserve space for industry types which haven't yet been invented. I'd like do this eventually to add support for maps smaller than 256x256, but it's not a priority right now.
Tsylatac
Engineer
Engineer
Posts: 50
Joined: 26 Dec 2015 01:04

Re: Improved Town Industries

Post by Tsylatac »

Fair enough!
User avatar
2TallTyler
Route Supervisor
Route Supervisor
Posts: 490
Joined: 11 Aug 2019 18:15
Contact:

Re: Improved Town Industries

Post by 2TallTyler »

A quick bugfix release.

1.2.2

- Change: Population requirement for Factory reduced to 100 if Improved Town Layouts is loaded with the Reduced Early House Population parameter active
- Fix: Map too small error actually requires 256x256, not 256x512
gravelpit
Traffic Manager
Traffic Manager
Posts: 200
Joined: 26 Feb 2015 14:49
Location: Poland

Re: Improved Town Industries

Post by gravelpit »

Nice im thanksfoul, but why 1700?!
Its so many dams today using grf vehicules.. I play since 1994 and never start game until 1900, that game is so fast that i chet and i rewarding the date.
I asking everybody ho read this!
WHEAR WE (OPENTTD) GOING?
User avatar
2TallTyler
Route Supervisor
Route Supervisor
Posts: 490
Joined: 11 Aug 2019 18:15
Contact:

Re: Improved Town Industries

Post by 2TallTyler »

I chose 1700 because that’s when the first vehicles become available in Sailing Ships and eGRVTS, two popular vehicle sets which add extremely early vehicles. But this is simply an option for those who wish to start an early game. You can start in any year.
User avatar
2TallTyler
Route Supervisor
Route Supervisor
Posts: 490
Joined: 11 Aug 2019 18:15
Contact:

Re: Improved Town Industries

Post by 2TallTyler »

1.3.2
July 31, 2020
  • Fix: Cargo labels reorganized (again) to fix Goods and Food acceptance by base game houses
  • Change: Rewritten NewGRF description mentions the need for NewGRF vehicles
Not savegame-compatible, but these were only bugs for those using base game houses and vehicles. If that doesn't describe you, no need to upgrade.
User avatar
2TallTyler
Route Supervisor
Route Supervisor
Posts: 490
Joined: 11 Aug 2019 18:15
Contact:

Re: Improved Town Industries

Post by 2TallTyler »

Finally, some new features instead of just bugfixes! :)

1.4.0
  • Add: Parameter to disable automatic field generation
  • Add: Decorative objects for each type of farm field, with terrain awareness
  • Add: Additional industry tile layouts for Coal Mine, Logging Camp, Oil Refinery, Paper Mill, and Factory
    • Thanks to YaoAngelsin for designing many of these
  • Add/Change: Added parameter to make Logging Camp behave like the vanilla Forest. This is the new default, but players can still choose the previous sub-tropic Lumber Mill behavior.
User avatar
2TallTyler
Route Supervisor
Route Supervisor
Posts: 490
Joined: 11 Aug 2019 18:15
Contact:

Re: Improved Town Industries

Post by 2TallTyler »

Waste & Recycling

The citizens of Improved Town Layouts have decided to leave their trash streetside for transport companies to collect. You can send it to the Power Plant for incineration, or to the Recycling Center for sorting and reuse.

When enabled by parameter in Improved Town Industries, Waste is generated by Improved Town Layouts houses and accepted by the new Recycling Center industry. The sorted Recyclables can be shipped to a variety of industries to re-enter the production stream:
  • Steel Mill (scrap metal)
  • Paper Mill (paper and cardboard)
  • Factory (plastics)
  • Farm (organic waste/compost)
These industries turn recyclables into their usual production (Steel, Goods, or Food), at a 1:1 rate, giving you more secondary products to transport.

Many thanks to jrook1445 for explaining things and providing clever code.

Still in Beta - want to help test?

I'd like to test this thoroughly before releasing on the fruit stand around the end of August. I welcome bug reports and suggestions on game balance issues. You can download beta versions of both this and Improved Town Layouts (required) here (updated to beta3 on August 19).

Other changes
  • Add: Chemicals delivered to Farms (as fertilizer) are now converted into Food at a 1:1 rate, as with deliveries to the Paper Mill
  • Codechange: Industries now have defined industry IDs for future update stability
User avatar
2TallTyler
Route Supervisor
Route Supervisor
Posts: 490
Joined: 11 Aug 2019 18:15
Contact:

Re: Improved Town Industries

Post by 2TallTyler »

recycling_center.PNG
recycling_center.PNG (878.15 KiB) Viewed 53949 times
Waste & Recycling is ready for release! A big thanks to jrook1445 for helping me understand the house production loop and writing clever code, and to /u/Pop06095 on reddit for playtesting and providing great feedback!

A few things changed since the Beta test, but I can't edit that post. Here's how things work in release:

Waste & Recycling chain
(requires Improved Town Layouts)
  • Improved Town Layouts houses produce Waste, which can be transported to the Power Plant (from 1882) for incineration or to the Recycling Center (from 1945) for conversion to Recycled Materials. Houses do not produce Waste before 1882.
  • Recycled Materials are accepted at:
    • Steel Mill (scrap metal)
    • Paper Mill (paper and cardboard)
    • Factory (plastics)
    • Farm (organic waste/compost)
  • These industries turn Recycled Materials into their usual production (Steel, Goods, or Food), at a 1:1 rate, giving you more secondary products to transport

Changelog

1.5.0
August 29, 2020
  • Add: Waste & Recycling
  • Add: Chemicals delivered to Farms (as fertilizer) are now converted into Food at a 1:1 rate, as with deliveries to the Paper Mill
  • Add: Loading ITI alongside most incompatible industry sets throws a fatal error which disables ITI. The list of incompatible industries is defined manually, so please notify me of new/additional incompatible NewGRFs.
  • Codechange: Industries now have defined industry IDs for future update stability
User avatar
Gadg8eer
Traffic Manager
Traffic Manager
Posts: 190
Joined: 14 Dec 2019 14:22

Re: Improved Town Industries

Post by Gadg8eer »

Question. Which cargo label do you use for waste? Is it WSTE, as listed here, or is it something else?
I have Asperger's, please be easy on me about stuff. My apologies if I've been a problem for you in the past.
User avatar
2TallTyler
Route Supervisor
Route Supervisor
Posts: 490
Joined: 11 Aug 2019 18:15
Contact:

Re: Improved Town Industries

Post by 2TallTyler »

It is indeed WSTE, and the cargo classes are Bulk, Piece Goods (matching Recyclables in FIRS), and Covered.
User avatar
Gadg8eer
Traffic Manager
Traffic Manager
Posts: 190
Joined: 14 Dec 2019 14:22

Re: Improved Town Industries

Post by Gadg8eer »

2TallTyler wrote: 30 Aug 2020 13:04 It is indeed WSTE, and the cargo classes are Bulk, Piece Goods (matching Recyclables in FIRS), and Covered.
Alright, thanks. How much waste do the houses produce in your GRFs? I'm going to add compatibility for waste to the "Late Start" version of OpenGFX Mars Houses.
I have Asperger's, please be easy on me about stuff. My apologies if I've been a problem for you in the past.
User avatar
2TallTyler
Route Supervisor
Route Supervisor
Posts: 490
Joined: 11 Aug 2019 18:15
Contact:

Re: Improved Town Industries

Post by 2TallTyler »

It depends on the building. I’m using the produce-cargo callback, which runs 8-9 times per month, hooked to some clever code by jrook1445 to produce every 8 iterations, allowing each house to specify its monthly production of each type: PASS, MAIL, and WSTE. Note that defining the produce_cargo callback overrides and disables the usual population and mail_multiplier production.

The code is pretty well-commented, but feel free to ask for clarification on anything. Code.

Also, when you release your NewGRF, please let me know so I can add compatibility to ITI.
User avatar
Gadg8eer
Traffic Manager
Traffic Manager
Posts: 190
Joined: 14 Dec 2019 14:22

Re: Improved Town Industries

Post by Gadg8eer »

2TallTyler wrote: 31 Aug 2020 15:53 It depends on the building. I’m using the produce-cargo callback, which runs 8-9 times per month, hooked to some clever code by jrook1445 to produce every 8 iterations, allowing each house to specify its monthly production of each type: PASS, MAIL, and WSTE. Note that defining the produce_cargo callback overrides and disables the usual population and mail_multiplier production.

The code is pretty well-commented, but feel free to ask for clarification on anything. Code.

Also, when you release your NewGRF, please let me know so I can add compatibility to ITI.
Oh boy that looks complicated. Would there be a good way to make the modified Mars houses produce WSTE without using any of that? Maybe future homes produce less waste?
I have Asperger's, please be easy on me about stuff. My apologies if I've been a problem for you in the past.
User avatar
2TallTyler
Route Supervisor
Route Supervisor
Posts: 490
Joined: 11 Aug 2019 18:15
Contact:

Re: Improved Town Industries

Post by 2TallTyler »

Nope, that callback is the only way for houses to produce anything other than passengers or mail. It’s not as bad as it looks, though. All of the switches which store temporary variables are specific callbacks for each type of house, then they all share the compatibility switch and production loop at the top.
User avatar
Gadg8eer
Traffic Manager
Traffic Manager
Posts: 190
Joined: 14 Dec 2019 14:22

Re: Improved Town Industries

Post by Gadg8eer »

2TallTyler wrote: 31 Aug 2020 23:02 Nope, that callback is the only way for houses to produce anything other than passengers or mail. It’s not as bad as it looks, though. All of the switches which store temporary variables are specific callbacks for each type of house, then they all share the compatibility switch and production loop at the top.
Ah, I see. I was thinking of the cargoes that houses accept, not the cargoes they produce.

So, I downloaded recycling.nml, but what do I add to the code of each house to make it refer to the switches?
I have Asperger's, please be easy on me about stuff. My apologies if I've been a problem for you in the past.
User avatar
2TallTyler
Route Supervisor
Route Supervisor
Posts: 490
Joined: 11 Aug 2019 18:15
Contact:

Re: Improved Town Industries

Post by 2TallTyler »

Each house will need the cargo_production callback which links to the corresponding production level switch. See the landmarks file for examples.
Post Reply

Return to “Graphics Releases”

Who is online

Users browsing this forum: No registered users and 3 guests