ButGroundTypes

Contents

Motivation

The various NewGRF that were created for NotRoadTypes revealed several downsides with the current NRT specification:

So, in summary, the issues arise in areas shared by road and tram on a tile:

Maybe the essential problem of NotRoadTypes is that it puts a main focus on RoadTypes.

Idea

The focus is NotRoadTypesButGroundTypes.

Split road stuff into four parts:

Groundtypes are meant to complement infrastructure with surrounding eye-candy. While they are introduced for road and tram for now, they also make sense for rail tracks and even canals. (think: fences, hedges, noise barriers, ... general eyecandy) However, the focus is on "infrastructure" being present on the tile and occupying most of the pixels. This makes groundtypes distinct from NewObjects and NewLandscape.

Since most stuff is define by the groundtype, it's unlikely that there will be need for more than a hand full of road- and tramtypes. (just to give an order of magnitude) This has little technical implications but is important for the UI design: Many groundtypes, few road-/tramtypes.

Catenary

Conversion and upgrades to road- and tramtypes, catenary complementing

Road- and tramtypes on a tile can be converted or upgraded.

Catenary-complementing:

For town-owned roads only upgrades are allowed.

Implications:

Conversion of groundtypes

Note: Speed limits are no criterion for/against changing the groundtype of town-owned tiles. This is different to bridges.

TODO pedestrian-access should be a criterion?

Default/built-in ground-, road- and tramtypes

By default OpenTTD provides these types:

ROAD, ELRD, RAIL and ELRL can be redefined/overridden by NewGRF, but can't be disabled.

TODO suitable class label and class name for the default groundtype

Town constructions

Towns grow along pedestrian-accessible tile.

Towns only build ROAD. If catenary is shared and electrified tram is already present, then ROAD is catenary-complemented to ELRD.

Implications:

Map array storage

Neither ground-, road- or tramtype are stored directly in the map array. Instead each tile references a combined-type. The combined-type is dynamically added to a global pool, when needed, and references ground-, road- and tramtype.

That is:

Vehicle interaction

GUI

There is (again) only one road/tram construction button in the main toolbar. The dropdown contains the most recent used combinations of groundtype and road- or tramtype.

/File/en/Archive/Development/Butgroundtypes gui.png

The road/tram construction bar has these additional elements:

Selecting a new groundtype is similar to station/object selection. The groundtype selection window can be kept open or closed during construction and conversions.

TODO Behaviour if groundtype forbids road/tram:

Behaviour of construction tools

Build road/tram on empty land:

Add road/tram bits to existing road/tram tile:

Remove road/tram bits:

Depot construction:

Station construction:

Bridges:

Tunnels:

Convert groundtype:

Toggle road/tram:

Convert road-/tramtype:

Other GUIs

Details

Road/tramtype labels and compatibility

Mostly same as in NRT. Additional:

Sprite layers

The tiles are composed using

Regular tiles

Layer Source Notes
Foundation baseset

Grass baseset (if requested by groundtype)

Underlay groundtype road-/trambits are ORed or provided separately
Road overlay roadtype empty for normal road
Tram overlay tramtype

Oneway signs baseset

Roadworks baseset

Catenary, back catenary

Roadside, back groundtype

Vehicles

Roadside, front groundtype

Catenary, front catenary

Level crossing

...

Road depot

TODO What sprites does the groundtype provide?

Overlay from road-/tramtype.

Drive-in road stop

TODO What sprites does the groundtype provide?

Overlay from road-/tramtype.

Bridges

TODO What sprites does the groundtype provide?

Tunnels

TODO What sprites does the groundtype provide?

NewGRF format

Global stuff

Road-/tramtype translation table: as in NRT

Testing for road-/tramtypes: as in NRT

Note: Nothing about groundtypes here.

Action 5 tram graphics: as in NRT

Vehicle stuff

Properties

Road-/tramtype: as in NRT

Variables

Query current road-/tramtypes: as in NRT

Query compatibility with specific road/tramtype: (in nrt-todolist, also useful for railtypes)

Note: Groundtypes are unknown to vehicles.

Road-/tramtype

Feature as in NRT

Properties

Same as in NRT:

New in BGT:

In NRT, but not in BGT:

Variables

Same as in NRT, additionally:

Graphics

Groundtype

New Feature

Properties

Variables

Same as for road/tramtype, additonally:

Graphics

TODO bridge surface TODO depots TODO drive-in stops TODO drive-though stops

Global catenary

Not supported, but in NRT

GUI sprites cannot be changed. Would they belong to road-/tramtype or groundtype? Who would want to change them anyway?