Skip to content

Instantly share code, notes, and snippets.

Standardised Railtype Scheme - Innsbruck 2022 Convention for partial compliance
1. The Standardised Railtype Scheme is a useful tool for providing reliable compatibility between train grfs and railtype grfs.
2. The Axle Load class in the scheme presents a number of issues for compliance.
2.1. Over 10 years since the scheme was standardised, few train grfs implement the axle load scheme as required (using 5 groups). Known examples with mostly complete implementations are Dutch Train Set, French Narrow Gauge Trains, and Finnish Trains.
2.2. Elements of the axle load scheme have proven hard to interpret. For example, is it compliant to use fewer than 5 groups for trains?
2.3. Meanwhile multiple train grfs use class 'A' for the axle load for all trains, except where relying on default railtypes such as RAIL and ELRL.
3. The Innsbruck 2022 Convention uses class 'A' for axle load for all trains in a train grf, except where relying on default railtypes such as RAIL and ELRL.
Migrating a hg repo (ELEPHANT example)
* copy directory to ELEPHANT.old.hg for backup
* cd ELEPHANT
* source ../../bin27/bin/activate
* git init
* git config core.ignoreCase false
* ../../tools/hg-fast-export/hg-fast-export.sh -r . -A ../../tools/authors-fast-export.txt
* noting that authors doesn't appear to actually work correctly :P
* git checkout -f HEAD
"When the sun is out and the wind is still, you're one month on in the middle of May."
OpenTTD 1.11.2 brings more bug fixes, including:
*
See the changelog for more.
* [Download](https://www.openttd.org/downloads/openttd-releases/latest.html)
* [Changelog](https://cdn.openttd.org/openttd-releases/1.11.1/changelog.txt)
switch (FEAT_TRAINS, SELF, switch_spritelayer_cargos_intermodal_cars_default_16px, cargo_type_in_veh) {
AORE: switch_spritelayer_cargos_intermodal_cars_default_16px_bulk_AORE_0;
CASS: switch_spritelayer_cargos_intermodal_cars_default_16px_bulk_CASS_0;
CLAY: switch_spritelayer_cargos_intermodal_cars_default_16px_bulk_CLAY_0;
COAL: switch_spritelayer_cargos_intermodal_cars_default_16px_bulk_COAL_0;
COKE: switch_spritelayer_cargos_intermodal_cars_default_16px_bulk_COKE_0;
CORE: switch_spritelayer_cargos_intermodal_cars_default_16px_bulk_CORE_0;
GRVL: switch_spritelayer_cargos_intermodal_cars_default_16px_bulk_GRVL_0;
IORE: switch_spritelayer_cargos_intermodal_cars_default_16px_bulk_IORE_0;
LIME: switch_spritelayer_cargos_intermodal_cars_default_16px_bulk_LIME_0;
switch (FEAT_TRAINS, PARENT, switch_is_restaurant_car_in_consist_5, [count_veh_id(5520) > 0]) {
1: return 1;
return 0;
}
switch (FEAT_TRAINS, PARENT, switch_is_restaurant_car_in_consist_4, [count_veh_id(5530) > 0]) {
1: return 1;
return switch_is_restaurant_car_in_consist_5;
}
switch (FEAT_TRAINS, PARENT, switch_is_restaurant_car_in_consist_3, [count_veh_id(5540) > 0]) {
1: return 1;
switch (FEAT_TRAINS, SELF, switch_alt_var_41_match_ids_15, [LOAD_TEMP(0) == LOAD_TEMP(16)]) {
1: return 1;
return 0;
}
switch (FEAT_TRAINS, SELF, switch_alt_var_41_match_ids_14, [LOAD_TEMP(0) == LOAD_TEMP(15)]) {
1: return 1;
return switch_alt_var_41_match_ids_15;
}
switch (FEAT_TRAINS, SELF, switch_alt_var_41_match_ids_13, [LOAD_TEMP(0) == LOAD_TEMP(14)]) {
1: return 1;
switch (FEAT_INDUSTRYTILES, SELF, switch_terrain_sprite_normal, [STORE_TEMP(GROUNDSPRITE_NORMAL, 0)]) {
return 1;
}
switch (FEAT_INDUSTRYTILES, SELF, switch_terrain_sprite_arctic_full_snow, [STORE_TEMP(GROUNDSPRITE_SNOW_4_4, 0)]) {
return 1;
}
switch (FEAT_INDUSTRYTILES, SELF, switch_terrain_sprite_arctic_three_quarter_snow, [STORE_TEMP(GROUNDSPRITE_SNOW_3_4, 0)]) {
return 1;
}
switch (FEAT_INDUSTRYTILES, SELF, switch_terrain_sprite_arctic_half_snow, [STORE_TEMP(GROUNDSPRITE_SNOW_2_4, 0)]) {
“The trouble with nml”
52:57 <andythenorth> to my mind, the CPP approach of dumping constants into one global namespace
06:53:02 <andythenorth> is a mess
06:53:15 <andythenorth> but…it makes for very compact templating :P
06:53:42 <andythenorth> no obj.obj.property or obj.method(obj.property) stuff
06:54:06 * andythenorth removing CPP from FIRS slowly
06:56:11 <Alberth> it's not designed to do large scale complicated replacements
06:56:37 <andythenorth> it’s a powerful tool that goes a long way fast :)
06:56:49 <andythenorth> but when it hits the limit, it hits it quite hard
// --------------------- crane rails --------------------- //
-1 * 0 00 04 \b4 \b1 TILE_HARBOUR_CRANE_RAILS_2
08 "CHPT" // Class ID - groups stations in menu
1A 02 // 2 tiles
//Basic layout
43
\dx000003F4 \wx0002 00 // custom ground sprite
\dx80008431 \wx0000
00 00 80 // combine with bounding box of ground sprite