Transport Tycoon Forums

The place to talk about Transport Tycoon
It is currently Thu Jan 24, 2019 3:19 am

All times are UTC




Post new topic  Reply to topic  [ 96 posts ]  Go to page Previous 1 2 3 4 5
Author Message
PostPosted: Sun Aug 26, 2012 12:55 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Thu Mar 22, 2012 11:10 am
Posts: 3528
Location: West Java
I have figured out how to keep them looks nice, including cutting the excessive blue. (I still left some, though - just to ease me in the xrel/yrel position)

I have tried to code 2 station tile type, but I get a problem in-game....

Attachment:
station problem 3.png
station problem 3.png [ 23.71 KiB | Viewed 2068 times ]


As you can see, its a problem with sprite... but grfcodec didn't show this error...

heres the .nfo code :

Code:
// Automatically generated by GRFCODEC. Do not modify!
// (Info version 7)
// Format: spritenum pcxfile xpos ypos compression ysize xsize xrel yrel   
    0 * 4    15 00 00 00
    1 * 51    08 07 "PJ" 00 00 "Underground Metro Station version 0.0" 00
    "By YNM" 00
    2 * 6    01 04 01 FF 04 00
    3 C:\Users\THINKCENTRE\Pictures\Projects\Metro_Station\metroRET_blue.pcx 1 46 49 39 64 -31 -08
    4 C:\Users\THINKCENTRE\Pictures\Projects\Metro_Station\metroRET_blue.pcx 81 46 49 39 64 -31 -08
    5 C:\Users\THINKCENTRE\Pictures\Projects\Metro_Station\metroRET_blue.pcx 161 46 49 39 64 -31 -08
    6 C:\Users\THINKCENTRE\Pictures\Projects\Metro_Station\metroRET_blue.pcx 241 46 49 39 64 -31 -08
    7 * 62    00 04 02 01 00 08 "UDBL" 09 02

   F4 03 00 00
   00 00 00
   10 05 03
   2D 84 00 00
   00 00 00
   10 10 08
   2E 84 00 00
   80

   F3 03 00 00
   00 00 00
   05 10 03
   2F 84 00 00
   00 00 00
   10 10 08
   30 84 00 00
   80
   
    8 * 7    02 04 00 00 01 00 00
    9 * 7    02 04 01 00 01 00 00
   10 * 10    03 04 01 00 01 FE 01 00 00 00
   11 * 42    04 48 FF 01 00 "┼Underground Metro Tile - South Side" 00
   12 * 32    04 48 FF 01 00 "─Underground Metro Station" 00
   
   13 C:\Users\THINKCENTRE\Pictures\Projects\Metro_Station\metroRET_blue.pcx 1 01 49 39 64 -31 -08
   14 C:\Users\THINKCENTRE\Pictures\Projects\Metro_Station\metroRET_blue.pcx 81 01 49 39 64 -31 -08
   15 C:\Users\THINKCENTRE\Pictures\Projects\Metro_Station\metroRET_blue.pcx 161 01 49 39 64 -31 -08
   16 C:\Users\THINKCENTRE\Pictures\Projects\Metro_Station\metroRET_blue.pcx 241 01 49 39 64 -31 -08
   17 * 62    00 04 02 01 00 08 "UDBL" 09 02

   F4 03 00 00
   00 00 00
   10 05 03
   2D 84 00 00
   00 00 00
   10 10 08
   2E 84 00 00
   80

   F3 03 00 00
   00 00 00
   05 10 03
   2F 84 00 00
   00 00 00
   10 10 08
   30 84 00 00
   80
   
   18 * 7    02 04 00 00 01 00 00
   19 * 7    02 04 01 00 01 00 00
   20 * 10    03 04 01 00 01 FE 01 00 00 00
   21 * 42    04 48 FF 01 00 "┼Underground Metro Tile - North Side" 00


here's the graphic (in .png due to me using MS paint to edit it):

Attachment:
metroRET_blue.png [64.24 KiB]
Downloaded 1 time


and the .grf in case anyone want to test it quickly:


Attachments:
undergroundmetro.grf [5.97 KiB]
Downloaded 48 times

_________________
YNM = yoursNotMine - Don't get it ?
Top
   
PostPosted: Sun Aug 26, 2012 1:50 pm 
Offline
Tycoon
Tycoon

Joined: Thu Dec 20, 2007 12:49 pm
Posts: 3653
Grfcodec never looks for errors, use nforenum for that. It most likely would have spit out either an error or a warning for your code. The problem: the second set of real sprites is missing an action1.


Top
   
PostPosted: Sun Aug 26, 2012 3:14 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Thu Mar 22, 2012 11:10 am
Posts: 3528
Location: West Java
Is action 1 is this line of code ? :

Code:
2 * 6    01 04 01 FF 04 00


I'm no longer on my computer and my batteries run low, so just say which one of them, but I suspect this one.

_________________
YNM = yoursNotMine - Don't get it ?


Top
   
PostPosted: Sun Aug 26, 2012 3:16 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Sun Oct 09, 2011 1:51 pm
Posts: 1641
Location: The Netherlands
Yes it indeed misses the action1.
Furthermore, I know you are in a test fase but could you please change the PJ in your action 08 for your grf-ID. Those are my initials that I also use in my grf's and they might conflict if they get the same ID. I know that I used that in my tutorial, but it was an example and should be changed to your own unique ID.

EDIT:
Quote:
Is action 1 is this line of code ? :

Yes

_________________
Projects: viewtopic.php?f=26&t=57266
Screenshots: viewtopic.php?f=47&t=56959

Winner of the following screenshot competitions:
sep 2012, jan 2013, apr 2013, aug 2013, mar 2014, mar 2016
All my work is released under GPL-license (either V2 or V3), if not clearly stated otherwise.


Top
   
PostPosted: Sun Aug 26, 2012 3:22 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Thu Mar 22, 2012 11:10 am
Posts: 3528
Location: West Java
A quick question : could I assign more than 2 characters on that "PJ" part ?

_________________
YNM = yoursNotMine - Don't get it ?


Top
   
PostPosted: Sun Aug 26, 2012 3:31 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Sun Oct 09, 2011 1:51 pm
Posts: 1641
Location: The Netherlands
Uhm, yes

You have 4 bits available for the ID, now you use "PJ" 00 00 (PJ is two and the 00's make up the other two). This is a very common use for an ID. So you use two letters of your initials to make the ID rather unique to others and you use the two 00's to give them numbers. So 00 00 is your first set 01 00, your second, etc etc. All in hexadecimal off course.
I hope this clears it up a bit ;-)

_________________
Projects: viewtopic.php?f=26&t=57266
Screenshots: viewtopic.php?f=47&t=56959

Winner of the following screenshot competitions:
sep 2012, jan 2013, apr 2013, aug 2013, mar 2014, mar 2016
All my work is released under GPL-license (either V2 or V3), if not clearly stated otherwise.


Top
   
PostPosted: Sun Aug 26, 2012 11:35 pm 
Offline
Tycoon
Tycoon

Joined: Wed Jan 17, 2007 12:14 am
Posts: 7263
small correction, it's "4 bytes".

you can have 4 letters, or 4 numbers, or any combination thereof. the very common example given here is 2 letters and 2 numbers, but you don't have to stick to that. the point is that you need to choose something that nobody else in the whole world will choose.

_________________
You might not exactly be interested in Ferion, but if you are, have fun :)


Top
   
PostPosted: Tue Aug 28, 2012 6:48 am 
Offline
Tycoon
Tycoon
User avatar

Joined: Thu Mar 22, 2012 11:10 am
Posts: 3528
Location: West Java
Well, I have sorted out all and using it in my game ! :D Thanks to all !

But I get a problem when I use the station :

Attachment:
Station Problem 4.png
Station Problem 4.png [ 29.33 KiB | Viewed 1965 times ]


The train below is showing up over the station "roof", despite I have using the underground metro track. (well, the station itself is using normal metro tracks due to using on the underground metro track would result in my station "roof" disappear - well if you have any suggestion to overcome this, too)

Any way out of this ?

Also, i have a question : is it possible for a station tile to automatically detect a road nearby ?

_________________
YNM = yoursNotMine - Don't get it ?


Top
   
PostPosted: Tue Aug 28, 2012 7:03 am 
Offline
OpenTTD Developer
OpenTTD Developer
User avatar

Joined: Wed Nov 07, 2007 10:44 pm
Posts: 9106
Location: Sol d
Yoursnotmine wrote:
Also, i have a question : is it possible for a station tile to automatically detect a road nearby ?


Somewhat: you can detect the tile type, e.g. that there is a road - but not which layout or configuration

http://newgrf-specs.tt-wiki.net/wiki/Va ... s_.2867.29
http://newgrf-specs.tt-wiki.net/wiki/Va ... s_.2860.29

_________________
Image
OpenTTD: manual | online content | translations | Wanted contributions and patches
#openttdcoop: blog | wiki | public server | DevZone | NewGRF web translator
DevZone - home of the free NewGRFs: OpenSFX | OpenMSX | OpenGFX | Swedish Rails | OpenGFX+ Trains|RV|Industries|Airports|Landscape | NML


Top
   
PostPosted: Tue Aug 28, 2012 7:05 am 
Offline
Tycoon
Tycoon
User avatar

Joined: Mon May 21, 2007 11:47 am
Posts: 6559
Location: The Netherlands
I'm hazarding a guess, but it may be that your graphics are defined for the back part of the station rather than the front part.
The drawing order is ground tile - back station part - vehicle - front station part. Thus the front station part is drawn overtop everything, and that's what you need for this type of station.

_________________
FooBar's Tram Tracks | TransRapid Track Set | Metro Track Set | OpenGFX base graphics set | FIRS Industry Replacement Set
Dutch Tram Set | Dutch Trainset 2 | Dutch Road Furniture


Top
   
PostPosted: Tue Aug 28, 2012 7:27 am 
Offline
Tycoon
Tycoon
User avatar

Joined: Thu Mar 22, 2012 11:10 am
Posts: 3528
Location: West Java
planetmaker wrote:
Yoursnotmine wrote:
Also, i have a question : is it possible for a station tile to automatically detect a road nearby ?


Somewhat: you can detect the tile type, e.g. that there is a road - but not which layout or configuration

http://newgrf-specs.tt-wiki.net/wiki/Va ... s_.2867.29
http://newgrf-specs.tt-wiki.net/wiki/Va ... s_.2860.29

Meh, I don't need configuration, just are there any roads or not :D (Hmm, probably also empty tiles if no road detected ?)

Also, I would need to know how does it affect the way the station drawed. Any lights on this ? (as theres no example and i don't know any GRF which also use this)

FooBar wrote:
I'm hazarding a guess, but it may be that your graphics are defined for the back part of the station rather than the front part.
The drawing order is ground tile - back station part - vehicle - front station part. Thus the front station part is drawn overtop everything, and that's what you need for this type of station.

No, Foobar - if you mean the vehicle, maybe thats what we need, but for catenary, due to my "roof" is drawn in the same height to your camouflage catenary, it'll always draw a catenary on top of my roof, only the RET signs will appear over. You could test it yourself.



(and the grf file if anybody wonder :
Attachment:
undergroundmetro.grf [5.98 KiB]
Downloaded 85 times
)

_________________
YNM = yoursNotMine - Don't get it ?


Top
   
PostPosted: Tue Aug 28, 2012 7:54 am 
Offline
Tycoon
Tycoon
User avatar

Joined: Mon May 21, 2007 11:47 am
Posts: 6559
Location: The Netherlands
It may be best to set the station tile to not draw catenary, and then draw your own roof instead.

_________________
FooBar's Tram Tracks | TransRapid Track Set | Metro Track Set | OpenGFX base graphics set | FIRS Industry Replacement Set
Dutch Tram Set | Dutch Trainset 2 | Dutch Road Furniture


Top
   
PostPosted: Tue Aug 28, 2012 4:38 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Thu Mar 22, 2012 11:10 am
Posts: 3528
Location: West Java
Hmm, now I have to ask something...

How do we apply the additional action and var action ? I know now that adding sprite, even define new things is an action, but for additional (like the var action 2), how does it needs to be added ? Just directly after the defining the station (all with what offsets, boundingbox, etc.), after adding sprite, or how ?

(or just say that for a GRF which use this, we have to put action n after this, etc. I'm haven't get in touch on building tgings with these, as NML seems to don't have any)

_________________
YNM = yoursNotMine - Don't get it ?


Top
   
PostPosted: Tue Aug 28, 2012 5:11 pm 
Offline
Tycoon
Tycoon

Joined: Wed Jan 17, 2007 12:14 am
Posts: 7263
the varaction2 must come before the action 3 that references it, or before any other varaction2 that references it (to form a chain). and it must come after all (var)action2 that it references itself.


the game starts at the action 3, goes backwards through all varaction2, until it arrives at an action1/realsprite, which it then draws. [alternatively, the varaction2 chain may end with a callback result, but only if the game was trying to resolve a callback]

_________________
You might not exactly be interested in Ferion, but if you are, have fun :)


Top
   
PostPosted: Wed Aug 29, 2012 9:41 am 
Offline
Tycoon
Tycoon
User avatar

Joined: Thu Mar 22, 2012 11:10 am
Posts: 3528
Location: West Java
Eh, if I already finished around the detecting road nearby, how (exactly : what action) can make the station draw its RET sign (and stairs) paralleling to the roads ? If in the var action 2 rail continuation info, the road is either on tile no. 2 and 3. The sprite is also available, it will fuse the north (and south) side tile station into one this way.


Quite much, now I'm understand what to write on the code at least (i still have no idea either how make it works)

_________________
YNM = yoursNotMine - Don't get it ?


Top
   
PostPosted: Fri Aug 16, 2013 11:43 am 
Offline
Tycoon
Tycoon
User avatar

Joined: Thu Mar 22, 2012 11:10 am
Posts: 3528
Location: West Java
Well, maybe it's the right time to resurrect the topic...

I just wanted to ask a few questions :

- How to create spritesets for buildings and multi-tile buildings ?
- How to do a graphic refit ? Do I need to add things to the item - graphics ?

_________________
YNM = yoursNotMine - Don't get it ?


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 47 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-2019 phpBB Limited

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