Transport Tycoon Forums

The place to talk about Transport Tycoon
It is currently Wed Dec 12, 2018 1:22 pm

All times are UTC




Post new topic  Reply to topic  [ 1244 posts ]  Go to page Previous 159 60 61 62 63
Author Message
PostPosted: Wed Dec 05, 2018 2:27 pm 
Offline
Engineer
Engineer
User avatar

Joined: Wed Jul 18, 2018 5:26 pm
Posts: 40
Location: Germany
Eddi wrote:
  • property 08 is a 4 byte-ID (like GRF-ID, Cargo-Label, etc.), not a String

Ah, that makes sence, so it would work like Railtypelabels, just for stationtypelabels, I guess. For example, I think, that something like "STSP" (=Station Single Platforms) would work, right?

Eddi wrote:
  • where did you get 0xC5 from for "name"? couldn't find that anywhere
  • the action0 complains about C5 being unknown (see previous question)

I got 0xC5 from the nfo output of m4nfo. I saw the C5 in front of the Name in the shown code, so I thought that might be it. So what should be used instead of C5, I could not find reference on the wiki for the definition of the name of a station tile?
Code:
10 * 21    04 04 FF 01 01 C5 "Empty Platform" 00


Eddi wrote:
  • the action2 is completely ill-formed. as far as i understand stations, tile layout should be a property (action0), not "graphics" (action2). no clue what you were trying to achieve there

I took a look at the Airports and Airport tiles, and they worked like the code I showed, that it referred to graphics. Though you might be right, because 0x0E for Stations is a custom layout definition, so that might define the layout and the default is just a single tile.

Eddi wrote:
  • the two action4 complain that you're using language ID 7F (indicating byte-IDs) instead of FF (indicating word-IDs). what that means i have no clue.

Maybe that has to do with the size of the ID? As of output_base.py the size seems to switch between "bytex", "wordx" and "dwordx" according to the size of the value. Could also be because I used C5 for the Name, that those correspond.

planetmaker wrote:
Do you happen to have a WIP git repo for your station code?

Well, kinda. Im currently just testing files and sometimes when I get something to work, I push it to this git repo.

_________________
Image


Top
   
PostPosted: Wed Dec 05, 2018 5:04 pm 
Offline
Tycoon
Tycoon

Joined: Wed Jan 17, 2007 12:14 am
Posts: 7226
PNDA_ wrote:
Eddi wrote:
  • where did you get 0xC5 from for "name"? couldn't find that anywhere
  • the action0 complains about C5 being unknown (see previous question)

I got 0xC5 from the nfo output of m4nfo. I saw the C5 in front of the Name in the shown code, so I thought that might be it. So what should be used instead of C5, I could not find reference on the wiki for the definition of the name of a station tile?
Code:
10 * 21    04 04 FF 01 01 C5 "Empty Platform" 00
yeah, but that is in an action 4, not an action 0. let's dissect that:

Code:
10 * 21 // sprite number and length
04 //action 4 (string)
04 //feature 4 (station)
FF //language ID (like i mentioned above, FF for Word-sized IDs instead of 7F)
01 //one string
01 //lower byte of the ID, which station
C5 //upper byte of the ID, indicating "station name"
"Empty Platform" //actual string
00 //terminating 0


nmlc likely will have a flag somewhere to define that action4 should be output with word-sized IDs instead of byte-sized, look at e.g. how houses do it differently to vehicles.

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


Top
   
PostPosted: Sun Dec 09, 2018 7:51 am 
Offline
Traffic Manager
Traffic Manager
User avatar

Joined: Thu Jul 02, 2015 8:05 am
Posts: 146
Location: Czech Republic
Hi all, is possible to code in NML houses what will be dependent on road possition? We need to rotate houses into right possition to do best vizual effect :) We found this function in NFO. Is there any way how to code it in NML? Thanks :)
Attachment:
nfo.png [43.27 KiB]
Not downloaded yet

_________________
Image


Top
   
PostPosted: Mon Dec 10, 2018 2:05 am 
Offline
OpenTTD Developer
OpenTTD Developer
User avatar

Joined: Wed Nov 07, 2007 10:44 pm
Posts: 9062
Location: Sol d
Yes. Check the "nearby" variables, nearby_tile_class in particular and simply check for the presence of road. I believe FIRS uses similar for more than 5 years for the petrol pump.

_________________
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
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 1244 posts ]  Go to page Previous 159 60 61 62 63

All times are UTC


Who is online

Users browsing this forum: No registered users and 3 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.