YAGL - Yet Another GRF Language (maybe)

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

Moderator: Graphics Moderators

User avatar
UnicycleBloke
Engineer
Engineer
Posts: 75
Joined: 30 Aug 2011 14:39
Location: Cambridge, England

Re: YAGL - Yet Another GRF Language (maybe)

Post by UnicycleBloke »

This is because the NewGRF specs have been extended. The code was recently updated by a kind contributor but I need to publish a fresh build. It's on my list but I've been busy of late. Sorry. I'll try to make time this weekend.
User avatar
UnicycleBloke
Engineer
Engineer
Posts: 75
Joined: 30 Aug 2011 14:39
Location: Cambridge, England

Re: YAGL - Yet Another GRF Language (maybe)

Post by UnicycleBloke »

I have created a new release of yagl at https://github.com/UnicycleBloke/yagl/releases/tag/v1.2. GlobalSettings has a couple of properties which apparently did not exist when I wrote the code. I have updated the code to include these.

Please try this to see if it fixes the problem. If not, I would be very grateful if you could provide the offending NewGRF. I don't play OTTD at the moment and don't have any recent files. Bananas seems to list them all as available-in-game. I did try installing the game on Linux but was unable to work out where downloaded NewGRF files are placed in the file system.

It's been a while since I looked at this code. Hopefully all is well.
User avatar
kamnet
Moderator
Moderator
Posts: 8665
Joined: 28 Sep 2009 17:15
Location: Eastern KY
Contact:

Re: YAGL - Yet Another GRF Language (maybe)

Post by kamnet »

JustMoreMemes wrote: 18 Apr 2024 23:19 C:\Users\Fierce PC\Desktop\Programs\NewGRF Creation\YAGL>yagl.exe -d dropjffork.grf
The source code for Drop JF Fork is here, it would be best to work from that.

viewtopic.php?p=1257036#p1257036
User avatar
UnicycleBloke
Engineer
Engineer
Posts: 75
Joined: 30 Aug 2011 14:39
Location: Cambridge, England

Re: YAGL - Yet Another GRF Language (maybe)

Post by UnicycleBloke »

Thanks for the link, kamnet. I tried out the new version and had indeed fixed the unknown property, but then there was another to fix... They were related to roadtype/tramtype translation tables. This is a feature introduced since I wrote the code. There are sure to be some others lurking here and there. It's easy to support new properties, but I haven't been proactive keeping up to date with the NewGRF specs. I hadn't really expected that people would use yagl for recent GRFs for which there is NML source.

I would like to bring the code up to date with the specs but I'm not sure when I'll find the time...
User avatar
smallfly
Chairman
Chairman
Posts: 890
Joined: 19 Oct 2009 13:29
Location: Germany

Re: YAGL - Yet Another GRF Language (maybe)

Post by smallfly »

Hey @UnicycleBloke! Thanks for the YAGL tool! I used it to decompile the NewGRF "Larger ship" by Bilbo. Then I encoded the .yagl with with YAGL and tested in game. Worked fine :-) BUT when uploading to BaNaNaS, BaNaNaS does not allow the upload and says "["File 'fast_ships.grf' failed validation", 'fast_ships.grf: Unexpected end-of-file.']" I have attached the .yagl file as well as the grf generated by YAGL.
Attachments
fast_ships.yagl
(1.93 KiB) Downloaded 12 times
fast_ships.grf
(239 Bytes) Downloaded 11 times
www.p1sim.org - P1SIM - Traffic, Logistics, City-Building & more
Join the discussions here on tt-forums.net!
User avatar
UnicycleBloke
Engineer
Engineer
Posts: 75
Joined: 30 Aug 2011 14:39
Location: Cambridge, England

Re: YAGL - Yet Another GRF Language (maybe)

Post by UnicycleBloke »

To answer your question on Discord, yagl does support both Container1 and Container2 formats. I checked and you would only need to change one line in the YAGL code to change the format. I think someone suggested that BaNaNaS does not support Container1. The default in yagl is Container2.

The other thing I noticed while debugging is that the GRF version is given as GRF6. The default in yagl is GRF8. I have no idea what BaNaNaS expects in this regard, but maybe try GRF8.

Please let me know if making these changes fixes the issue.
User avatar
smallfly
Chairman
Chairman
Posts: 890
Joined: 19 Oct 2009 13:29
Location: Germany

Re: YAGL - Yet Another GRF Language (maybe)

Post by smallfly »

Just switched to "Container2" and BaNaNaS was happy :-) Thanks!
www.p1sim.org - P1SIM - Traffic, Logistics, City-Building & more
Join the discussions here on tt-forums.net!
Post Reply

Return to “NewGRF Technical Discussions”

Who is online

Users browsing this forum: No registered users and 1 guest