Transport Tycoon Forums

The place to talk about Transport Tycoon
It is currently Mon Feb 20, 2017 11:06 am

All times are UTC




Post new topic  Reply to topic  [ 77 posts ]  Go to page Previous 1 2 3 4 Next
Author Message
PostPosted: Sun Jul 17, 2016 7:28 pm 
Offline
Chairman
Chairman
User avatar

Joined: Tue Nov 23, 2010 9:25 pm
Posts: 859
Location: ::1
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:
#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.


Top
   
PostPosted: Sun Jul 17, 2016 11:37 pm 
Offline
Chairman
Chairman
User avatar

Joined: Tue Nov 23, 2010 9:25 pm
Posts: 859
Location: ::1
I played some more more with alignment code.


Attachments:
nars_addon_source.tar.gz [64.32 KiB]
Downloaded 10 times
NARS_ADDON.tar [10 KiB]
Downloaded 12 times
Top
   
PostPosted: Mon Jul 18, 2016 1:21 am 
Offline
Tycoon
Tycoon
User avatar

Joined: Sat Aug 16, 2008 10:26 pm
Posts: 3448
Skype: neko-master
Location: Oshawa, Ontario, CANADA
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:
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:
File comment: Testing Source Code
NARS_ADDON_SET.zip [30.29 KiB]
Downloaded 13 times

_________________
Proud Canadian
Nekomasters Projects...
# NARS Add-On Set Development (Add more Trains to North America!)
# NML Category System v1.1 (Organize your GRFS!)
Top
   
PostPosted: Mon Jul 18, 2016 4:14 am 
Offline
Chairman
Chairman
User avatar

Joined: Tue Nov 23, 2010 9:25 pm
Posts: 859
Location: ::1
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).


Top
   
PostPosted: Mon Jul 18, 2016 4:27 am 
Offline
Tycoon
Tycoon
User avatar

Joined: Sat Aug 16, 2008 10:26 pm
Posts: 3448
Skype: neko-master
Location: Oshawa, Ontario, CANADA
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:
$ make -b
[NML] NARS_ADDON.grf
nmlc 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"

_________________
Proud Canadian
Nekomasters Projects...
# NARS Add-On Set Development (Add more Trains to North America!)
# NML Category System v1.1 (Organize your GRFS!)


Top
   
PostPosted: Mon Jul 18, 2016 5:09 am 
Offline
Tycoon
Tycoon
User avatar

Joined: Sat Aug 16, 2008 10:26 pm
Posts: 3448
Skype: neko-master
Location: Oshawa, Ontario, CANADA
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:
File comment: Troubled file, wont compile
NARS_ADDON_18-07-2016.zip [58.04 KiB]
Downloaded 15 times

_________________
Proud Canadian
Nekomasters Projects...
# NARS Add-On Set Development (Add more Trains to North America!)
# NML Category System v1.1 (Organize your GRFS!)
Top
   
PostPosted: Mon Jul 18, 2016 2:28 pm 
Offline
Chairman
Chairman
User avatar

Joined: Tue Nov 23, 2010 9:25 pm
Posts: 859
Location: ::1
Code:
// ---------------------------------------------------------
// DIESEL LOCOMOTIVES (2000)
// ---------------------------------------------------------

sort(FEAT_TRAINS, [ITEM_DIESEL_EMD_E9]);
sort(FEAT_TRAINS, [ITEM_DIESEL_EMD_FP45]);

That should be
Code:
sort(FEAT_TRAINS, [
   // ---------------------------------------------------------
   // DIESEL LOCOMOTIVES (2000)
   // ---------------------------------------------------------
   ITEM_DIESEL_EMD_E9,
   ITEM_DIESEL_EMD_FP45
]);


Top
   
PostPosted: Mon Jul 18, 2016 5:21 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Sat Aug 16, 2008 10:26 pm
Posts: 3448
Skype: neko-master
Location: Oshawa, Ontario, CANADA
Sylf wrote:
Code:
// ---------------------------------------------------------
// DIESEL LOCOMOTIVES (2000)
// ---------------------------------------------------------

sort(FEAT_TRAINS, [ITEM_DIESEL_EMD_E9]);
sort(FEAT_TRAINS, [ITEM_DIESEL_EMD_FP45]);

That should be
Code:
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 581 times ]

_________________
Proud Canadian
Nekomasters Projects...
# NARS Add-On Set Development (Add more Trains to North America!)
# NML Category System v1.1 (Organize your GRFS!)
Top
   
PostPosted: Mon Jul 18, 2016 7:02 pm 
Offline
Chairman
Chairman
User avatar

Joined: Tue Nov 23, 2010 9:25 pm
Posts: 859
Location: ::1
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:
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 ←↑
}


Top
   
PostPosted: Mon Jul 18, 2016 8:10 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Sat Aug 16, 2008 10:26 pm
Posts: 3448
Skype: neko-master
Location: Oshawa, Ontario, CANADA
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:
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.

_________________
Proud Canadian
Nekomasters Projects...
# NARS Add-On Set Development (Add more Trains to North America!)
# NML Category System v1.1 (Organize your GRFS!)


Top
   
PostPosted: Tue Jul 19, 2016 4:14 am 
Offline
Tycoon
Tycoon
User avatar

Joined: Sat Aug 16, 2008 10:26 pm
Posts: 3448
Skype: neko-master
Location: Oshawa, Ontario, CANADA
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 [107.17 KiB]
Not downloaded yet

_________________
Proud Canadian
Nekomasters Projects...
# NARS Add-On Set Development (Add more Trains to North America!)
# NML Category System v1.1 (Organize your GRFS!)
Top
   
PostPosted: Wed Jul 20, 2016 7:03 am 
Offline
Tycoon
Tycoon
User avatar

Joined: Sat Aug 16, 2008 10:26 pm
Posts: 3448
Skype: neko-master
Location: Oshawa, Ontario, CANADA
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
Attachment:
NARS_ADDON_SET_4ENGINES.png [54.48 KiB]
Not downloaded yet

_________________
Proud Canadian
Nekomasters Projects...
# NARS Add-On Set Development (Add more Trains to North America!)
# NML Category System v1.1 (Organize your GRFS!)


Top
   
PostPosted: Thu Jul 21, 2016 10:41 am 
Offline
Tycoon
Tycoon
User avatar

Joined: Sat Aug 16, 2008 10:26 pm
Posts: 3448
Skype: neko-master
Location: Oshawa, Ontario, CANADA
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!

_________________
Proud Canadian
Nekomasters Projects...
# NARS Add-On Set Development (Add more Trains to North America!)
# NML Category System v1.1 (Organize your GRFS!)


Top
   
PostPosted: Sat Jul 23, 2016 7:52 am 
Offline
Tycoon
Tycoon
User avatar

Joined: Mon Oct 17, 2005 8:56 pm
Posts: 3224
Location: Estonia
Instead of spamming every new locomotive can You maybe add a buy menu shot to first post to see new added locomotives?

_________________
TT-Screenshot Of The Month - 2012 July, winner!
TT-Screenshot Of The Month - 2013 May, winner tie with Purno!
TT-Screenshot Of The Month - 2014 February, winner!
TT-Screenshot Of The Month - 2014 June, winner tie with alluke!
TT-Screenshot Of The Month - 2014 April, winner!

My screen shot thread ---> Have a look


Top
   
PostPosted: Sun Jul 31, 2016 5:11 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Sat Aug 16, 2008 10:26 pm
Posts: 3448
Skype: neko-master
Location: Oshawa, Ontario, CANADA
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

_________________
Proud Canadian
Nekomasters Projects...
# NARS Add-On Set Development (Add more Trains to North America!)
# NML Category System v1.1 (Organize your GRFS!)


Top
   
PostPosted: Sun Jul 31, 2016 8:14 pm 
Offline
Transport Coordinator
Transport Coordinator
User avatar

Joined: Mon May 30, 2016 11:55 pm
Posts: 305
Location: London
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 372 times ]
Front.png
Front.png [ 8.73 KiB | Viewed 372 times ]

_________________
If you have a couple minutes to spare feel free to check out my website!
Here it is
Quirky?! Quirky is an old lady who gives people the finger! -Homer Simpson
Top
   
PostPosted: Sun Jul 31, 2016 11:31 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Sat Aug 16, 2008 10:26 pm
Posts: 3448
Skype: neko-master
Location: Oshawa, Ontario, CANADA
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.

_________________
Proud Canadian
Nekomasters Projects...
# NARS Add-On Set Development (Add more Trains to North America!)
# NML Category System v1.1 (Organize your GRFS!)


Top
   
PostPosted: Mon Aug 01, 2016 9:13 am 
Offline
Transport Coordinator
Transport Coordinator
User avatar

Joined: Mon May 30, 2016 11:55 pm
Posts: 305
Location: London
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!

_________________
If you have a couple minutes to spare feel free to check out my website!
Here it is
Quirky?! Quirky is an old lady who gives people the finger! -Homer Simpson


Top
   
PostPosted: Mon Aug 01, 2016 12:06 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Sat Feb 14, 2015 12:44 am
Posts: 1550
Location: Newcastle, Australia
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
All my projects are GPLv2 License.
AuzTrains & NSWTrains: http://www.tt-forums.net/viewtopic.php?f=26&t=74193
AuzInd (Industry Set): http://www.tt-forums.net/viewtopic.php?f=26&t=74471
AuzObjects: http://www.tt-forums.net/viewtopic.php?f=26&t=74510
AuzBridges: viewtopic.php?f=26&t=75248


Top
   
PostPosted: Mon Aug 01, 2016 12:39 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Sat Aug 16, 2008 10:26 pm
Posts: 3448
Skype: neko-master
Location: Oshawa, Ontario, CANADA
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

_________________
Proud Canadian
Nekomasters Projects...
# NARS Add-On Set Development (Add more Trains to North America!)
# NML Category System v1.1 (Organize your GRFS!)


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 77 posts ]  Go to page Previous 1 2 3 4 Next

All times are UTC


Who is online

Users browsing this forum: jmc47ott and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000-2017 phpBB Limited

Copyright © Owen Rudge/The Transport Tycoon Forums 2001-2017.
Hosted by Zernebok Hosting.