Project

General

Profile

Feature #1608

Part Transformation according to attributes/state, specifically (emissive) textures

Added by lipatden over 10 years ago. Updated over 10 years ago.

Status:
New
Severity:
Low
Assignee:
-
Category:
Parts
Target version:
-
% Done:

0%

Platform:
Any
Expansion:
Mod Related:
No
Votes:
Arrow u r green
Arrow d r red

Description

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 for no Kerbals on board and state = 1 for Kerbals on 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.

History

#1 Updated by lipatden over 10 years ago

Correction:
  • state = 0 for no Kerbals on board and state = 1 for Kerbals on board

Where do I log a feature request for the bug tracker to allow "oh no" editing?

#2 Updated by Ted over 10 years ago

  • Description updated (diff)

Unfortunately, redmine does not allow for users to edit their own description fields.
I have made the edit for you.

Also available in: Atom PDF