Page 1 of 1

How to select a unique grfid?

Posted: 18 Nov 2024 00:06
by ebla71
Couldn't find any answer to the following question:

How do you select a unique grifid that has not been assigned to any other NewGRF so far?!?

And if there is no suggested procedure - is there at least a list of already used grfid's somewhere?

Re: How to select a unique grfid?

Posted: 18 Nov 2024 01:36
by skc
First place I would look is on BaNaNas.

Re: How to select a unique grfid?

Posted: 18 Nov 2024 03:03
by ebla71
skc wrote: 18 Nov 2024 01:36 First place I would look is on BaNaNas.
Thank you very much - yes, in the NewGRF list the first column indeed gives the ID.

Still, some more rational approach to ID assignment would be nice ...

Re: How to select a unique grfid?

Posted: 18 Nov 2024 15:49
by Quast65
Its Hexadecimal conversion:
https://www.eso.org/~ndelmott/ascii.html
A lot of people tend to use the first 2 numbers to personalize their ID's.
For example a lot of GarryG's IDs start with 4747, which is GG

Re: How to select a unique grfid?

Posted: 18 Nov 2024 15:55
by ebla71
Quast65 wrote: 18 Nov 2024 15:49 Its Hexadecimal conversion:
A lot of people tend to use the first 2 numbers to personalize their ID's.
For example a lot of GarryG's IDs start with 4747, which is GG
Yes, I already understood that.

Maybe I'm just thinking too much about it and the "namespace" is large enough to make collisions highly unlikely.

Will try to avoid the initials of the most prolific NewGRF and graphics authors, though :lol:

Re: How to select a unique grfid?

Posted: 18 Nov 2024 15:59
by Quast65
Yeah, its just too bad you cant sort the GRF list out on BaNaNas running from low ID to high. That would make it easier to choose a range.

Re: How to select a unique grfid?

Posted: 19 Nov 2024 19:22
by Brickblock1
Quast65 wrote: 18 Nov 2024 15:59 Yeah, its just too bad you cant sort the GRF list out on BaNaNas running from low ID to high. That would make it easier to choose a range.
You actually can just not on the site.
this page works however

Re: How to select a unique grfid?

Posted: 19 Nov 2024 19:53
by Quast65
Brickblock1 wrote: 19 Nov 2024 19:22 You actually can just not on the site.
Cheers, I think that is very handy for new developers to find a suitable range!