Definemodel (DEF): Difference between revisions
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
<span {{code}}>'''definemodel''' <filename> <scale> <shade offset></span> | <span {{code}}>'''definemodel''' <filename> <scale> <shade offset></span> | ||
Defines an MD2/3-format model file to replace certain sprites in the game. See '''definemodelframe''' and '''definemodelanim''' for details on how to specify the ART-file tiles to replace. <filename> is the name of the MD2/3 model. <scale> is a (possibly fractional) value specifying a scaling factor for the model when it is rendered, eg. 1.5 for one-and-a-half times as big. <shade-offset> is an integer value specifying how much to bias the sprite's shade value by. A negative value for this makes the model brighter. Conversely, a positive value makes it darker. | |||
<span {{code}}>''' | |||
< | <span {{code}}>'''definemodelskin''' <palnum> <filename></span> | ||
Defines a skin to be used on the model for all frames declared after this command, when the sprite palette is equal to <palnum>. (This makes more sense when given a demonstration.) IMPORTANT: If your model exists in a subdirectory (ie. '''definemodel''' includes a path to the .md2/3) you will need to give the same path to filename if the skin is in the same directory. | |||
''' | <span {{code}}>'''selectmodelskin''' <skin></span> | ||
Selects a model skin. | |||
''' | <span {{code}}>'''definemodelanim''' <start frame> <end frame> <rate> <flags></span> | ||
Defines an animation from a group of frames in the model given by the last preceding '''definemodel''' instruction. <start-frame> and <end-frame> specify the names of the starting and ending frames of the animation. <frame-rate> is the frame rate at which the animation should play. This value can be fractional. <flags> specifies any special properties the animation should have. Valid options are: | |||
* 0 none (looping animation) | * 0 none (looping animation) | ||
* 1 one-shot (plays beginning to end once and stops on the last frame) | * 1 one-shot (plays beginning to end once and stops on the last frame) | ||
'''definemodelframe''' | <span {{code}}>'''definemodelframe''' <frame> <start tilenum> <end tilenum></span> | ||
Defines a range of ART-file tiles to correspond with the given frame of the model specified in the last preceding '''definemodel''' instruction. <frame-name> is the name of the frame, which if identical to the starting frame of a '''definemodelanim''' animation will play that animation. If <frame-name> is not corresponding with an animation, the replacement will be static. <first-tile> and <last-tile> specify a range of ART-file tiles which this model frame should replace. | |||
[[Category:DEF commands]] | [[Category:DEF commands]] | ||
[[Category:Deprecated]] | [[Category:Deprecated]] |
Revision as of 05:48, 23 February 2020
definemodel <filename> <scale> <shade offset>
Defines an MD2/3-format model file to replace certain sprites in the game. See definemodelframe and definemodelanim for details on how to specify the ART-file tiles to replace. <filename> is the name of the MD2/3 model. <scale> is a (possibly fractional) value specifying a scaling factor for the model when it is rendered, eg. 1.5 for one-and-a-half times as big. <shade-offset> is an integer value specifying how much to bias the sprite's shade value by. A negative value for this makes the model brighter. Conversely, a positive value makes it darker.
definemodelskin <palnum> <filename>
Defines a skin to be used on the model for all frames declared after this command, when the sprite palette is equal to <palnum>. (This makes more sense when given a demonstration.) IMPORTANT: If your model exists in a subdirectory (ie. definemodel includes a path to the .md2/3) you will need to give the same path to filename if the skin is in the same directory.
selectmodelskin <skin>
Selects a model skin.
definemodelanim <start frame> <end frame> <rate> <flags>
Defines an animation from a group of frames in the model given by the last preceding definemodel instruction. <start-frame> and <end-frame> specify the names of the starting and ending frames of the animation. <frame-rate> is the frame rate at which the animation should play. This value can be fractional. <flags> specifies any special properties the animation should have. Valid options are:
- 0 none (looping animation)
- 1 one-shot (plays beginning to end once and stops on the last frame)
definemodelframe <frame> <start tilenum> <end tilenum>
Defines a range of ART-file tiles to correspond with the given frame of the model specified in the last preceding definemodel instruction. <frame-name> is the name of the frame, which if identical to the starting frame of a definemodelanim animation will play that animation. If <frame-name> is not corresponding with an animation, the replacement will be static. <first-tile> and <last-tile> specify a range of ART-file tiles which this model frame should replace.