NML - a Newgrf Meta Language

Discussions about the technical aspects of graphics development, including NewGRF tools and utilities.

Moderator: Graphics Moderators

User avatar
GarryG
Tycoon
Tycoon
Posts: 5836
Joined: 14 Feb 2015 00:44
Location: Newcastle, Australia

Re: NML - a Newgrf Meta Language

Post by GarryG »

Well fellas, looks like slitting a large combined sprite set not viable if want to build a station in the gap.

Need to use 2 separate views to achieve that result.

I done some sets and here the file with them all.
templates_Industry.rar
(2.28 MiB) Downloaded 140 times
You will find the templates for 1x2 4 views, 1x3 4 views, 2x2 2 & 4 views, 2x3 2 & 4 views, 3x3 2 & 4 views, 4x4 2 & 4 views, 6x6 4 views, 8x8 2 views and 12x12 1 view.

Hope some of you can make use of them.

Cheers
Soot Happens
Screenshot Of The Month Winner March 2020
All my projects are GPLv2 License unless stated.
Auz Road Sets: viewtopic.php?f=29&t=87335
Auz Project Releases: viewtopic.php?f=67&t=84725
Auz Trains: 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
Auz Objects: viewtopic.php?f=26&t=75657
Auz Bridges: viewtopic.php?f=26&t=75248
Auz Stations: viewtopic.php?f=26&t=76390
Auz Tracks: viewtopic.php?f=26&t=82691
Auz Subway Stations: viewtopic.php?f=26&t=85335
Auz Eyecandy TramTracks: viewtopic.php?t=89908
User avatar
Quast65
Tycoon
Tycoon
Posts: 2642
Joined: 09 Oct 2011 13:51
Location: The Netherlands

Re: NML - a Newgrf Meta Language

Post by Quast65 »

Leanden wrote:Ive sent you a pm about this, but the fix is easy, wherever you intend to split the tiles, seperate this into 2 spritesheets and then update the spriteset references for those tiles on the other side of the split to the second spritesheet. Then it wont try drawing the more northern tiles as overlays :)
So, if I understand you correctly, rather than starting out with for example this (a single file with the complete drawing):
Example54.png
Example54.png (4.4 KiB) Viewed 6236 times
You need to split it into these (two separate files, each containing a different part of the drawing):
Example55.png
Example55.png (6.81 KiB) Viewed 6236 times
That way the general reference to the location of the tiles stays the same, but you only have to change the filename for where the tiles can be found.
So for tiles 123, file is 3x3_back.png and tiles 789 3x3_front.png.

Am I correct with this?
If so, indeed an easy fix.
Projects: http://www.tt-forums.net/viewtopic.php?f=26&t=57266
Screenshots: http://www.tt-forums.net/viewtopic.php?f=47&t=56959
Scenario of The Netherlands: viewtopic.php?f=60&t=87604

Winner of the following screenshot competitions:
sep 2012, jan 2013, apr 2013, aug 2013, mar 2014, mar 2016, oct 2020
All my work is released under GPL-license (either V2 or V3), if not clearly stated otherwise.
User avatar
GarryG
Tycoon
Tycoon
Posts: 5836
Joined: 14 Feb 2015 00:44
Location: Newcastle, Australia

Re: NML - a Newgrf Meta Language

Post by GarryG »

Both sprites will be in same png .. the first set be numbered 1 to 9 and the 10 to 18.

If the set has 4 views each be numbered 1 to 9, 10 to 18, 19 to 27 and 28 to 36.

And you refer to each sprite by those numbers.

In the case of the image you showing .. will reference to sprites 1 to 6 and 13 to 18.
Soot Happens
Screenshot Of The Month Winner March 2020
All my projects are GPLv2 License unless stated.
Auz Road Sets: viewtopic.php?f=29&t=87335
Auz Project Releases: viewtopic.php?f=67&t=84725
Auz Trains: 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
Auz Objects: viewtopic.php?f=26&t=75657
Auz Bridges: viewtopic.php?f=26&t=75248
Auz Stations: viewtopic.php?f=26&t=76390
Auz Tracks: viewtopic.php?f=26&t=82691
Auz Subway Stations: viewtopic.php?f=26&t=85335
Auz Eyecandy TramTracks: viewtopic.php?t=89908
User avatar
Quast65
Tycoon
Tycoon
Posts: 2642
Joined: 09 Oct 2011 13:51
Location: The Netherlands

Re: NML - a Newgrf Meta Language

Post by Quast65 »

GarryG wrote:Both sprites will be in same png ..
No, there will be 2 separate PNGs. One containing sprites for the front part and one containing sprites for the back part, both exactly the same size and placed on the same spot, just the transparency is in different places.
In your code you then only have to change the locationname. So for example you started out with just one PNG (called test3x3_1.png), then the code for sprite number 1 and number 7 was this:

Code: Select all

	spriteset(test3x3_spriteset_1_0) {
	[352, 0, 64, 168, -31, -137, ANIM | NOCROP, "gfx/test3x3_1.png"]
	}
	

Code: Select all

	spriteset(test3x3_spriteset_7_0) {
	[544, 0, 64, 264, -31, -233, ANIM | NOCROP, "gfx/test3x3_1.png"]
	}
But now you have 2 PNGs, one for the front (lets call that one test3x3_1_FRONT.png) and one for the back (lets call that one test3x3_1_BACK.png), that way you only have to change the code to this:

Code: Select all

	spriteset(test3x3_spriteset_1_0) {
	[352, 0, 64, 168, -31, -137, ANIM | NOCROP, "gfx/test3x3_1_BACK.png"]
	}
	

Code: Select all

	spriteset(test3x3_spriteset_7_0) {
	[544, 0, 64, 264, -31, -233, ANIM | NOCROP, "gfx/test3x3_1_FRONT.png"]
	}
So now it takes tile 1 from test3x3_1_BACK.png and tile 7 from test3x3_1_FRONT.png. And if I understood it correctly, this would fix the issue with the clipping of the station in the middle.
Dont forget to change this for the snow-versions too by the way, so also 2 separate snow versions (with front and back) are needed.
Projects: http://www.tt-forums.net/viewtopic.php?f=26&t=57266
Screenshots: http://www.tt-forums.net/viewtopic.php?f=47&t=56959
Scenario of The Netherlands: viewtopic.php?f=60&t=87604

Winner of the following screenshot competitions:
sep 2012, jan 2013, apr 2013, aug 2013, mar 2014, mar 2016, oct 2020
All my work is released under GPL-license (either V2 or V3), if not clearly stated otherwise.
User avatar
Leanden
Tycoon
Tycoon
Posts: 2613
Joined: 19 Mar 2009 19:25
Location: Kent

Re: NML - a Newgrf Meta Language

Post by Leanden »

Quast has it right, by splitting it into two sprites it removes the overlapping tiles from the drawing.
Image
User avatar
Quast65
Tycoon
Tycoon
Posts: 2642
Joined: 09 Oct 2011 13:51
Location: The Netherlands

Re: NML - a Newgrf Meta Language

Post by Quast65 »

Good to hear!
I have asked Garry to send me an example of a 3x3 with middle row cleared for road/track that has the issues, I will then fix it for him so he can see what has to be changed (but it is already nighttime in Australia, so it may take a couple of hours). Actual examples are sometimes easier to understand than snippets of code.
Results will also be posted here.

EDIT:
Yep, it seems to work! ;-)
Example56.png
Example56.png (37.62 KiB) Viewed 6207 times
Thnx Leanden!! :bow:
Projects: http://www.tt-forums.net/viewtopic.php?f=26&t=57266
Screenshots: http://www.tt-forums.net/viewtopic.php?f=47&t=56959
Scenario of The Netherlands: viewtopic.php?f=60&t=87604

Winner of the following screenshot competitions:
sep 2012, jan 2013, apr 2013, aug 2013, mar 2014, mar 2016, oct 2020
All my work is released under GPL-license (either V2 or V3), if not clearly stated otherwise.
User avatar
GarryG
Tycoon
Tycoon
Posts: 5836
Joined: 14 Feb 2015 00:44
Location: Newcastle, Australia

Re: NML - a Newgrf Meta Language

Post by GarryG »

Trying to run NMLC to convert a file Auz_Fake_Rails.nml to newgrf ..however I get this message.

Code: Select all

C:\Tools\NML\ObjectsFakeRails>nmlc Auz_Fake_Rails.nml
[Knmlc ERROR: nmlc: An internal error has occurred:
nmlc-version: v6133:5ec05bde6098 from 2016-10-16
Error:    (IndexError) "pop from empty list".
Command:  ['nmlc', 'Auz_Fake_Rails.nml']
Location: File "nml\actions\action4.py", line 168, in get_string_action4s
Do I have to many entries ?

Had 211 entries .. but when I removed some reducing it back to 205 entries it converted with out any problems .. I thought the limit was 255, but maybe I am wrong.
First though error in a entry but with trial and error discovered wasn't the problem but seems to be too many entries was the problem.

Cheers
Soot Happens
Screenshot Of The Month Winner March 2020
All my projects are GPLv2 License unless stated.
Auz Road Sets: viewtopic.php?f=29&t=87335
Auz Project Releases: viewtopic.php?f=67&t=84725
Auz Trains: 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
Auz Objects: viewtopic.php?f=26&t=75657
Auz Bridges: viewtopic.php?f=26&t=75248
Auz Stations: viewtopic.php?f=26&t=76390
Auz Tracks: viewtopic.php?f=26&t=82691
Auz Subway Stations: viewtopic.php?f=26&t=85335
Auz Eyecandy TramTracks: viewtopic.php?t=89908
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: NML - a Newgrf Meta Language

Post by planetmaker »

GarryG wrote:Trying to run NMLC to convert a file Auz_Fake_Rails.nml to newgrf ..however I get this message.

Code: Select all

C:\Tools\NML\ObjectsFakeRails>nmlc Auz_Fake_Rails.nml
[Knmlc ERROR: nmlc: An internal error has occurred:
nmlc-version: v6133:5ec05bde6098 from 2016-10-16
Error:    (IndexError) "pop from empty list".
Command:  ['nmlc', 'Auz_Fake_Rails.nml']
Location: File "nml\actions\action4.py", line 168, in get_string_action4s
Do I have to many entries ?

Had 211 entries .. but when I removed some reducing it back to 205 entries it converted with out any problems .. I thought the limit was 255, but maybe I am wrong.
First though error in a entry but with trial and error discovered wasn't the problem but seems to be too many entries was the problem.

Cheers
Basically 'yes'. you used all possible strings for a certain type of strings (there are different and I cannot tell which).
User avatar
GarryG
Tycoon
Tycoon
Posts: 5836
Joined: 14 Feb 2015 00:44
Location: Newcastle, Australia

Re: NML - a Newgrf Meta Language

Post by GarryG »

Wonder if the string is the templates for size of sprite used.

The sprite "template_building_low" I have reference to this for 196 different spritesets and each spritset used this template 3 times for normal, purchase and snow.

EDIT: if you like a copy of the nml file let me know.
Soot Happens
Screenshot Of The Month Winner March 2020
All my projects are GPLv2 License unless stated.
Auz Road Sets: viewtopic.php?f=29&t=87335
Auz Project Releases: viewtopic.php?f=67&t=84725
Auz Trains: 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
Auz Objects: viewtopic.php?f=26&t=75657
Auz Bridges: viewtopic.php?f=26&t=75248
Auz Stations: viewtopic.php?f=26&t=76390
Auz Tracks: viewtopic.php?f=26&t=82691
Auz Subway Stations: viewtopic.php?f=26&t=85335
Auz Eyecandy TramTracks: viewtopic.php?t=89908
frosch
OpenTTD Developer
OpenTTD Developer
Posts: 988
Joined: 20 Dec 2006 13:31
Location: Aschaffenburg

Re: NML - a Newgrf Meta Language

Post by frosch »

When you compile your 205-thingies version, nmlc prints a summary at the end, what type of ids it uses and what their limit is.
There you should find something which is close to the maximum.
⢇⡸⢸⠢⡇⡇⢎⡁⢎⡱⢸⡱⢸⣭⠀⢸⢜⢸⢸⣀⢸⣀⢸⣭⢸⡱⠀⢰⠭⡆⣫⠰⣉⢸⢸⠀⢰⠭⡆⡯⡆⢹⠁⠀⢐⠰⡁
User avatar
GarryG
Tycoon
Tycoon
Posts: 5836
Joined: 14 Feb 2015 00:44
Location: Newcastle, Australia

Re: NML - a Newgrf Meta Language

Post by GarryG »

"(undefined string)"

Been brought to my attention in some objects sets getting this message (undefined string) when playing a game in the "Object Selection" menu.

If my objects sets are placed above some objects sets from other makers, they will have that message .. some of those objects sets are: City Objects, VAST + Fences, VAST (Objects), Beach Objects, and SNO-Supercheese's NewObjects.

If I place my object sets after those .. I get the message in some of my sets associated with the Auz_Water_Objects.

I wondering if the problem is in the NML file where need to add lines similar to this:

class: "WATR";
classname: string(STR_WATR);

and in the ing file under

#Object classes

Am I on the right track?
Soot Happens
Screenshot Of The Month Winner March 2020
All my projects are GPLv2 License unless stated.
Auz Road Sets: viewtopic.php?f=29&t=87335
Auz Project Releases: viewtopic.php?f=67&t=84725
Auz Trains: 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
Auz Objects: viewtopic.php?f=26&t=75657
Auz Bridges: viewtopic.php?f=26&t=75248
Auz Stations: viewtopic.php?f=26&t=76390
Auz Tracks: viewtopic.php?f=26&t=82691
Auz Subway Stations: viewtopic.php?f=26&t=85335
Auz Eyecandy TramTracks: viewtopic.php?t=89908
frosch
OpenTTD Developer
OpenTTD Developer
Posts: 988
Joined: 20 Dec 2006 13:31
Location: Aschaffenburg

Re: NML - a Newgrf Meta Language

Post by frosch »

Yes, all classes need a name.
If multiple GRFs define the same class, then one of the names will win (the name from the last GRF).
If your GRF shall not require the other GRFs to be present, your GRF needs to define names for all the classes it uses.
⢇⡸⢸⠢⡇⡇⢎⡁⢎⡱⢸⡱⢸⣭⠀⢸⢜⢸⢸⣀⢸⣀⢸⣭⢸⡱⠀⢰⠭⡆⣫⠰⣉⢸⢸⠀⢰⠭⡆⡯⡆⢹⠁⠀⢐⠰⡁
User avatar
GarryG
Tycoon
Tycoon
Posts: 5836
Joined: 14 Feb 2015 00:44
Location: Newcastle, Australia

Re: NML - a Newgrf Meta Language

Post by GarryG »

frosch wrote:Yes, all classes need a name.
Thanks pal, I though problem might be something like that.

Thought I'd ask to be sure before I changes my codes to some unique so be less chance of that happening again.

Cheers
Soot Happens
Screenshot Of The Month Winner March 2020
All my projects are GPLv2 License unless stated.
Auz Road Sets: viewtopic.php?f=29&t=87335
Auz Project Releases: viewtopic.php?f=67&t=84725
Auz Trains: 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
Auz Objects: viewtopic.php?f=26&t=75657
Auz Bridges: viewtopic.php?f=26&t=75248
Auz Stations: viewtopic.php?f=26&t=76390
Auz Tracks: viewtopic.php?f=26&t=82691
Auz Subway Stations: viewtopic.php?f=26&t=85335
Auz Eyecandy TramTracks: viewtopic.php?t=89908
User avatar
GarryG
Tycoon
Tycoon
Posts: 5836
Joined: 14 Feb 2015 00:44
Location: Newcastle, Australia

Re: NML - a Newgrf Meta Language

Post by GarryG »

GarryG wrote:"(undefined string)"
I changed all the class and classnames thinking that might be the problem to stop it interfering with other objects sets, but unfortunately it wasn't the answer. It did fix some issues, but still received the (undefined string) message if my Auz_Water_Objects was in the wrong order in the Active NewGRF Files. It had to be last and if I included the AuzFakeRailwayLines above the water objects I would get the (undefined string) message only in the water object file for some of it objects.

So I did some test putting the Auz_Water_Objects at top and added one file at a time and eventually found that aircraft set called WAS caused the (undefined string) messages. If I put WAS last then I could put my files and other object files anywhere I liked above the WAS file.

All the time I thought only object files will interfere with object files, but seems like other files will interfere too.

It seems like there is something in WAS and my files Auz_Water_Objects and possibly AuzFakeRailwayLines that interfere with each other.

I put this message here just to let other coders know, when we get these error message, the error might not be the project your working on, but problem could be a interference from some where else.

Cheers
Soot Happens
Screenshot Of The Month Winner March 2020
All my projects are GPLv2 License unless stated.
Auz Road Sets: viewtopic.php?f=29&t=87335
Auz Project Releases: viewtopic.php?f=67&t=84725
Auz Trains: 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
Auz Objects: viewtopic.php?f=26&t=75657
Auz Bridges: viewtopic.php?f=26&t=75248
Auz Stations: viewtopic.php?f=26&t=76390
Auz Tracks: viewtopic.php?f=26&t=82691
Auz Subway Stations: viewtopic.php?f=26&t=85335
Auz Eyecandy TramTracks: viewtopic.php?t=89908
Alberth
OpenTTD Developer
OpenTTD Developer
Posts: 4763
Joined: 09 Sep 2007 05:03
Location: home

Re: NML - a Newgrf Meta Language

Post by Alberth »

GarryG wrote:So I did some test putting the Auz_Water_Objects at top and added one file at a time and eventually found that aircraft set called WAS caused the (undefined string) messages. If I put WAS last then I could put my files and other object files anywhere I liked above the WAS file.

All the time I thought only object files will interfere with object files, but seems like other files will interfere too.

It seems like there is something in WAS and my files Auz_Water_Objects and possibly AuzFakeRailwayLines that interfere with each other.
Did you check whether WAS has undefined strings if you put it last?

Your complete set of NewGRFs may be requiring more strings than OpenTTD has. Since these are provided by OpenTTD to a NewGRF on demand, on a first come - first serve basis, NewGRFs near the bottom may be out of luck. Now WAS sounds like a NewGRF that could require a zillion strings. If so, it would eat a big portion of the available string space, leaving nothing for the others below it. That would explain if you move everything above WAS, those Newgrfs have no problem.
However, you don't solve "require too many strings" by just swapping stuff, you'd just move the problem to a different spot. With your solution, I'd expect the problem to be in WAS now.

It may not be easy to find proof though.
Being a retired OpenTTD developer does not mean I know what I am doing.
User avatar
GarryG
Tycoon
Tycoon
Posts: 5836
Joined: 14 Feb 2015 00:44
Location: Newcastle, Australia

Re: NML - a Newgrf Meta Language

Post by GarryG »

Alberth wrote:Did you check whether WAS has undefined strings if you put it last?
Thanks for mentioning this .. just checked by starting a game in year 2000 .. when try select a cargo for a plane .. for instance if I click on Food if it comes up with Food (undefined string).. has this on all cargos when selecting them.

If I move WAS above my object sets the undefined string disappears and allows you to use for selection.

So that was the answer to my problem .. bumma.
Alberth wrote:Your complete set of NewGRFs may be requiring more strings than OpenTTD has.
In my sets AuzFakeRailwayLines is the largest and Auz_Water_Objects if the smallest and problem seems to be with these.

Do you think if I re-do my objects sets and make each one a bit smaller .. would that help?

Maybe WAS and my sets not meant to play with each other.
Soot Happens
Screenshot Of The Month Winner March 2020
All my projects are GPLv2 License unless stated.
Auz Road Sets: viewtopic.php?f=29&t=87335
Auz Project Releases: viewtopic.php?f=67&t=84725
Auz Trains: 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
Auz Objects: viewtopic.php?f=26&t=75657
Auz Bridges: viewtopic.php?f=26&t=75248
Auz Stations: viewtopic.php?f=26&t=76390
Auz Tracks: viewtopic.php?f=26&t=82691
Auz Subway Stations: viewtopic.php?f=26&t=85335
Auz Eyecandy TramTracks: viewtopic.php?t=89908
Alberth
OpenTTD Developer
OpenTTD Developer
Posts: 4763
Joined: 09 Sep 2007 05:03
Location: home

Re: NML - a Newgrf Meta Language

Post by Alberth »

GarryG wrote:
Alberth wrote:Did you check whether WAS has undefined strings if you put it last?
Thanks for mentioning this .. just checked by starting a game in year 2000 .. when try select a cargo for a plane .. for instance if I click on Food if it comes up with Food (undefined string).. has this on all cargos when selecting them.

If I move WAS above my object sets the undefined string disappears and allows you to use for selection.

So that was the answer to my problem .. bumma.
Alberth wrote:Your complete set of NewGRFs may be requiring more strings than OpenTTD has.
In my sets AuzFakeRailwayLines is the largest and Auz_Water_Objects if the smallest and problem seems to be with these.
Sorry for not being more precise.

What I meant was "the set of NewGRFs that you use in your game", rather than "the set of NewGRFs you wrote", as you seem to interpret it.


As for solving, while I do wonder if you can reduce string usage in some way, I don't know enough of the string system to say anything sensible about solution directions, sorry. I also don't think you can point to a particular NewGRF as being the bad one. The combined set together needs more strings than exist, you can't conclude much more than that, I think.
Maybe OpenTTD should do more checking and report an error or warning if it runs out of free strings. Not sure if that would help though, it doesn't help the user much, other than being aware of it. Providing a solution would be much nicer.
Being a retired OpenTTD developer does not mean I know what I am doing.
User avatar
GarryG
Tycoon
Tycoon
Posts: 5836
Joined: 14 Feb 2015 00:44
Location: Newcastle, Australia

Re: NML - a Newgrf Meta Language

Post by GarryG »

Alberth wrote:Sorry for not being more precise.
That's no problem as I find it hard to explain details at times.

I also got one of those keyboards that seem to type wrong words and spell things wrong :D
For instance where I wrote "So that was the answer to my problem .. bumma."
It should have been "So that was not the answer to my problem .. bumma." :)
For some reason keyboard left out the not and I not notice it until now.

I wonder with the sprite graphics .. do you have to have 3 sets for each objects.

Code: Select all

//spritesets with 4 directions, SNOW-version and the PURCHASE-menu
spriteset (spriteset_dam_shore1) {
    template_building_low(0,0,"gfx/dam_shore1.png")
}

spriteset (spriteset_dam_shore1_SNOW) {
    template_building_low(0,0,"gfx/dam_shore1_SNOW.png")
}

spriteset (spriteset_dam_shore1_PURCHASE) {
    template_building_low(0,0,"gfx/dam_shore1_PURCHASE.png")
}

Can the PURCHASE & the SNOW spritesets refer to the 1st one if they the same and the object does not need snow on it?

I'll experiment on that idea today and see what happens.

Thanks kindly for helping.
Soot Happens
Screenshot Of The Month Winner March 2020
All my projects are GPLv2 License unless stated.
Auz Road Sets: viewtopic.php?f=29&t=87335
Auz Project Releases: viewtopic.php?f=67&t=84725
Auz Trains: 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
Auz Objects: viewtopic.php?f=26&t=75657
Auz Bridges: viewtopic.php?f=26&t=75248
Auz Stations: viewtopic.php?f=26&t=76390
Auz Tracks: viewtopic.php?f=26&t=82691
Auz Subway Stations: viewtopic.php?f=26&t=85335
Auz Eyecandy TramTracks: viewtopic.php?t=89908
frosch
OpenTTD Developer
OpenTTD Developer
Posts: 988
Joined: 20 Dec 2006 13:31
Location: Aschaffenburg

Re: NML - a Newgrf Meta Language

Post by frosch »

I checked the NewGRF configuration you mentioned.
They use this many sprites/texts:

Code: Select all

                                                                 GRM sprites   A1/5 sprites     Texts
OPENTTD.GRF                                                                          1850
xussr_railway_set-0.4.1/xussr.grf                                      295          91619        1199
auzlandscapeobjects-2/auz_landscape_objects.grf                                      1044          53
auz_lineside_objects-23/auz_lineside_objects.grf                                     2188         502
auz_roadside_objects-20/auz_roadside_objects.grf                                     4800         706
beach_objects-1.2/beach_v1_2.grf                                                      620          21
city_objects-b08.1/co08.1.grf                                                         569          16
dutch_road_furniture-0.7.1/dutchroadfurniture.grf                                    2024          72
fake_airport_objects-0.1/fakeairportobjects_v0_1.grf                                 1520         229
farm_objects-3/farmobjects.grf                                                         48          57
friss-0.1.0/friss.grf                                                                 136          98
sno__supercheeses_newobjects-0.2/sno-supercheesesnewobjects.grf                       304          22
vast_objects-0.3.0/vastobjects.grf                                                    672          58
vast_fences-0.2.0/vastfences.grf                                                       32           7

Total                                                                  295         107426        3040
Limit                                                             ca. 9000   ca. 16000000    ca. 6100
It does not appear like you reached any limit here.
If you can provide a savegame, I can check your particular configuration, but it still seems unlikely that you reached some limit.


About your sprite sharing:
You can share sprites between different graphic chains and even different objects just fine.
Sharing them reduces memory usage.
⢇⡸⢸⠢⡇⡇⢎⡁⢎⡱⢸⡱⢸⣭⠀⢸⢜⢸⢸⣀⢸⣀⢸⣭⢸⡱⠀⢰⠭⡆⣫⠰⣉⢸⢸⠀⢰⠭⡆⡯⡆⢹⠁⠀⢐⠰⡁
User avatar
Pyoro
Tycoon
Tycoon
Posts: 2558
Joined: 17 Oct 2008 12:17
Location: Virgo Supercluster

Re: NML - a Newgrf Meta Language

Post by Pyoro »

Not with just those, but with a full list like (c&p mess follows)

Code: Select all

FBFB0501|60082E7DF1D3976274AB86843C3E07B2|dutch_road_furniture-0.7.1\dutchroadfurniture.grf = 0 0 0
BEBE0100|E24EEEA0E1760CE5CBE2DE202859A3F2|farmobjects.grf = 
BEBE0200|BBDD17A87E73E401E92AE92A8F555E59|forestobjects.grf = 
504A0013|E2FB4F9E66207F8016B7303323FDD00C|isrdwestyle_objects-1.0\isrdwe_objects_v1_0.grf = 
54470203|F84B6D37659F23D19E176C99BC48DEF6|opengfx_airports_as_objects-0.3\airportobjects.grf = 
504A5457|D795341420C564012E262FAB630018C5|town_walls_objects-0.1\townwalls_v0_1.grf = 
6D620C00|C79E400CDDAF4610BC8613199D08933E|marico.grf = 
F1250006|FE6C7CCC6CF0D1069BB360D20AC0609E|firs_2-2.1.1\firs.grf = 0 0 0 0 0 0 16 150 80 300
6D620401|C5ACB6D5536A464FD78871D91840A35F|dbsetxlw.grf = 
4D656F17|8A4F8A04256C90BECF818D134C91C816|long_vehicles-v404oct2008\4lvw.grf = 
57A50001|318F3C3F17CA68EAD533BAC88B093094|was_world_airliners_set-0.1\was.grf = 0 0
4A430001|4CF50E2A770F6672A77A8842A3129ECA|british_stations_set-0.0.4final\dstatsw.grf = 
43415463|422B1603DC1CEDA4E59E715E12EAD332|canstnw.grf = 
43485053|3FFDBE665AF574189F8A6B08C94F3A71|chips_station_set-1.6.1\chips.grf = 
52455400|1600687C50C5AB1E72EDD487CAD50E2A|ae_cityw.GRF = 
58534453|2E100BCA91DB8371CD9D57DBEC3AB0C8|dutch_stations_set-1.0.0alpha\dutchstatw.grf = 
504A0110|E8244C5278CB2408A818854DC11F8940|dutch_station_addition_set-0.8\dstatadd_v0_8.grf = 
44573553|EF7529EBEAF35758EE07E628B25F608D|dwenewobjects-v0.1\dwe_newobj.grf = 
52571203|7CE88A25DDB058C1BE577B88D049B274|egrvts2-188\egrvts2.grf = 0 63 2 0
BEBE0004|52891CF520C3C2F8C49C8712B73C4193|slopegrf.grf = 
414E0101|5D665C64693A438E3046C22666F46E08|fish_ship_set-0.9.2\fish.grf = 
41501202|B13DD8FB0D7C34CACAC2FE68BD137BB9|heqs_heavy_equipment_set-1.5.2\heqs.grf = 9 9 1 1 1 1
4A430002|93EAC5F5396584B92D4C5F0AAAF3F6C5|industrial_stations_renewal-1.0.2\indstatr.grf = 0 1
41533031|B21E7D6ADD69B1C07643939764FB4878|swedish_houses-1.1.2\swehouses.grf = 
74677462|1D2A4E03D9F30922788C166254C27619|total_bridge_renewal_set-1.2\total_bridges.grf = 
444E0400|735D3D74D5DCADBF1FD6EF7A9C5A3519|vast_station_tiles-0.2.0\vast.grf = 
444A5401|B9E9E16F258B32DC91E8BABEF037AFA7|nutracks-r247\nutracks.grf = 1 2 5 1975 0 0 80 125 180 230 350 56 56 37 20 14 14 9 20
414E0201|536506BDDDBD8644815FC2E7E6A80D7A|fish_2-2.0.2\fish.grf = 1 1 0
504E0001|E7781323D2B0086E2E76342DAA036054|ukwaypointsw.grf = 
4D635769|B723E4E85C20D56B678F79A42A474A08|wired-0.9\wired.grf = 0 1 1 0 0 0
6D620601|345E3A5AFFED67377A86E8168EAAEA84|newstats.grf = 
52455200|0E5A9C5ACD2BCAF7FA0658C3F905A660|ae_ruraw.GRF = 
52455300|37C0B839B13C4B18051580C81EEDF427|ae_subuw.GRF = 
45530500|D9BE5AFA481FC3E0A96E6EB72B455612|japanese_stations-3.6\jpstations.grf = 1 1 1 1
504A0107|92B822D319E71F920908801AD5751D26|beach_objects-1.2\beach_v1_2.grf = 
444E0800|334F8C4697455569073434DB107F864A|vast_objects-0.3.0\vastobjects.grf = 1 1 2 4
444E0C00|CD35704025292A559AD71A380F167257|vastfences\vastfences.grf = 1 1 2 4 0
49464E4F|9EE9117BD4511BD6879429ECF8DC9335|sno__supercheeses_newobjects-0.3.1\sno-supercheesesnewobjects.grf = 0 0 5
0100403A|26B8CB3E29FA6DAD15DFE2F08F0BF1ED|city_objects-b08.1\co08.1.grf = 
47471801|5CDF85914B08477DC8575CD424C25274|auz_landscape_objects.grf = 
47472301|35B2DB65EAC561E540B4FA56F2A8142B|auzfakerailwaylines.grf = 0 0
47470705|839BE30947B00EAE97E0523819A6C457|auz_lineside_objects.grf = 0 0 0
47470901|C341543292EBFEC6F75774C58C936024|auz_roadside_objects-20\auz_roadside_objects.grf = 0 0 0
47471502|1298CF810B0836096B3A769DC5F26DA7|auz_water_objects.grf = 0 0 0
54570101|E25D564F7F8F4B3AC6C7F375BD25B387|us_train_set-0.87.4d\ussetw.grf = 
44440111|9B5051E70D60EF2926A249B923AFB0CA|uk_renewal_set.3.04\pb_ukrs.grf = 
44442202|3DAC7433C0DA14AD3C5E8C89D73A6A2E|uk_renewal_set_addon_pack.3.04\ukrsap1w.grf = 
27711003|30EF819C36EA5E003976E26A8A25CF71|2cc_trainset-2.0.0beta5\2cctrainset.grf = 2 2 0
4D480201|9E914C31E5FC7FC3F686D009BD55F331|alexandra_palace-1.0.0\alexandrapalace.grf = 
54430201|C837D48D657129DD915830D60D68E09F|cs_stationset_v0.1-1\csstationsw.grf = 
54430202|081B62FD686AF2161866A0CF6EA043AC|cs_platforms_set-1\csplatformsw.grf = 
54632301|27C47A20D48022AF9A29B9ECBDD3232D|cs_extras_set-1\stat-cs_extras-win.grf = 
44578619|B30A5E35634A59D2BDD9C2389CEDBF2C|dwestationtiles__fences-v1.2\fences.grf = 
44573452|48CF5FC0DEB895136F337A7E563FC66D|dwestationtiles_industrial_ter-v0.7\dwe_stat_r.grf = 
52571201|C1C7D8C53EB7E74EEE2F0EF29638B466|egrvts.1.0\egrvts.grf = 
49464556|F1F4F773E4A978A242EC74AEACCBAAC0|eyecandy_road_vehicles-1.1\eyecandyroadvehicles.grf = 0 0 0 0 0 1 1 1 1 1 1 1
41501201|739B8552107144F8F7C01E9D456313DC|heqs_heavy_equipment_set-0.7.0\heqs.grf = 
It'll happen. Namely HEQS and Eyecandy vehicles won't have any strings availale anymore; eGRVTs seems to just make the cut.

dunno if some warning message for the user would make sense. I suppose it can be confusing since there's really nothing in there that doesn't work or has some incompatibility or such, it's just text that doesn't display. Not that I'd ever play with x different vehicle sets and such. But some do. ^^
Post Reply

Return to “NewGRF Technical Discussions”

Who is online

Users browsing this forum: No registered users and 3 guests