Definemodel (DEF): Difference between revisions

From EDukeWiki
Jump to navigation Jump to search
Fox (talk | contribs)
No edit summary
Fox (talk | contribs)
No edit summary
Line 1: Line 1:
'''definemodel <filename> <scale> <shade offset>
'''definemodel''' <filename> <scale> <shade offset><br />
 
'''definemodelskin''' <palnum> <filename><br />
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.
'''selectmodelskin''' <skin><br />
 
'''definemodelanim''' <start frame> <end frame> <rate> <flags><br />
'''definemodelskin''' <palnum> <filename>
'''definemodelframe''' <frame> <start tilenum> <end tilenum>
 
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>
'''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.


Selects a model skin.
'''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.


'''definemodelanim''' <start frame> <end frame> <rate> <flags>
'''selectmodelskin''' selects a model skin.


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:
'''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''' <frame> <start tilenum> <end tilenum>
'''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.
 
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 16: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.