By adding a "requires"-attribute to the mapmodel config file, a mapmodel
can trigger the map editor to include another model and have it loaded
during map load. This can be used to create model modifications which
use ressources of another model. For example, a new model can provide a
different skin for an existing model - and that attribute will make sure,
that the required original model is also loaded.
This mechanism does not work, if the attribute is changed after the map
is finished, because the map editor has to copy the dependency into the
map config file. After adding the attribute, the map has to be written at
least once (the dependencies are checked during savemap).
The point of dependency-attributes is to make sure the custom original
model is also loaded from a package server. Mods of official models do not
need to use the attribute, because the official model does not need to be
downloaded. The attribute is necessary, if one model on akimbo depends on
another model on akimbo.
The mapmodels that are required by other models have an additional
parameter "1" added to their mapmodel command in the config file - which
will preload the model during map load, even if no entity actually uses it.
The additional parameter is handled automatically.
The new command updatemapmodeldependencies triggers the dependency check
manually - which will make required models appear in the model list. This
is done automatically during savemap.
Changed commands:
mapmodelslotusage
now returns a single space, if the model slot is not used by any
map entity, but is required by another model (with entities)
mapmodel
allows one more parameter - if "1", the model is preloaded, even if
no entities use it
mdlattribute requires <modelname>
if used, specifies that the current model depends on parts of another
custom model (which therefore also has to be downloaded)
can only be used once per model config
example:
mdlattribute requires makke/signs/exit
could be used in signs/loading-dock/md2.cfg to reuse
makke/signs/exit/tris.md2
DOCREF mdlattribute mapmodel mapmodelslotusage