Transport Tycoon Forums

The place to talk about Transport Tycoon
It is currently Tue Apr 23, 2019 3:09 am

All times are UTC




Post new topic  Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Sun Mar 24, 2019 12:33 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Sat Mar 31, 2007 2:23 pm
Posts: 4826
Location: Lost in Music
Planetmaker merged the PR for NML 16-cargo industry support https://github.com/OpenTTD/nml/pull/15

1. There are no docs for this feature. Someone needs to write them, per the pull request.
2. This feature breaks backwards compatibility in NML.
3. The feature is relatively untested.

NML remains unmaintained, if you use it, and you want to see it continue to be developed, you need to help. Find us in #openttd irc https://wiki.openttd.org/Irc

cheers,

Andy

_________________
FIRS Industry Replacement Set (Released) | HEQS Heavy Equipment Set (trucks, industrial trams and more) (Finished)
Squid Ate FISH (ships) (Released) | CHIPS Has Improved Players' Stations (Finished)
Iron Horse (trains, released) | Termite (tracks for Iron Horse, released) | Busy Bee (game script, released)

Road Hog (road vehicles, released)


Top
   
PostPosted: Mon Apr 22, 2019 12:21 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Sat Feb 14, 2015 12:44 am
Posts: 2902
Location: Newcastle, Australia
Hi all,

In the NML update dated April 10, tried to follow the sample for the Industry to try add extra cargos to my Industries, but unfortunately have trouble understanding it and also some of the code it comes up with some error messages.

For instance when I add this:
Code:
               cargo_types: [
            produce_cargo("LVST", 8),
            produce_cargo("GRAI", 12),
            produce_cargo("WOOD", 4),
        ];

Get a message
Quote:
Unknown property name: cargo types


I added other files from the sample trying to work out why it keep giving me that error message, but I was unsuccessful.

So I made up a AuzIndTest with just one Industry to test with.

The Industry is called "Commercials" I extracted it from my main AuzInd files.

I've zipped up all the files associated with AuzIndTest for anyone who would like to play around with it and see if they can add extra cargos to it.

The nml file I zipped up has 6332 lines. The first 2038 is all references to 56 different cargo types and some Parameter settings.

Majority of my coding is extracted from FIRS 1.4.3.

Hoping those who understand coding better than me might be able to work with this one Industry and get it to work with many cargos.

Hope it will help other coders too.

Cheers all


Attachments:
AuzIndTest.rar [239.49 KiB]
Downloaded 1 time

_________________
Soot Happens
All my projects are GPLv2 License unless stated.
Auz Project Releases: viewtopic.php?f=67&t=84725
AuzTrains: http://www.tt-forums.net/viewtopic.php?f=26&t=74193
Auz Industry Sets: http://www.tt-forums.net/viewtopic.php?f=26&t=74471
AuzObjects: viewtopic.php?f=26&t=75657
AuzBridges: viewtopic.php?f=26&t=75248
AuzStations: viewtopic.php?f=26&t=76390
AuzTracks: viewtopic.php?f=26&t=82691
Top
   
PostPosted: Mon Apr 22, 2019 2:41 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Sat Mar 31, 2007 2:23 pm
Posts: 4826
Location: Lost in Music
Nielsm wrote an example for new production callback format here: https://0x0.st/zHBc.txt

I've attached a couple of files from FIRS v4 development.

Hope this helps.


Attachments:
quarry.nml [216.52 KiB]
Downloaded 3 times
factory.nml [58.62 KiB]
Downloaded 3 times

_________________
FIRS Industry Replacement Set (Released) | HEQS Heavy Equipment Set (trucks, industrial trams and more) (Finished)
Squid Ate FISH (ships) (Released) | CHIPS Has Improved Players' Stations (Finished)
Iron Horse (trains, released) | Termite (tracks for Iron Horse, released) | Busy Bee (game script, released)

Road Hog (road vehicles, released)
Top
   
PostPosted: Mon Apr 22, 2019 11:23 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Sat Feb 14, 2015 12:44 am
Posts: 2902
Location: Newcastle, Australia
Thanks kindly for the examples.

Will experiment with those and see what I can do.

Cheers

_________________
Soot Happens
All my projects are GPLv2 License unless stated.
Auz Project Releases: viewtopic.php?f=67&t=84725
AuzTrains: http://www.tt-forums.net/viewtopic.php?f=26&t=74193
Auz Industry Sets: http://www.tt-forums.net/viewtopic.php?f=26&t=74471
AuzObjects: viewtopic.php?f=26&t=75657
AuzBridges: viewtopic.php?f=26&t=75248
AuzStations: viewtopic.php?f=26&t=76390
AuzTracks: viewtopic.php?f=26&t=82691


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 4 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000-2019 phpBB Limited

Copyright © Owen Rudge/The Transport Tycoon Forums 2001-2019.
Hosted by Zernebok Hosting.