OpenTTD / nml

NewGRF Meta Language
GNU General Public License v2.0
42 stars 36 forks source link

Increase D0xx string limit please #325

Closed Quantom2 closed 4 months ago

Quantom2 commented 4 months ago

Allow D0xx strings limit increase up to 10 times (or even higer)

Hi! We currently working on xUSSR set v0.8.1, and (starting from 0.8) get a problem. Our set is reached a limit in 1024 D0xx strings, and currently, at the moment, we simply devided set onto different .grf, including differemt stuff, just for resolve problem of D0xx strings limit. But, this is not best option to us, we have multiple problems with that solutions, so I came here for ask a feachure of increased D0xx string limit. Are this even possible, or no?

Help, please, 'cause problems caused of reaching this limit is only increasing and increasing... Thanks!

glx22 commented 4 months ago

It's not possible to increase the D0xx range, but I think it's possible to work around the limitation. Some callbacks support use of text stack and you can then have a generic D0xx string using {STRING} to include some DCxx strings.

glx22 commented 4 months ago

After a discussion with @George-VB, it looks like the workaround doesn't work with NML. Any string referenced in switches is assigned to D0xx range and it won't be easy to determine when a string can be assigned to DCxx range.

glx22 commented 4 months ago

With #326, the workaround should now work.