Feature Request #1628

Warn on missing properties

Added by planetmaker almost 10 years ago. Updated over 8 years ago.

Status:NewStart date:2010-10-11
Priority:LowDue date:
Assignee:-% Done:


Target version:-


For vehicles with non-default IDs no default properties are defined. NML could (and should) warn about missing required properties.

warn_on_missing_props.diff Magnifier (2.02 KB) Hirundo, 2012-02-15 21:30


#1 Updated by Hirundo over 8 years ago

This would indeed be quite helpful, even for vehicles with default IDs I'd say.
Precondition for issuing a warning would be, that you set more than 10 (or a different number) properties. Then we can be quite sure that the user is creating a new vehicle and that he should be setting all properties.

Having many of these warning would be annoying, though, if you cannot turn them off. Could we devise a way, so the user could tell NML to not issue a warning? Disabling per-item would be nicest.

#2 Updated by Hirundo over 8 years ago

Attached is a patch that implements the basic functionality. Currently it works for all vehicles, but excluding those with a default ID would be relatively trivial.

A disadvantage is that the user is 'forced' to set all properties, which means a lot of typing.

There are quite some properties with defaults (cargo aging, RV TE, visual effect, wagon power). For some others (e.g. loading speed, reliability decay) there are quite sane defaults available that currently work for default vehicles only. It'd be nice if NML could set default values for these (perhaps all?) properties itself, to save typing. Problem is, though, how to figure out when the user is defining a 'new vehicle'. Any solution has to work with a) multiple property blocks, b) conditional skipping of property blocks and c) engine overrides, which is the reason that I've not come up with a definitive solution yet.

Also available in: Atom PDF