[OTTD] NARS ADD-ON SET (3 OCT 2016 - r0042) Dev Thread (Help wanted!)

Discuss, get help with, or post new graphics for TTDPatch and OpenTTD, using the NewGRF system, here. Graphics for plain TTD also acceptable here.

Moderator: Graphics Moderators

User avatar
Sylf
President
President
Posts: 957
Joined: 23 Nov 2010 21:25
Location: ::1

Re: [OTTD] NekoMasters NARS Add-on Project (Help needed)

Post by Sylf »

NekoMaster wrote:but when I goto compile the code I made

"Parsing ...Illegal character '#' (character code 0x23) at "nars_addon.pnml", line 9, column 1"

Which is :

Code: Select all

#include "src/header.pnml"
in your nars_addon.pnml
make is the command you'll need to use, not nmlc. If that is not working, please join #openttd IRC channel on OFTC network.
User avatar
Sylf
President
President
Posts: 957
Joined: 23 Nov 2010 21:25
Location: ::1

Re: [OTTD] NekoMasters NARS Add-on Project (Help needed)

Post by Sylf »

I played some more more with alignment code.
Attachments
nars_addon_source.tar.gz
(64.32 KiB) Downloaded 62 times
NARS_ADDON.tar
(10 KiB) Downloaded 62 times
User avatar
NekoMaster
Tycoon
Tycoon
Posts: 4001
Joined: 16 Aug 2008 22:26
Skype: neko-master
Location: Oshawa, Ontario, CANADA

Re: [OTTD] NekoMasters NARS Add-on Project (Help needed)

Post by NekoMaster »

Thanks a lot for the help, because of you I was able to actually make sense of NML and compile stuff.

To make things easier on my self I took the code you created and organized it and set it up so I can use this as a template for future projects as well.

Also I didn't like that some sprite sheets where different as some sprites where made by someone then modified by another person, and sometimes there are more then one people I have to credit for something, like PikkaBird and DanMack for anything from NARS 1 and 2.

So I made a new sprite sheet set up which also includes a copy of the OpenTTD DOS Pallet incase someone wants to make a quick edit in paint or gimp without needing a pallet file.

I still hope that you'll be working with me on this, and I hope the new set up wont be too complicated for you to understand or work with.

I've attached a copy of what I have to show what I've done... and because I'm having a problem with compiling.

Bash keeps giving me some error. I can get into by SHIFT+RIGHT CLICK and Select Open Command Window Here, and then I enter the command Bash.

Code: Select all

D:\GRFPROJECTS\NARS_ADDON_SET>bash

bash-3.1$ make
make: *** No rule to make target `NARS_ADDON.pnml', needed by `NARS_ADDON_SET.nml'.  Stop.
bash-3.1$
I've looked in all the nml and make files and I can't find anything that would solve this. This is because you'll see that I changed the project short name from NARS ADDON to NARS ADDON SET
Attachments
NARS_ADDON_SET.zip
Testing Source Code
(30.29 KiB) Downloaded 49 times
Image Proud Canadian Image
Nekomasters Projects! (Downloads available on BaNaNaS!) \(>^w^<)/
# NARS ADD-ON SET 2CC | 2cc Rapid Transit For Me! (2ccRTFM) | 2cc Wagons In NML (2ccWIN)
# NML Category System (Organize your GRFS!) <- TT-Forums Exclusive Download!
User avatar
Sylf
President
President
Posts: 957
Joined: 23 Nov 2010 21:25
Location: ::1

Re: [OTTD] NekoMasters NARS Add-on Project (Help needed)

Post by Sylf »

NekoMaster wrote:Bash keeps giving me some error.
You'll need to cd to /d/GRFPROJECTS/NARS_ADDON_SET each time you enter bash, before you run make.

Also, I personally would find it easier to use msys.bat to enter the bash environment - it has a nice default prompt to show you which directory you're currently in. It should be in c:\mingw\msys\1.0 (or whereever you install your mingw).
User avatar
NekoMaster
Tycoon
Tycoon
Posts: 4001
Joined: 16 Aug 2008 22:26
Skype: neko-master
Location: Oshawa, Ontario, CANADA

Re: [OTTD] NekoMasters NARS Add-on Project (Help needed)

Post by NekoMaster »

Well with the new sprite sheet style I had to reconfigure the template alignments and offsets and while working on that I didn't touch anything else other then the template.pnml and suddenly I get this

Code: Select all

$ make -b
[NML] NARS_ADDON.grf
[Knmlc ERROR: "src/vehicleID.pnml", line 23: Syntax error, unexpected token "item"
Included from: "NARS_ADDON.pnml", line 17
make: *** [NARS_ADDON.grf] Error 1
It was working fine one moment and then after changing a few numbers in template.pnml and then using make to get a GRF it shows that error.

I've tried everything and I can't seem to fix this one and its the silliest stupidest error I've gotten so far.... complaning about something that was fine before and is an important part and now it just rejects it like "Uh... item doesnt belong there"
Image Proud Canadian Image
Nekomasters Projects! (Downloads available on BaNaNaS!) \(>^w^<)/
# NARS ADD-ON SET 2CC | 2cc Rapid Transit For Me! (2ccRTFM) | 2cc Wagons In NML (2ccWIN)
# NML Category System (Organize your GRFS!) <- TT-Forums Exclusive Download!
User avatar
NekoMaster
Tycoon
Tycoon
Posts: 4001
Joined: 16 Aug 2008 22:26
Skype: neko-master
Location: Oshawa, Ontario, CANADA

Re: [OTTD] NekoMasters NARS Add-on Project (Help needed)

Post by NekoMaster »

Heres a copy of what I have at the moment...

it just seems that if I fix or remove something commandline/bash/nmlc/what ever is complaining about EVERYTHING under the sun with my code, things that where fine just a few builds ago...

And this all started when I changed a few numbers in my template.pnml file... ungh....

Maybe someone can figure out what the hell is going on and why
Attachments
NARS_ADDON_18-07-2016.zip
Troubled file, wont compile
(58.04 KiB) Downloaded 52 times
Image Proud Canadian Image
Nekomasters Projects! (Downloads available on BaNaNaS!) \(>^w^<)/
# NARS ADD-ON SET 2CC | 2cc Rapid Transit For Me! (2ccRTFM) | 2cc Wagons In NML (2ccWIN)
# NML Category System (Organize your GRFS!) <- TT-Forums Exclusive Download!
User avatar
Sylf
President
President
Posts: 957
Joined: 23 Nov 2010 21:25
Location: ::1

Re: [OTTD] NekoMasters NARS Add-on Project (Help needed)

Post by Sylf »

Code: Select all

// ---------------------------------------------------------
// DIESEL LOCOMOTIVES (2000)
// ---------------------------------------------------------

sort(FEAT_TRAINS, [ITEM_DIESEL_EMD_E9]);
sort(FEAT_TRAINS, [ITEM_DIESEL_EMD_FP45]);
That should be

Code: Select all

sort(FEAT_TRAINS, [
	// ---------------------------------------------------------
	// DIESEL LOCOMOTIVES (2000)
	// ---------------------------------------------------------
	ITEM_DIESEL_EMD_E9,
	ITEM_DIESEL_EMD_FP45
]);
User avatar
NekoMaster
Tycoon
Tycoon
Posts: 4001
Joined: 16 Aug 2008 22:26
Skype: neko-master
Location: Oshawa, Ontario, CANADA

Re: [OTTD] NekoMasters NARS Add-on Project (Help needed)

Post by NekoMaster »

Sylf wrote:

Code: Select all

// ---------------------------------------------------------
// DIESEL LOCOMOTIVES (2000)
// ---------------------------------------------------------

sort(FEAT_TRAINS, [ITEM_DIESEL_EMD_E9]);
sort(FEAT_TRAINS, [ITEM_DIESEL_EMD_FP45]);
That should be

Code: Select all

sort(FEAT_TRAINS, [
	// ---------------------------------------------------------
	// DIESEL LOCOMOTIVES (2000)
	// ---------------------------------------------------------
	ITEM_DIESEL_EMD_E9,
	ITEM_DIESEL_EMD_FP45
]);
The problem I was having was that bash/nmlc was complaining about the word "item" in my VehicleID.pnml, when Item is used as the first part of each vehicle to include.

---

Also after trying to work with that new sprite sheet style I'm givign up on it for something a little better but with the sprites in the same position as they should be, this way the usual alignment and off sets should work.

This is the last time I change the sprite sheets unless something comes along that forces a new change. I just want to keep everything organised and easy to make out what each sprite is suppose to be as well as giving proper credit for the sprites.

I've posted an example of a sprite sheet using Sprite Template v3.0 which I'm happy with.

Also I noticed in the 2cc SET NML Code, there is some code for B-unit stuff for some of the locomotives like the FP9, Sharknose, E8, etc. Though it requires a second template to refer to the second line of sprites (the B row or booster row) of sprites.
Attachments
DIESEL_EMD_E9.png
DIESEL_EMD_E9.png (44.3 KiB) Viewed 2354 times
Image Proud Canadian Image
Nekomasters Projects! (Downloads available on BaNaNaS!) \(>^w^<)/
# NARS ADD-ON SET 2CC | 2cc Rapid Transit For Me! (2ccRTFM) | 2cc Wagons In NML (2ccWIN)
# NML Category System (Organize your GRFS!) <- TT-Forums Exclusive Download!
User avatar
Sylf
President
President
Posts: 957
Joined: 23 Nov 2010 21:25
Location: ::1

Re: [OTTD] NekoMasters NARS Add-on Project (Help needed)

Post by Sylf »

I finally took a look at all of files in that latest zip, and thare are a whole host of things that's broken now.
It'll be better if we wait for a project repo set up.

Couple general advice:
avoid spaces in any file/directory names in the project.
treat everything in the code as case sensitive.

As for the cause of that particular error, the error is in templates.pnml.
The backslash (\) at the end of line 42 caused c preprocessor to move the curly bracket in the next line to be moved up. And end of line 42 is a comment. So that whole template block is never cloned properly because of how the comment is written. Change it to something like

Code: Select all

template template_L8( y ) {

// [ Lt_X, UP_Y,  Wdt,  Hgt, off_x, off_y ]
   [    1,   37,    8,   24,    -4,   -12 ] // Up ↑
   [   17,   46,   23,   17,   -12,    -8 ] // Up Right ↑→
   [   56,   41,   32,   16,   -16,   -12 ] // Right →
   [   97,   46,   23,   17,   -12,    -8 ] // Right Down ↓→
   [  121,   49,    8,   24,    -4,   -12 ] // Down ↓
   [  130,   46,   24,   17,   -12,    -8 ] // Down Left ←↓
   [  161,   41,   33,   32,   -16,   -12 ] // Left ←
   [  210,   46,   23,   17,   -12,    -8 ] // Up Left ←↑
}
User avatar
NekoMaster
Tycoon
Tycoon
Posts: 4001
Joined: 16 Aug 2008 22:26
Skype: neko-master
Location: Oshawa, Ontario, CANADA

Re: [OTTD] NekoMasters NARS Add-on Project (Help needed)

Post by NekoMaster »

Sylf wrote:I finally took a look at all of files in that latest zip, and thare are a whole host of things that's broken now.
It'll be better if we wait for a project repo set up.

Couple general advice:
avoid spaces in any file/directory names in the project.
treat everything in the code as case sensitive.

As for the cause of that particular error, the error is in templates.pnml.
The backslash (\) at the end of line 42 caused c preprocessor to move the curly bracket in the next line to be moved up. And end of line 42 is a comment. So that whole template block is never cloned properly because of how the comment is written. Change it to something like

Code: Select all

template template_L8( y ) {

// [ Lt_X, UP_Y,  Wdt,  Hgt, off_x, off_y ]
   [    1,   37,    8,   24,    -4,   -12 ] // Up ↑
   [   17,   46,   23,   17,   -12,    -8 ] // Up Right ↑→
   [   56,   41,   32,   16,   -16,   -12 ] // Right →
   [   97,   46,   23,   17,   -12,    -8 ] // Right Down ↓→
   [  121,   49,    8,   24,    -4,   -12 ] // Down ↓
   [  130,   46,   24,   17,   -12,    -8 ] // Down Left ←↓
   [  161,   41,   33,   32,   -16,   -12 ] // Left ←
   [  210,   46,   23,   17,   -12,    -8 ] // Up Left ←↑
}
Oh, I didn't think about that, I thought anythign after // would be ignored and treated as a comment, no matter what it was. I guess I was wrong.

ANyways don't worry too much about the Stuff I posted in that ZIP, I just redid all the sprites on the new sprite sheet. The new sprite sheet template allows for the original alignment/offsets to be used, just like any other set does and should (with the first blue sprite box being at 2x, 2y)

Lastly I still have many more sprites to set up, I've been going around and asking permission to use peoples work, so the only sprites you'll see in the gfx are sprites I have permission to use.
Image Proud Canadian Image
Nekomasters Projects! (Downloads available on BaNaNaS!) \(>^w^<)/
# NARS ADD-ON SET 2CC | 2cc Rapid Transit For Me! (2ccRTFM) | 2cc Wagons In NML (2ccWIN)
# NML Category System (Organize your GRFS!) <- TT-Forums Exclusive Download!
User avatar
NekoMaster
Tycoon
Tycoon
Posts: 4001
Joined: 16 Aug 2008 22:26
Skype: neko-master
Location: Oshawa, Ontario, CANADA

Re: [OTTD] NekoMasters NARS Add-on Project (Help needed)

Post by NekoMaster »

Using Sylfs code, or rather just copy pasting stuff and adding more to the code they posted in NARS ADDON Source, I added a couple of engines of my own.

Here we have a GE P32-8BHW AKa AMtrak Pepsi Cans. While they're not as good as GE P40DC's or P42DC's which come a little later, its just one of the many locomotives I plan to add even if its not 100% useful. Some of these I'm adding because they look cool IMO.

Image

Next We have a New Haven EP-5 "Jet", while they have half decent specs for an american electric, they where loud, cramped, and unreliable in real life, but they did serve for a short while with New Haven. BTW I know I'm using it wrong here, but I was too lazy to set up a brand new line for passenger so I put them on iron ore duty in my grf test run here.

Image
Attachments
AMtrak_Pepsi_Can.png
(146.63 KiB) Not downloaded yet
NewHaven_Jet.png
NewHaven_Jet.png (107.17 KiB) Viewed 414 times
Image Proud Canadian Image
Nekomasters Projects! (Downloads available on BaNaNaS!) \(>^w^<)/
# NARS ADD-ON SET 2CC | 2cc Rapid Transit For Me! (2ccRTFM) | 2cc Wagons In NML (2ccWIN)
# NML Category System (Organize your GRFS!) <- TT-Forums Exclusive Download!
User avatar
NekoMaster
Tycoon
Tycoon
Posts: 4001
Joined: 16 Aug 2008 22:26
Skype: neko-master
Location: Oshawa, Ontario, CANADA

Re: [OTTD] NekoMasters NARS Add-on Project (Help needed)

Post by NekoMaster »

Alright! Thanks to Sylf helping me learn how to code, I now know enough to make a simple GRF, with single unit locomotives (that is, I can't do articulated stuff yet, or B-units, or multi-part locomotives like a ALCO-GE Boxcab electric which has two units for the locomotive).


The GRF and Source can be downloaded from the first post ======>> viewtopic.php?f=26&t=75036#p1172995

( ......or you can download it here download/file.php?id=193413 )


Heres a picture of the 4 Locomotives I have coded in with example train sets.

Image
NARS_ADDON_SET_4ENGINES.png
(54.48 KiB) Not downloaded yet
Image Proud Canadian Image
Nekomasters Projects! (Downloads available on BaNaNaS!) \(>^w^<)/
# NARS ADD-ON SET 2CC | 2cc Rapid Transit For Me! (2ccRTFM) | 2cc Wagons In NML (2ccWIN)
# NML Category System (Organize your GRFS!) <- TT-Forums Exclusive Download!
User avatar
NekoMaster
Tycoon
Tycoon
Posts: 4001
Joined: 16 Aug 2008 22:26
Skype: neko-master
Location: Oshawa, Ontario, CANADA

Re: [OTTD] NekoMasters NARS Add-on Project (TEST GRF 2 RELEASED!)

Post by NekoMaster »

Another update in the first post, this time with TEST GRF 2, with 3 times more locomotives then TEST 1!!!

Includes stuff like :

EMD E7, E8, and E9 (in Amtrak Phase 1 Paint)

EMD SD45-2 (A little cheaper to run then the SD45 and more reliable)

EMD GP40 and GP40-2

and, another locomotive I've really wanted to see in game...

the EMD F40C in Metra style!
Image Proud Canadian Image
Nekomasters Projects! (Downloads available on BaNaNaS!) \(>^w^<)/
# NARS ADD-ON SET 2CC | 2cc Rapid Transit For Me! (2ccRTFM) | 2cc Wagons In NML (2ccWIN)
# NML Category System (Organize your GRFS!) <- TT-Forums Exclusive Download!
User avatar
NekoMaster
Tycoon
Tycoon
Posts: 4001
Joined: 16 Aug 2008 22:26
Skype: neko-master
Location: Oshawa, Ontario, CANADA

Re: [OTTD] NekoMasters NARS Add-on Project (TEST GRF 2 RELEASED!)

Post by NekoMaster »

ISA wrote:Instead of spamming every new locomotive can You maybe add a buy menu shot to first post to see new added locomotives?
Well the first post is updated and redesigned!

I even posted a new GRF update and also added some pictures to make things nicer, like a vehicle list and a (temporary?) picture for the project, though not necessarily a logo.

Considering I've always wanted to make a set with the Santa Fe Super Chief style FP45 as well as other locomotives, I'd like it if the logo of this set used the theme of a Santa Fe FP45
Image Proud Canadian Image
Nekomasters Projects! (Downloads available on BaNaNaS!) \(>^w^<)/
# NARS ADD-ON SET 2CC | 2cc Rapid Transit For Me! (2ccRTFM) | 2cc Wagons In NML (2ccWIN)
# NML Category System (Organize your GRFS!) <- TT-Forums Exclusive Download!
User avatar
The Growl
Transport Coordinator
Transport Coordinator
Posts: 342
Joined: 30 May 2016 23:55
Location: London

Re: [OTTD] NekoMasters NARS Add-on Set (July 31st, 2016 - r0014) Dev Thread

Post by The Growl »

I have Kawaski M8 and M7 sprites from the American Train pack. I can adapt them so they're used in 2CC if you like. I could also make some Budd railcars (I think that's what it's called) if you like.
Attachments
M8 Sheet.png
M8 Sheet.png (9.83 KiB) Viewed 2145 times
Front.png
Front.png (8.73 KiB) Viewed 2145 times
Image
User avatar
NekoMaster
Tycoon
Tycoon
Posts: 4001
Joined: 16 Aug 2008 22:26
Skype: neko-master
Location: Oshawa, Ontario, CANADA

Re: [OTTD] NekoMasters NARS Add-on Set (July 31st, 2016 - r0014) Dev Thread

Post by NekoMaster »

The Growl wrote:I have Kawaski M8 and M7 sprites from the American Train pack. I can adapt them so they're used in 2CC if you like. I could also make some Budd railcars (I think that's what it's called) if you like.
Anything I'm including will have to be 2cc to fit in with NARS 2.5, Also NARS 2.5 already has Budd Railcars/RDC's. It might be nice to have some Metro stuff, especially because the M7 and M8 are electric which any North American set could do with more of. Might also be nice to have the M1/M3 cars and MP54 if anyone ever wants to draw them.
Image Proud Canadian Image
Nekomasters Projects! (Downloads available on BaNaNaS!) \(>^w^<)/
# NARS ADD-ON SET 2CC | 2cc Rapid Transit For Me! (2ccRTFM) | 2cc Wagons In NML (2ccWIN)
# NML Category System (Organize your GRFS!) <- TT-Forums Exclusive Download!
User avatar
The Growl
Transport Coordinator
Transport Coordinator
Posts: 342
Joined: 30 May 2016 23:55
Location: London

Re: [OTTD] NekoMasters NARS Add-on Set (July 31st, 2016 - r0014) Dev Thread

Post by The Growl »

NekoMaster wrote:
The Growl wrote:I have Kawaski M8 and M7 sprites from the American Train pack. I can adapt them so they're used in 2CC if you like. I could also make some Budd railcars (I think that's what it's called) if you like.
Anything I'm including will have to be 2cc to fit in with NARS 2.5, Also NARS 2.5 already has Budd Railcars/RDC's. It might be nice to have some Metro stuff, especially because the M7 and M8 are electric which any North American set could do with more of. Might also be nice to have the M1/M3 cars and MP54 if anyone ever wants to draw them.
Will do!
Image
User avatar
GarryG
Tycoon
Tycoon
Posts: 5850
Joined: 14 Feb 2015 00:44
Location: Newcastle, Australia

Re: [OTTD] NekoMasters NARS Add-on Set (July 31st, 2016 - r0014) Dev Thread

Post by GarryG »

Good to see you started your project.

If you like take some locos from my AuzTrains if you like. Many of the steam are USA design. The QR C17 was originally built in USA before World War II started. They was on a ship bound for a Asian country when war started, so they sent them to Queensland instead.

Cheers pal
Soot Happens
Screenshot Of The Month Winner March 2020
All my projects are GPLv2 License unless stated.
Auz Road Sets: viewtopic.php?f=29&t=87335
Auz Project Releases: viewtopic.php?f=67&t=84725
Auz Trains: http://www.tt-forums.net/viewtopic.php?f=26&t=74193
Auz Industry Sets: http://www.tt-forums.net/viewtopic.php?f=26&t=74471
Auz Objects: viewtopic.php?f=26&t=75657
Auz Bridges: viewtopic.php?f=26&t=75248
Auz Stations: viewtopic.php?f=26&t=76390
Auz Tracks: viewtopic.php?f=26&t=82691
Auz Subway Stations: viewtopic.php?f=26&t=85335
Auz Eyecandy TramTracks: viewtopic.php?t=89908
User avatar
NekoMaster
Tycoon
Tycoon
Posts: 4001
Joined: 16 Aug 2008 22:26
Skype: neko-master
Location: Oshawa, Ontario, CANADA

Re: [OTTD] NekoMasters NARS Add-on Set (July 31st, 2016 - r0014) Dev Thread

Post by NekoMaster »

GarryG wrote:Good to see you started your project.

If you like take some locos from my AuzTrains if you like. Many of the steam are USA design. The QR C17 was originally built in USA before World War II started. They was on a ship bound for a Asian country when war started, so they sent them to Queensland instead.

Cheers pal
I don't know how much I'll need in terms of steam as NARS 2.5 has most of the major designs used. I mostly plan on adding Unique steam locomotives like the Southern Pacific GS-4, Union Pacific FEF, and the Union Pacific Big Boy
Image Proud Canadian Image
Nekomasters Projects! (Downloads available on BaNaNaS!) \(>^w^<)/
# NARS ADD-ON SET 2CC | 2cc Rapid Transit For Me! (2ccRTFM) | 2cc Wagons In NML (2ccWIN)
# NML Category System (Organize your GRFS!) <- TT-Forums Exclusive Download!
Post Reply

Return to “Graphics Development”

Who is online

Users browsing this forum: Ahrefs [Bot], belgi, Google Adsense [Bot] and 15 guests