Transport Tycoon Forums

The place to talk about Transport Tycoon
It is currently Tue Dec 11, 2018 3:48 am

All times are UTC




Post new topic  Reply to topic  [ 1244 posts ]  Go to page Previous 159 60 61 62 63 Next
Author Message
PostPosted: Thu Sep 07, 2017 5:50 pm 
Offline
Engineer
Engineer
User avatar

Joined: Sun Oct 31, 2004 12:43 pm
Posts: 36
Location: Slovakia - Bratislava
Actually the #2 is not really what I wanted to achieve.

At the end of WWII many German buses were taken by the armies and these were later distributed by the ministry of transportation. So basically what happened was that the companies got various buses as a compensation for buses that were in desolate condition (during WWII there was not enough tires and spare parts as all were sent to the armies), and as a compensation for buses taken by the German forces at the end of war for evacuation of German families, officers, etc.

So basically the company sent an order to the ministry and they got buses from a certain pool, not really able to decide what capacity, age or producer/type they will be.

I know, that several railway carriages sets have several variations of the same carriage (like several different liveries) and as you buy it will randomly pick the livery. My question was rather if this can be used on road vehicles and if yes, if it can be used to not only pick the livery, but attributes like running costs, # of passengers, top speed, loading speed, etc.

_________________
Woof !


Top
   
PostPosted: Thu Sep 07, 2017 5:53 pm 
Offline
Engineer
Engineer
User avatar

Joined: Sun Oct 31, 2004 12:43 pm
Posts: 36
Location: Slovakia - Bratislava
andythenorth wrote:
No, the vehicle can be built, but can't be given any station orders (vehicles fitted for pax can't route to truck stations and vice versa).


So, a bus station can't load mail? As if you build a bus station next to a train station, you will have mail and passengers there. So the mail is on the station and the bus will stop at the bus station, which contains mail.

_________________
Woof !


Top
   
PostPosted: Thu Sep 07, 2017 6:31 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Thu Mar 19, 2009 7:25 pm
Posts: 2621
Location: Kent
Greyfur wrote:
andythenorth wrote:
No, the vehicle can be built, but can't be given any station orders (vehicles fitted for pax can't route to truck stations and vice versa).


So, a bus station can't load mail? As if you build a bus station next to a train station, you will have mail and passengers there. So the mail is on the station and the bus will stop at the bus station, which contains mail.


Yep thats Openttd 101. Buses dont stop at Truck stops and vice versa, regardless of what cargo is waiting

_________________
Image


Top
   
PostPosted: Fri Sep 08, 2017 12:49 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Sat Jan 18, 2014 6:10 pm
Posts: 1083
andythenorth wrote:
Greyfur wrote:
1) Have a bus transport both passengers and mail at once?

No, the vehicle can be built, but can't be given any station orders (vehicles fitted for pax can't route to truck stations and vice versa).
[I tried it once] :)

Of course they can, just build all scheduled stations as universal freight/passenger stops (bus stop adjacent to truck stop). I tried it many times :)

_________________
My experimental openTTD server: 149.156.194.203:3979 non-standard client, now testing: JGRPP http://tiny.pl/ggnch
Projects: Reproducible Map Generation patch, NewGRFs: Manpower industries, PolTrams, Polroad, 600mm narrow gauge, preindustrial houses, wired, ECS industry extension.
Addicted to freeciv longturn.


Top
   
PostPosted: Fri Sep 15, 2017 9:49 am 
Offline
Engineer
Engineer
User avatar

Joined: Thu Sep 14, 2017 11:59 am
Posts: 10
hello guys,

I recently made an attempt to create my first grf file using the nml language. I am not a good programmer, but with the help of some examples from both the wiki and the forums I succeeded in creating a grf which adds a few fictional planes and other air vehicles for gameplay.

One of these planes is the Arwing from Starfox which has an maximum speed of 5130 km/h. At first I wasn't able to apply this speed to the vehicle, because the maximum speed is 3280 km/h when the property speed is set to 255. After reading several posts of the forums I figured out that this limitation can be lifted with the use of a callback. After applying this to the vehicle I however experienced a problem: due to the enormous speed, the aircraft keeps circling around an airport when trying to land even if the runway is empty.

So my question is: Is there a simple way to make the aircraft slow down when it has reached the airport of destination so that it can land?


Attachments:
ezgif-4-d85d3e9185.gif
ezgif-4-d85d3e9185.gif [ 3.91 MiB | Viewed 2515 times ]
Top
   
PostPosted: Thu Apr 26, 2018 12:46 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Fri Oct 17, 2008 12:17 pm
Posts: 2408
Location: Virgo Supercluster
I have a question about snow-awareness and animation - I'm always doing it the same way for my tiles:
Code:
spritelayout spritelayout_emptytile_12 {
    ground {
        sprite: 4023;
    }
   building {
        sprite: LOAD_TEMP(1);
      hide_sprite: (terrain_type != TILETYPE_SNOW);
    }
}

So there's the groundtile and if it's above the snowline this switch I copied from somewhere says what other groundtile to draw:
Code:
switch (FEAT_OBJECTS, SELF, switch_emptytile_1_object, [
        //tile slope offset in storage register 0
        STORE_TEMP(slope_to_sprite_offset(tile_slope), 0),
        //terrain type in storage register 1
        STORE_TEMP(GROUNDSPRITE_NORMAL, 1),
      STORE_TEMP( (nearby_tile_terrain_type(0,0) == TILETYPE_DESERT) * GROUNDSPRITE_DESERT, 1),
      STORE_TEMP( LOAD_TEMP(1) + (LOAD_TEMP(1) == 0) * 4512 * (nearby_tile_terrain_type( 1, 0) == TILETYPE_DESERT), 1),
      STORE_TEMP( LOAD_TEMP(1) + (LOAD_TEMP(1) == 0) * 4512 * (nearby_tile_terrain_type(-1, 0) == TILETYPE_DESERT), 1),
      STORE_TEMP( LOAD_TEMP(1) + (LOAD_TEMP(1) == 0) * 4512 * (nearby_tile_terrain_type( 0, 1) == TILETYPE_DESERT), 1),
      STORE_TEMP( LOAD_TEMP(1) + (LOAD_TEMP(1) == 0) * 4512 * (nearby_tile_terrain_type( 0,-1) == TILETYPE_DESERT), 1),
      STORE_TEMP( LOAD_TEMP(1) + (LOAD_TEMP(1) == 0) * GROUNDSPRITE_NORMAL, 1),
      STORE_TEMP(terrain_type == TILETYPE_SNOW   ? GROUNDSPRITE_SNOW : LOAD_TEMP(1), 1),
      STORE_TEMP(snowline_height == 0xFF ? 0xFF : nearby_tile_height(0,0) - snowline_height, 255),
      STORE_TEMP((LOAD_TEMP(255) == -1) ? GROUNDSPRITE_SNOW_1_4 : LOAD_TEMP(1), 1),
      STORE_TEMP((LOAD_TEMP(255) ==  0) ? GROUNDSPRITE_SNOW_2_4 : LOAD_TEMP(1), 1),
      STORE_TEMP((LOAD_TEMP(255) ==  1) ? GROUNDSPRITE_SNOW_3_4 : LOAD_TEMP(1), 1)
        ]) {
    switch_emptytile_1_view;
}

(slope isn't actually needed here but whatever). Anyway, this works reliably, as far as I've found.

But when I do the same thing for an animated ground tile:
Code:
spritelayout spritelayout_field_41 {
   ground {
      sprite: 4202 + (animation_frame * 19);
   }
   building {
      sprite: LOAD_TEMP(1);
      hide_sprite: (terrain_type != TILETYPE_SNOW);
   }

It doesn't work and instead always draws the non-snow groundtile.

However, if I just use the "simple" method:
Code:
spritelayout spritelayout_field_41 {
   ground {
      sprite: 4202 + (animation_frame * 19);
   }
   building {
      sprite: GROUNDSPRITE_SNOW;
      hide_sprite: (terrain_type != TILETYPE_SNOW);
   }

and draw the snow-tile like this (disregarding the transitions) ... it does actually work again.

I've tried a bunch of variations and the results are always the same. Can't "hide" the ground sprite 'cause that causes glitches. Reversing the order of groundsprite and animated sprite doesn't help either. I might have overlooked a possible combination of groundsprites, childsprites, buildings, in various orders, but I've fiddled around quite a bit ^^;

So, basically: why does the load_temp-switch method work for non-animated ground tiles but not for animated ones? And why does it still work if the tile in question is directly given? ^^;
Or, heck, I don't care so much about the "why", and I suppose just losing the snowy transitions isn't such a big deal - but if anyone has a solution I'd still be interested (or maybe there's generally a flaw in the method that could be fixed/improved ;) ).


Top
   
PostPosted: Mon Apr 30, 2018 2:52 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Fri Oct 17, 2008 12:17 pm
Posts: 2408
Location: Virgo Supercluster
Alright, an easier(?) question.

I thought about doing a date-aware item, and looked at VAST on how to do that with animations, but it's too incomprehensible. Basically he's made some switch that controls animations and then magic happens and it works.
So I decided to just go with what I know and simply hide sprites:
Code:
building { //FRUIT
      sprite: spriteset_fruit(0);
      xoffset: 8;
      yoffset: -8;
      zoffset: 48;
      xextent: 8;
      yextent: 8;
      zextent: 8;
   }
   childsprite {
      sprite: spriteset_fruit(1);
      hide_sprite: current_month != 3;
   }
   childsprite {
      sprite: spriteset_fruit(2);
      hide_sprite: current_month != 4 && current_month != 5 && current_month != 6 && current_month != 7;
   }
   childsprite {
      sprite: spriteset_fruit(3);
      hide_sprite: current_month != 8 && current_month != 9;
   }

And that works, mostly, except that sprites don't update reliably. That never seemed to be an issue if I do the same thing for example for snow-awareness - as soon as the snow is there, the sprite updates. But here date changes and sometimes something happens and sometimes nothing does, unless I zoom in and out, then it refreshes and works properly.

I guess it has something to do with objects not being redrawn randomly all the time, to help performance or whatever, but is there anything I can do about that? Otherwise I guess I'll have to try and figure out how that animation thing actually works ^^;


Top
   
PostPosted: Wed May 02, 2018 7:51 am 
Offline
Tycoon
Tycoon

Joined: Wed Jan 17, 2007 12:14 am
Posts: 7226
basically, you cannot rely on the sprite being redrawn at a specific time, and you cannot trigger that from your NewGRF. The game redraws the tile every 256 ticks ("tileloop"), or whenever it was invisible due to something else (like a window drawn over it, or a vehicle passing by). this works with snow-awareness, because changing snow levels is also done in the tieloop, so it's redrawn then anyway, but you cannot use "current_month" in your calculation, because that changes at different times.

what you instead could do is put your date calculation into the animation callback, and use the animation frame for drawing

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


Top
   
PostPosted: Tue Sep 18, 2018 9:31 pm 
Offline
Engineer
Engineer

Joined: Fri Aug 09, 2013 6:31 am
Posts: 17
Following the tutorial, I'm trying to make an articulated road vehicle. The vehicle and trailer appear ingame, but for some reason, the trailer sprites don't show up correctly in some views. Let me show you.
Image
That's the expected behaviour, trailer sprite appears above the truck

Image
In this case, the trailer should overlap part of the truck, but it doesn't.

Please check the code. Am I missing something?

[+] Spoiler
Code:
//DEFAULT
spriteset (SpS_TRUCK, "gfx/TRUCKS.png") { TMP_32px_A (0,820) }
spriteset (SpS_TRAILER_000, "gfx/TRUCKS.png") { TMP_32px_A (0,860) }
spriteset (SpS_TRAILER_100, "gfx/TRUCKS.png") { TMP_32px_B (0,860) }

spritegroup SpG_TRAILER {
   loading: [SpS_TRAILER_000, SpS_TRAILER_100];
   loaded:  [SpS_TRAILER_000, SpS_TRAILER_100];
}
//set default gfxs
switch (FEAT_ROADVEHS, SELF, SWI_TRUCK_PartsGFx, position_in_consist ) {
    0: return SpS_TRUCK;
    1: return SpG_TRAILER;
    return SpS_TRUCK;
}

//set number of articulated parts
switch (FEAT_ROADVEHS, SELF, SWI_TRUCK_NumberParts, extra_callback_info1) {
    0: return ITEM_TRUCK;
   1: return ITEM_TRAILER;
    return CB_RESULT_NO_MORE_ARTICULATED_PARTS;
}
//set capacity of each part
switch (FEAT_ROADVEHS, SELF, SWI_TRUCK_PartCap, position_in_consist ) {
    0: return 0;
   1: return 30;
    return 30; //default
}
//to adjust veh length
switch (FEAT_ROADVEHS, SELF, SWI_TRUCK_Length, position_in_consist) {
    0: return 4;
    return 8;
}

item (FEAT_ROADVEHS, ITEM_TRAILER) {
    property {
      sprite_id:                      SPRITE_ID_NEW_ROADVEH;       
       name:                           string(STR_NAME_TRAILER);
        climates_available:             NO_CLIMATE;
        refittable_cargo_classes:       bitmask(CC_PIECE_GOODS);
        non_refittable_cargo_classes:   bitmask();
      cargo_allow_refit:             [];
      cargo_disallow_refit:         [];
      default_cargo_type:            GOOD;
        loading_speed:                  5;
        cost_factor:                    0;
        running_cost_base:              RUNNING_COST_NONE;
      running_cost_factor:            0;
      refit_cost:                     25;
      cargo_age_period:            185;
      power:                          0 hp;
        weight:                         0 ton;
      tractive_effort_coefficient:   0;
      air_drag_coefficient:         0;
      cargo_capacity:                 30;
        sound_effect:                   SOUND_TRUCK_START;
        misc_flags:                     bitmask(ROADVEH_FLAG_2CC, ROADVEH_FLAG_AUTOREFIT);
}
   graphics {
   default: SpG_TRAILER;
   }
}
item (FEAT_ROADVEHS, ITEM_TRUCK) {
    property {
      sprite_id:                      SPRITE_ID_NEW_ROADVEH;       
       name:                           string(STR_NAME_TRUCK);
        climates_available:             ALL_CLIMATES;
        introduction_date:              date(2001,01,01);
        model_life:                     30;
        vehicle_life:                   20;
        reliability_decay:              20;
        refittable_cargo_classes:       bitmask(CC_PIECE_GOODS);
        non_refittable_cargo_classes:   bitmask();
      cargo_allow_refit:             [];
      cargo_disallow_refit:         [];
      default_cargo_type:            GOOD;
        loading_speed:                  5;
        cost_factor:                    20;
        running_cost_base:              RUNNING_COST_ROADVEH;
      running_cost_factor:            125;
      refit_cost:                     25; // Refitting is free (25% purchase cost)
      cargo_age_period:            185;
        speed:                          98 km/h;
      power:                          480 hp;
        weight:                         15 ton;
      cargo_capacity:                 30;
        sound_effect:                   SOUND_TRUCK_START;
        misc_flags:                     bitmask(ROADVEH_FLAG_2CC, ROADVEH_FLAG_AUTOREFIT);
}
   graphics {
   default: SWI_TRUCK_PartsGFx;
   articulated_part: SWI_TRUCK_NumberParts;
   length: SWI_TRUCK_Length;
   cargo_capacity: SWI_TRUCK_PartCap;
   purchase: SpS_TRUCK_Purchase;
   additional_text: string(STR_INFO_TRUCK);
   }
}


Top
   
PostPosted: Tue Sep 18, 2018 10:53 pm 
Offline
Tycoon
Tycoon

Joined: Wed Jan 17, 2007 12:14 am
Posts: 7226
you need to be careful with overlaps, as the game has a rather primitive algorithm of using bounding boxes to decide which sprite must be drawn on top

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


Top
   
PostPosted: Wed Sep 19, 2018 6:13 pm 
Offline
Chief Executive
Chief Executive
User avatar

Joined: Mon Apr 17, 2017 4:52 pm
Posts: 644
Location: Western Ile-de-France Region
In this case, the truck's bounding box is in front of the trailer's, so the truck is drawn on top.


Top
   
PostPosted: Sat Oct 06, 2018 7:52 pm 
Offline
Engineer
Engineer
User avatar

Joined: Wed Jul 18, 2018 5:26 pm
Posts: 39
Location: Germany
Hey,
This might be a slightly out of place (in the meaning of wrong thread or forum) question, but will there be any future Updates on Stations (or even any of the other missing Features (0x04, 5, 6, 7, C, E))?

I am currently looking through the code and seeing if I could help out a bit. From the wiki and in the code, I see that only the Action0 Properties are missing for Stations, same Information I get when trying to compile a NML File with an item (FEAT_STATIONS). (And I have never done anything in NFO either, though it doesnt seem to be that hard)

action0properties.py:
Code:
#
# Feature 0x04 (Stations)
#

properties[0x04] = {
   'station_type'                     : [{'size': 4, 'num': 0x08, 'value_function': default_station}, {'size': 4, 'num': 0x08, 'value_function': waypoint}],
   'sprite_layout'                     : {'size': 5, 'num': 0x09},
   'copy_sprite_layout'               : {'size': 1, 'num': 0x0A},
   'callback_flags'                  : {'size': 1, 'num': 0x0B},
   'number_of_disabled_platforms'         : {'size': 1, 'num': 0x0C},
   'number_of_disabled_platforms_length'   : {'size': 1, 'num': 0x0D},
   'custom_layout'                     : {'size': 5, 'num': 0x0E},
   'copy_layout_by_station_id'            : {'size': 1, 'num': 0x0F},
   'lots_threshold'                  : {'size': 2, 'num': 0x10},
   'pylon_placement'                  : {'size': 1, 'num': 0x11},
   'cargo_type_sprites'               : {'size': 4, 'num': 0x12},
   'general_flags'                     : {'size': 1, 'num': 0x13},
   'overhead_wire_placement'            : {'size': 1, 'num': 0x14},
   'allow_train_to_enter'               : {'size': 1, 'num': 0x15},
   'animation_info'                  : {'size': 2, 'num': 0x16},
   'animation_speed'                  : {'size': 1, 'num': 0x17},
   'animation_triggers'               : {'size': 2, 'num': 0x18},
   # 19 Road Routing not yet implemented
   'register_modifiers'               : {'size': 5, 'num': 0x1A},
}


global_constants.py:
Code:
# Stations Callback Flags
   'AVAILABLE_CONSTRUCTION':         0,
   '':                           1,
   '':                           2,
   '':                           3,
   '':                           4,

   # Stations General Flags
   'DIFFERENT_GROUND_SPRITES':         0,
   'SIMULATE_CARGO_OVER_TILES':      1,
   '':                           2,
   'CUSTOM_FOUNDATION_ON_SLOPE':      3,
   'USE_EXTENDED_FOUNDATION_ON_SLOPE':   4,

   #Stations Animation triggers
   'STATION_PART_IS_BUILT':         0,
   'NEW_CARGO_AT_STATION':            1,
   'CARGO_REMOVED_FROM_STATION':      2,
   'TRAIN_ENTERS_STATION':            3,
   'TRAIN_LEAVES_STATION':            4,
   'TRAIN_LOADS_CARGO':            5,
   'REGULAR_RELOAD':               6,

   #Stations Custom layout
   'PLAIN_PLATFORM':               0x00;
   'PLATFORM_WITH_BUILDING':         0x02;
   'PLATFORM_WITH_ROOF_LEFT':         0x04;
   'PLATFORM_WITH_ROOF_RIGHT':         0x06;


Some of this might be wrong, or not work, so any Info and Help on how to continue would be nice :D
Also it would be great if any of the Devs that already know how nml works, continue adding the missing features and I would be happy to help!
Also, I haven't quite figured out how to compile yet, if anyone could show how to that would be great!
Thanks


Top
   
PostPosted: Mon Oct 15, 2018 7:09 am 
Offline
Engineer
Engineer
User avatar

Joined: Sun Oct 31, 2004 12:43 pm
Posts: 36
Location: Slovakia - Bratislava
Is it possible to do new graphics for stations in NML? The online wiki page says it is not, but it also says it has not been updated for 6 years...

Thank you!

_________________
Woof !


Top
   
PostPosted: Mon Oct 15, 2018 10:49 am 
Offline
Chief Executive
Chief Executive
User avatar

Joined: Mon Apr 17, 2017 4:52 pm
Posts: 644
Location: Western Ile-de-France Region
No, you cannot yet code stations with NML.


Top
   
PostPosted: Mon Oct 15, 2018 11:51 am 
Offline
Tycoon
Tycoon
User avatar

Joined: Sat Feb 14, 2015 12:44 am
Posts: 2676
Location: Newcastle, Australia
If any one want to build stations .. can be done in NFO.

Quast65 has a tutorial in Simuscape at
http://www.simuscape.net/simutalk/viewt ... e6a57974f2

Step by step guide making platforms and station buildings both track and non-tracks.

_________________
Soot Happens
All my projects are GPLv2 License unless stated.
AuzTrains & AuzTrainsNSW: 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: viewtopic.php?f=26&t=75657
AuzBridges: viewtopic.php?f=26&t=75248
AuzStations: viewtopic.php?f=26&t=76390
AuzTracks: viewtopic.php?f=26&t=82691


Top
   
PostPosted: Mon Oct 15, 2018 9:21 pm 
Offline
Chief Executive
Chief Executive
User avatar

Joined: Mon Apr 17, 2017 4:52 pm
Posts: 644
Location: Western Ile-de-France Region
m4nfo is also a language that I have tried for coding stations and it seems to work quite well... If only I could have some help from the developer...


Top
   
PostPosted: Tue Dec 04, 2018 6:40 pm 
Offline
Engineer
Engineer
User avatar

Joined: Wed Jul 18, 2018 5:26 pm
Posts: 39
Location: Germany
Hey, so I am here again, trying to implement Stations into NML. Because it seems like development isn't going anywhere just now.

I have managed for the NML Compiler to ouput a file, a working GRF File, and also accept Station Properties and Callbacks. I only have a few problems with the properties so OpenTTD can actually use the file and the Stations show up ingame.
I will show the outputed NFO Code with the Errors marked by NFORenum. I also got a bit of Information on how NFO works of of the output of m4NFO.

Code:
//!!Warning (209): Offset 4: Found byte 1 of a 4-byte escape while reading byte 1 of a 1-byte field.
//!!Warning (42): Length does not match nument1 and nument2 of 01 and 00. (Expected 7 bytes)
//!!Error (58): Action 2 declaring no lots-of-cargo sets.
//!!Warning (209): Offset 5: Found byte 2 of a 4-byte escape while reading byte 1 of a 2-byte field.
    5 * 18    02 04 FF \b1 \dx80000000
\dx80000000 \b0 \b0 \b0 \b16 \b16 \b16

//!!Fatal Error (47): Offset 7: Invalid property C5.
    6 * 13    00 04 \b2 01 FF \wx0000
C5 \wx0000
08 \wx0000

//!!Error (206): Cannot set (extended-)byte IDs for feature 04.
    7 * 15    04 04 7F 01 00 "Station_1" 00

//!!Error (206): Cannot set (extended-)byte IDs for feature 04.
    8 * 21    04 04 7F 01 00 "Single Platform" 00

//!!Error (200): Offset 3: Prop 08 has not been set for ID 00.
    9 * 7    03 04 01 00 \b0
\wx00FF    // station_tile_layout;


So sprite 5 to 9 all have some kind of Warning or Error. I just can't really get on what produces these errors and why they are happening. And what are these \wx and \dx, those are quite easy to find in the python compiler:
Code:
def print_varx(self, value, size):
        """
        Print a variable sized value.

        @param value: Value to output.
        @type  value: C{int}

        @param size: Size of the output (1..4), 3 means extended byte.
        @type  size: C{int}
        """
        if size == 1:
            self.print_bytex(value)
        elif size == 2:
            self.print_wordx(value)
        elif size == 3:
            self.print_bytex(0xFF)
            self.print_wordx(value)
        elif size == 4:
            self.print_dwordx(value)
        else:
            assert False


The NML Code is very basic I would say:
Code:
item (FEAT_STATIONS, i_station) {
   property {
      name:                string(STR_STATION_TEST);
      station_class:         string(STR_STATION_CLASS);
   }
   graphics {
      default: station_tile_layout;
   }
}


and the new Internal Code of NML looks like this:
Code:
properties[0x04] = {
    'name'                                   : {'size': 2, 'num': 0xC5, 'string': None},
    'station_class'                          : {'size': 2, 'num': 0x08, 'string': None},
    'sprite_layout'                          : {'size': 5, 'num': 0x09},
    'copy_sprite_layout'                     : {'size': 1, 'num': 0x0A},
    'callback_flags'                         : {'size': 1, 'num': 0x0B},
    'number_of_disabled_platforms'           : {'size': 1, 'num': 0x0C},
    'number_of_disabled_platforms_length'    : {'size': 1, 'num': 0x0D},
    'custom_layout'                          : {'size': 5, 'num': 0x0E},
    'copy_layout_by_station_id'              : {'size': 1, 'num': 0x0F},
    'lots_threshold'                         : {'size': 2, 'num': 0x10},
    'pylon_placement'                        : {'size': 1, 'num': 0x11},
    'cargo_type_sprites'                     : {'size': 4, 'num': 0x12},
    'general_flags'                          : {'size': 1, 'num': 0x13},
    'overhead_wire_placement'                : {'size': 1, 'num': 0x14},
    'allow_train_to_enter'                   : {'size': 1, 'num': 0x15},
    'animation_info'                         : {'size': 2, 'num': 0x16},
    'animation_speed'                        : {'size': 1, 'num': 0x17},
    'animation_triggers'                     : {'size': 2, 'num': 0x18},
    # 19 Road Routing not yet implemented
    'register_modifiers'                     : {'size': 5, 'num': 0x1A},
}

(I left out the global constants because those are irrelevant, I think.)
If anyone sees an Issue please report, and I probably have more than one mistake in the properties[0x04] = {} part.

_________________
Image


Top
   
PostPosted: Tue Dec 04, 2018 10:59 pm 
Offline
Tycoon
Tycoon

Joined: Wed Jan 17, 2007 12:14 am
Posts: 7226
so, let's go backwards, as far as i understand stuff:
  • property 08 is a 4 byte-ID (like GRF-ID, Cargo-Label, etc.), not a String
  • where did you get 0xC5 from for "name"? couldn't find that anywhere
  • 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.
  • the action0 complains about C5 being unknown (see previous question)
  • 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

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


Top
   
PostPosted: Wed Dec 05, 2018 6:29 am 
Offline
Chief Executive
Chief Executive
User avatar

Joined: Mon Apr 17, 2017 4:52 pm
Posts: 644
Location: Western Ile-de-France Region
In my limited knowledge on NFO, I know for sure that sprite layout goes into Action 0, but tile layout of multi tile stations gets defined in Action 2.


Top
   
PostPosted: Wed Dec 05, 2018 11:26 am 
Offline
OpenTTD Developer
OpenTTD Developer
User avatar

Joined: Wed Nov 07, 2007 10:44 pm
Posts: 9062
Location: Sol d
PNDA_ wrote:
Hey,
This might be a slightly out of place (in the meaning of wrong thread or forum) question, but will there be any future Updates on Stations (or even any of the other missing Features (0x04, 5, 6, 7, C, E))?


Yes. But as you have figured, it is mostly a lack of developer time. So contributions to add these missing stuff are greatly appreciated.

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

_________________
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 Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


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.