Project

General

Profile

Feature #1608

Updated by Ted over 10 years ago

Presently parts can map textures statically, and this results in some unexpected behaviour from stock parts e.g. battery packs continuing to show a green light even when fully depleted. While plugins may be able to transform a part in almost any way, and base game behaviour allows transforms such as the LightAnimation procedure in response to light events, this feels like a good addition to the base functionality to make this more widely available to other parts. Apologies if I simply don't know enough about the API to find this myself, but my research has come up blank.

This can be a illustrated by use cases, but I'm thinking of a generic capability where state is defined by the part.cfg:
* Binary indicator: state 0 or state 1, in the battery case state 1 = charge >80%, state 0 = charge<=20%, allowing a part config to map (emissive) green for state 1 and red for state 0, or state = 0 1 for no Kerbals on board and state = 1 for Kerbals on board board.
* Discrete conditions: States 0, 1, ..., n, and may correspond to resource levels ranges (<10% critical, 10-30% warning, >30% nominal) allowing maps to colours red, amber, green
* Integer range, where (emissive) texture A maps to state 0 and texture B to state 255, with the applied texture being both with transparency (or other effect, you're the coding genii) to allow for transition.

Back