Definemodel (DEF): Difference between revisions
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
'''definemodel <filename> <scale> <shade offset> | '''definemodel''' <filename> <scale> <shade offset><br /> | ||
'''definemodelskin''' <palnum> <filename><br /> | |||
'''selectmodelskin''' <skin><br /> | |||
'''definemodelanim''' <start frame> <end frame> <rate> <flags><br /> | |||
''' | '''definemodelframe''' <frame> <start tilenum> <end tilenum> | ||
''' | '''definemodel''' 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''' 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''' selects a model skin. | ||
'''definemodelanim''' 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''' | '''definemodelframe''' 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 15:27, 21 February 2020
definemodel <filename> <scale> <shade offset>
definemodelskin <palnum> <filename>
selectmodelskin <skin>
definemodelanim <start frame> <end frame> <rate> <flags>
definemodelframe <frame> <start tilenum> <end tilenum>
definemodel 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 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 selects a model skin.
definemodelanim 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 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.