Re: NML - a Newgrf Meta Language
Posted: 08 Jun 2016 11:02
Here's a 2x3 set of tiles that 3iff designed and I coded it so can now be used with Industries.
They make drawing your Industries so much easier and quicker.The place to talk about Transport Tycoon
https://www.tt-forums.net/
Good idea .. anyone suggest a heading for the Topic so easy to find?Eddi wrote:might be worth splitting this in a separate topic, nobody is going to find this buried in here.
Not a bad idea, maybe call it something like "my -insert name- coding examples/templates" and put links to various examples in the first post (with a short description).Eddi wrote:might be worth splitting this in a separate topic, nobody is going to find this buried in here.
Your the one who first invented the joined sprites .. at least to my knowledge you are. So be nice if you started it by adding the 2x1, 2x2 and 2x3 sets for objects shown in this section earlier. Then I can add the Industry codes I done.Quast65 wrote:Not a bad idea, maybe call it something like "my -insert name- coding examples/templates" and put links to various examples in the first post (with a short description).Eddi wrote:might be worth splitting this in a separate topic, nobody is going to find this buried in here.
Saves some time uploading examples if they are already somewhere in this forum and, if new are added, makes those also easy to find.
I think that is the best way to go, create a page on the wiki where links can be added to various coding examples/templates.frosch wrote:You could also add it to, or link it from:
https://www.tt-wiki.net/index.php?title=NMLTutorial
Code: Select all
switch(FEAT_INDUSTRYTILES, SELF, test8x8x2_industry_layout_2_graphics_switch, relative_pos) {
relative_coord(0, 0): test8x8x2_spritelayout_65;
relative_coord(0, 1): test8x8x2_spritelayout_66;
relative_coord(0, 2): test8x8x2_spritelayout_67;
relative_coord(0, 3): test8x8x2_spritelayout_68;
relative_coord(0, 4): test8x8x2_spritelayout_69;
relative_coord(0, 5): test8x8x2_spritelayout_70;
relative_coord(0, 6): test8x8x2_spritelayout_71;
relative_coord(0, 7): test8x8x2_spritelayout_72;
relative_coord(1, 0): test8x8x2_spritelayout_73;
relative_coord(1, 1): test8x8x2_spritelayout_74;
relative_coord(1, 2): test8x8x2_spritelayout_75;
relative_coord(1, 3): test8x8x2_spritelayout_76;
relative_coord(1, 4): test8x8x2_spritelayout_77;
relative_coord(1, 5): test8x8x2_spritelayout_78;
relative_coord(1, 6): test8x8x2_spritelayout_79;
relative_coord(1, 7): test8x8x2_spritelayout_80;
relative_coord(2, 0): test8x8x2_spritelayout_81;
relative_coord(2, 1): test8x8x2_spritelayout_82;
relative_coord(2, 2): test8x8x2_spritelayout_83;
relative_coord(2, 3): test8x8x2_spritelayout_84;
relative_coord(2, 4): test8x8x2_spritelayout_85;
relative_coord(2, 5): test8x8x2_spritelayout_86;
relative_coord(2, 6): test8x8x2_spritelayout_87;
relative_coord(2, 7): test8x8x2_spritelayout_88;
relative_coord(5, 0): test8x8x2_spritelayout_105;
relative_coord(5, 1): test8x8x2_spritelayout_106;
relative_coord(5, 2): test8x8x2_spritelayout_107;
relative_coord(5, 3): test8x8x2_spritelayout_108;
relative_coord(5, 4): test8x8x2_spritelayout_109;
relative_coord(5, 5): test8x8x2_spritelayout_110;
relative_coord(5, 6): test8x8x2_spritelayout_111;
relative_coord(5, 7): test8x8x2_spritelayout_112;
relative_coord(6, 0): test8x8x2_spritelayout_113;
relative_coord(6, 1): test8x8x2_spritelayout_114;
relative_coord(6, 2): test8x8x2_spritelayout_115;
relative_coord(6, 3): test8x8x2_spritelayout_116;
relative_coord(6, 4): test8x8x2_spritelayout_117;
relative_coord(6, 5): test8x8x2_spritelayout_118;
relative_coord(6, 6): test8x8x2_spritelayout_119;
relative_coord(6, 7): test8x8x2_spritelayout_120;
relative_coord(7, 0): test8x8x2_spritelayout_121;
relative_coord(7, 1): test8x8x2_spritelayout_122;
relative_coord(7, 2): test8x8x2_spritelayout_123;
relative_coord(7, 3): test8x8x2_spritelayout_124;
relative_coord(7, 4): test8x8x2_spritelayout_125;
relative_coord(7, 5): test8x8x2_spritelayout_126;
relative_coord(7, 6): test8x8x2_spritelayout_127;
relative_coord(7, 7): test8x8x2_spritelayout_128;
test8x8x2_spritelayout_2; // a default is needed, but should never be reached, layout definitions are explicit
}
tilelayout test8x8x2_industry_layout_2_tilelayout {
0, 0: test8x8x2_tile;
0, 1: test8x8x2_tile;
0, 2: test8x8x2_tile;
0, 3: test8x8x2_tile;
0, 4: test8x8x2_tile;
0, 5: test8x8x2_tile;
0, 6: test8x8x2_tile;
0, 7: test8x8x2_tile;
1, 0: test8x8x2_tile;
1, 1: test8x8x2_tile;
1, 2: test8x8x2_tile;
1, 3: test8x8x2_tile;
1, 4: test8x8x2_tile;
1, 5: test8x8x2_tile;
1, 6: test8x8x2_tile;
1, 7: test8x8x2_tile;
2, 0: test8x8x2_tile;
2, 1: test8x8x2_tile;
2, 2: test8x8x2_tile;
2, 3: test8x8x2_tile;
2, 4: test8x8x2_tile;
2, 5: test8x8x2_tile;
2, 6: test8x8x2_tile;
2, 7: test8x8x2_tile;
5, 0: test8x8x2_tile;
5, 1: test8x8x2_tile;
5, 2: test8x8x2_tile;
5, 3: test8x8x2_tile;
5, 4: test8x8x2_tile;
5, 5: test8x8x2_tile;
5, 6: test8x8x2_tile;
5, 7: test8x8x2_tile;
6, 0: test8x8x2_tile;
6, 1: test8x8x2_tile;
6, 2: test8x8x2_tile;
6, 3: test8x8x2_tile;
6, 4: test8x8x2_tile;
6, 5: test8x8x2_tile;
6, 6: test8x8x2_tile;
6, 7: test8x8x2_tile;
7, 0: test8x8x2_tile;
7, 1: test8x8x2_tile;
7, 2: test8x8x2_tile;
7, 3: test8x8x2_tile;
7, 4: test8x8x2_tile;
7, 5: test8x8x2_tile;
7, 6: test8x8x2_tile;
7, 7: test8x8x2_tile;
}
So... Is this the trick used to keep room in industries for roads/tracks/waterways?? If so, very very interesting!! I have always been curious about how that was done in some industry sets.GarryG wrote: Simple to use (has to be for me to understand things) .. and the great part about is no more splitting buildings to put in single tiles.
Hope you make use of it.
Cheers
But that can make the numbers harder to see for some people (also with regard to some colors of the tiles, blue can be difficult to see then, or ingame the blue will get the color of the ground and then also harder to see), I would then advise to make some templates with rows/lines of tiles in transparent blue and just copy paste those over the graphic template.Leanden wrote:If you change the colours of the numbers in the graphic template to transparent blue, then the unused tiles will be easier to edit out by just using fill tool and transparent blue
I just tried that idea and I think be okLeanden wrote:If you change the colours of the numbers in the graphic template to transparent blue, then the unused tiles will be easier to edit out by just using fill tool and transparent blue