Maphack Language: Difference between revisions
Comments on notmd2, notmd3, nomd2anim, nomd3anim |
more detailed information added |
||
Line 1: | Line 1: | ||
Maphacks are used to edit the positioning of objects and other parts of a level in cases where the maps cannot be redistributed. | Maphacks are used to edit the positioning of objects and other parts of a level in cases where the maps cannot be redistributed. | ||
This only affects the visual representation through the renderer and does ''not'' change the actual gameplay. | |||
Additional information may be found in [http://svn.eduke32.com/duke3d_hrp/maphacks/MapHacks.txt MapHacks.txt]. | |||
==sprite== | ==sprite== | ||
Line 8: | Line 10: | ||
sprite ''spriteid'' '''angleoff''' ''value'' | sprite ''spriteid'' '''angleoff''' ''value'' | ||
Rotates the model away from the starting angle of the sprite. A ''value'' of 2048 represents a full turn of 360 degrees. | Rotates the model (md3 or kvx) away from the starting angle of the sprite. A ''value'' of 2048 represents a full turn of 360 degrees. Practical ''values'' should be chosen between -1023 and 1024 (+- 180 degrees). | ||
===notmd=== | ===notmd=== | ||
Line 15: | Line 17: | ||
sprite ''spriteid'' '''notmd3''' | sprite ''spriteid'' '''notmd3''' | ||
Renders a tile as a | Renders a tile as a texture (original ART tile or highres image if available) instead of a model (md3 or kvx). This is achieved by altering the value of [[mdflags]].<br/> | ||
It is mostly used to "flatten" wall aligned or floor aligned decorative objects.<br/> | |||
There is no actual implementation for ''notmd2'' and ''notmd3''. They are mapped to ''notmd''. | There is no actual implementation for ''notmd2'' and ''notmd3''. They are mapped to ''notmd''. | ||
Line 29: | Line 32: | ||
sprite ''spriteid'' '''pitch''' ''value'' | sprite ''spriteid'' '''pitch''' ''value'' | ||
Adjusts the model's '''[[pitch]]''', i.e. bowing or falling backwards. | Adjusts the model's '''[[pitch]]''', i.e. bowing or falling backwards. Not yet implemented for kvx models.<br/> | ||
A hackish method can be used to move the model | A hackish method can be used to move the model forwards/backwards from clipping into a wall, by setting the sprite's '''mdzoff''' to a grossly high (or low negative) number (try 100000 for starters), and setting a '''pitch''' of 1. | ||
===[[roll]]=== | ===[[roll]]=== | ||
sprite ''spriteid'' '''roll''' ''value'' | sprite ''spriteid'' '''roll''' ''value'' | ||
Adjusts the model's '''[[roll]]''', i.e. tilting to the side. | Adjusts the model's '''[[roll]]''', i.e. tilting to the side. Not yet implemented for kvx models. | ||
===[[mdxoff]]=== | ===[[mdxoff]]=== | ||
sprite ''spriteid'' '''mdxoff''' ''value'' | sprite ''spriteid'' '''mdxoff''' ''value'' | ||
Offsets the '''x''' coordinate of the model's centerpoint, to be used in conjunction with '''pitch | Offsets the '''x''' coordinate of the model's centerpoint,(upwards/downwards in 3D view) to be used in conjunction with '''pitch'''. | ||
===[[mdyoff]]=== | ===[[mdyoff]]=== | ||
sprite ''spriteid'' '''mdyoff''' ''value'' | sprite ''spriteid'' '''mdyoff''' ''value'' | ||
Offsets the '''y''' coordinate of the model's centerpoint, to be used in conjunction with | Offsets the '''y''' coordinate of the model's centerpoint (upwards/downwards in 3D view), to be used in conjunction with '''roll'''. | ||
===[[mdzoff]]=== | ===[[mdzoff]]=== | ||
sprite ''spriteid'' '''mdzoff''' ''value'' | sprite ''spriteid'' '''mdzoff''' ''value'' | ||
Offsets the '''z''' coordinate of the model's centerpoint, to be used in conjunction with '''pitch''' and '''roll'''. | Offsets the '''z''' coordinate of the model's centerpoint, to be used in conjunction with '''pitch''' (forwards/backwards) and/or '''roll''' (right/left).<br/> | ||
The '''pitch''' and '''roll''' values can be used as scaling factors. With '''pitch 1''' and '''roll -2''', for example, the model is moved twice as far to the left as it gets moved forwards. Be aware that the same ''value'' will result in 1/16 the translation for '''mdzoff''' compared to '''mdxoff''' and '''mdyoff'''. | |||
===away1=== | ===away1=== | ||
sprite ''spriteid'' '''away1''' | sprite ''spriteid'' '''away1''' | ||
Moves the sprite | Moves the sprite forwards by a small amount. This is achieved by altering the value of [[mdflags]].<br/> | ||
This is mostly used to resolve flickering ("z-fighting") of overlapping wall aligned sprites, which is especially prevalent when using the Polymer renderer. | |||
===away2=== | ===away2=== | ||
sprite ''spriteid'' '''away2''' | sprite ''spriteid'' '''away2''' | ||
Moves the sprite | Moves the sprite backwards by a small amount. This is achieved by altering the value of [[mdflags]].<br/> | ||
This is mostly used to resolve flickering ("z-fighting") of overlapping wall aligned sprites, which is especially prevalent when using the Polymer renderer. | |||
==light== | ==light== |
Revision as of 03:47, 26 October 2021
Maphacks are used to edit the positioning of objects and other parts of a level in cases where the maps cannot be redistributed. This only affects the visual representation through the renderer and does not change the actual gameplay. Additional information may be found in MapHacks.txt.
sprite
sprite spriteid <token> [value]
sprite spriteid angoff value
sprite spriteid angleoff value
Rotates the model (md3 or kvx) away from the starting angle of the sprite. A value of 2048 represents a full turn of 360 degrees. Practical values should be chosen between -1023 and 1024 (+- 180 degrees).
notmd
sprite spriteid notmd
sprite spriteid notmd2
sprite spriteid notmd3
Renders a tile as a texture (original ART tile or highres image if available) instead of a model (md3 or kvx). This is achieved by altering the value of mdflags.
It is mostly used to "flatten" wall aligned or floor aligned decorative objects.
There is no actual implementation for notmd2 and notmd3. They are mapped to notmd.
nomdanim
sprite spriteid nomdanim
sprite spriteid nomd2anim
sprite spriteid nomd3anim
Freezes any model animation in place. This is achieved by altering the value of mdflags.
There is no actual implementation for nomd2anim and nomd3anim. They are mapped to nomdanim.
sprite spriteid pitch value
Adjusts the model's pitch, i.e. bowing or falling backwards. Not yet implemented for kvx models.
A hackish method can be used to move the model forwards/backwards from clipping into a wall, by setting the sprite's mdzoff to a grossly high (or low negative) number (try 100000 for starters), and setting a pitch of 1.
sprite spriteid roll value
Adjusts the model's roll, i.e. tilting to the side. Not yet implemented for kvx models.
sprite spriteid mdxoff value
Offsets the x coordinate of the model's centerpoint,(upwards/downwards in 3D view) to be used in conjunction with pitch.
sprite spriteid mdyoff value
Offsets the y coordinate of the model's centerpoint (upwards/downwards in 3D view), to be used in conjunction with roll.
sprite spriteid mdzoff value
Offsets the z coordinate of the model's centerpoint, to be used in conjunction with pitch (forwards/backwards) and/or roll (right/left).
The pitch and roll values can be used as scaling factors. With pitch 1 and roll -2, for example, the model is moved twice as far to the left as it gets moved forwards. Be aware that the same value will result in 1/16 the translation for mdzoff compared to mdxoff and mdyoff.
away1
sprite spriteid away1
Moves the sprite forwards by a small amount. This is achieved by altering the value of mdflags.
This is mostly used to resolve flickering ("z-fighting") of overlapping wall aligned sprites, which is especially prevalent when using the Polymer renderer.
away2
sprite spriteid away2
Moves the sprite backwards by a small amount. This is achieved by altering the value of mdflags.
This is mostly used to resolve flickering ("z-fighting") of overlapping wall aligned sprites, which is especially prevalent when using the Polymer renderer.
light
light sector x y z range r g b radius faderadius angle horiz minshade maxshade priority tilenum
Displays a spotlight using the Polymer renderer.