[NFO] Action A with num-sets > 1 doesn't work?

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

Moderator: Graphics Moderators

Post Reply
arikover
Route Supervisor
Route Supervisor
Posts: 466
Joined: 15 Jun 2007 09:27
Skype: madchimiste
Location: Berlin, Deutschland

[NFO] Action A with num-sets > 1 doesn't work?

Post by arikover »

I made some Fields sprites and tried to replace them ingame. They are 9 sets of 19 sprites each, ranging from id 4126 to 4296 in trg1r.grf.

I tried the following:

Code: Select all

x * 5 0A \b9 \b19 \w4126

...9 x 19 realsprites
but I get an error with grfcodec.

When I do 9 actions A (each for 19 sprites):

Code: Select all

x * 5 0A \b1 \b19 \w4126

... 19 realsprites


9 times
It works.

So my question is: in the case of actions A, can the <numsets> parameter be higher than 1?
User avatar
wallyweb
Tycoon
Tycoon
Posts: 6102
Joined: 27 Nov 2004 15:05
Location: Canada

Re: [NFO] Action A with num-sets > 1 doesn't work?

Post by wallyweb »

NewGRF Specs - Action A wrote:The set of <num-sprites> and <first-sprite> is repeated as often as <num-sets> specifies.

Code: Select all

x * 5 0A \b9
   \b19 \w4126 // first set of 19 sprites
   \b19 \w4145 // second set of 19 sprites
   \b19 \w4164 // third set of 19 sprites
   ...
   ...
   ...
   ...
   ...
   \b19 \wxxxx // last set of 19 sprites
OR

Code: Select all

x * 5 0A \b1 \b171 \w4126 // all 171 sprites
arikover
Route Supervisor
Route Supervisor
Posts: 466
Joined: 15 Jun 2007 09:27
Skype: madchimiste
Location: Berlin, Deutschland

Re: [NFO] Action A with num-sets > 1 doesn't work?

Post by arikover »

Oh. :oops:

So everything is in the specs. One just has to read carefully...

Thank you for the quick answer, wallyweb.
User avatar
wallyweb
Tycoon
Tycoon
Posts: 6102
Joined: 27 Nov 2004 15:05
Location: Canada

Re: [NFO] Action A with num-sets > 1 doesn't work?

Post by wallyweb »

arikover wrote:Oh. :oops:

So everything is in the specs. One just has to read carefully...

Thank you for the quick answer, wallyweb.
:bow: :D
Post Reply

Return to “NewGRF Technical Discussions”

Who is online

Users browsing this forum: No registered users and 11 guests