Transport Tycoon Forums

The place to talk about Transport Tycoon
It is currently Wed Jun 20, 2018 9:05 pm

All times are UTC




Post new topic  Reply to topic  [ 9 posts ] 
Author Message
PostPosted: Mon Feb 19, 2018 3:05 pm 
Offline
Engineer
Engineer
User avatar

Joined: Thu Feb 01, 2018 12:36 pm
Posts: 12
Location: Czech Republic, Ostrava
Hi,

im coding now stations. I need help with it. My problem is callbacks generally.

I MUST USE NFO!!! Not NML or m4nfo!

Now i have 1x4 custom station with start sprite (0), 2 continous sprites (1,2) and end sprite (3):
Image

For custom layout i have this code:
Code:

// custom station layout
-1*0    02 04 01
            89                // get lowest doubleword
            41                // platform info and relative position for individually built sections
            00                // shift??                                                 <- WHAT IS IT??
            0F                // mask??                                                  <- WHAT IS IT??
            00
            00    00 04 00    FF                              // what this bytes means? I know only third byte is length of station (maybe third and fourth byte?)
            00    00 00 00    00    00 00 00    02 FF    // 2 // this load second pair of sprites defined in Action 00
            01    00 00 00    01    00 00 00    02 FF    // 1 // this load second pair of sprites defined in Action 00
            02    00 00 00    02    00 00 00    04 FF    // 0 // this load fourth pair of sprites defined in Action 00
            03    00 00 00    03    00 00 00    0A FF    // 3 ??                                          <- NOT WORKING AND LOAD FIRST PAIR DEFINED IN ACTION 00
   
// callback switch?         
-1*0   02 04 02
            81                // get Byte
            0C                // 0C - callback
            00                // shift
            FF                // mask
            01                // one (range bellow)
            01 00 14 14       // set action=01 if callback=14
            00 00             // otherwise use this set

// info about aupper actions
-1*0    03 04                 // Action 3, assigns graphics sets to feature IDs
           01                 // Number of IDs this action 3 associates graphics with, just the one
           03                 // Station-ID
           01                 // ??? what is this? Count of modification bellow?
           FE 03 00           // FE all cargos = action 03, what is 00?
           00 00              // others default graphic set
      

1) What is some parts (more in comments upper in code)?

2) How can i add next track in same layout?

3) Exist way how define start sprite, continous sprites and end sprite for variable station?

4) How to cargo change sprites?

5) How to animation?

Im study many hours on Wiki (its not good station documentation) and this and other forums. But no answers for my questions.

_________________
Image


Last edited by vasatko on Mon Feb 19, 2018 3:49 pm, edited 6 times in total.

Top
   
PostPosted: Mon Feb 19, 2018 3:21 pm 
Online
Tycoon
Tycoon
User avatar

Joined: Sat Nov 27, 2004 3:05 pm
Posts: 5212
Location: Canada
I just posted some links in your other topic in the Suggestions forum. 8)

_________________
wallyweb on tt-forums: Screenshots - Projects - Releases
wallyweb on Simuscape: Projects - Releases
Other Stuff: TTDPatch 2.6 "Nightly" download - cirdan's OpenTTD branch (New Map Features)
Screenshot Of The Month Contest Winner: August 2015 - Tied May 2016 - January 2018


Top
   
PostPosted: Mon Feb 19, 2018 3:41 pm 
Offline
Engineer
Engineer
User avatar

Joined: Thu Feb 01, 2018 12:36 pm
Posts: 12
Location: Czech Republic, Ostrava
wallyweb wrote:
Look in here. :D and also in here. :D

Sorry but i wrote, that i need in NFO and not NML (or m4nfo)! And first link i readed many times, but there is not explain what is it. If you read it, than you see only replacing, no coding.

_________________
Image


Top
   
PostPosted: Mon Feb 19, 2018 3:43 pm 
Online
Tycoon
Tycoon
User avatar

Joined: Sat Nov 27, 2004 3:05 pm
Posts: 5212
Location: Canada
Good for closing the other duplicate topic. :D

vasatko wrote:
wallyweb wrote:
Look in here. :D and also in here. :D


Sorry but i wrote that i need in NFO and not NML! And first link i readed many times, but there is not explain what is it. If you read it, than you see only replacing no coding.
Aye. The first link is not NML. It is NFO, but I think that topic is still being developed. Send a PM to Quast65. 8)

The second link is not NML either. It is m4nfo by Michael Blunck and it does have tutorials. 8)

_________________
wallyweb on tt-forums: Screenshots - Projects - Releases
wallyweb on Simuscape: Projects - Releases
Other Stuff: TTDPatch 2.6 "Nightly" download - cirdan's OpenTTD branch (New Map Features)
Screenshot Of The Month Contest Winner: August 2015 - Tied May 2016 - January 2018


Top
   
PostPosted: Mon Feb 19, 2018 3:56 pm 
Offline
Engineer
Engineer
User avatar

Joined: Thu Feb 01, 2018 12:36 pm
Posts: 12
Location: Czech Republic, Ostrava
wallyweb wrote:
Send a PM to Quast65. 8)


I do it :-)
Quast65 wrote:
Action-2s are (at least for me ;-) ) very hard to understand how they exactly work...
When making the tutorial I looked at various code examples from other GRFs and figured out how to use them, without exactly understanding why they work ;-)



wallyweb wrote:
The second link is not NML either. It is m4nfo by Michael Blunck and it does have tutorials. 8)

Yes i know it. Thank you. But generated code not explain me some parametrs from my code upper. I realy need understand NFO for stations.

_________________
Image


Top
   
PostPosted: Mon Feb 19, 2018 3:56 pm 
Offline
Tycoon
Tycoon

Joined: Wed Apr 27, 2005 7:09 am
Posts: 5185
wallyweb wrote:
vasatko wrote:
Sorry but i wrote, that i need in NFO and not NML (or m4nfo)!

The second link is not NML either. It is m4nfo by Michael Blunck and it does have tutorials. 8)

Yeah, makes no sense to code stations in plain nfo.

Of course, for a small set with simple stations you could get away with it, but few people succeded even there.

vasatko wrote:
I realy need understand NFO for stations.

Good luck and best wishes from my side.

regards
Michael

_________________
Image


Top
   
PostPosted: Mon Feb 19, 2018 4:07 pm 
Offline
Engineer
Engineer
User avatar

Joined: Thu Feb 01, 2018 12:36 pm
Posts: 12
Location: Czech Republic, Ostrava
michael blunck wrote:
Yeah, makes no sense to code stations in plain nfo.

Of course, for a small set with simple stations you could get away with it, but few people succeded even there.

regards
Michael


OK, thank you Michael for your reply. I tried your m4nfo for bridges (stefino_cz wrote you PM about problems with compilation). But more easy was use NFO. Your m4nfo not support all. For example front of bridge with different sprite for roads and rails.

I think that m4nfo is for little set developers. But if I need big set or some special actions in set, then i must understand NFO.

Im goinig to try m4nfo with stations and understand what is in generated NFO. Its only one way for me, i think.

_________________
Image


Top
   
PostPosted: Mon Feb 19, 2018 4:19 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Sun Oct 09, 2011 1:51 pm
Posts: 1538
Location: The Netherlands
If you dont get replies here answering your questions (give it some time though, not everyone checks out these forums on a regular base ;-) ), try PM-ing some of the developers of other quite large station-sets.
Like the Japanese Stations (that has cargo-aware tiles) or Industrial Stations Renewal (that also has animations).

_________________
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: Mon Feb 19, 2018 4:35 pm 
Offline
Tycoon
Tycoon

Joined: Wed Apr 27, 2005 7:09 am
Posts: 5185
vasatko wrote:
[...] I tried your m4nfo for bridges (stefino_cz wrote you PM about problems with compilation). But more easy was use NFO. Your m4nfo not support all. For example front of bridge with different sprite for roads and rails.

After reading stefinos reply, I´ve been testing bridges, and indeed it was buggy. I´m sorry, but this was the first time that I took a look on bridges since 4 years (nobody coded a new bridge set since years), and the reason for buggyness was a number of changes in m4nfo since 2014.

I´ve already fixed the original bug, but when being on it I decided to rewrite some parts of the bridge code as well. I´ll post a new m4nfo bridge module with a revised tutorial in the next couple of days.

vasatko wrote:
I think that m4nfo is for little set developers. But if I need big set or some special actions in set, then i must understand NFO.

I totally disagree here. Coding a large (station) set in plain nfo is a real challenge[*] (I´ve done it for quite a long time). In addition, m4nfo is best prepared to be used for large sets, you could even handle distributed files, and "link" grf part files, to reduce "compile time".

[*] For example, take a look on ISR´s nfo code, and try to "understand" it. :cool:

m4nfo for stations, objects and (train) vehicles is mature, since these are the areas I´m constantly working on. There might be some inconveniences with other TTD "features" (due to a long time of absence from those), but usually even those will be fixed in a short time, if reported.

vasatko wrote:
Im goinig to try m4nfo with stations and understand what is in generated NFO. Its only one way for me, i think.

Feel free to contact me in case.

regards
Michael

_________________
Image


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 9 posts ] 

All times are UTC


Who is online

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

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