NFO Help

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

Moderator: Graphics Moderators

User avatar
WRH
Engineer
Engineer
Posts: 34
Joined: 14 Dec 2006 14:42
Contact:

NFO Help

Post by WRH »

Hi I'm looking for some help with NFO coding. A while ago I made some graphics, but newobjects didn't seem to be live at the time in OttD, so now it is I'm looking to continue.

So what am I trying to achieve?

I'm starting off with my road signs. I want them in the game and to be able to select them from the objects menu. Once I can do it for these I should be able to do it for any objects.

I've spent the last week or so looking at various resources here and elsewhere trying to make sense of how to accomplish this. I've got this far:

I've sort of chopped it up so it make more sense to me.


Code: Select all

 // Automatically generated by GRFCODEC. Do not modify!
// (Info version 7)
// Escapes: 2+ 2- 2< 2> 2u< 2u> 2/ 2% 2u/ 2u% 2* 2& 2| 2^ 2sto = 2s 2rst = 2r 2psto 2ror = 2rot 2cmp 2ucmp 2<< 2u>> 2>>
// Escapes: 71 70 7= 7! 7< 7> 7G 7g 7gG 7GG 7gg 7c 7C
// Escapes: D= = DR D+ = DF D- = DC Du* = DM D* = DnF Du<< = DnC D<< = DO D& D| Du/ D/ Du% D%
// Format: spritenum pcxfile xpos ypos compression ysize xsize xrel yrel
    0 * 4	 54 00 00 00

//!!Warning (143): Offset 12: Using unspecified control character 15.
    1 * 15	 08 06 "WRH SIGNS" D5 15 00 00

//!!Fatal Error (47): Offset 58: Invalid property 49.
    2 * 313	 00 0F 09 0D 00 
      08 "SIN1" "SIN2" "SIN3" "SIN4" "SIN5" "SIN6" "SIN7" "SIN8" "SIN9" "SIN10" "SIN11" "SIN12" "SIN13" "SIN14"
      09 00 D0 01 D0 02 D0 03 D0 04 D0 05 D0 06 D0 07 D0 08 D0 09 D0 0A D0 0B D0 0C D0 0D D0
      0A 00 D0 01 D0 02 D0 03 D0 04 D0 05 D0 06 D0 07 D0 08 D0 09 D0 0A D0 0B D0 0C D0 0D D0
      0B 01 01 01 01 01 01 01 01 01 01 01 01 01 01
      0C 11 11 11 11 11 11 11 11 11 11 11 11 11 11
      0D 0C 0C 0C 0C 0C 0C 0C 0C 0C 0C 0C 0C 0C 0C
      0E 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00      
      0F 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
      10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

     //IN GAME OBJECT

    3 * 4	 01 0F 0E 01
    4 c:\\sign.pcx 150 13 09 31 58 -26 -1
    5 c:\\sign.pcx 230 13 09 31 58 -26 -1
    6 c:\\sign.pcx 310 13 09 31 58 -26 -1
    7 c:\\sign.pcx 390 13 09 31 58 -26 -1
    8 c:\\sign.pcx 470 13 09 31 58 -26 -1
    9 c:\\sign.pcx 550 13 09 31 58 -26 -1
   10 c:\\sign.pcx 630 13 09 31 58 -26 -1
   11 c:\\sign.pcx 710 13 09 31 58 -26 -1
   12 c:\\sign.pcx 2 61 09 31 63 -31 -1
   13 c:\\sign.pcx 82 61 09 31 63 -31 -1
   14 c:\\sign.pcx 162 61 09 31 63 -31 -1
   15 c:\\sign.pcx 242 61 09 31 63 -31 -1
   16 c:\\sign.pcx 339 61 09 31 63 -31 -1
   17 c:\\sign.pcx 418 61 09 31 63 -31 -1

   18 * 17	 02 0F 00 00 8D 0F 00 00 00 80 00 80 00 00 0F 0F E5 // 0 0
   19 * 17	 02 0F 01 00 8D 0F 00 00 01 80 00 80 00 00 0F 0F E5 // 0 1
   20 * 17	 02 0F 02 00 8D 0F 00 00 02 80 00 80 00 00 0F 0F E5 // 0 2
   21 * 17	 02 0F 03 00 8D 0F 00 00 03 80 00 80 00 00 0F 0F E5 // 1 0
   22 * 17	 02 0F 04 00 8D 0F 00 00 04 80 00 80 00 00 0F 0F E5 // 1 1
   23 * 17	 02 0F 05 00 8D 0F 00 00 05 80 00 80 00 00 0F 0F E5 // 1 2
   24 * 17	 02 0F 06 00 8D 0F 00 00 06 80 00 80 00 00 0F 0F E5 // 2 0        //ACTION 2's
   25 * 17	 02 0F 07 00 8D 0F 00 00 07 80 00 80 00 00 0F 0F E5 // 2 1   
   26 * 17	 02 0F 08 00 8D 0F 00 00 08 80 00 80 00 00 0F 0F E5 // 2 2
   27 * 17	 02 0F 09 00 8D 0F 00 00 09 80 00 80 00 00 0F 0F E5 // 2 2
   28 * 17	 02 0F 0A 00 8D 0F 00 00 0A 80 00 80 00 00 0F 0F E5 // 2 2
   29 * 17	 02 0F 0B 00 8D 0F 00 00 0B 80 00 80 00 00 0F 0F E5 // 2 2
   30 * 17	 02 0F 0C 00 8D 0F 00 00 0C 80 00 80 00 00 0F 0F E5 // 2 2
   31 * 17	 02 0F 0D 00 8D 0F 00 00 0D 80 00 80 00 00 0F 0F E5 // 2 2

	 //MENU OBJECT

   32 * 4	 01 0F 0E 01

   33 c:\\sign.pcx 150 13 09 31 58 -26 -1
   34 c:\\sign.pcx 230 13 09 31 58 -26 -1
   35 c:\\sign.pcx 310 13 09 31 58 -26 -1
   36 c:\\sign.pcx 390 13 09 31 58 -26 -1
   37 c:\\sign.pcx 470 13 09 31 58 -26 -1
   38 c:\\sign.pcx 550 13 09 31 58 -26 -1                //REAL SPRITES
   39 c:\\sign.pcx 630 13 09 31 58 -26 -1               
   40 c:\\sign.pcx 710 13 09 31 58 -26 -1
   41 c:\\sign.pcx 2 61 09 31 63 -31 -1
   42 c:\\sign.pcx 82 61 09 31 63 -31 -1

   43 c:\\sign.pcx 162 61 09 31 63 -31 -1
   44 c:\\sign.pcx 242 61 09 31 63 -31 -1

   45 c:\\sign.pcx 338 61 09 31 63 -31 -1
   46 c:\\sign.pcx 418 61 09 31 63 -31 -1

   47 * 17	 02 0F 0E 00 00 80 00 80 00 00 00 00 00 00 00 00 00 
   48 * 17	 02 0F 0F 00 01 80 00 80 00 00 00 00 00 00 00 00 00 
   49 * 17	 02 0F 10 00 02 80 00 80 00 00 00 00 00 00 00 00 00 
   50 * 17	 02 0F 11 00 03 80 00 80 00 00 00 00 00 00 00 00 00 
   51 * 17	 02 0F 12 00 04 80 00 80 00 00 00 00 00 00 00 00 00 
   52 * 17	 02 0F 13 00 05 80 00 80 00 00 00 00 00 00 00 00 00 
   53 * 17	 02 0F 14 00 06 80 00 80 00 00 00 00 00 00 00 00 00  //ACTION 2's
   54 * 17	 02 0F 15 00 07 80 00 80 00 00 00 00 00 00 00 00 00 
   55 * 17	 02 0F 16 00 08 80 00 80 00 00 00 00 00 00 00 00 00 
   56 * 17	 02 0F 17 00 09 80 00 80 00 00 00 00 00 00 00 00 00 
   57 * 17	 02 0F 18 00 0A 80 00 80 00 00 00 00 00 00 00 00 00 
   58 * 17	 02 0F 19 00 0B 80 00 80 00 00 00 00 00 00 00 00 00 
   59 * 17	 02 0F 1A 00 0C 80 00 80 00 00 00 00 00 00 00 00 00 
   60 * 17	 02 0F 1B 00 0D 80 00 80 00 00 00 00 00 00 00 00 00 



   61 * 10	 03 0F 01 00 01 FF 00 00 00 00 
   62 * 10	 03 0F 01 01 01 FF 00 00 00 00
   63 * 10	 03 0F 01 02 01 FF 00 00 00 00 
   64 * 10	 03 0F 01 03 01 FF 00 00 00 00 
   65 * 10	 03 0F 01 04 01 FF 00 00 00 00 
   66 * 10	 03 0F 01 05 01 FF 00 00 00 00 
   67 * 10	 03 0F 01 06 01 FF 00 00 00 00 //ACTION 3's
   68 * 10	 03 0F 01 07 01 FF 00 00 00 00 // GET ERROR MESSAGES ABOUT Default ID used earlier in sprite.
   69 * 10	 03 0F 01 08 01 FF 00 00 00 00 
   70 * 10	 03 0F 01 09 01 FF 00 00 00 00 
   71 * 10	 03 0F 01 0A 01 FF 00 00 00 00 
   72 * 10	 03 0F 01 0B 01 FF 00 00 11 00 


   73 * 11	 04 48 FF 01 00 D0 "MENU" 00
   74 * 18	 04 48 FF 01 01 D0 "" 00
   75 * 14	 04 48 FF 01 02 D0 "" 00
   76 * 18	 04 48 FF 02 03 D0 "" 00
   77 * 14	 04 48 FF 01 04 D0 "" 00
   78 * 18	 04 48 FF 02 05 D0 "" 00             //ACTION 4's
   79 * 18	 04 48 FF 01 06 D0 "" 00
   80 * 18	 04 48 FF 02 07 D0 "" 00
   81 * 11	 04 48 FF 01 08 D0 "" 00
   82 * 18	 04 48 FF 01 09 D0 "" 00
   83 * 14	 04 48 FF 01 0A D0 "" 00
   84 * 14	 04 48 FF 01 0B D0 "" 00
	 
	 
	 //ERROR MESSAGES ???? NO IDEA WHAT THEY ARE ABOUT ;D


//!!For feature F the following cargoIDs have not been used since their most recent definition:
//!!01 (last defined at sprite 19)
//!!02 (last defined at sprite 20)
//!!03 (last defined at sprite 21)
//!!04 (last defined at sprite 22)
//!!05 (last defined at sprite 23)
//!!06 (last defined at sprite 24)
//!!07 (last defined at sprite 25)
//!!08 (last defined at sprite 26)
//!!09 (last defined at sprite 27)
//!!0A (last defined at sprite 28)
//!!0B (last defined at sprite 29)
//!!0C (last defined at sprite 30)
//!!0D (last defined at sprite 31)
//!!0E (last defined at sprite 47)
//!!0F (last defined at sprite 48)
//!!10 (last defined at sprite 49)
//!!12 (last defined at sprite 51)
//!!13 (last defined at sprite 52)
//!!14 (last defined at sprite 53)
//!!15 (last defined at sprite 54)
//!!16 (last defined at sprite 55)
//!!17 (last defined at sprite 56)
//!!18 (last defined at sprite 57)
//!!19 (last defined at sprite 58)
//!!1A (last defined at sprite 59)
//!!1B (last defined at sprite 60)
The thing is I'm not knowledgeable of NFO, I've sort of figured out how some things work in a limited way but I'm struggling with it.

It's one thing being able to make the graphics another to actually see them doing their thing in game. :|

So what am I doing wrong here? I've clearly not understood something. It seems to be the Action 3s that are throwing all the errors, i'm not experienced enough to know why. I just keep sitting back and having a think, see if I spot a pattern.
Eddi
Tycoon
Tycoon
Posts: 8258
Joined: 17 Jan 2007 00:14

Re: NFO Help

Post by Eddi »

WRH wrote:

Code: Select all

   68 * 10	 03 0F 01 07 01 FF 00 00 00 00 // GET ERROR MESSAGES ABOUT Default ID used earlier in sprite.
it's just a warning. it says "you are using ID '00 00' twice, once for cargo type FF, and once for all others. this is redundant.
//ERROR MESSAGES ???? NO IDEA WHAT THEY ARE ABOUT ;D
//!!For feature F the following cargoIDs have not been used since their most recent definition:
well, obviously, you didn't use these action2-IDs in any of your action3.
michael blunck
Tycoon
Tycoon
Posts: 5948
Joined: 27 Apr 2005 07:09
Contact:

Re: NFO Help

Post by michael blunck »

It´s already the action8 being corrupted:
WRH wrote:

Code: Select all

//!!Warning (143): Offset 12: Using unspecified control character 15.
    1 * 15    08 06 "WRH SIGNS" D5 15 00 00
In fact is has to be:

<sprite-number> * <length> 08 <version> <grf-id> <name> <description>

<grf-id> needs to contain exactly four bytes, and <name> and <description> have to be null-terminated strings.

regards
Michael
Image
as
Transport Coordinator
Transport Coordinator
Posts: 281
Joined: 07 Mar 2007 20:13

Re: NFO Help

Post by as »

Code: Select all

//!!Fatal Error (47): Offset 58: Invalid property 49.
    2 * 313    00 0F 09 0D 00 
      08 "SIN1" "SIN2" "SIN3" "SIN4" "SIN5" "SIN6" "SIN7" "SIN8" "SIN9" "SIN10" "SIN11" "SIN12" "SIN13" "SIN14"
      09 00 D0 01 D0 02 D0 03 D0 04 D0 05 D0 06 D0 07 D0 08 D0 09 D0 0A D0 0B D0 0C D0 0D D0
      0A 00 D0 01 D0 02 D0 03 D0 04 D0 05 D0 06 D0 07 D0 08 D0 09 D0 0A D0 0B D0 0C D0 0D D0
      0B 01 01 01 01 01 01 01 01 01 01 01 01 01 01
      0C 11 11 11 11 11 11 11 11 11 11 11 11 11 11
      0D 0C 0C 0C 0C 0C 0C 0C 0C 0C 0C 0C 0C 0C 0C
      0E 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00      
      0F 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
      10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
You are actually setting properties for 14(0E in hex) objects, not 13(0D) like your code says. Changing that should remove this error.
User avatar
Lakie
TTDPatch Developer
TTDPatch Developer
Posts: 1799
Joined: 26 May 2004 16:37
Location: Britain
Contact:

Re: NFO Help

Post by Lakie »

Well, as Michael pointed out your Action8 is quite wrong, it should likely be closer to the following.

Code: Select all

    0 * 0    08 07 // version 7 allows escape sequences which are highly useful.
               "WRHS" // 4 bytes either as a string (as shown), bytes (00 01 02 03) or mixture ("WRH" 00).
                 "WHS' Signs" 00 // Grf Name
                 "<description>" 00 // Grf Description
Next your Action0 looks a little odd in its data,
  • You specify that you are defining properties for 13 objects but actually set properties for 14, (as the previous poster states).
  • You'd be better off setting all objects into the same class, property 08. (Which takes four bytes like the Grf id, maybe something like "SIGN").
  • The textids for the object names (0A) will not usually match the class names (09), try starting from \wxD401 and using \wxD400 for all the class names
The error about the properties being unknown is due to using more than four bytes for a class id, as such it is reading the character as a property number which obviously fails.

Now, I'm going to presume all the sprites are various signs (and views of said signs), there is no need to define them twice. The same Action2 Layouts used in-game will operate correctly in the menus.
The errors at the end are because you only use the Action2 Layout "00", all your Action3's point to this Action2 Layout (save one) for both the menu and the in-game. I suspect it'd be easier at this point to just drop the menu section (FF <id>) from your Action3's.

I doubt you'll want you Action4's staying as is, unless you want your object class to be named "MENU" and your objects to be nameless.

Finally, as a suggestion, I'd suggest you have a look at using object views, (if various planned objects (graphics) are merely rotated versions of a single sign), in particular Action0, Property 17 and Action2 Variational, Variable 48. This will allow you to cut down the number of object ids used by the Grf, and also group various views logically in the menu.

~ Lakie
TTDpatch Developer 2005 - 2010 ~ It all started because of shortened vehicle not loading correctly, now look where I've gone with it!
Grfs coded ~ Finnish Train Set (Teaser) | Bm73 (Release 3) | Emu 680 (Release 3)| Glass Station (Release 1) | UK Roadset (Version 1.1a) | New Water Coasts (Version 7)
Pikka: "Lakie's a good coder, but before he'll add any feature to TTDP you have to convince him that you're not going to use it to destroy the world as we know it."
User avatar
Lakie
TTDPatch Developer
TTDPatch Developer
Posts: 1799
Joined: 26 May 2004 16:37
Location: Britain
Contact:

Re: NFO Help

Post by Lakie »

Since you haven't replied, I'm guessing you might prefer a simple code example of how a single object using views could be wrote.

Code: Select all

// Automatically generated by GRFCODEC. Do not modify!
// (Info version 7)
// Format: spritenum pcxfile xpos ypos compression ysize xsize xrel yrel
    0 * 4    \d?

    // Defines various bits of information for OpenTTD.
    0 * 0    14
               "C" "INFO"
                 "B" "VRSN" \w4 \d1                      // Grf version
                 "B" "MINV" \w4 \d1                      // Minimum compatible version
                 "B" "PALS" \w1 "W"                      // Or "D" if Dos paletted
                 "B" "NPAR" \w1 \b0                      // No parameters
               00
             00

    0 * 0    08 07
               "WRHS" // 4 bytes either as a string (as shown), bytes (00 01 02 03) or mixture ("WRH" 00).
                 "WRHS' Sign Objects" 00                 // Grf Name
                 "Various Sign Objects from WRHS." 00    // Grf Description

    0 * 0    00 0F
               \b7
                 \b1 00                                  // Increase as needed
                   // Base properties, required
                   08    "SIGN"    #"SIGN" ...           // Object's class
                   09    \wxD400   #\wxD400 ...          // Class' name
                   0A    \wxD401   #\wxD402 ...          // Object's name
                   0B    01        #01 ...               // Climate availablity
                   0C    11        #11 ...               // Object size

                   // Optional properties
                   0D    \b12      #\b12 ...              // Object's buy cost factor

                   // Properties dropped, had same value as defaults
                   // 0E   \d0000-00-00                   // Intro date
                   // 0F   \d0000-00-00                   // Outtro date
                   // 10   \wx0                           // Object flags

                   // Object views (either 1, 2 or 4)
                   17    \b4        #\b1 ...               // Object views

    // For this example I'm assuming 4 views (or rotations if you like) of the sign
    0 * 0    01 00 04 01
    // Graphics for first object (sign)

    // Action2 Layouts defining how the graphics will appear in game
    0 * 0    02 0F 00
               \b0                                        // Basic format for simplicity
                 \d1420                                   // Plain grass
                   \dx80000000   00 00   0F 0F 20         // Add 0x8000 to the sprite if CC
    0 * 0    02 0F 01
               \b0
                 \d1420
                   \dx80000001   00 00   0F 0F 20
    0 * 0    02 0F 02
               \b0
                 \d1420
                   \dx80000002   00 00   0F 0F 20
    0 * 0    02 0F 03
               \b0
                 \d1420
                   \dx80000003   00 00   0F 0F 20

    // Selects the tile layout to use based on the object's view
    0 * 0    02 0F 10
                81   48                                   // Decide based off view
                  00   03                                 // No shift, logical and by 3 (0 .. 3)
                    \b3                                   // 3 results (plus one default)
                      \wx1   \b1 \b1                      // Use Action2 Layout '01' for view 2
                      \wx2   \b2 \b2                      // Use Action2 Layout '02' for view 3
                      \wx3   \b3 \b3                      // Use Action2 Layout '03' for view 4
                      \wx0                                // Use Action2 Layout '00' for default view

    // Set the objects graphics
    0 * 0    03 0F
               \b1   00
                 \b0                                      // No specific menu chains
                   \wx10                                  // Use the graphics selector Action2 Variational '10'

    // Strings (set D000+x, use as D400+x for properties or 8000+x in callback returns)
    0 * 0    04 48
               FF                                         // Default language (also 16 bit textid)
                 \b2   \wxD000
                   // Object class name, (shared over many grfs so don't be 'grf specific' in its naming)
                   "Signs" 00                             // D400

                   // Object names (specific to your grf)
                   "Roundabout Sign" 00                   // D401
                   # ...
Not actually tested, so it may have a few mistakes, but it should be correct.
Defines a single object using views, in particular this expects 4 views (or rotations if you like).
This is somewhat more a template, add/drop bits as needed.

I suggest making fair use of the escape sequences (such as '\w'), as they can make your life a lot easier, I also feel they can make code more readable.

Hope that helps,
~ Lakie
TTDpatch Developer 2005 - 2010 ~ It all started because of shortened vehicle not loading correctly, now look where I've gone with it!
Grfs coded ~ Finnish Train Set (Teaser) | Bm73 (Release 3) | Emu 680 (Release 3)| Glass Station (Release 1) | UK Roadset (Version 1.1a) | New Water Coasts (Version 7)
Pikka: "Lakie's a good coder, but before he'll add any feature to TTDP you have to convince him that you're not going to use it to destroy the world as we know it."
User avatar
WRH
Engineer
Engineer
Posts: 34
Joined: 14 Dec 2006 14:42
Contact:

Re: NFO Help

Post by WRH »

Lakie wrote:Since you haven't replied,

Hope that helps,
~ Lakie
Sorry :wink:

My absence is due to being at work all day and then working to figure out how to do this. Which I have to a certain extent. I thought I'd cracked it at one point. I thought that I'd finally struck pure gold, but then I found out it was very much a nugget of purest green!

I discovered even though my menu was correct, I always got the same sign no matter what icon I picked.

I've just being trying out some stuff. I'll look at your latest post and see if that helps me, I should have said before I needed the big writing version with pictures. Else it's some beans or a very small casserole. :lol:

This is where I'm at so far. Once I have something I know works properly, I'll take up your suggestion to look at object views as it's obviously a better way to do it as it saves space.

Code: Select all

// Automatically generated by GRFCODEC. Do not modify!
// (Info version 7)
// Escapes: 2+ 2- 2< 2> 2u< 2u> 2/ 2% 2u/ 2u% 2* 2& 2| 2^ 2sto = 2s 2rst = 2r 2psto 2ror = 2rot 2cmp 2ucmp 2<< 2u>> 2>>
// Escapes: 71 70 7= 7! 7< 7> 7G 7g 7gG 7GG 7gg 7c 7C
// Escapes: D= = DR D+ = DF D- = DC Du* = DM D* = DnF Du<< = DnC D<< = DO D& D| Du/ D/ Du% D%
// Format: spritenum pcxfile xpos ypos compression ysize xsize xrel yrel
    0 * 4	 75 00 00 00

    1 * 17	 08 06 57 52 48 01 "WRH SIGNS" 00 00

    2 * 308	 00 0F 09 0E 00
		  08 "SIGN" "SIGN" "SIGN" "SIGN" "SIGN" "SIGN" "SIGN" "SIGN" "SIGN" "SIGN" "SIGN" "SIGN" "SIGN" "SIGN"
      09 00 D0 00 D0 00 D0 00 D0 00 D0 00 D0 00 D0 00 D0 00 D0 00 D0 00 D0 00 D0 00 D0 00 D0 
      0A 00 D0 01 D0 02 D0 03 D0 04 D0 05 D0 06 D0 07 D0 08 D0 09 D0 0A D0 0B D0 0C D0 0D D0
      0B 01 01 01 01 01 01 01 01 01 01 01 01 01 01
      0C 11 11 11 11 11 11 11 11 11 11 11 11 11 11
      0D 0C 0C 0C 0C 0C 0C 0C 0C 0C 0C 0C 0C 0C 0C
      0E 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00      
      0F 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
      10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

     //IN GAME OBJECT

    3 * 4	 01 0F 0E 01
    4 c:\\sign.pcx 150 19 09 31 58 -26 -1
    5 c:\\sign.pcx 230 19 09 31 58 -26 -1
    6 c:\\sign.pcx 310 19 09 31 58 -26 -1
    7 c:\\sign.pcx 390 19 09 31 58 -26 -1
    8 c:\\sign.pcx 470 19 09 31 58 -26 -1
    9 c:\\sign.pcx 550 19 09 31 58 -26 -1
   10 c:\\sign.pcx 630 19 09 31 58 -26 -1
   11 c:\\sign.pcx 710 19 09 31 58 -26 -1
   12 c:\\sign.pcx 2 67 09 31 63 -31 -1
   13 c:\\sign.pcx 82 67 09 31 63 -31 -1
   14 c:\\sign.pcx 162 67 09 31 63 -31 -1
   15 c:\\sign.pcx 242 67 09 31 63 -31 -1
   16 c:\\sign.pcx 339 67 09 31 63 -31 -1
   17 c:\\sign.pcx 418 67 09 31 63 -31 -1

   18 * 17	 02 0F 00 00 8D 0F 00 00 00 80 00 80 00 00 0F 0F E5 // 0 0
   19 * 17	 02 0F 01 00 8D 0F 00 00 01 80 00 80 00 00 0F 0F E5 // 0 1
   20 * 17	 02 0F 02 00 8D 0F 00 00 02 80 00 80 00 00 0F 0F E5 // 0 2
   21 * 17	 02 0F 03 00 8D 0F 00 00 03 80 00 80 00 00 0F 0F E5 // 1 0
   22 * 17	 02 0F 04 00 8D 0F 00 00 04 80 00 80 00 00 0F 0F E5 // 1 1
   23 * 17	 02 0F 05 00 8D 0F 00 00 05 80 00 80 00 00 0F 0F E5 // 1 2
   24 * 17	 02 0F 06 00 8D 0F 00 00 06 80 00 80 00 00 0F 0F E5 // 2 0        //ACTION 2's
   25 * 17	 02 0F 07 00 8D 0F 00 00 07 80 00 80 00 00 0F 0F E5 // 2 1   
   26 * 17	 02 0F 08 00 8D 0F 00 00 08 80 00 80 00 00 0F 0F E5 // 2 2
   27 * 17	 02 0F 09 00 8D 0F 00 00 09 80 00 80 00 00 0F 0F E5 // 2 2
   28 * 17	 02 0F 0A 00 8D 0F 00 00 0A 80 00 80 00 00 0F 0F E5 // 2 2
   29 * 17	 02 0F 0B 00 8D 0F 00 00 0B 80 00 80 00 00 0F 0F E5 // 2 2
   30 * 17	 02 0F 0C 00 8D 0F 00 00 0C 80 00 80 00 00 0F 0F E5 // 2 2
   31 * 17	 02 0F 0D 00 8D 0F 00 00 0D 80 00 80 00 00 0F 0F E5 // 2 2

	 //MENU OBJECT

   32 * 4	 01 0F 0E 01

   33 c:\\sign.pcx 150 13 09 31 58 -26 -1
   34 c:\\sign.pcx 230 13 09 31 58 -26 -1
   35 c:\\sign.pcx 310 13 09 31 58 -26 -1
   36 c:\\sign.pcx 390 13 09 31 58 -26 -1
   37 c:\\sign.pcx 470 13 09 31 58 -26 -1
   38 c:\\sign.pcx 550 13 09 31 58 -26 -1                //REAL SPRITES
   39 c:\\sign.pcx 630 13 09 31 58 -26 -1               
   40 c:\\sign.pcx 710 13 09 31 58 -26 -1
   41 c:\\sign.pcx 2 61 09 31 63 -31 -1
   42 c:\\sign.pcx 82 61 09 31 63 -31 -1

   43 c:\\sign.pcx 162 61 09 31 63 -31 -1
   44 c:\\sign.pcx 242 61 09 31 63 -31 -1

   45 c:\\sign.pcx 338 61 09 31 63 -31 -1
   46 c:\\sign.pcx 418 61 09 31 63 -31 -1

   47 * 17	 02 0F 0E 00 00 80 00 80 00 00 00 00 00 00 00 00 00 
   48 * 17	 02 0F 0F 00 01 80 00 80 00 00 00 00 00 00 00 00 00 
   49 * 17	 02 0F 10 00 02 80 00 80 00 00 00 00 00 00 00 00 00 
   50 * 17	 02 0F 11 00 03 80 00 80 00 00 00 00 00 00 00 00 00 
   51 * 17	 02 0F 12 00 04 80 00 80 00 00 00 00 00 00 00 00 00 
   52 * 17	 02 0F 13 00 05 80 00 80 00 00 00 00 00 00 00 00 00 
   53 * 17	 02 0F 14 00 06 80 00 80 00 00 00 00 00 00 00 00 00  //ACTION 2's
   54 * 17	 02 0F 15 00 07 80 00 80 00 00 00 00 00 00 00 00 00 
   55 * 17	 02 0F 16 00 08 80 00 80 00 00 00 00 00 00 00 00 00 
   56 * 17	 02 0F 17 00 09 80 00 80 00 00 00 00 00 00 00 00 00 
   57 * 17	 02 0F 18 00 0A 80 00 80 00 00 00 00 00 00 00 00 00 
   58 * 17	 02 0F 19 00 0B 80 00 80 00 00 00 00 00 00 00 00 00 
   59 * 17	 02 0F 1A 00 0C 80 00 80 00 00 00 00 00 00 00 00 00 
   60 * 17	 02 0F 1B 00 0D 80 00 80 00 00 00 00 00 00 00 00 00 


                              //setid   //def setid
//61 * 10	 03 0F 01 00 01 FF //00 00   //00 00


   61 * 18	 02 0F 1C 81 10 00 FF 02 00 80 00 00 00 80 01 0E 0E 80 
   62 * 18	 02 0F 1D 81 10 00 FF 02 00 80 00 00 00 80 01 0E 0F 80 
   63 * 18	 02 0F 1E 81 10 00 FF 02 00 80 00 00 00 80 01 0E 10 80 
   64 * 18	 02 0F 1F 81 10 00 FF 02 00 80 00 00 00 80 01 0E 11 80 
   65 * 18	 02 0F 20 81 10 00 FF 02 00 80 00 00 00 80 01 0E 12 80 
   66 * 18	 02 0F 21 81 10 00 FF 02 00 80 00 00 00 80 01 0E 13 80
   67 * 18	 02 0F 22 81 10 00 FF 02 00 80 00 00 00 80 01 0E 14 80 
   68 * 18	 02 0F 23 81 10 00 FF 02 00 80 00 00 00 80 01 0E 15 80 
   69 * 18	 02 0F 24 81 10 00 FF 02 00 80 00 00 00 80 01 0E 16 80 
   70 * 18	 02 0F 25 81 10 00 FF 02 00 80 00 00 00 80 01 0E 17 80 
   71 * 18	 02 0F 26 81 10 00 FF 02 00 80 00 00 00 80 01 0E 18 80  //VAR ACTION2'S
   72 * 18	 02 0F 27 81 10 00 FF 02 00 80 00 00 00 80 01 0E 19 80 
   73 * 18	 02 0F 28 81 10 00 FF 02 00 80 00 00 00 80 01 0E 1A 80 
   74 * 18	 02 0F 29 81 10 00 FF 02 00 80 00 00 00 80 01 0E 1B 80 

   75 * 17	 02 0F 2A 85 0C 00 FF FF 01 16 00 49 01 49 01 0E 00 
   76 * 17	 02 0F 2B 85 0C 00 FF FF 01 17 00 49 01 49 01 0F 00 
   77 * 17	 02 0F 2C 85 0C 00 FF FF 01 18 00 49 01 49 01 10 00 
   78 * 17	 02 0F 2D 85 0C 00 FF FF 01 19 00 49 01 49 01 11 00 
   79 * 17	 02 0F 2E 85 0C 00 FF FF 01 1A 00 49 01 49 01 12 00 
   80 * 17	 02 0F 2F 85 0C 00 FF FF 01 1B 00 49 01 49 01 13 00 
   81 * 17	 02 0F 30 85 0C 00 FF FF 01 1C 00 49 01 49 01 14 00 
   82 * 17	 02 0F 31 85 0C 00 FF FF 01 16 00 49 01 49 01 15 00 
   83 * 17	 02 0F 32 85 0C 00 FF FF 01 17 00 49 01 49 01 16 00 
   84 * 17	 02 0F 33 85 0C 00 FF FF 01 18 00 49 01 49 01 17 00 
   85 * 17	 02 0F 34 85 0C 00 FF FF 01 19 00 49 01 49 01 18 00 
   86 * 17	 02 0F 35 85 0C 00 FF FF 01 1A 00 49 01 49 01 19 00 
   87 * 17	 02 0F 36 85 0C 00 FF FF 01 1B 00 49 01 49 01 1A 00 
   88 * 17	 02 0F 37 85 0C 00 FF FF 01 1C 00 49 01 49 01 1B 00 





//!!Warning (100): Default ID appears earlier in sprite.
   89 * 10	 03 0F 01 00 01 FF 00 00 00 00
//!!Warning (100): Default ID appears earlier in sprite.
   90 * 10	 03 0F 01 01 01 FF 01 00 00 00
//!!Warning (100): Default ID appears earlier in sprite.
   91 * 10	 03 0F 01 02 01 FF 02 00 00 00
//!!Warning (100): Default ID appears earlier in sprite.
   92 * 10	 03 0F 01 03 01 FF 03 00 00 00 
//!!Warning (100): Default ID appears earlier in sprite.
   93 * 10	 03 0F 01 04 01 FF 04 00 00 00
//!!Warning (100): Default ID appears earlier in sprite.
   94 * 10	 03 0F 01 05 01 FF 05 00 00 00
//!!Warning (100): Default ID appears earlier in sprite.
   95 * 10	 03 0F 01 06 01 FF 06 00 00 00
//!!Warning (100): Default ID appears earlier in sprite.
   96 * 10	 03 0F 01 07 01 FF 07 00 00 00
//!!Warning (100): Default ID appears earlier in sprite.
   97 * 10	 03 0F 01 08 01 FF 08 00 00 00
//!!Warning (100): Default ID appears earlier in sprite.
   98 * 10	 03 0F 01 09 01 FF 09 00 00 00
//!!Warning (100): Default ID appears earlier in sprite.
   99 * 10	 03 0F 01 0a 01 FF 0a 00 00 00
//!!Warning (100): Default ID appears earlier in sprite.
  100 * 10	 03 0F 01 0b 01 FF 0b 00 00 00
//!!Warning (100): Default ID appears earlier in sprite.
  101 * 10	 03 0F 01 0c 01 FF 0c 00 00 00
//!!Warning (100): Default ID appears earlier in sprite.
  102 * 10	 03 0F 01 0d 01 FF 0d 00 00 00


  103 * 11	 04 48 FF 01 00 D0 "MENU" 00
  104 * 12	 04 48 FF 01 01 D0 "sign1" 00
  105 * 12	 04 48 FF 01 02 D0 "sign2" 00
//!!Error (79): Expected 1 more string(s) for this action 4.
  106 * 12	 04 48 FF 02 03 D0 "sign3" 00
  107 * 12	 04 48 FF 01 04 D0 "sign4" 00
//!!Error (79): Expected 1 more string(s) for this action 4.
  108 * 12	 04 48 FF 02 05 D0 "sign5" 00             //ACTION 4's
  109 * 12	 04 48 FF 01 06 D0 "sign6" 00
//!!Error (79): Expected 1 more string(s) for this action 4.
  110 * 12	 04 48 FF 02 07 D0 "sign7" 00
  111 * 12	 04 48 FF 01 08 D0 "sign8" 00
  112 * 12	 04 48 FF 01 09 D0 "sign9" 00
  113 * 13	 04 48 FF 01 0A D0 "sign10" 00
  114 * 13	 04 48 FF 01 0B D0 "sign11" 00
  115 * 13	 04 48 FF 01 0C D0 "sign12" 00
  116 * 13	 04 48 FF 01 0D D0 "sign13" 00
  117 * 13	 04 48 FF 01 0E D0 "sign14" 00


	 //ERROR MESSAGES ???? NO IDEA WHAT THEY ARE ABOUT ;D


//!!For feature F the following cargoIDs have not been used since their most recent definition:
//!!01 (last defined at sprite 19)
//!!02 (last defined at sprite 20)
//!!03 (last defined at sprite 21)
//!!04 (last defined at sprite 22)
//!!05 (last defined at sprite 23)
//!!06 (last defined at sprite 24)
//!!07 (last defined at sprite 25)
//!!08 (last defined at sprite 26)
//!!09 (last defined at sprite 27)
//!!0A (last defined at sprite 28)
//!!0B (last defined at sprite 29)
//!!0C (last defined at sprite 30)
//!!0D (last defined at sprite 31)
//!!1D (last defined at sprite 62)
//!!1E (last defined at sprite 63)
//!!1F (last defined at sprite 64)
//!!20 (last defined at sprite 65)
//!!21 (last defined at sprite 66)
//!!22 (last defined at sprite 67)
//!!23 (last defined at sprite 68)
//!!24 (last defined at sprite 69)
//!!25 (last defined at sprite 70)
//!!26 (last defined at sprite 71)
//!!27 (last defined at sprite 72)
//!!28 (last defined at sprite 73)
//!!29 (last defined at sprite 74)
//!!2A (last defined at sprite 75)
//!!2B (last defined at sprite 76)
//!!2C (last defined at sprite 77)
//!!2D (last defined at sprite 78)
//!!2E (last defined at sprite 79)
//!!2F (last defined at sprite 80)
//!!30 (last defined at sprite 81)
//!!31 (last defined at sprite 82)
//!!32 (last defined at sprite 83)
//!!33 (last defined at sprite 84)
//!!34 (last defined at sprite 85)
//!!35 (last defined at sprite 86)
//!!36 (last defined at sprite 87)
//!!37 (last defined at sprite 88)
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Re: NFO Help

Post by DaleStan »

Code: Select all

//!!For feature F the following cargoIDs have not been used since their most recent definition:
//!!01 (last defined at sprite 19)
<...>
If you can't figure out what that's complaining about, then read the documentation for message 95. (I'm not sure why the message number doesn't appear in that message.)
If you still can't figure out what it's complaining about, prove that you've read the documentation and ask again.

Once you've done that, fix the rest of the errors, and either fix or disable warning 100. The same above-mentioned procedure applies for each other message.

If NFORenum is complaining, the appropriate question is either
1) NFORenum doesn't like this code, but I think it's right because <foo>. Am I mistaken, or is this a bug in NFORenum?
2) NFORenum doesn't like this code. The documentation tells me that I should <bar>, but that doesn't make sense in this context. How should I go about making NFORenum happy?

Only once NFORenum stops complaining is it appropriate to ask "Why doesn't this work?"
To get a good answer, ask a Smart Question. Similarly, if you want a bug fixed, write a Useful Bug Report. No TTDPatch crashlog? Then follow directions.
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
User avatar
WRH
Engineer
Engineer
Posts: 34
Joined: 14 Dec 2006 14:42
Contact:

Re: NFO Help

Post by WRH »

DaleStan wrote:

Code: Select all

//!!For feature F the following cargoIDs have not been used since their most recent definition:
//!!01 (last defined at sprite 19)
<...>
If you can't figure out what that's complaining about, then read the documentation for message 95. (I'm not sure why the message number doesn't appear in that message.)
If you still can't figure out what it's complaining about, prove that you've read the documentation and ask again.
Hey now, be fair. I'm starting with basically no knowledge whatsoever. I could read the documentation until I'm blue in the face, it wasn't making any sense to me at all. Sorry but, when you don't know anything to begin with lessons can be long and slow. :|

No disrespect to Lakie either, but I had no idea what all that dx0000454 stuff is. Escape sequences??? I had to go and look at Wikipedia to figure out what he was on about. I can't help it if I don't know. All I can do is find out. :wink:

Half of the time the error messages were just rubbish anyway.

I got it working!

I had great difficulty understanding how all the ID's link up. So I was getting menus that worked but signs that didn't, then vice versa. Then after much f*** about and going over the documentation again. It finally made sense. It was my action 3's that were the problem.

Ignore the warning 100's. They don't make any difference.

The thing I finally understood was these couple of two byte ID thingies. They both had to be set to work in game and in the menu. It took me all week to figure that out! :twisted:


Code: Select all

   

                                                  [THESE THINGS]
32 * 10	 03 0F 01 00 01 FF      00 00   00 00


Well all I can say is YAY! :lol:
Attachments
SIGNANDMENU.jpg
SIGNANDMENU.jpg (86.68 KiB) Viewed 521 times
User avatar
Lakie
TTDPatch Developer
TTDPatch Developer
Posts: 1799
Joined: 26 May 2004 16:37
Location: Britain
Contact:

Re: NFO Help

Post by Lakie »

Well, its your choice, I believe you might want to read this page about them, before ruling them out, however.

~ Lakie
TTDpatch Developer 2005 - 2010 ~ It all started because of shortened vehicle not loading correctly, now look where I've gone with it!
Grfs coded ~ Finnish Train Set (Teaser) | Bm73 (Release 3) | Emu 680 (Release 3)| Glass Station (Release 1) | UK Roadset (Version 1.1a) | New Water Coasts (Version 7)
Pikka: "Lakie's a good coder, but before he'll add any feature to TTDP you have to convince him that you're not going to use it to destroy the world as we know it."
User avatar
WRH
Engineer
Engineer
Posts: 34
Joined: 14 Dec 2006 14:42
Contact:

Re: NFO Help

Post by WRH »

I'm now attempting to work on object views...

I get lots of 'warnings' no errors as such.

This is in response to prop 17 in action 0

Code: Select all

/!!Warning (99): Offset 98: No more data was expected.

This to the varaction 2's which contain the related prop 48. I used Lakies code with the escape sequences for this, I thought I may as well look at how they work and learn something else.

Code: Select all

//!!Warning (86): Offset 4: Testing nonexistant variable 48.

One thing which is annoying me at the moment is nfo renum messing up the real sprite co-ordinates. Meaning I'm going to have to go back and set these again!

I have no idea why it's doing this. :lol:

Anyway I was going to post code. But I've got questions now instead?

All I have is one set of action1s referencing all 14 action 2's , one set of action 3's, only 4 lines of them. I've been thinking I might need to cut things into groups of however many views I want each with it's own action 1, sprites, actions2s. Then the action 2's with the prop 48s.

My thinking so far has been to do everything with as few sets of actions as possible. The single sign version worked in game and menu with just one set of each action, no seperates. When trying this with views it just doesn't work; well not as intended anyway. I get a menu with just four signs, rather than getting different views.


I'm going to carry on working and reading, usually if I keep poking away I'll get somewhere, realise something or other.

OK. Update. I say this should work. However it's not. No object views. Just four objects...

Just don't get. :|

Apart from the Warning 100's, which I've learned mean nothing much, very few warnings and no errors. Still don't get why it says prop 48 doesn't exist. Of course it does, and since I'm using the latest version of NFO renum, it should know.

Code: Select all

// Automatically generated by GRFCODEC. Do not modify!
// (Info version 7)
// Escapes: 2+ 2- 2< 2> 2u< 2u> 2/ 2% 2u/ 2u% 2* 2& 2| 2^ 2sto = 2s 2rst = 2r 2psto 2ror = 2rot 2cmp 2ucmp 2<< 2u>> 2>>
// Escapes: 71 70 7= 7! 7< 7> 7G 7g 7gG 7GG 7gg 7c 7C
// Escapes: D= = DR D+ = DF D- = DC Du* = DM D* = DnF Du<< = DnC D<< = DO D& D| Du/ D/ Du% D%
// Format: spritenum pcxfile xpos ypos compression ysize xsize xrel yrel
    0 * 4	 32 00 00 00
    1 * 17	 08 06 "WRH" 01 "WRH SIGNS" 00 00
//!!Warning (99): Offset 98: No more data was expected.
    2 * 103	 00 0F 09 04 00 
		08 "SIGN" "SIGN" "SIGN" "SIGN"
		09 00 D0 00 D0 00 D0 00 D0 
	  0A 00 D0 01 D0 02 D0 03 D0 
	  0B 01 01 01 01  
		0C 11 11 11 11
		0D 0C 0C 0C 0C 
		0E 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
	  0F 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
	  10 00 00 00 00 00 00 00 00
	  17 04 04 04 02



    3 * 4	 01 0F 0E 01
    4 c:\sign.PCX 82 8 09 31 58 -26 -1
    5 c:\sign.PCX 146 8 09 31 58 -26 -1
    6 c:\sign.PCX 210 8 09 31 58 -26 -1
    7 c:\sign.PCX 274 8 09 31 58 -26 -1
    8 c:\sign.PCX 338 8 09 31 58 -26 -1
    9 c:\sign.PCX 402 8 09 31 58 -26 -1
   10 c:\sign.PCX 466 8 09 31 58 -26 -1
   11 c:\sign.PCX 530 8 09 31 58 -26 -1
   12 c:\sign.PCX 594 8 09 31 63 -31 -1
   13 c:\sign.PCX 674 8 09 31 63 -31 -1
   14 c:\sign.PCX 2 56 09 31 63 -31 -1
   15 c:\sign.PCX 82 56 09 31 63 -31 -1
   16 c:\sign.PCX 162 56 09 31 63 -31 -1
   17 c:\sign.PCX 242 56 09 31 63 -31 -1




   18 * 17	 02 0F 00 00 8D 0F 00 00 00 80 00 80 00 00 0F 0F E5
   19 * 17	 02 0F 01 00 8D 0F 00 00 01 80 00 80 00 00 0F 0F E5
   20 * 17	 02 0F 02 00 8D 0F 00 00 02 80 00 80 00 00 0F 0F E5
   21 * 17	 02 0F 03 00 8D 0F 00 00 03 80 00 80 00 00 0F 0F E5
   22 * 17	 02 0F 04 00 8D 0F 00 00 04 80 00 80 00 00 0F 0F E5
   23 * 17	 02 0F 05 00 8D 0F 00 00 05 80 00 80 00 00 0F 0F E5
   24 * 17	 02 0F 06 00 8D 0F 00 00 06 80 00 80 00 00 0F 0F E5
   25 * 17	 02 0F 07 00 8D 0F 00 00 07 80 00 80 00 00 0F 0F E5
   26 * 17	 02 0F 08 00 8D 0F 00 00 08 80 00 80 00 00 0F 0F E5
   27 * 17	 02 0F 09 00 8D 0F 00 00 09 80 00 80 00 00 0F 0F E5
   28 * 17	 02 0F 0A 00 8D 0F 00 00 0a 80 00 80 00 00 0F 0F E5
   29 * 17	 02 0F 0B 00 8D 0F 00 00 0b 80 00 80 00 00 0F 0F E5
   30 * 17	 02 0F 0C 00 8D 0F 00 00 0c 80 00 80 00 00 0F 0F E5
   31 * 17	 02 0F 0D 00 8D 0F 00 00 0d 80 00 80 00 00 0F 0F E5

//!!Warning (86): Offset 4: Testing nonexistant variable 48.
   32 * 22	 02 0F 00
                81 48                                   // Decide based off view
                  00 03                                 // No shift, logical and by 3 (0 .. 3)
                    \b3                                   // 3 results (plus one default)
                      \wx1   01 01                      // Use Action2 Layout '01' for view 2
                      \wx2   02 02                      // Use Action2 Layout '02' for view 3
                      \wx3   03 03                      // Use Action2 Layout '03' for view 4
                      \wx0                                // Use Action2 Layout '00' for default view

//!!Warning (86): Offset 4: Testing nonexistant variable 48.
   33 * 22	 02 0F 01
                81 48                                   // Decide based off view
                  00 03                                 // No shift, logical and by 3 (0 .. 3)
                    \b3                                   // 3 results (plus one default)
                      \wx1   04 04                      // Use Action2 Layout '01' for view 2
                      \wx2   05 05                      // Use Action2 Layout '02' for view 3
                      \wx3   06 06                      // Use Action2 Layout '03' for view 4
                      \wx0                          // Use Action2 Layout '00' for default view

//!!Warning (86): Offset 4: Testing nonexistant variable 48.
   34 * 22	 02 0F 02
                81 48                                   // Decide based off view
                  00 03                                // No shift, logical and by 3 (0 .. 3)
                    \b3                                   // 3 results (plus one default)
                      \wx1   07 07                      // Use Action2 Layout '01' for view 2
                      \wx2   08 08                      // Use Action2 Layout '02' for view 3
                      \wx3   0a 0a                      // Use Action2 Layout '03' for view 4
                      \wx0                         // Use Action2 Layout '00' for default view

//!!Warning (86): Offset 4: Testing nonexistant variable 48.
   35 * 22	 02 0F 03
                81 48                                   // Decide based off view
                  00 03                                // No shift, logical and by 3 (0 .. 3)
                    \b3                                   // 3 results (plus one default)
                      \wx1   0b 0b                      // Use Action2 Layout '01' for view 2
                      \wx2   0c 0c
											\wx2   0d 0d                      // Use Action2 Layout '02' for view 3
                      \wx0                         // Use Action2 Layout '00' for default view






//!!Warning (100): Default ID appears earlier in sprite.
   36 * 10	 03 0F 01 00 01 FF 00 00 00 00
//!!Warning (100): Default ID appears earlier in sprite.
   37 * 10	 03 0F 01 01 01 FF 01 00 01 00
//!!Warning (100): Default ID appears earlier in sprite.
   38 * 10	 03 0F 01 02 01 FF 02 00 02 00
//!!Warning (100): Default ID appears earlier in sprite.
   39 * 10	 03 0F 01 03 01 FF 03 00 03 00

//!!Warning (100): Default ID appears earlier in sprite.
   40 * 10	 03 0F 01 00 01 FF 04 00 04 00
//!!Warning (100): Default ID appears earlier in sprite.
   41 * 10	 03 0F 01 01 01 FF 05 00 05 00
//!!Warning (100): Default ID appears earlier in sprite.
   42 * 10	 03 0F 01 02 01 FF 06 00 06 00
//!!Warning (100): Default ID appears earlier in sprite.
   43 * 10	 03 0F 01 03 01 FF 07 00 07 00

//!!Warning (100): Default ID appears earlier in sprite.
   44 * 10	 03 0F 01 00 01 FF 08 00 08 00
//!!Warning (100): Default ID appears earlier in sprite.
   45 * 10	 03 0F 01 01 01 FF 09 00 09 00
//!!Warning (100): Default ID appears earlier in sprite.
   46 * 10	 03 0F 01 02 01 FF 0a 00 0a 00
//!!Warning (100): Default ID appears earlier in sprite.
   47 * 10	 03 0F 01 03 01 FF 0b 00 0b 00

//!!Warning (100): Default ID appears earlier in sprite.
   48 * 10	 03 0F 01 00 01 FF 0c 00 0c 00
//!!Warning (100): Default ID appears earlier in sprite.
   49 * 10	 03 0F 01 01 01 FF 0d 00 0d 00


   50 * 49	 04 48 FF 05 00 D0 "Road Signs" 00 "Signs 1" 00 "Signs 2" 00 "Signs 3" 00 "Signs 4" 00
michael blunck
Tycoon
Tycoon
Posts: 5948
Joined: 27 Apr 2005 07:09
Contact:

Re: NFO Help

Post by michael blunck »

Well, one bug is here:

Code: Select all

//!!Warning (99): Offset 98: No more data was expected.
    2 * 103    00 0F 09 04 00 
As you added prop 17, you should have increased the number of props from "09" to "0a" as well. Now, prop17 gets not processed anyway.

regards
Michael
Image
User avatar
Lakie
TTDPatch Developer
TTDPatch Developer
Posts: 1799
Joined: 26 May 2004 16:37
Location: Britain
Contact:

Re: NFO Help

Post by Lakie »

I'd still drop the "01 FF <id> 00" and replace it with "00" in the Action3s. That'd also cull the warning 100s.

As Michael says, you need to increment the Action0 property count when adding property 17, (change to "0A").
Have you tried using a newer version of renum, preferably the one which comes packaged with grfcodec 5.1?

~ Lakie
TTDpatch Developer 2005 - 2010 ~ It all started because of shortened vehicle not loading correctly, now look where I've gone with it!
Grfs coded ~ Finnish Train Set (Teaser) | Bm73 (Release 3) | Emu 680 (Release 3)| Glass Station (Release 1) | UK Roadset (Version 1.1a) | New Water Coasts (Version 7)
Pikka: "Lakie's a good coder, but before he'll add any feature to TTDP you have to convince him that you're not going to use it to destroy the world as we know it."
User avatar
WRH
Engineer
Engineer
Posts: 34
Joined: 14 Dec 2006 14:42
Contact:

Re: NFO Help

Post by WRH »

Lakie wrote:I'd still drop the "01 FF <id> 00" and replace it with "00" in the Action3s. That'd also cull the warning 100s.
I've done that, it still brings warning 100s. But that's not important at the moment.

As Michael says, you need to increment the Action0 property count when adding property 17, (change to "0A").
Have you tried using a newer version of renum, preferably the one which comes packaged with grfcodec 5.1?

~ Lakie
Increased number of props. That did work, then I downloaded grfcodec and renum from your link. I already thought I'd done this before, but obviously I hadn't. Ran renum, then re-encoded, now it almost works. Just my ID's to unscrew now and then I'll be cooking on gas. :D
Yexo
Tycoon
Tycoon
Posts: 3663
Joined: 20 Dec 2007 12:49

Re: NFO Help

Post by Yexo »

WRH wrote:
Lakie wrote:I'd still drop the "01 FF <id> 00" and replace it with "00" in the Action3s. That'd also cull the warning 100s.
I've done that, it still brings warning 100s. But that's not important at the moment.
You must have done that incorrectly, as that fix is definitely correct.
User avatar
WRH
Engineer
Engineer
Posts: 34
Joined: 14 Dec 2006 14:42
Contact:

Re: NFO Help

Post by WRH »

I just don't obviously understand any of this.

OK I can get views to work with just one set of 4 sprites, If I try it with more or all I just end up with a broken menu or stuck with the first 4 signs, which work OK but no others. Thing is I'm not getting any errors as such, technically no problem. I'm really struggling with the large set concept in it's implementation with views.

I could just have 4 separate GRFS, why is it so hard to get one grf with all of them in?


OK it doesn't help if it's just not sinking in, my mind struggles with this stuff. I'm sure it's my understanding of the ID's or Cargotypes or whatever they are, I believe it's this that I've not understood, and that and how it links up with other actions.

I've tried looking at a comparable project to help me, Wallyweb always gives out a NFO with detailed info. It does help but then again even that is hard to follow as he does things with a great deal more understanding than I do. For example I look at his ID's and mine, his work mine don't, that's all I can see. :wink:

It's the action 3's I believe. It's this that seems to ether make or break it. Trying the ID's.

I've tried about every combination I can think of. Some do half a job, some just don't work at all. Then by accident I get five signs that work (funny number) go back and try the same thing again, I get 6 thinking I'm on to something I try a seventh. Then it breaks.

Code: Select all

// Automatically generated by GRFCODEC. Do not modify!
// (Info version 7)
// Escapes: 2+ 2- 2< 2> 2u< 2u> 2/ 2% 2u/ 2u% 2* 2& 2| 2^ 2sto = 2s 2rst = 2r 2psto 2ror = 2rot 2cmp 2ucmp 2<< 2u>> 2>>
// Escapes: 71 70 7= 7! 7< 7> 7G 7g 7gG 7GG 7gg 7c 7C
// Escapes: D= = DR D+ = DF D- = DC Du* = DM D* = DnF Du<< = DnC D<< = DO D& D| Du/ D/ Du% D%
// Format: spritenum pcxfile xpos ypos compression ysize xsize xrel yrel
    0 * 4	 2B 00 00 00
    1 * 17	 08 06 "WRH" 01 "WRH SIGNS" 00 00
    2 * 103	 00 0F 0a 04 00 
		08 "SIGN" "SIGN" "SIGN" "SIGN"
		09 00 D0 00 D0 00 D0 00 D0 
	  0A 00 D0 01 D0 02 D0 03 D0 
	  0B 01 01 01 01  
		0C 11 11 11 11
		0D 0C 0C 0C 0C 
		0E 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
	  0F 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
	  10 00 00 00 00 00 00 00 00
	  17 04 04 04 02

//set 1

    3 * 4	 01 0F 04 01
    4 c:\sign.PCX 151 19 09 31 58 -26 -1
    5 c:\sign.PCX 230 19 09 31 58 -26 -1
    6 c:\sign.PCX 306 19 09 31 58 -31 -1
    7 c:\sign.PCX 386 19 09 31 58 -29 -1






    8 * 17	 02 0F 00 00 8D 0F 00 00 00 80 00 80 00 00 0F 0F E5
    9 * 17	 02 0F 01 00 8D 0F 00 00 01 80 00 80 00 00 0F 0F E5
   10 * 17	 02 0F 02 00 8D 0F 00 00 02 80 00 80 00 00 0F 0F E5
   11 * 17	 02 0F 03 00 8D 0F 00 00 03 80 00 80 00 00 0F 0F E5

   12 * 22	 02 0F 00
                81   48                                   // Decide based off view
                  00   03                                 // No shift, logical and by 3 (0 .. 3)
                    \b3                                   // 3 results (plus one default)
                      \wx1   01 01                      // Use Action2 Layout '01' for view 2
                      \wx2   02 02                      // Use Action2 Layout '02' for view 3
                      \wx3   03 03                      // Use Action2 Layout '03' for view 4
                      \wx0                 








	 //set2

   13 * 4	 01 0F 04 01

   14 c:\sign.PCX 468 19 09 31 58 -28 -1
   15 c:\sign.PCX 552 19 09 31 58 -26 -1
   16 c:\sign.PCX 2 67 09 31 58 -29 -1
   17 c:\sign.PCX 630 19 09 31 58 -26 -1

   18 * 17	 02 0F 04 00 8D 0F 00 00 00 80 00 80 00 00 0F 0F E5
   19 * 17	 02 0F 05 00 8D 0F 00 00 01 80 00 80 00 00 0F 0F E5
   20 * 17	 02 0F 06 00 8D 0F 00 00 02 80 00 80 00 00 0F 0F E5
   21 * 17	 02 0F 07 00 8D 0F 00 00 03 80 00 80 00 00 0F 0F E5

//!!Warning (98): Variation 1 cannot be reached.
//!!Warning (98): Variation 2 cannot be reached.
   22 * 22	 02 0F 01
                81   48                                   // Decide based off view
                  00   03                                 // No shift, logical and by 3 (0 .. 3)
                    \b3                                   // 3 results (plus one default)
                      \wx1   \b4 b4                      // Use Action2 Layout '01' for view 2
                      \wx2   \b5 b5                      // Use Action2 Layout '02' for view 3
                      \wx3   \b6 b6                      // Use Action2 Layout '03' for view 4
                      \wx0                 


// set 3

   23 * 4	 01 0F 04 01

   24 c:\sign.PCX 706 19 09 31 63 -31 -1
   25 c:\sign.PCX 419 67 09 31 63 -31 -1
   26 c:\sign.PCX 339 67 09 31 63 -31 -1
   27 c:\sign.PCX 82 67 09 31 63 -31 -1

   28 * 17	 02 0F 08 00 8D 0F 00 00 00 80 00 80 00 00 0F 0F E5
   29 * 17	 02 0F 09 00 8D 0F 00 00 01 80 00 80 00 00 0F 0F E5
   30 * 17	 02 0F 0a 00 8D 0F 00 00 02 80 00 80 00 00 0F 0F E5
   31 * 17	 02 0F 0b 00 8D 0F 00 00 03 80 00 80 00 00 0F 0F E5


   32 * 22	 02 0F 02
                81   48                                   // Decide based off view
                  00   03                                 // No shift, logical and by 3 (0 .. 3)
                    \b3                                   // 3 results (plus one default)
                     \wx1   \b7 \b7                     // Use Action2 Layout '01' for view 2
                      \wx2   \b8 \b8                      // Use Action2 Layout '02' for view 3
                      \wx3   \b9 \b9                     // Use Action2 Layout '03' for view 4
                      \wx0 

											//set 4, with two sign views

   33 * 4	 01 0F 02 01

   34 c:\sign.PCX 162 67 09 31 63 -31 -1
   35 c:\sign.PCX 242 67 09 31 63 -31 -1 


   36 * 17	 02 0F 0C 00 8D 0F 00 00 00 80 00 80 00 00 0F 0F E5
   37 * 17	 02 0F 0D 00 8D 0F 00 00 01 80 00 80 00 00 0F 0F E5  

   38 * 18	 02 0F 03
                81   48                                   // Decide based off view
                  00   02                                 // No shift, logical and by 3 (0 .. 3)
                    \b2                                   // 3 results (plus one default)
                      \wx1   \b10 \b10                      // Use Action2 Layout '01' for view 2
                      \wx2   \b11 \b11                      // Use Action2 Layout '02' for view 3
                      \wx0                              


//!!Warning (100): Default ID appears earlier in sprite.
   39 * 10	 03 0F 01 00 01 00 00 00 00 00
//!!Warning (100): Default ID appears earlier in sprite.
   40 * 10	 03 0F 01 01 01 00 01 00 01 00
//!!Warning (100): Default ID appears earlier in sprite.
   41 * 10	 03 0F 01 02 01 00 02 00 02 00
//!!Warning (100): Default ID appears earlier in sprite.
   42 * 10	 03 0F 01 03 01 00 03 00 03 00

   //43 * 10	 03 0F 01 00 01 00 00 00 04 00
   //44 * 10	 03 0F 01 01 01 00 01 00 05 00
   //45 * 10	 03 0F 01 02 01 00 06 00 06 00
   //46 * 10	 03 0F 01 03 01 00 07 00 07 00

   //47 * 10	 03 0F 01 00 01 00 08 00 08 00
   //48 * 10	 03 0F 01 01 01 00 09 00 09 00
   //49 * 10	 03 0F 01 02 01 00 0A 00 0A 00
   //50 * 10	 03 0F 01 03 01 00 0B 00 0B 00

   //43 * 10	 03 0F 01 00 01 00 0C 00 0C 00
   //52 * 10	 03 0F 01 01 01 00 0D 00 0D 00


   43 * 49	 04 48 FF 05 00 D0 "Road Signs" 00 "Signs 1" 00 "Signs 2" 00 "Signs 3" 00 "Signs 4" 00



//!!For feature F the following cargoIDs have not been used since their most recent definition:
//!!04 (last defined at sprite 18)
//!!05 (last defined at sprite 19)
//!!06 (last defined at sprite 20)
//!!07 (last defined at sprite 21)
//!!08 (last defined at sprite 28)
//!!09 (last defined at sprite 29)
//!!0A (last defined at sprite 30)
//!!0B (last defined at sprite 31)
//!!0C (last defined at sprite 36)
//!!0D (last defined at sprite 37)
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: NFO Help

Post by planetmaker »

Why the heck do you declare nfo version 6 in your action8 instead of the version 7 you probably want and should use?
User avatar
WRH
Engineer
Engineer
Posts: 34
Joined: 14 Dec 2006 14:42
Contact:

Re: NFO Help

Post by WRH »

planetmaker wrote:Why the heck do you declare nfo version 6 in your action8 instead of the version 7 you probably want and should use?
I thought this was game version, this is what the wiki states. It even lists each version with the appropriate game. I had no idea this is actually NFO version. The wiki never mentions that, it says graphics version.

I didn't wish to make my set incompatible with previous versions, which is why. :)
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: NFO Help

Post by planetmaker »

That byte has nothing to do with the version of your NewGRF. It's the version of the language you write it in... the graphics format version.
Yexo
Tycoon
Tycoon
Posts: 3663
Joined: 20 Dec 2007 12:49

Re: NFO Help

Post by Yexo »

I've added some comments in your code, I hope this helps.
WRH wrote:

Code: Select all

//First set looks ok

	 //set2

   13 * 4	 01 0F 04 01

   14 c:\sign.PCX 468 19 09 31 58 -28 -1
   15 c:\sign.PCX 552 19 09 31 58 -26 -1
   16 c:\sign.PCX 2 67 09 31 58 -29 -1
   17 c:\sign.PCX 630 19 09 31 58 -26 -1

   18 * 17	 02 0F 04 /* <- that 04 is the set id of this action 2. You should reuse setid 00 here. */ 00 8D 0F 00 00 00 80 00 80 00 00 0F 0F E5
   19 * 17	 02 0F 05 /* <- see above, that 05 should be 01. */ 00 8D 0F 00 00 01 80 00 80 00 00 0F 0F E5
   20 * 17	 02 0F 06 /* <- replace 06 by 02. */ 00 8D 0F 00 00 02 80 00 80 00 00 0F 0F E5
   21 * 17	 02 0F 07 /* <- replace 07 by 03. */ 00 8D 0F 00 00 03 80 00 80 00 00 0F 0F E5

   22 * 22	 02 0F 01
                81   48                                   // Decide based off view
                  00   03                                 // No shift, logical and by 3 (0 .. 3)
                    \b3                                   // 3 results (plus one default)
                      // \wx1, \wx2, \wx3 and \wx0 refer to the action2 IDs you've defined above.
                      // If you reuse an action2 ID it'll refer to the last one defined before the usage.
                      // You define action2 ID 1 in both sprite 8 and (with my modification above) also in sprite 18.
                      // This usage here will refer to the usage in sprite 18 since it's the last definition before this sprite.
                      \wx1   \b4 b4    //Replace "\b4 b4" with "01 01" (without quotes), do the same for the lines below ("02 02" and "03 03")
                      \wx2   \b5 b5                      // Use Action2 Layout '02' for view 3
                      \wx3   \b6 b6                      // Use Action2 Layout '03' for view 4
                      \wx0                 


// set 3

   23 * 4	 01 0F 04 01

   24 c:\sign.PCX 706 19 09 31 63 -31 -1
   25 c:\sign.PCX 419 67 09 31 63 -31 -1
   26 c:\sign.PCX 339 67 09 31 63 -31 -1
   27 c:\sign.PCX 82 67 09 31 63 -31 -1

   // Do the same as for set 2, reuse action2 IDs 00 to 03.
   28 * 17	 02 0F 08 00 8D 0F 00 00 00 80 00 80 00 00 0F 0F E5
   29 * 17	 02 0F 09 00 8D 0F 00 00 01 80 00 80 00 00 0F 0F E5
   30 * 17	 02 0F 0a 00 8D 0F 00 00 02 80 00 80 00 00 0F 0F E5
   31 * 17	 02 0F 0b 00 8D 0F 00 00 03 80 00 80 00 00 0F 0F E5


   32 * 22	 02 0F 02
                81   48                                   // Decide based off view
                  00   03                                 // No shift, logical and by 3 (0 .. 3)
                    \b3                                   // 3 results (plus one default)
                     // Do the same as above, \b7 \b7 should be 01 01 etc.
                     \wx1   \b7 \b7                     // Use Action2 Layout '01' for view 2
                      \wx2   \b8 \b8                      // Use Action2 Layout '02' for view 3
                      \wx3   \b9 \b9                     // Use Action2 Layout '03' for view 4
                      \wx0 
//Snip set 4

Instead of this:
   39 * 10	 03 0F 01 00 01 00 00 00 00 00
   40 * 10	 03 0F 01 01 01 00 01 00 01 00
   41 * 10	 03 0F 01 02 01 00 02 00 02 00
   42 * 10	 03 0F 01 03 01 00 03 00 03 00
You should use this:
   39 * 10	 03 0F 01 00 00 00 00
   40 * 10	 03 0F 01 01 00 01 00
   41 * 10	 03 0F 01 02 00 02 00
   42 * 10	 03 0F 01 03 00 03 00

   43 * 49	 04 48 FF 05 00 D0 "Road Signs" 00 "Signs 1" 00 "Signs 2" 00 "Signs 3" 00 "Signs 4" 00
Post Reply

Return to “NewGRF Technical Discussions”

Who is online

Users browsing this forum: No registered users and 1 guest