https://wiki.eduke32.com/w/api.php?action=feedcontributions&user=Dr.+Kylstien&feedformat=atomEDukeWiki - User contributions [en]2024-03-29T13:57:56ZUser contributionsMediaWiki 1.42.0-alphahttps://wiki.eduke32.com/w/index.php?title=Cross-Platform_Modding&diff=8898Cross-Platform Modding2010-03-06T19:26:40Z<p>Dr. Kylstien: added list of hard-coded filenames.</p>
<hr />
<div>EDuke32 is cross-platform and supports Mac OS X and Linux as well as Windows. A properly made mod can run on any OS supported by EDuke32, but some considerations need to be made.<br />
<br />
==Checklist==<br />
#'''Is my mod in a file that users of other operating systems can open?''' (No self-extracting files or installer programs. zip, rar, and 7z files are good.)<br />
#'''Did I type all the filenames with the same case as the actual files and directories?''' All Unix-like operating systems (Unix, Linux, BSD, Mac OS X) are case-sensitive. This means that MyMod.con, MYMOD.CON and mymod.con are all different files. Make sure you type the paths exactly as they appear, or EDuke32 will not find them. It is recommended (and standard practice on these systems) to always use lowercase file and directory names so that there is not confusion. The case of some filenames are hard-coded in EDuke32 and must be typed as follows: <br />
##EDUKE.CON <br />
##GAME.CON <br />
##duke3d.def <br />
##duke3d.grp <br />
##tiles###.art<br />
<br />
#'''Can my mod play nicely with other mods and existing EDuke32 installs?''' Operating systems like Linux keep their programs, data, and configuration in separate locations and will have only one copy of EDuke32 and a standard directory to load mods from. Therefore, well-behaved mods will keep their files separate from files for other mods and not autoload by default. If you keep your mod together in a zip file, or a directory to be loaded with "-game_dir", you should be okay. Bundling your whole working directory with a full install of EDuke32 and DukePlus, loose EDUKE.CON and duke3d.def files, and a complicated batch file is not acceptable. As simple as it may be for Windows users, it requires a lot of work for users of other operating systems to play your mod. (It may also cause problems for people that have EDuke32 set up a specific way on Windows.)<br />
#'''Has my mod been tested on other Operating Systems?''' This is not always possible, but it helps to have beta testers on different systems. They can help you answer the previous checks more certainly and also reveal unexpected issues that you can fix.</div>Dr. Kylstienhttps://wiki.eduke32.com/w/index.php?title=Cross-Platform_Modding&diff=8897Cross-Platform Modding2010-03-06T18:59:15Z<p>Dr. Kylstien: Not sure what happened to this, but I re-added a note on beta-testing.</p>
<hr />
<div>EDuke32 is cross-platform and supports Mac OS X and Linux as well as Windows. A properly made mod can run on any OS supported by EDuke32, but some considerations need to be made.<br />
<br />
==Checklist==<br />
#'''Is my mod in a file that users of other operating systems can open?''' (No self-extracting files or installer programs. zip, rar, and 7z files are good.)<br />
#'''Did I type all the filenames with the same case as the actual files and directories?''' All Unix-like operating systems (Unix, Linux, BSD, Mac OS X) are case-sensitive. This means that MyMod.con, MYMOD.CON and mymod.con are all different files. Make sure you type the paths exactly as they appear, or EDuke32 will not find them. It is recommended (and standard practice on these systems) to always use lowercase file and directory names so that there is not confusion.<br />
#'''Can my mod play nicely with other mods and existing EDuke32 installs?''' Operating systems like Linux keep their programs, data, and configuration in separate locations and will have only one copy of EDuke32 and a standard directory to load mods from. Therefore, well-behaved mods will keep their files separate from files for other mods and not autoload by default. If you keep your mod together in a zip file, or a directory to be loaded with "-game_dir", you should be okay. Bundling your whole working directory with a full install of EDuke32 and DukePlus, loose EDUKE.CON and duke3d.def files, and a complicated batch file is not acceptable. As simple as it may be for Windows users, it requires a lot of work for users of other operating systems to play your mod. (It may also cause problems for people that have EDuke32 set up a specific way on Windows.)<br />
#'''Has my mod been tested on other Operating Systems?''' This is not always possible, but it helps to have beta testers on different systems. They can help you answer the previous checks more certainly and also reveal unexpected issues that you can fix.</div>Dr. Kylstienhttps://wiki.eduke32.com/w/index.php?title=Main_Page&diff=8895Main Page2010-03-06T18:50:01Z<p>Dr. Kylstien: </p>
<hr />
<div>__NOTOC__ __NOEDITSECTION__<br />
Welcome to EDukeWiki! This wiki serves to provide the most accurate and complete source of [[EDuke32]] documentation on the Internet.<br />
<br />
{| cellpadding="0" cellspacing="0" border="0" width="100%"<br />
| width="66%" valign="top" style="background-color: #f8f8ff; border: 2px solid #dddddd; border-right: none; padding: 0.6em;" |<br />
<br />
{| cellpadding="0" cellspacing="0" border="0" width="100%"<br />
| width="50%" valign="top" style="background-color: #f8f8ff; border: none; border-right: none; padding: 0.6em;" |<br />
<br />
===Using EDuke32=== <br />
* [[Installation and configuration]]<br />
* [[Multiplayer]]<br />
* [[Configuration file options]]<br />
* [[Command line options]]<br />
* [[Console commands]] <br />
* [[Frequently Asked Questions]] <br />
<br />
| width="50%" valign="top" style="border: none; padding: 0.6em;" |<br />
<br />
===Building EDuke32 From Source===<br />
* [[Building EDuke32 on Windows]]<br />
* [[Building EDuke32 on Linux]] <br />
* [http://www.spam-filter.de/osx/eduke32_on_os_x Building EDuke32 on OS X]<br />
* [[APT repository | APT repository for Debian / Ubuntu]]<br />
<br />
|}<br />
<br />
{| cellpadding="0" cellspacing="0" border="0" width="100%"<br />
| width="50%" valign="top" style="background-color: #f8f8ff; border: none; border-right: none; padding: 0.6em;" |<br />
<br />
===Editing & Modding EDuke32=== <br />
* [[Scripting|Scripting using CON files]] <br />
* [[Tutorials|CON script tutorials and examples]] <br />
* [[DEF Language|Engine content definition language]]<br />
* [[Maphack Language|Maphack level adjustments]]<br />
* [[Level editing|Editing levels with Mapster32]] <br />
* [[Cross-Platform Modding|Can users of other operating systems play my mod?]]<br />
* [[Utilities|Utilities for use with EDuke32]]<br />
* [[EDuke32 Modifications|Index of existing EDuke32 mods]]<br />
<br />
| width="50%" valign="top" style="border: none; padding: 0.6em;" |<br />
<br />
===External Links=== <br />
* [http://forums.duke4.net/index.php?showforum=26 Official EDuke32 Discussion Forum]<br />
* [irc://irc.freenode.net/eduke32 #eduke32 on irc.freenode.net]<br />
* [http://infosuite.dukerepository.com/ The Duke Nukem 3D Informational Suite]<br />
* [http://www.moddb.com/engines/eduke32/ EDuke32 on Mod DB]<br />
* [http://dukeworld.duke4.net/eduke32/synthesis/ EDuke32 Synthesis Builds]<br />
* [http://hendricks266.duke4.net/eduke32/ EDuke32 Build Mirror]<br />
|}<br />
<br />
| width="33%" valign="top" style="border: 2px solid #dddddd; border-left: none; padding: 0.6em;" |<br />
<br />
[[Image:Title_screen.png|right]]<br />
<br />
|}<br />
<br />
Please remember that EDukeWiki is a community project. It relies on content contributed by users such as yourself in order to stay alive and continue to be useful. It is the responsibility of users like you to not only make sure that the documentation here is both accurate and relevant to current version of [[EDuke32]], but to also help reverse any vandalism you see. Thank you for your contributions and for helping to keep our wiki friendly and clean of vandalism and spam!<br />
<br />
This wiki is supported by [http://www.plagman.net Plagman]'s ongoing donation of server hosting, by our sponsored links, and by purchases of games from [http://www.gog.com/en/frontpage/pp/6c1e671f9af5b46d9c1a52067bdf0e53685674f7 gog.com] by accounts registered through our banners.<br />
<br />
If you don't yet own ''Duke Nukem 3D: Atomic Edition'', [http://www.gog.com/en/gamecard/duke_nukem_3d_atomic_edition/pp/6c1e671f9af5b46d9c1a52067bdf0e53685674f7 buy it now for $5.99!]<br />
<br />
In fact, [http://www.gog.com/en/frontpage/pp/6c1e671f9af5b46d9c1a52067bdf0e53685674f7 check out gog.com] even if you already own Duke; if you're reading this wiki, chances are you're interested in other classic games, of which gog.com has plenty available for quick download at unbeatable prices. They even have a few things you can snag for free. Give 'em a try!</div>Dr. Kylstienhttps://wiki.eduke32.com/w/index.php?title=Cross-Platform_Modding&diff=8894Cross-Platform Modding2010-03-06T18:46:51Z<p>Dr. Kylstien: typo</p>
<hr />
<div>EDuke32 is cross-platform and supports MacOSX and Linux as well as Windows. A properly made mod can run on any OS supported by Eduke32, but some considerations need to be made.<br />
<br />
==Checklist==<br />
#'''Is my mod in a file that users of other operating systems can open?''' (No self-extracting files or installer programs. zip, rar, and 7z files are good.)<br />
#'''Did I type all the filenames with the same case as the actual files and directories?''' All Unix-like operating systems (Unix, Linux, BSD, MacOSX) are case-sensitive. This means that MyMod.con, MYMOD.CON and mymod.con are all different files. Make sure you type the paths exactly as they appear, or EDuke32 will not find them. It is recommended (and standard practice on these systems) to always use lowercase file and directory names so that there is not confusion.<br />
#'''Can my mod play nicely with other mods and existing EDuke32 installs?''' Operating systems like Linux keep their programs, data, and configuration in separate locations and will have only one copy of EDuke32 and a standard directory to load mods from. Therefore, well-behaved mods will keep their files separate from files for other mods and not autoload by default. If you keep your mod together in a zip file, or a directory to be loaded with "-game_dir", you should be okay. Bundling your whole working directory with a full install of EDuke32 and DukePlus, loose EDUKE.CON and duke3d.def files, and a complicated batch file is not acceptable. As simple as it may be for Windows users, it requires a lot of work for users of other operating systems to play your mod. (It may also cause problems for people that have EDuke32 set up a specific way on Windows.)</div>Dr. Kylstienhttps://wiki.eduke32.com/w/index.php?title=Cross-Platform_Modding&diff=8893Cross-Platform Modding2010-03-06T18:45:42Z<p>Dr. Kylstien: Created page with 'EDuke32 is cross-platform and supports MacOSX and Linux as well as Windows. A properly made mod can run on any OS supported by Eduke32, but some considerations need to be made. ...'</p>
<hr />
<div>EDuke32 is cross-platform and supports MacOSX and Linux as well as Windows. A properly made mod can run on any OS supported by Eduke32, but some considerations need to be made.<br />
<br />
==Checklist==<br />
#'''Is my mod in a file that users of other operating systems can open?''' (No self-extracting files or installer programs. zip, rar, and 7z files are good.)<br />
#'''Did I type all the filenames with the same case as the actual files and directories?''' All Unix-like operating systems (Unix, Linux, BSD, MacOSX) are case-sensitive. This means that MyMod.con, MYMOD.CON and mymod.con are all different files. Make sure you type the paths exactly as they appear, or EDuke32 will not find them. It is recommended (and standard practice on these systems) to always use lowercase file and directory names so that there is not confusion.<br />
#'''Can my mod play nicely with other mods and existing EDuke32 installs?''' Operating systems like Linux keep their programs, data, and configuration in separate locations and will have only one copy of EDuke32 and a standard directory to load mods from. Therefore, well-behaved mods be keep their files separate from files for other mods and not autoload by default. If you keep your mod together in a zip file, or a directory to be loaded with "-game_dir", you should be okay. Bundling your whole working directory with a full install of EDuke32 and DukePlus, loose EDUKE.CON and duke3d.def files, and a complicated batch file is not acceptable. As simple as it may be for Windows users, it requires a lot of work for users of other operating systems to play your mod. (It may also cause problems for people that have EDuke32 set up a specific way on Windows.)</div>Dr. Kylstienhttps://wiki.eduke32.com/w/index.php?title=Members_of_the_userdef_structure&diff=8663Members of the userdef structure2009-10-30T16:53:58Z<p>Dr. Kylstien: </p>
<hr />
<div><div style="column-count:3;-moz-column-count:3;"><br />
*[[althud]]<br />
*[[angleinterpolation]]<br />
*[[automsg]]<br />
*[[auto_run]]<br />
*[[autovote]]<br />
*[[brightness]]<br />
*[[camerasprite]]<br />
*[[camera_time]]<br />
*[[cashman]]<br />
*[[clipping]]<br />
*[[color]]<br />
*[[const_visibility]]<br />
*[[coop]]<br />
*[[coords]]<br />
*[[crosshair]]<br />
*[[crosshairscale]]<br />
*[[deathmsgs]]<br />
*[[democams]]<br />
*[[detail]]<br />
*[[display_bonus_screen]]<br />
*[[drawweapon]]<br />
*[[entered_name]]<br />
*[[eog]]<br />
*[[executions]]<br />
*[[ffire]]<br />
*[[fola]]<br />
*[[folavel]]<br />
*[[folfvel]]<br />
*[[folx]]<br />
*[[foly]]<br />
*[[from_bonus]]<br />
*[[fta_on]]<br />
*[[god]]<br />
*[[idplayers]]<br />
*[[last_camsprite]]<br />
*[[last_level]]<br />
*[[last_overhead]]<br />
*[[level_number]]<br />
*[[levelstats]]<br />
*[[lockout]]<br />
*[[marker]]<br />
*[[m_coop]]<br />
*[[m_ffire]]<br />
*[[m_level_number]]<br />
*[[m_marker]]<br />
*[[m_monsters_off]]<br />
*[[m_noexits]]<br />
*[[monsters_off]]<br />
*[[mouseaiming]]<br />
*[[mouseflip]]<br />
*[[m_player_skill]]<br />
*[[m_recstat]]<br />
*[[m_respawn_inventory]]<br />
*[[m_respawn_items]]<br />
*[[m_respawn_monsters]]<br />
*[[msgdisptime]]<br />
*[[multimode]]<br />
*[[m_volume_number]]<br />
*[[noexits]]<br />
*[[obituaries]]<br />
*[[overhead_on]]<br />
*[[pause_on]]<br />
*[[playerai]]<br />
*[[player_skill]]<br />
*[[pwlockout]]<br />
*[[reccnt]]<br />
*[[recstat]]<br />
*[[respawn_inventory]]<br />
*[[respawn_items]]<br />
*[[respawn_monsters]]<br />
*[[ridecule]]<br />
*[[rtsname;]]<br />
*[[savegame]]<br />
*[[screen_size]]<br />
*[[screen_tilting]]<br />
*[[scrollmode]]<br />
*[[secretlevel]]<br />
*[[shadows]]<br />
*[[showallmap]]<br />
*[[show_help]]<br />
*[[showweapons]]<br />
*[[statusbarmode]]<br />
*[[statusbarscale]]<br />
*[[team]]<br />
*[[tickrate]]<br />
*[[user_name]]<br />
*[[uw_framerate]]<br />
*[[viewbob]]<br />
*[[volume_number]]<br />
*[[warp_on]]<br />
*[[wchoice]]<br />
*[[weaponsway]]<br />
*[[weaponswitch]]<br />
</div><br />
<br />
[[Category:Structure member documentation]]</div>Dr. Kylstienhttps://wiki.eduke32.com/w/index.php?title=DEF_Language&diff=8652DEF Language2009-10-14T17:03:38Z<p>Dr. Kylstien: /* sound */</p>
<hr />
<div>== Definitions ==<br />
<br />
New to JFDuke3D\EDuke32 are DEF files. These parsed scripts allow redefinition of flat, Hightile textures, 3D models, miscellaneous settings, and, possibly, in the future, higher-quality sounds and music, and enhanced cutscenes.<br />
<br />
Comments can be used by prefixing the text with a double forward-slash (C++ style), <code>//</code>, or surrounding the text with <code>/* (comment here) */</code> (C style).<br />
<br />
__TOC__<br />
{{Def table1}}<br />
<br />
=====<div {{Def link}}>texture</div>=====<br />
<span {{Def element}}>texture <i><tilenum> { ... }</i></span><br />
<br />
Defines a Hightile texture to replace an ART-file tile. <i><tilenum></i> may be a number, or a defined label.<br />
<br />
Example:<br />
<br />
texture 3586 {<br />
pal 0 { file "mymod/tree.png" }<br />
pal 21 { file "mymod/tree_red.png" xscale 2.0 yscale 2.0 alphacut 0 nodownsize nocompress }<br />
glow { file "mymod/tree_light.png" }<br />
detail { file "mymod/plant_texture.png" scale 0.5 }<br />
}<br />
<br />
The brace-enclosed block may contain these instructions:<br />
<br />
: <span {{Def subelement}}>pal <i><palnum> { ... }</i></span><br />
<br />
: Replaces the palette <i><palnum></i>. If a palette has no pal definition palette 0 definition will be used. Tint will not be used on palettes defined with this instruction.<br />
<br />
: The brace-enclosed block may contain these instructions:<br />
<br />
:: <span {{Def subelement}}>file <i><filename></i></span> (or <span {{Def subelement}}>name <i><filename></i></span>)<br />
<br />
:: Defines which texture file to use. File may be any PNG, JPG, TGA, BMP, GIF or PCX file. This instruction must be supplied.<br />
<br />
:: <span {{Def subelement}}>alphacut <i><cutoff-value></i></span><br />
<br />
:: Sets the level of transparency at which a pixel in the texture is considered opaque. Pixels with more transparency than the cut-off are not drawn to the screen when rendered. The default setting is 0.32, which is just below the 33% transparency level of Build. If your texture has areas that are more transparent than the default, you can lower the cut-off level to preserve that detail.<br />
<br />
:: <span {{Def subelement}}>nocompress</span><br />
<br />
:: Prevents the texture from being compressed using S3TC if texture compression is enabled.<br />
<br />
:: <span {{Def subelement}}>nodownsize</span><br />
<br />
:: Prevents the texture from being downsized.<br />
<br />
:: <span {{Def subelement}}>xscale <i><value></i></span><br /><br />
:: <span {{Def subelement}}>yscale <i><value></i></span><br />
<br />
:: Sets the scale of the hightile texture in relation to the original texture. A <i><value></i> of 1.0 makes it the same size, higher makes it cover more then the original tile and smaller makes it cover a smaller area. <b>xscale</b> (aka <b>scale</b>, <b>detailscale</b>, <b>intensity</b>) sets the horizontal scale and <b>yscale</b> sets the vertical scale.<br />
<br />
: <span {{Def subelement}}>detail <i>{ ... }</i></span><br />
<br />
: Defines a [[Detail_mapping|detail texture]] for the texture. The brace-enclosed block may contain these instructions:<br />
<br />
:: <span {{Def subelement}}>file <i><filename></i></span><br />
<br />
:: Specifies which detail texture file to use. File may be any PNG, JPG, TGA, BMP, GIF or PCX file. This instruction must be supplied.<br />
<br />
:: <span {{Def subelement}}>scale <i><value></i></span><br />
<br />
:: <i><value></i> is a positive floating-point value that'll determine how much your detail map should repeat on your diffuse map (if you want your detail map to repeat five times, use a 1/5 scale : 0.2).<br />
<br />
: <span {{Def subelement}}>glow <i>{ ... }</i></span><br />
<br />
: Defines a [[Glow_mapping|glow map]] for the texture. The brace-enclosed block may contain these instructions:<br />
<br />
:: <span {{Def subelement}}>file <i><filename></i></span><br />
<br />
:: Specifies which glow map file to use. This instruction must be supplied.<br />
<br />
{{Def table2}} {{Def table1}}<br />
<br />
=====<div {{Def link}}>tint</div>=====<br />
<span {{Def element}}>tint <i>{ ... }</i></span><br />
<br />
Defines a Hightile texture tint to simulate palette effects normally used on ART-file tiles.<br />
<br />
Example:<br />
<br />
tint { pal 1 red 127 green 127 blue 255 flags 0 }<br />
tint { pal 2 green 127 blue 127 }<br />
<br />
The brace-enclosed block may contain these instructions:<br />
<br />
: <span {{Def subelement}}>pal <i><palnum></i></span><br />
<br />
: The palette number the tint applies to.<br />
<br />
: <span {{Def subelement}}>red <i><value></i></span> (or <span {{Def subelement}}>r <i><value></i></span>)<br /><br />
: <span {{Def subelement}}>green <i><value></i></span> (or <span {{Def subelement}}>g <i><value></i></span>)<br /><br />
: <span {{Def subelement}}>blue <i><value></i></span> (or <span {{Def subelement}}>b <i><value></i></span>)<br />
<br />
: Specifies a color component value, in the range of 0 to 255. Unspecified components are assumed to be 255 and any out of range values are clamped to the maximum or minimum as appropriate.<br />
<br />
: <span {{Def subelement}}>flags <i><flags></i></span><br />
<br />
: Specifies any special processing effects to use for the tint. The value of flags may be the sum of any of these values:<br />
<br />
: 0 = no effects<br /><br />
: 1 = convert to greyscale<br /><br />
: 2 = invert colors<br />
<br />
{{Def table2}} {{Def table1}}<br />
<br />
=====<div {{Def link}}>skybox</div>=====<br />
<br />
<span {{Def element}}>skybox <i>{ ... }</i></span><br />
<br />
Defines a skybox that overrides a parallaxing floor or ceiling in OpenGL Polymost rendering mode.<br />
<br />
Example:<br />
skybox {<br />
tile 3586 pal 0<br />
front "mymod/sky_1.png" nocompress <br />
right "mymod/sky_2.png" nocompress <br />
back "mymod/sky_3.png" nocompress<br />
left "mymod/sky_4.png" nocompress <br />
top "mymod/sky_5.png" nocompress<br />
down "mymod/sky_6.png" nocompress<br />
}<br />
<br />
The brace-enclosed block may contain these instructions:<br />
<br />
: <span {{Def subelement}}>tile <i><tilenum></i></span><br />
<br />
: Specifies the ART file tile to override.<br />
<br />
: <span {{Def subelement}}>pal <i><palnum></i></span><br />
<br />
: Specifies the palette number the skybox should happen for.<br />
<br />
: <span {{Def subelement}}>front <i><filename></i></span> (or <span {{Def subelement}}>Front</span> / <span {{Def subelement}}>ft</span> / <span {{Def subelement}}>forward</span>)<br /><br />
: <span {{Def subelement}}>right <i><filename></i></span> (or <span {{Def subelement}}>rt</span> / <span {{Def subelement}}>right</span>)<br /><br />
: <span {{Def subelement}}>back <i><filename></i></span> (or <span {{Def subelement}}>bk</span> / <span {{Def subelement}}>back</span>)<br /><br />
: <span {{Def subelement}}>left <i><filename></i></span> (or <span {{Def subelement}}>lf</span> / <span {{Def subelement}}>left</span>) / <span {{Def subelement}}>lt</span>)<br /><br />
: <span {{Def subelement}}>top <i><filename></i></span> (or <span {{Def subelement}}>up</span> / <span {{Def subelement}}>top</span> / <span {{Def subelement}}>ceiling</span> / <span {{Def subelement}}>ceil</span>)<br /><br />
: <span {{Def subelement}}>down <i><filename></i></span> (or <span {{Def subelement}}>dn</span> / <span {{Def subelement}}>bottom</span> / <span {{Def subelement}}>floor</span> / <span {{Def subelement}}>down</span>)<br />
<br />
: Defines a single face of the skybox where facename may be any of these keywords appropriate for the face in question:<br />
<br />
: NOTE: All six faces are required to be specified.<br />
<br />
{{Def table2}} {{Def table1}}<br />
<br />
=====<div {{Def link}}>model</div>=====<br />
<br />
<span {{Def element}}>model <i><filename> { ... }</i></span><br />
<br />
Defines a model to replace certain sprites in the game when running in OpenGL Polymost mode. <i><filename></i> is the model file in md2 or md3 format.<br />
<br />
Note: md2 is considered deprecated.<br />
<br />
The brace-enclosed block may contain these instructions:<br />
<br />
: <span {{Def subelement}}>scale <i><value></i></span><br />
<br />
: <i><value></i> 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.<br />
<br />
: <span {{Def subelement}}>shade <i><shade-offset></i></span><br />
<br />
: <i><shade-offset></i> 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.<br />
<br />
: <span {{Def subelement}}>zadd <i><offset></i></span><br />
<br />
: <i><offset></i> is a (possibly fractional) value specifying a height offset for the model. Quake models are aligned in the center while Build models are aligned at the floor. Using this command will allow Build to use Quake models without modification to the MD2/3 file itself.<br />
<br />
: <span {{Def subelement}}>flags <i><flags></i></span><br />
<br />
: Specifies any special properties the model should have, the values of which should be added together to combine multiple options.<br />
: 0: default value<br /><br />
: 1: Prevents the the model from being affected by the tints.<br /><br />
<br />
: <span {{Def subelement}}>skin <i>{ ... }</i></span><br />
<br />
: Defines a skin to be used on the model for all frames declared after this command. The brace-enclosed block may contain these instructions:<br />
<br />
:: <span {{Def subelement}}>pal <i><palnum></i></span><br />
<br />
:: Specifies which palette this skin maps to.<br />
<br />
:: <span {{Def subelement}}>surface <i><surfnum></i></span><br />
<br />
:: Specifies which MD3 surface this skin should be applied to. This has no significance for MD2 models.<br />
<br />
:: <span {{Def subelement}}>file <i><filename></i></span><br />
<br />
:: Specifies the texture file to use for the skin. File may be any PNG, JPG, TGA, BMP, GIF or PCX file<br />
<br />
:: IMPORTANT: If your model exists in a subdirectory (ie. the model filename 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.<br />
<br />
: <span {{Def subelement}}>anim <i>{ ... }</i></span><br />
<br />
: Defines an animation from a group of frames in the model. The brace-enclosed block may contain these instructions:<br />
<br />
:: <span {{Def subelement}}>frame0 <i><framename></i></span><br /><br />
:: <span {{Def subelement}}>frame1 <i><framename></i></span><br />
<br />
:: Specifies the names of the start (<b>frame0</b>) and end (<b>frame1</b>) frames of the animation.<br />
<br />
:: <span {{Def subelement}}>fps <i><fps></i></span><br />
<br />
:: Specifies the frame rate at which the animation should play. This value may be fractional.<br />
<br />
:: <span {{Def subelement}}>flags <i><flags></i></span><br />
<br />
:: Specifies any special properties the animation should have, the values of which should be added together to combine multiple options.<br />
<br />
:: Valid options are:<br />
:: 0 none (looping animation)<br /><br />
:: 1 one-shot (plays beginning to end once and stops on the last frame).<br />
<br />
: <span {{Def subelement}}>frame <i>{ ... }</i></span><br />
<br />
: Defines a range of ART-file tiles to correspond with the given frame/animation of the model. The brace-enclosed block may contain these instructions:<br />
<br />
:: <span {{Def subelement}}>name <i><framename></i></span><br /><br />
:: <span {{Def subelement}}>frame <i><framename></i></span><br />
<br />
:: If <i><framename></i> is identical to the starting frame of an animation, the engine will play that animation, otherwise the replacement will be static. You can choose to use the <b>frame</b> or <b>name</b> versions of this instruction as both are identical.<br />
<br />
:: <span {{Def subelement}}>tile <i><tilenum></i></span><br /><br />
:: <span {{Def subelement}}>tile0 <i><tilenum></i></span><br /><br />
:: <span {{Def subelement}}>tile1 <i><tilenum></i></span><br />
<br />
:: Use the tile instruction to specify an ART-file tile which this model should replace. Use the <b>tile0</b> and <b>tile1</b> instructions together to specify a range of ART-file tiles. If you use <b>tile0</b>, you must also have a <b>tile1</b>. You may not use the same instruction twice to specify multiple ranges.<br />
<br />
:: <span {{Def subelement}}>smoothduration <i><value></i></span><br />
<br />
:: If smoothduration is non-zero switching from another animation to the one defined by that frame block will trigger an intermediary animation smoothing state of duration <i><value></i> seconds.<br />
<br />
:: <span {{Def subelement}}>pal <i><value></i></span><br />
<br />
:: Makes the model definition exclusive for the this pal. This allow to assign different models for different pal.<br />
<br />
: <span {{Def subelement}}>hud <i>{ ... }</i></span><br />
<br />
: Defines a range of ART-file tiles to use with a heads-up-display. The brace-enclosed block may contain these instructions:<br />
<br />
:: <span {{Def subelement}}>tile <i><tilenum></i></span><br /><br />
:: <span {{Def subelement}}>tile0 <i><tilenum></i></span><br /><br />
:: <span {{Def subelement}}>tile1 <i><tilenum></i></span><br />
<br />
:: <b>tile0</b> and <b>tile1</b> together specify a range of ART-file tiles which this model frame should replace when rendered as part of the HUD. You can specify individual tiles using a single tile command.<br />
<br />
:: <span {{Def subelement}}>xadd <i><offset></i></span><br /><br />
:: <span {{Def subelement}}>yadd <i><offset></i></span><br /><br />
:: <span {{Def subelement}}>zadd <i><offset></i></span><br /><br />
:: <span {{Def subelement}}>angadd <i><offset></i></span><br />
<br />
:: Use these offsets to fine-tune the location of the model placement. <b>xadd</b>, <b>yadd</b>, and <b>zadd</b> are position offsets relative to the viewer's orienation. You can use floating point values with them. <b>angadd</b> is a Build angle offset. (512 90 degrees, 1024 180 degrees, etc...).<br />
<br />
:: <span {{Def subelement}}>hide</span><br />
<br />
:: Some weapons use multiple ART tiles for constructing the gun or animation. Use this option to hide parts that you don't need in your replacement.<br />
<br />
:: <span {{Def subelement}}>nobob</span><br />
<br />
:: By default, the HUD model offset is affected by the player bobbing offset when the player is walking. Use this option to disable that.<br />
<br />
:: <span {{Def subelement}}>flipped</span><br />
<br />
:: Use this option to apply the settings inside the hud block only if the object is normally rendered x-flipped (mirror image). Some weapons, such as the devastator, are rendered in 2 pieces, the left devastator is actually a mirror image of the right.<br />
<br />
:: <span {{Def subelement}}>nodepth</span><br />
<br />
:: Use this to render a HUD model without the use of the depth buffer. Normally, you should avoid this. The one exception where this is useful is for the spinning nuke menu pointer because it should always be in front - and it just happens to be convex ... which is the one case that is safe with the depth buffer disabled … a rather fortunate coincidence. [[Image:Smile.gif]]<br />
<br />
: <span {{Def subelement}}>detail <i>{ ... }</i></span><br />
<br />
: Defines a [[Detail_mapping|detail texture]] for the model. The brace-enclosed block may contain these instructions:<br />
<br />
:: <span {{Def subelement}}>file <i><filename></i></span><br />
<br />
:: Specifies which detail texture file to use. File may be any PNG, JPG, TGA, BMP, GIF or PCX file. This instruction must be supplied.<br />
<br />
:: <span {{Def subelement}}>scale <i><value></i></span><br />
<br />
:: <i><value></i> is a positive floating-point value that'll determine how much your detail map should repeat on your diffuse map (if you want your detail map to repeat five times, use a 1/5 scale : 0.2).<br />
<br />
:: <span {{Def subelement}}>surface <i><surfnum></i></span><br />
<br />
:: Specifies which MD3 surface this detail texture should be applied to. This has no significance for MD2 models.<br />
<br />
: <span {{Def subelement}}>glow <i>{ ... }</i></span><br />
<br />
: Defines a [[Glow_mapping|glow map]] for the model. The brace-enclosed block may contain these instructions:<br />
<br />
:: <span {{Def subelement}}>file <i><filename></i></span><br />
<br />
:: Specifies which glow map file to use. This instruction must be supplied.<br />
<br />
:: <span {{Def subelement}}>surface <i><surfnum></i></span><br />
<br />
:: Specifies which MD3 surface this glow map should be applied to. This has no significance for MD2 models.<br />
<br />
{{Def table2}} {{Def table1}}<br />
<br />
=====<div {{Def link}}>voxel</div>=====<br />
<br />
<span {{Def element}}>voxel <i><filename> { ... }</i></span><br />
<br />
Defines a voxel to replace sprites. filename is the name of the .KVX file containing the voxel. The brace-enclosed block may contain these instructions:<br />
<br />
: <span {{Def subelement}}>tile <i><tilenum></i></span><br /><br />
: <span {{Def subelement}}>tile0 <i><tilenum></i></span><br /><br />
: <span {{Def subelement}}>tile1 <i><tilenum></i></span><br />
<br />
: Use these instructions to map tiles that should be rendered as a voxels. Use <b>tile</b> to map a single tile to be rendered as voxels and <b>tile0</b>, <b>tile1</b> together define a range of tiles to be rendered as voxels. The <b>tile0</b> instruction should appear before the <b>tile1</b> instruction to define a correct range.<br />
<br />
: <span {{Def subelement}}>scale <i><value></i></span><br />
<br />
: <i><value></i> is a (possibly fractional) value specifying a scaling factor for the voxelmodel when it is rendered, eg. 1.5 for one-and-a-half times as big.<br />
<br />
{{Def table2}} {{Def table1}}<br />
<br />
=====<div {{Def link}}>music</div>=====<br />
<span {{Def element}}>music <i>{ ... }</i></span><br />
<br />
Example:<br />
music { id "E1L1" file "stalker1.ogg" }<br />
music { id "Intro" file "grabbag.ogg" }<br />
music { id "Briefing" file "briefing.ogg" }<br />
music { id "Loading" file "bonus.ogg" }<br />
<br />
: <span {{Def subelement}}>id <i><value></i></span><br />
<br />
: <i><value></i> is "Intro", "Briefing", "Loading" or "E'''x'''L'''y'''"(where x is the episode and y is the level).<br /><br />
<br />
: <span {{Def subelement}}>file <i><filename></i></span><br />
<br />
: Specifies which music file to use. File types: MID, OGG<br />
<br />
{{Def table2}} {{Def table1}}<br />
<br />
=====<div {{Def link}}>sound</div>=====<br />
<span {{Def element}}>sound <i>{ ... }</i></span><br />
<br />
Example:<br />
sound { id "249" file "bonus.ogg" }<br />
<br />
: <span {{Def subelement}}>id <i><value></i></span><br />
<br />
: Specifies the ID of sound. The ID can be found in DEFS.CON.<br />
<br />
: <span {{Def subelement}}>file <i><filename></i></span><br />
<br />
: Specifies which music file to use. File types: WAV, VOC, OGG<br />
<br />
{{Def table2}}<br />
<br />
== Un-Definitions ==<br />
<br />
The main use for these is for cases in which the .ART files are somewhat different, and you want to ensure compatibility for the new art without new textures or models. A good example of this is [http://hendricks266.duke4.net/nw_plus.html Duke: Nuclear Winter Plus] by [[User:Hendricks 266|Hendricks266]]. (see undef.def)<br />
<br />
{{Def table1}}<br />
<br />
=====<div {{Def link}}>undeftexture</div>=====<br />
<span {{Def element}}>undeftexture <i><tile></i></span><br /><br />
<span {{Def element}}>undeftexturerange <i><tile0> <tile1></i></span><br />
<br />
This is for undefining Hightile textures.<br />
<br />
{{Def table2}} {{Def table1}}<br />
<br />
=====<div {{Def link}}>undefmodel</div>=====<br />
<span {{Def element}}>undefmodel <i><tile></i></span><br /><br />
<span {{Def element}}>undefmodelrange <i><tile0> <tile1></i></span><br /><br />
<span {{Def element}}>undefmodelof <i><tile></i></span><sup>1</sup><br />
<br />
This is for undefining 3D models.<br />
<br />
With <b>undefmodelof</b> all the tiles grouped together within the same .DEF code block are un-defined.<br />
<br />
1. Support of <b>undefmodelof</b> seems to be broken at this time. Using it in your .DEF files will result in crashing upon compiling.<br />
<br />
{{Def table2}}<br />
<br />
== Misc ==<br />
<br />
{{Def table1}}<br />
<br />
=====<div {{Def link}}>animtilerange</div>=====<br />
<br />
<span {{Def element}}>animtilerange <i><tilenum1> <tilenum2> <speed value> <animation value></i></span><br />
<br />
Animates hightile textures the same way as 8 bit art does. Hightile art needs to be defined first.<br />
<br />
{{Def table2}} {{Def table1}}<br />
<br />
=====<div {{Def link}}>dummytile</div>=====<br />
<br />
<span {{Def element}}>dummytile <i><tilenum> <x-dimension> <y-dimension></i></span><br /><br />
<span {{Def element}}>dummytilerange <i><tilenum1> <tilenum2> <x-dimension> <y-dimension></i></span><br />
<br />
Used in DEF files to create a blank tile at location <b><''tilenum''></b> of the dimensions <b><''x-dimension''></b> and <b><''y-dimension''></b>. This allows the creation of placeholder tiles for use with definetexture\texture without having to edit .ART files.<br />
<br />
{{Def table2}} {{Def table1}}<br />
<br />
=====<div {{Def link}}>setuptile</div>=====<br />
<br />
<span {{Def element}}>setuptile <i><tilenum> <x-dimension> <y-dimension> <x-offset> <y-offset></i></span><br /><br />
<span {{Def element}}>setuptilerange <i><tilenum1> <tilenum2> <x-dimension> <y-dimension> <x-offset> <y-offset></i></span><br />
<br />
Used in DEF files to setup the properties which are applied to the highres replacement of the tile. This allows the creation of placeholder tiles for use with definetexture\texture without having to edit .ART files.<br />
<br />
Unlike <b>dummytile</b> this command won't draw black squares and accepts the offsets.<br />
<br />
{{Def table2}} {{Def table1}}<br />
<br />
=====<div {{Def link}}>dummytilefrompic</div>=====<br />
<br />
<span {{Def element}}>dummytilefrompic <i><tileID> <file></i></span><br />
<br />
{{Def table2}} {{Def table1}}<br />
<br />
=====<div {{Def link}}>tilefromtexture</div>=====<br />
<br />
<span {{Def element}}>tilefromtexture <i>{ ... }</i></span><br />
<br />
Used to generate an 8-bit tile from an image file.<br />
<br />
: <span {{Def subelement}}>file <i><filename></i></span><br /><br />
: <span {{Def subelement}}>name <i><filename></i></span><br />
<br />
: <span {{Def subelement}}>alphacut <i><value></i></span><br />
<br />
: <span {{Def subelement}}>xoffset <i><value></i></span><br /><br />
: <span {{Def subelement}}>xoff <i><value></i></span><br />
<br />
: <span {{Def subelement}}>yoffset <i><value></i></span><br /><br />
: <span {{Def subelement}}>yoff <i><value></i></span><br />
<br />
{{Def table2}} {{Def table1}}<br />
<br />
=====<div {{Def link}}>include</div>=====<br />
<br />
<span {{Def element}}>include <i><filename></i></span><br /><br />
<span {{Def element}}>#include <i><filename></i></span><br />
<br />
Processes the script commands in <i><filename></i> at the point of the <b>include</b> call.<br />
<br />
{{Def table2}} {{Def table1}}<br />
<br />
=====<div {{Def link}}>define</div>=====<br />
<br />
<span {{Def element}}>define <i><label> <integer-value></i></span><br /><br />
<span {{Def element}}>#define <i><label> <integer-value></i></span><br />
<br />
Declares <i><label></i> to represent the numeric value <i><integer-value></i>. <i><integer-value></i> can be a label, in which case the value of the label given is used.<br />
<br />
NOTE: You may find it convenient to include DEFS.CON (for JFDuke3D) or NAMES.H to predefine many of the tile names in the art file.<br />
<br />
{{Def table2}} {{Def table1}}<br />
<br />
=====<div {{Def link}}>loadgrp</div>=====<br />
<br />
<span {{Def element}}>loadgrp <i><.GRP\.ZIP file></i></span><br />
<br />
The DEF equivalent of the <b>/g</b> command line switch. <b>loadgrp</b> can only be used in the originating .DEF file; it is usually <b>duke3d.def</b> or the .DEF file specified by the <b>/h</b> command line switch.<br />
<br />
{{Def table2}} {{Def table1}}<br />
<br />
=====<div {{Def link}}>noautoload</div>=====<br />
<br />
<span {{Def element}}>noautoload</span><br />
<br />
Disables the autoload dir feature.<br />
<br />
{{Def table2}} {{Def table1}}<br />
<br />
=====<div {{Def link}}>cachesize</div>=====<br />
<br />
<span {{Def element}}>cachesize <i><size></i></span><br />
<br />
Specifies the size of the cache in Kb.<br />
<br />
{{Def table2}} {{Def table1}}<br />
<br />
=====<div {{Def link}}>fogpal</div>=====<br />
<br />
<span {{Def element}}>fogpal <i><palette number> <red intensity> <green intensity> <blue intensity></i></span><br />
<br />
<b>fogpal</b> defines a palette a sector-based fog effect. To use it, change the pal of your sector to the pal defined with <b>fogpal</b>.<br />
<br />
Intensities range from 0-63. Palettes 26, 27, 28 and 29 are pre-defined for you as white, red, green and blue respectively. Sector visibility controls fog density.<br />
<br />
{{Def table2}}<br />
<br />
== Mapster32 ==<br />
<br />
{{Def table1}}<br />
<br />
=====<div {{Def link}}>2dcol</div>=====<br />
<br />
<span {{Def element}}>2dcol <i><colornum> <red> <green> <blue></i></span><br />
<br />
<b>2dcol</b> is a definition of a color to be used in the 2D mode of [[Mapster32]], in conjunction with <b>spritecol</b> that works similarly to <b>tint</b> and <b>definetint</b>. <i><colornum></i> is a unique identifier, similar to [[define|defines]] and [[gamevar|gamevars]]. <i><red></i>, <i><green></i>, and <i><blue></i> are the RGB color values that are mixed together to get your custom color.<br />
<br />
Certain low values are already hard-coded, and redefining them will change colors of the default layout. If you know the correct value, you can replace the default colors used for <b>all</b> the sprites. You truly have the power to customize Mapster32. Lime green 2D mode background, anyone?<br />
<br />
{{Def table2}} {{Def table1}}<br />
<br />
=====<div {{Def link}}>spritecol</div>=====<br />
<br />
<span {{Def element}}>spritecol <i><tilenum> <normalcolornum> <blockingcolornum></i></span><br />
<br />
<b>spritecol</b> is a definition of the color a sprite will appear in 2D mode, instead of the standard sky blue and hot pink, or another special color (like yellow for hard-coded enemies or white for the [[Special_Sprite_Reference_Guide|special sprites]]). <b><''normalcolornum''></b> is the <b><''colornum''></b> of the <b>2dcol</b> definition of your color for the standard sprite color as defined by <b><''tilenum''></b>. The same goes for <b><''blockingcolornum''></b>, except that this value is for when the sprite has the first bit of [[cstat]] set (1) (<code>[']+[B]</code> keys in [[Mapster32]]), which is the blocking flag.<br />
<br />
{{Def table2}} {{Def table1}}<br />
<br />
=====<div {{Def link}}>spritehotkey</div>=====<br />
<br />
<span {{Def element}}>spritehotkey <i><key> <spriteID></i></span><br />
<br />
Pressing a key from 1 to 0 on the upper row before pressing S will make the inserted sprite's picnum change according to this definition.<br />
<br />
{{Def table2}} {{Def table1}}<br />
<br />
=====<div {{Def link}}>tilegroup</div>=====<br />
<br />
<span {{Def element}}>tilegroup <i><groupname> { ... }</i></span><br />
<br />
Defines group for tile tile selector(Press T in the tile seletor). Mapster32 loads TILES.CFG on startup.<br />
<br />
: <span {{Def subelement}}>tile <i><tilenum></i></span><br /><br />
: <span {{Def subelement}}>tilerange <i><tilenum1> <tilenum2></i></span><br /><br />
: <span {{Def subelement}}>tiles <i>{ <tile1> <tile2> ... <tileN> }</i></span><br />
<br />
: Adds tiles to the group. Names can be found in DEFS.CON.<br />
<br />
: <span {{Def subelement}}>hotkey <i><value></i></span><br />
<br />
: Specifies the hotkey for the group.<br />
<br />
: <span {{Def subelement}}>colors <i><value1> <value2></i></span><br />
<br />
: Colors are the colors for Blocking OFF and Blocking ON.<br />
<br />
{{Def table2}} {{Def table1}}<br />
<br />
=====<div {{Def link}}>alphabet</div>=====<br />
<br />
<span {{Def element}}>alphabet <i>{ ... }</i></span><br />
<br />
Defines alphabet for the input text feature(Ctrl+T). Mapster32 loads TILES.CFG on startup.<br />
<br />
: <span {{Def subelement}}>map <i><value> <tile></i></span><br />
<br />
: <span {{Def subelement}}>mapa <i><string> <tile></i></span><br />
<br />
: <span {{Def subelement}}>maprange <i><value1> <value2> <tile></i></span><br />
<br />
: <span {{Def subelement}}>maprangea <i><char1> <char2> <tile></i></span><br />
<br />
: <span {{Def subelement}}>offset <i><value> <offset></i></span><br />
<br />
: <span {{Def subelement}}>offseta <i><string> <offset></i></span><br />
<br />
{{Def table2}}<br />
<br />
== Deprecated Commands ==<br />
<br />
{{Def table1}}<br />
<br />
=====<div {{Def link}}>definetexture</div>=====<br />
<br />
<span {{Def element}}>definetexture <i><tile-number> <palette-number> <x-center> <y-center> <x-size> <y-size> <filename></i></span><br />
<br />
Defines a Hightile texture to replace an ART-file picture. <i><tile-number></i> may be an number, or a defined label. Use a value of 0 for <i><x-center></i> and <i><y-center></i> and a value of -1 for <i><x-size></i> and <i><y-size></i> for now until these values are actually used. <i><filename></i> may be any PNG, JPG, TGA, BMP, GIF or PCX file.<br />
<br />
{{Def table2}} {{Def table1}}<br />
<br />
=====<div {{Def link}}>definetint</div>=====<br />
<br />
<span {{Def element}}>definetint <i><palette-number> <red> <green> <blue> <flags></i></span><br />
<br />
Defines a Hightile texture tint to simulate palette effects normally used on ART-file tiles. <i><red></i>, <i><green></i>, and <i><blue></i> are numbers in the range 0 to 255 which specify the color the tint should look like. <i><flags></i> specifies any processing effects to use. Valid values are:<br />
<br />
0 no effects<br /><br />
1 convert to greyscale<br /><br />
2 invert colours<br /><br />
<br />
These values can be added together to produce a combination of effects.<br />
<br />
{{Def table2}} {{Def table1}}<br />
<br />
=====<div {{Def link}}>defineskybox</div>=====<br />
<br />
<span {{Def element}}>defineskybox <i><tile-number> <palette-number> <reserved> <front-face-filename> <right-face-filename> <back-face-filename> <left-face-filename> <top-face-filename> <bottom-face-filename></i></span><br />
<br />
Defines a sky-box composed of six images mapped onto the faces <br />
of a cube to be used when <i><tile-number></i> is set as parallaxing in GL Polymost mode. <i><reserved></i> should be 0 for now until its meaning is fully conceived.<br />
<br />
{{Def table2}} {{Def table1}}<br />
<br />
=====<div {{Def link}}>definemodel</div>=====<br />
<br />
<span {{Def element}}>definemodel <i><filename> <scale> <shade-offset></i></span><br />
<br />
Defines an MD2/3-format model file to replace certain sprites in the game. See <b>definemodelframe</b> and <b>definemodelanim</b> for details on how to specify the ART-file tiles to replace. <i><filename></i> is the name of the MD2/3 model. <i><scale></i> 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. <i><shade-offset></i> 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.<br />
<br />
: <span {{Def subelement}}>definemodelskin <i><palette-number> <filename></i></span><br />
<br />
: Defines a skin to be used on the model for all frames declared after this command, when the sprite palette is equal to <i><palette-number></i>. (This makes more sense when given a demonstration.) IMPORTANT: If your model exists in a subdirectory (ie. <b>definemodel</b> 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.<br />
<br />
: <span {{Def subelement}}>selectmodelskin <i><skin ID></i></span><br />
<br />
: Selects a model skin.<br />
<br />
: <span {{Def subelement}}>definemodelanim <i><start-frame> <end-frame> <frame-rate> <flags></i></span><br />
<br />
: Defines an animation from a group of frames in the model given by the last preceding <b>definemodel</b> instruction. <i><start-frame></i> and <i><end-frame></i> specify the names of the starting and ending frames of the animation. <i><frame-rate></i> is the frame rate at which the animation should play. This value can be fractional. <i><flags></i> specifies any special properties the animation should have. Valid options are:<br />
<br />
: 0 none (looping animation)<br /><br />
: 1 one-shot (plays beginning to end once and stops on the last frame)<br />
<br />
: <span {{Def subelement}}>definemodelframe <i><frame-name> <first-tile> <last-tile></i></span><br />
<br />
: Defines a range of ART-file tiles to correspond with the given frame of the model specified in the last preceding <b>definemodel</b> instruction. <i><frame-name></i> is the name of the frame, which if identical to the starting frame of a <b>definemodelanim</b> animation will play that animation. If <i><frame-name></i> is not corresponding with an animation, the replacement will be static. <i><first-tile></i> and <i><last-tile></i> specify a range of ART-file tiles which this model frame should replace.<br />
<br />
{{Def table2}} {{Def table1}}<br />
<br />
=====<div {{Def link}}>definevoxel</div>=====<br />
<br />
<span {{Def element}}>definevoxel <i><filename></i></span><br /><br />
<span {{Def element}}>definevoxeltiles <i><first-tile> <last-tile></i></span><br />
<br />
Defines a voxel to replace sprites in the game. <i><filename></i> is the name of the .KVX file containing the voxel.<br />
<br />
<b>definevoxeltiles</b> defines the range of ART-file tiles to replace with the voxel.<br />
<br />
{{Def table2}} {{Def table1}}<br />
<br />
=====<div {{Def link}}>alphahack</div>=====<br />
<br />
<span {{Def element}}>alphahack <i><tilenum> <value></i></span><br /><br />
<span {{Def element}}>alphahackrange <i><tilenum1> <tilenum2> <value></i></span><br /><br />
<br />
<b>alphahack</b> is a deprecated command to improve alpha filtering of highres art of <i><tilenum></i>. <i><value></i> is always -1.<br />
<br />
{{Def table2}}<br />
<br />
[[Category:All commands]]</div>Dr. Kylstienhttps://wiki.eduke32.com/w/index.php?title=DEF_Language&diff=8651DEF Language2009-10-14T17:03:12Z<p>Dr. Kylstien: /* music */</p>
<hr />
<div>== Definitions ==<br />
<br />
New to JFDuke3D\EDuke32 are DEF files. These parsed scripts allow redefinition of flat, Hightile textures, 3D models, miscellaneous settings, and, possibly, in the future, higher-quality sounds and music, and enhanced cutscenes.<br />
<br />
Comments can be used by prefixing the text with a double forward-slash (C++ style), <code>//</code>, or surrounding the text with <code>/* (comment here) */</code> (C style).<br />
<br />
__TOC__<br />
{{Def table1}}<br />
<br />
=====<div {{Def link}}>texture</div>=====<br />
<span {{Def element}}>texture <i><tilenum> { ... }</i></span><br />
<br />
Defines a Hightile texture to replace an ART-file tile. <i><tilenum></i> may be a number, or a defined label.<br />
<br />
Example:<br />
<br />
texture 3586 {<br />
pal 0 { file "mymod/tree.png" }<br />
pal 21 { file "mymod/tree_red.png" xscale 2.0 yscale 2.0 alphacut 0 nodownsize nocompress }<br />
glow { file "mymod/tree_light.png" }<br />
detail { file "mymod/plant_texture.png" scale 0.5 }<br />
}<br />
<br />
The brace-enclosed block may contain these instructions:<br />
<br />
: <span {{Def subelement}}>pal <i><palnum> { ... }</i></span><br />
<br />
: Replaces the palette <i><palnum></i>. If a palette has no pal definition palette 0 definition will be used. Tint will not be used on palettes defined with this instruction.<br />
<br />
: The brace-enclosed block may contain these instructions:<br />
<br />
:: <span {{Def subelement}}>file <i><filename></i></span> (or <span {{Def subelement}}>name <i><filename></i></span>)<br />
<br />
:: Defines which texture file to use. File may be any PNG, JPG, TGA, BMP, GIF or PCX file. This instruction must be supplied.<br />
<br />
:: <span {{Def subelement}}>alphacut <i><cutoff-value></i></span><br />
<br />
:: Sets the level of transparency at which a pixel in the texture is considered opaque. Pixels with more transparency than the cut-off are not drawn to the screen when rendered. The default setting is 0.32, which is just below the 33% transparency level of Build. If your texture has areas that are more transparent than the default, you can lower the cut-off level to preserve that detail.<br />
<br />
:: <span {{Def subelement}}>nocompress</span><br />
<br />
:: Prevents the texture from being compressed using S3TC if texture compression is enabled.<br />
<br />
:: <span {{Def subelement}}>nodownsize</span><br />
<br />
:: Prevents the texture from being downsized.<br />
<br />
:: <span {{Def subelement}}>xscale <i><value></i></span><br /><br />
:: <span {{Def subelement}}>yscale <i><value></i></span><br />
<br />
:: Sets the scale of the hightile texture in relation to the original texture. A <i><value></i> of 1.0 makes it the same size, higher makes it cover more then the original tile and smaller makes it cover a smaller area. <b>xscale</b> (aka <b>scale</b>, <b>detailscale</b>, <b>intensity</b>) sets the horizontal scale and <b>yscale</b> sets the vertical scale.<br />
<br />
: <span {{Def subelement}}>detail <i>{ ... }</i></span><br />
<br />
: Defines a [[Detail_mapping|detail texture]] for the texture. The brace-enclosed block may contain these instructions:<br />
<br />
:: <span {{Def subelement}}>file <i><filename></i></span><br />
<br />
:: Specifies which detail texture file to use. File may be any PNG, JPG, TGA, BMP, GIF or PCX file. This instruction must be supplied.<br />
<br />
:: <span {{Def subelement}}>scale <i><value></i></span><br />
<br />
:: <i><value></i> is a positive floating-point value that'll determine how much your detail map should repeat on your diffuse map (if you want your detail map to repeat five times, use a 1/5 scale : 0.2).<br />
<br />
: <span {{Def subelement}}>glow <i>{ ... }</i></span><br />
<br />
: Defines a [[Glow_mapping|glow map]] for the texture. The brace-enclosed block may contain these instructions:<br />
<br />
:: <span {{Def subelement}}>file <i><filename></i></span><br />
<br />
:: Specifies which glow map file to use. This instruction must be supplied.<br />
<br />
{{Def table2}} {{Def table1}}<br />
<br />
=====<div {{Def link}}>tint</div>=====<br />
<span {{Def element}}>tint <i>{ ... }</i></span><br />
<br />
Defines a Hightile texture tint to simulate palette effects normally used on ART-file tiles.<br />
<br />
Example:<br />
<br />
tint { pal 1 red 127 green 127 blue 255 flags 0 }<br />
tint { pal 2 green 127 blue 127 }<br />
<br />
The brace-enclosed block may contain these instructions:<br />
<br />
: <span {{Def subelement}}>pal <i><palnum></i></span><br />
<br />
: The palette number the tint applies to.<br />
<br />
: <span {{Def subelement}}>red <i><value></i></span> (or <span {{Def subelement}}>r <i><value></i></span>)<br /><br />
: <span {{Def subelement}}>green <i><value></i></span> (or <span {{Def subelement}}>g <i><value></i></span>)<br /><br />
: <span {{Def subelement}}>blue <i><value></i></span> (or <span {{Def subelement}}>b <i><value></i></span>)<br />
<br />
: Specifies a color component value, in the range of 0 to 255. Unspecified components are assumed to be 255 and any out of range values are clamped to the maximum or minimum as appropriate.<br />
<br />
: <span {{Def subelement}}>flags <i><flags></i></span><br />
<br />
: Specifies any special processing effects to use for the tint. The value of flags may be the sum of any of these values:<br />
<br />
: 0 = no effects<br /><br />
: 1 = convert to greyscale<br /><br />
: 2 = invert colors<br />
<br />
{{Def table2}} {{Def table1}}<br />
<br />
=====<div {{Def link}}>skybox</div>=====<br />
<br />
<span {{Def element}}>skybox <i>{ ... }</i></span><br />
<br />
Defines a skybox that overrides a parallaxing floor or ceiling in OpenGL Polymost rendering mode.<br />
<br />
Example:<br />
skybox {<br />
tile 3586 pal 0<br />
front "mymod/sky_1.png" nocompress <br />
right "mymod/sky_2.png" nocompress <br />
back "mymod/sky_3.png" nocompress<br />
left "mymod/sky_4.png" nocompress <br />
top "mymod/sky_5.png" nocompress<br />
down "mymod/sky_6.png" nocompress<br />
}<br />
<br />
The brace-enclosed block may contain these instructions:<br />
<br />
: <span {{Def subelement}}>tile <i><tilenum></i></span><br />
<br />
: Specifies the ART file tile to override.<br />
<br />
: <span {{Def subelement}}>pal <i><palnum></i></span><br />
<br />
: Specifies the palette number the skybox should happen for.<br />
<br />
: <span {{Def subelement}}>front <i><filename></i></span> (or <span {{Def subelement}}>Front</span> / <span {{Def subelement}}>ft</span> / <span {{Def subelement}}>forward</span>)<br /><br />
: <span {{Def subelement}}>right <i><filename></i></span> (or <span {{Def subelement}}>rt</span> / <span {{Def subelement}}>right</span>)<br /><br />
: <span {{Def subelement}}>back <i><filename></i></span> (or <span {{Def subelement}}>bk</span> / <span {{Def subelement}}>back</span>)<br /><br />
: <span {{Def subelement}}>left <i><filename></i></span> (or <span {{Def subelement}}>lf</span> / <span {{Def subelement}}>left</span>) / <span {{Def subelement}}>lt</span>)<br /><br />
: <span {{Def subelement}}>top <i><filename></i></span> (or <span {{Def subelement}}>up</span> / <span {{Def subelement}}>top</span> / <span {{Def subelement}}>ceiling</span> / <span {{Def subelement}}>ceil</span>)<br /><br />
: <span {{Def subelement}}>down <i><filename></i></span> (or <span {{Def subelement}}>dn</span> / <span {{Def subelement}}>bottom</span> / <span {{Def subelement}}>floor</span> / <span {{Def subelement}}>down</span>)<br />
<br />
: Defines a single face of the skybox where facename may be any of these keywords appropriate for the face in question:<br />
<br />
: NOTE: All six faces are required to be specified.<br />
<br />
{{Def table2}} {{Def table1}}<br />
<br />
=====<div {{Def link}}>model</div>=====<br />
<br />
<span {{Def element}}>model <i><filename> { ... }</i></span><br />
<br />
Defines a model to replace certain sprites in the game when running in OpenGL Polymost mode. <i><filename></i> is the model file in md2 or md3 format.<br />
<br />
Note: md2 is considered deprecated.<br />
<br />
The brace-enclosed block may contain these instructions:<br />
<br />
: <span {{Def subelement}}>scale <i><value></i></span><br />
<br />
: <i><value></i> 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.<br />
<br />
: <span {{Def subelement}}>shade <i><shade-offset></i></span><br />
<br />
: <i><shade-offset></i> 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.<br />
<br />
: <span {{Def subelement}}>zadd <i><offset></i></span><br />
<br />
: <i><offset></i> is a (possibly fractional) value specifying a height offset for the model. Quake models are aligned in the center while Build models are aligned at the floor. Using this command will allow Build to use Quake models without modification to the MD2/3 file itself.<br />
<br />
: <span {{Def subelement}}>flags <i><flags></i></span><br />
<br />
: Specifies any special properties the model should have, the values of which should be added together to combine multiple options.<br />
: 0: default value<br /><br />
: 1: Prevents the the model from being affected by the tints.<br /><br />
<br />
: <span {{Def subelement}}>skin <i>{ ... }</i></span><br />
<br />
: Defines a skin to be used on the model for all frames declared after this command. The brace-enclosed block may contain these instructions:<br />
<br />
:: <span {{Def subelement}}>pal <i><palnum></i></span><br />
<br />
:: Specifies which palette this skin maps to.<br />
<br />
:: <span {{Def subelement}}>surface <i><surfnum></i></span><br />
<br />
:: Specifies which MD3 surface this skin should be applied to. This has no significance for MD2 models.<br />
<br />
:: <span {{Def subelement}}>file <i><filename></i></span><br />
<br />
:: Specifies the texture file to use for the skin. File may be any PNG, JPG, TGA, BMP, GIF or PCX file<br />
<br />
:: IMPORTANT: If your model exists in a subdirectory (ie. the model filename 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.<br />
<br />
: <span {{Def subelement}}>anim <i>{ ... }</i></span><br />
<br />
: Defines an animation from a group of frames in the model. The brace-enclosed block may contain these instructions:<br />
<br />
:: <span {{Def subelement}}>frame0 <i><framename></i></span><br /><br />
:: <span {{Def subelement}}>frame1 <i><framename></i></span><br />
<br />
:: Specifies the names of the start (<b>frame0</b>) and end (<b>frame1</b>) frames of the animation.<br />
<br />
:: <span {{Def subelement}}>fps <i><fps></i></span><br />
<br />
:: Specifies the frame rate at which the animation should play. This value may be fractional.<br />
<br />
:: <span {{Def subelement}}>flags <i><flags></i></span><br />
<br />
:: Specifies any special properties the animation should have, the values of which should be added together to combine multiple options.<br />
<br />
:: Valid options are:<br />
:: 0 none (looping animation)<br /><br />
:: 1 one-shot (plays beginning to end once and stops on the last frame).<br />
<br />
: <span {{Def subelement}}>frame <i>{ ... }</i></span><br />
<br />
: Defines a range of ART-file tiles to correspond with the given frame/animation of the model. The brace-enclosed block may contain these instructions:<br />
<br />
:: <span {{Def subelement}}>name <i><framename></i></span><br /><br />
:: <span {{Def subelement}}>frame <i><framename></i></span><br />
<br />
:: If <i><framename></i> is identical to the starting frame of an animation, the engine will play that animation, otherwise the replacement will be static. You can choose to use the <b>frame</b> or <b>name</b> versions of this instruction as both are identical.<br />
<br />
:: <span {{Def subelement}}>tile <i><tilenum></i></span><br /><br />
:: <span {{Def subelement}}>tile0 <i><tilenum></i></span><br /><br />
:: <span {{Def subelement}}>tile1 <i><tilenum></i></span><br />
<br />
:: Use the tile instruction to specify an ART-file tile which this model should replace. Use the <b>tile0</b> and <b>tile1</b> instructions together to specify a range of ART-file tiles. If you use <b>tile0</b>, you must also have a <b>tile1</b>. You may not use the same instruction twice to specify multiple ranges.<br />
<br />
:: <span {{Def subelement}}>smoothduration <i><value></i></span><br />
<br />
:: If smoothduration is non-zero switching from another animation to the one defined by that frame block will trigger an intermediary animation smoothing state of duration <i><value></i> seconds.<br />
<br />
:: <span {{Def subelement}}>pal <i><value></i></span><br />
<br />
:: Makes the model definition exclusive for the this pal. This allow to assign different models for different pal.<br />
<br />
: <span {{Def subelement}}>hud <i>{ ... }</i></span><br />
<br />
: Defines a range of ART-file tiles to use with a heads-up-display. The brace-enclosed block may contain these instructions:<br />
<br />
:: <span {{Def subelement}}>tile <i><tilenum></i></span><br /><br />
:: <span {{Def subelement}}>tile0 <i><tilenum></i></span><br /><br />
:: <span {{Def subelement}}>tile1 <i><tilenum></i></span><br />
<br />
:: <b>tile0</b> and <b>tile1</b> together specify a range of ART-file tiles which this model frame should replace when rendered as part of the HUD. You can specify individual tiles using a single tile command.<br />
<br />
:: <span {{Def subelement}}>xadd <i><offset></i></span><br /><br />
:: <span {{Def subelement}}>yadd <i><offset></i></span><br /><br />
:: <span {{Def subelement}}>zadd <i><offset></i></span><br /><br />
:: <span {{Def subelement}}>angadd <i><offset></i></span><br />
<br />
:: Use these offsets to fine-tune the location of the model placement. <b>xadd</b>, <b>yadd</b>, and <b>zadd</b> are position offsets relative to the viewer's orienation. You can use floating point values with them. <b>angadd</b> is a Build angle offset. (512 90 degrees, 1024 180 degrees, etc...).<br />
<br />
:: <span {{Def subelement}}>hide</span><br />
<br />
:: Some weapons use multiple ART tiles for constructing the gun or animation. Use this option to hide parts that you don't need in your replacement.<br />
<br />
:: <span {{Def subelement}}>nobob</span><br />
<br />
:: By default, the HUD model offset is affected by the player bobbing offset when the player is walking. Use this option to disable that.<br />
<br />
:: <span {{Def subelement}}>flipped</span><br />
<br />
:: Use this option to apply the settings inside the hud block only if the object is normally rendered x-flipped (mirror image). Some weapons, such as the devastator, are rendered in 2 pieces, the left devastator is actually a mirror image of the right.<br />
<br />
:: <span {{Def subelement}}>nodepth</span><br />
<br />
:: Use this to render a HUD model without the use of the depth buffer. Normally, you should avoid this. The one exception where this is useful is for the spinning nuke menu pointer because it should always be in front - and it just happens to be convex ... which is the one case that is safe with the depth buffer disabled … a rather fortunate coincidence. [[Image:Smile.gif]]<br />
<br />
: <span {{Def subelement}}>detail <i>{ ... }</i></span><br />
<br />
: Defines a [[Detail_mapping|detail texture]] for the model. The brace-enclosed block may contain these instructions:<br />
<br />
:: <span {{Def subelement}}>file <i><filename></i></span><br />
<br />
:: Specifies which detail texture file to use. File may be any PNG, JPG, TGA, BMP, GIF or PCX file. This instruction must be supplied.<br />
<br />
:: <span {{Def subelement}}>scale <i><value></i></span><br />
<br />
:: <i><value></i> is a positive floating-point value that'll determine how much your detail map should repeat on your diffuse map (if you want your detail map to repeat five times, use a 1/5 scale : 0.2).<br />
<br />
:: <span {{Def subelement}}>surface <i><surfnum></i></span><br />
<br />
:: Specifies which MD3 surface this detail texture should be applied to. This has no significance for MD2 models.<br />
<br />
: <span {{Def subelement}}>glow <i>{ ... }</i></span><br />
<br />
: Defines a [[Glow_mapping|glow map]] for the model. The brace-enclosed block may contain these instructions:<br />
<br />
:: <span {{Def subelement}}>file <i><filename></i></span><br />
<br />
:: Specifies which glow map file to use. This instruction must be supplied.<br />
<br />
:: <span {{Def subelement}}>surface <i><surfnum></i></span><br />
<br />
:: Specifies which MD3 surface this glow map should be applied to. This has no significance for MD2 models.<br />
<br />
{{Def table2}} {{Def table1}}<br />
<br />
=====<div {{Def link}}>voxel</div>=====<br />
<br />
<span {{Def element}}>voxel <i><filename> { ... }</i></span><br />
<br />
Defines a voxel to replace sprites. filename is the name of the .KVX file containing the voxel. The brace-enclosed block may contain these instructions:<br />
<br />
: <span {{Def subelement}}>tile <i><tilenum></i></span><br /><br />
: <span {{Def subelement}}>tile0 <i><tilenum></i></span><br /><br />
: <span {{Def subelement}}>tile1 <i><tilenum></i></span><br />
<br />
: Use these instructions to map tiles that should be rendered as a voxels. Use <b>tile</b> to map a single tile to be rendered as voxels and <b>tile0</b>, <b>tile1</b> together define a range of tiles to be rendered as voxels. The <b>tile0</b> instruction should appear before the <b>tile1</b> instruction to define a correct range.<br />
<br />
: <span {{Def subelement}}>scale <i><value></i></span><br />
<br />
: <i><value></i> is a (possibly fractional) value specifying a scaling factor for the voxelmodel when it is rendered, eg. 1.5 for one-and-a-half times as big.<br />
<br />
{{Def table2}} {{Def table1}}<br />
<br />
=====<div {{Def link}}>music</div>=====<br />
<span {{Def element}}>music <i>{ ... }</i></span><br />
<br />
Example:<br />
music { id "E1L1" file "stalker1.ogg" }<br />
music { id "Intro" file "grabbag.ogg" }<br />
music { id "Briefing" file "briefing.ogg" }<br />
music { id "Loading" file "bonus.ogg" }<br />
<br />
: <span {{Def subelement}}>id <i><value></i></span><br />
<br />
: <i><value></i> is "Intro", "Briefing", "Loading" or "E'''x'''L'''y'''"(where x is the episode and y is the level).<br /><br />
<br />
: <span {{Def subelement}}>file <i><filename></i></span><br />
<br />
: Specifies which music file to use. File types: MID, OGG<br />
<br />
{{Def table2}} {{Def table1}}<br />
<br />
=====<div {{Def link}}>sound</div>=====<br />
<span {{Def element}}>sound <i><tilenum> { ... }</i></span><br />
<br />
Example:<br />
sound { id "249" file "bonus.ogg" }<br />
<br />
: <span {{Def subelement}}>id <i><value></i></span><br />
<br />
: Specifies the ID of sound. The ID can be found in DEFS.CON.<br />
<br />
: <span {{Def subelement}}>file <i><filename></i></span><br />
<br />
: Specifies which music file to use. File types: WAV, VOC, OGG<br />
<br />
{{Def table2}}<br />
<br />
== Un-Definitions ==<br />
<br />
The main use for these is for cases in which the .ART files are somewhat different, and you want to ensure compatibility for the new art without new textures or models. A good example of this is [http://hendricks266.duke4.net/nw_plus.html Duke: Nuclear Winter Plus] by [[User:Hendricks 266|Hendricks266]]. (see undef.def)<br />
<br />
{{Def table1}}<br />
<br />
=====<div {{Def link}}>undeftexture</div>=====<br />
<span {{Def element}}>undeftexture <i><tile></i></span><br /><br />
<span {{Def element}}>undeftexturerange <i><tile0> <tile1></i></span><br />
<br />
This is for undefining Hightile textures.<br />
<br />
{{Def table2}} {{Def table1}}<br />
<br />
=====<div {{Def link}}>undefmodel</div>=====<br />
<span {{Def element}}>undefmodel <i><tile></i></span><br /><br />
<span {{Def element}}>undefmodelrange <i><tile0> <tile1></i></span><br /><br />
<span {{Def element}}>undefmodelof <i><tile></i></span><sup>1</sup><br />
<br />
This is for undefining 3D models.<br />
<br />
With <b>undefmodelof</b> all the tiles grouped together within the same .DEF code block are un-defined.<br />
<br />
1. Support of <b>undefmodelof</b> seems to be broken at this time. Using it in your .DEF files will result in crashing upon compiling.<br />
<br />
{{Def table2}}<br />
<br />
== Misc ==<br />
<br />
{{Def table1}}<br />
<br />
=====<div {{Def link}}>animtilerange</div>=====<br />
<br />
<span {{Def element}}>animtilerange <i><tilenum1> <tilenum2> <speed value> <animation value></i></span><br />
<br />
Animates hightile textures the same way as 8 bit art does. Hightile art needs to be defined first.<br />
<br />
{{Def table2}} {{Def table1}}<br />
<br />
=====<div {{Def link}}>dummytile</div>=====<br />
<br />
<span {{Def element}}>dummytile <i><tilenum> <x-dimension> <y-dimension></i></span><br /><br />
<span {{Def element}}>dummytilerange <i><tilenum1> <tilenum2> <x-dimension> <y-dimension></i></span><br />
<br />
Used in DEF files to create a blank tile at location <b><''tilenum''></b> of the dimensions <b><''x-dimension''></b> and <b><''y-dimension''></b>. This allows the creation of placeholder tiles for use with definetexture\texture without having to edit .ART files.<br />
<br />
{{Def table2}} {{Def table1}}<br />
<br />
=====<div {{Def link}}>setuptile</div>=====<br />
<br />
<span {{Def element}}>setuptile <i><tilenum> <x-dimension> <y-dimension> <x-offset> <y-offset></i></span><br /><br />
<span {{Def element}}>setuptilerange <i><tilenum1> <tilenum2> <x-dimension> <y-dimension> <x-offset> <y-offset></i></span><br />
<br />
Used in DEF files to setup the properties which are applied to the highres replacement of the tile. This allows the creation of placeholder tiles for use with definetexture\texture without having to edit .ART files.<br />
<br />
Unlike <b>dummytile</b> this command won't draw black squares and accepts the offsets.<br />
<br />
{{Def table2}} {{Def table1}}<br />
<br />
=====<div {{Def link}}>dummytilefrompic</div>=====<br />
<br />
<span {{Def element}}>dummytilefrompic <i><tileID> <file></i></span><br />
<br />
{{Def table2}} {{Def table1}}<br />
<br />
=====<div {{Def link}}>tilefromtexture</div>=====<br />
<br />
<span {{Def element}}>tilefromtexture <i>{ ... }</i></span><br />
<br />
Used to generate an 8-bit tile from an image file.<br />
<br />
: <span {{Def subelement}}>file <i><filename></i></span><br /><br />
: <span {{Def subelement}}>name <i><filename></i></span><br />
<br />
: <span {{Def subelement}}>alphacut <i><value></i></span><br />
<br />
: <span {{Def subelement}}>xoffset <i><value></i></span><br /><br />
: <span {{Def subelement}}>xoff <i><value></i></span><br />
<br />
: <span {{Def subelement}}>yoffset <i><value></i></span><br /><br />
: <span {{Def subelement}}>yoff <i><value></i></span><br />
<br />
{{Def table2}} {{Def table1}}<br />
<br />
=====<div {{Def link}}>include</div>=====<br />
<br />
<span {{Def element}}>include <i><filename></i></span><br /><br />
<span {{Def element}}>#include <i><filename></i></span><br />
<br />
Processes the script commands in <i><filename></i> at the point of the <b>include</b> call.<br />
<br />
{{Def table2}} {{Def table1}}<br />
<br />
=====<div {{Def link}}>define</div>=====<br />
<br />
<span {{Def element}}>define <i><label> <integer-value></i></span><br /><br />
<span {{Def element}}>#define <i><label> <integer-value></i></span><br />
<br />
Declares <i><label></i> to represent the numeric value <i><integer-value></i>. <i><integer-value></i> can be a label, in which case the value of the label given is used.<br />
<br />
NOTE: You may find it convenient to include DEFS.CON (for JFDuke3D) or NAMES.H to predefine many of the tile names in the art file.<br />
<br />
{{Def table2}} {{Def table1}}<br />
<br />
=====<div {{Def link}}>loadgrp</div>=====<br />
<br />
<span {{Def element}}>loadgrp <i><.GRP\.ZIP file></i></span><br />
<br />
The DEF equivalent of the <b>/g</b> command line switch. <b>loadgrp</b> can only be used in the originating .DEF file; it is usually <b>duke3d.def</b> or the .DEF file specified by the <b>/h</b> command line switch.<br />
<br />
{{Def table2}} {{Def table1}}<br />
<br />
=====<div {{Def link}}>noautoload</div>=====<br />
<br />
<span {{Def element}}>noautoload</span><br />
<br />
Disables the autoload dir feature.<br />
<br />
{{Def table2}} {{Def table1}}<br />
<br />
=====<div {{Def link}}>cachesize</div>=====<br />
<br />
<span {{Def element}}>cachesize <i><size></i></span><br />
<br />
Specifies the size of the cache in Kb.<br />
<br />
{{Def table2}} {{Def table1}}<br />
<br />
=====<div {{Def link}}>fogpal</div>=====<br />
<br />
<span {{Def element}}>fogpal <i><palette number> <red intensity> <green intensity> <blue intensity></i></span><br />
<br />
<b>fogpal</b> defines a palette a sector-based fog effect. To use it, change the pal of your sector to the pal defined with <b>fogpal</b>.<br />
<br />
Intensities range from 0-63. Palettes 26, 27, 28 and 29 are pre-defined for you as white, red, green and blue respectively. Sector visibility controls fog density.<br />
<br />
{{Def table2}}<br />
<br />
== Mapster32 ==<br />
<br />
{{Def table1}}<br />
<br />
=====<div {{Def link}}>2dcol</div>=====<br />
<br />
<span {{Def element}}>2dcol <i><colornum> <red> <green> <blue></i></span><br />
<br />
<b>2dcol</b> is a definition of a color to be used in the 2D mode of [[Mapster32]], in conjunction with <b>spritecol</b> that works similarly to <b>tint</b> and <b>definetint</b>. <i><colornum></i> is a unique identifier, similar to [[define|defines]] and [[gamevar|gamevars]]. <i><red></i>, <i><green></i>, and <i><blue></i> are the RGB color values that are mixed together to get your custom color.<br />
<br />
Certain low values are already hard-coded, and redefining them will change colors of the default layout. If you know the correct value, you can replace the default colors used for <b>all</b> the sprites. You truly have the power to customize Mapster32. Lime green 2D mode background, anyone?<br />
<br />
{{Def table2}} {{Def table1}}<br />
<br />
=====<div {{Def link}}>spritecol</div>=====<br />
<br />
<span {{Def element}}>spritecol <i><tilenum> <normalcolornum> <blockingcolornum></i></span><br />
<br />
<b>spritecol</b> is a definition of the color a sprite will appear in 2D mode, instead of the standard sky blue and hot pink, or another special color (like yellow for hard-coded enemies or white for the [[Special_Sprite_Reference_Guide|special sprites]]). <b><''normalcolornum''></b> is the <b><''colornum''></b> of the <b>2dcol</b> definition of your color for the standard sprite color as defined by <b><''tilenum''></b>. The same goes for <b><''blockingcolornum''></b>, except that this value is for when the sprite has the first bit of [[cstat]] set (1) (<code>[']+[B]</code> keys in [[Mapster32]]), which is the blocking flag.<br />
<br />
{{Def table2}} {{Def table1}}<br />
<br />
=====<div {{Def link}}>spritehotkey</div>=====<br />
<br />
<span {{Def element}}>spritehotkey <i><key> <spriteID></i></span><br />
<br />
Pressing a key from 1 to 0 on the upper row before pressing S will make the inserted sprite's picnum change according to this definition.<br />
<br />
{{Def table2}} {{Def table1}}<br />
<br />
=====<div {{Def link}}>tilegroup</div>=====<br />
<br />
<span {{Def element}}>tilegroup <i><groupname> { ... }</i></span><br />
<br />
Defines group for tile tile selector(Press T in the tile seletor). Mapster32 loads TILES.CFG on startup.<br />
<br />
: <span {{Def subelement}}>tile <i><tilenum></i></span><br /><br />
: <span {{Def subelement}}>tilerange <i><tilenum1> <tilenum2></i></span><br /><br />
: <span {{Def subelement}}>tiles <i>{ <tile1> <tile2> ... <tileN> }</i></span><br />
<br />
: Adds tiles to the group. Names can be found in DEFS.CON.<br />
<br />
: <span {{Def subelement}}>hotkey <i><value></i></span><br />
<br />
: Specifies the hotkey for the group.<br />
<br />
: <span {{Def subelement}}>colors <i><value1> <value2></i></span><br />
<br />
: Colors are the colors for Blocking OFF and Blocking ON.<br />
<br />
{{Def table2}} {{Def table1}}<br />
<br />
=====<div {{Def link}}>alphabet</div>=====<br />
<br />
<span {{Def element}}>alphabet <i>{ ... }</i></span><br />
<br />
Defines alphabet for the input text feature(Ctrl+T). Mapster32 loads TILES.CFG on startup.<br />
<br />
: <span {{Def subelement}}>map <i><value> <tile></i></span><br />
<br />
: <span {{Def subelement}}>mapa <i><string> <tile></i></span><br />
<br />
: <span {{Def subelement}}>maprange <i><value1> <value2> <tile></i></span><br />
<br />
: <span {{Def subelement}}>maprangea <i><char1> <char2> <tile></i></span><br />
<br />
: <span {{Def subelement}}>offset <i><value> <offset></i></span><br />
<br />
: <span {{Def subelement}}>offseta <i><string> <offset></i></span><br />
<br />
{{Def table2}}<br />
<br />
== Deprecated Commands ==<br />
<br />
{{Def table1}}<br />
<br />
=====<div {{Def link}}>definetexture</div>=====<br />
<br />
<span {{Def element}}>definetexture <i><tile-number> <palette-number> <x-center> <y-center> <x-size> <y-size> <filename></i></span><br />
<br />
Defines a Hightile texture to replace an ART-file picture. <i><tile-number></i> may be an number, or a defined label. Use a value of 0 for <i><x-center></i> and <i><y-center></i> and a value of -1 for <i><x-size></i> and <i><y-size></i> for now until these values are actually used. <i><filename></i> may be any PNG, JPG, TGA, BMP, GIF or PCX file.<br />
<br />
{{Def table2}} {{Def table1}}<br />
<br />
=====<div {{Def link}}>definetint</div>=====<br />
<br />
<span {{Def element}}>definetint <i><palette-number> <red> <green> <blue> <flags></i></span><br />
<br />
Defines a Hightile texture tint to simulate palette effects normally used on ART-file tiles. <i><red></i>, <i><green></i>, and <i><blue></i> are numbers in the range 0 to 255 which specify the color the tint should look like. <i><flags></i> specifies any processing effects to use. Valid values are:<br />
<br />
0 no effects<br /><br />
1 convert to greyscale<br /><br />
2 invert colours<br /><br />
<br />
These values can be added together to produce a combination of effects.<br />
<br />
{{Def table2}} {{Def table1}}<br />
<br />
=====<div {{Def link}}>defineskybox</div>=====<br />
<br />
<span {{Def element}}>defineskybox <i><tile-number> <palette-number> <reserved> <front-face-filename> <right-face-filename> <back-face-filename> <left-face-filename> <top-face-filename> <bottom-face-filename></i></span><br />
<br />
Defines a sky-box composed of six images mapped onto the faces <br />
of a cube to be used when <i><tile-number></i> is set as parallaxing in GL Polymost mode. <i><reserved></i> should be 0 for now until its meaning is fully conceived.<br />
<br />
{{Def table2}} {{Def table1}}<br />
<br />
=====<div {{Def link}}>definemodel</div>=====<br />
<br />
<span {{Def element}}>definemodel <i><filename> <scale> <shade-offset></i></span><br />
<br />
Defines an MD2/3-format model file to replace certain sprites in the game. See <b>definemodelframe</b> and <b>definemodelanim</b> for details on how to specify the ART-file tiles to replace. <i><filename></i> is the name of the MD2/3 model. <i><scale></i> 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. <i><shade-offset></i> 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.<br />
<br />
: <span {{Def subelement}}>definemodelskin <i><palette-number> <filename></i></span><br />
<br />
: Defines a skin to be used on the model for all frames declared after this command, when the sprite palette is equal to <i><palette-number></i>. (This makes more sense when given a demonstration.) IMPORTANT: If your model exists in a subdirectory (ie. <b>definemodel</b> 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.<br />
<br />
: <span {{Def subelement}}>selectmodelskin <i><skin ID></i></span><br />
<br />
: Selects a model skin.<br />
<br />
: <span {{Def subelement}}>definemodelanim <i><start-frame> <end-frame> <frame-rate> <flags></i></span><br />
<br />
: Defines an animation from a group of frames in the model given by the last preceding <b>definemodel</b> instruction. <i><start-frame></i> and <i><end-frame></i> specify the names of the starting and ending frames of the animation. <i><frame-rate></i> is the frame rate at which the animation should play. This value can be fractional. <i><flags></i> specifies any special properties the animation should have. Valid options are:<br />
<br />
: 0 none (looping animation)<br /><br />
: 1 one-shot (plays beginning to end once and stops on the last frame)<br />
<br />
: <span {{Def subelement}}>definemodelframe <i><frame-name> <first-tile> <last-tile></i></span><br />
<br />
: Defines a range of ART-file tiles to correspond with the given frame of the model specified in the last preceding <b>definemodel</b> instruction. <i><frame-name></i> is the name of the frame, which if identical to the starting frame of a <b>definemodelanim</b> animation will play that animation. If <i><frame-name></i> is not corresponding with an animation, the replacement will be static. <i><first-tile></i> and <i><last-tile></i> specify a range of ART-file tiles which this model frame should replace.<br />
<br />
{{Def table2}} {{Def table1}}<br />
<br />
=====<div {{Def link}}>definevoxel</div>=====<br />
<br />
<span {{Def element}}>definevoxel <i><filename></i></span><br /><br />
<span {{Def element}}>definevoxeltiles <i><first-tile> <last-tile></i></span><br />
<br />
Defines a voxel to replace sprites in the game. <i><filename></i> is the name of the .KVX file containing the voxel.<br />
<br />
<b>definevoxeltiles</b> defines the range of ART-file tiles to replace with the voxel.<br />
<br />
{{Def table2}} {{Def table1}}<br />
<br />
=====<div {{Def link}}>alphahack</div>=====<br />
<br />
<span {{Def element}}>alphahack <i><tilenum> <value></i></span><br /><br />
<span {{Def element}}>alphahackrange <i><tilenum1> <tilenum2> <value></i></span><br /><br />
<br />
<b>alphahack</b> is a deprecated command to improve alpha filtering of highres art of <i><tilenum></i>. <i><value></i> is always -1.<br />
<br />
{{Def table2}}<br />
<br />
[[Category:All commands]]</div>Dr. Kylstienhttps://wiki.eduke32.com/w/index.php?title=DEF_Language&diff=8566DEF Language2009-10-10T20:16:36Z<p>Dr. Kylstien: /* tilefromtexture */</p>
<hr />
<div>New to JFDuke3D\EDuke32 are DEF files. These parsed scripts allow redefinition of flat, Hightile textures, 3D models, miscellaneous settings, and, possibly, in the future, higher-quality sounds and music, and enhanced cutscenes.<br />
<br />
Comments can be used by prefixing the text with a double forward-slash (C++ style), <code>//</code>, or surrounding the text with <code>/* (comment here) */</code> (C style).<br />
<br />
<div class="floatleft">__TOC__</div><br />
<br />
== Definitions ==<br />
<br />
=== texture ===<br />
<br />
'''texture''' '''''<tilenum> { ... }'''''<br />
<br />
Defines a Hightile texture to replace an ART-file tile. '''''<tilenum>''''' may be a number, or a defined label.<br />
<br />
The brace-enclosed block may contain these instructions:<br />
<br />
==== pal ====<br />
<br />
'''pal''' '''''<palnum> { ... }'''''<br />
<br />
Replaces the palette '''''<palnum>'''''. If a palette has no pal definition palette 0 definition will be used. Tint will not be used on palettes defined with this instruction.<br />
<br />
The brace-enclosed block may contain these instructions:<br />
<br />
===== file =====<br />
<br />
'''file''' '''''<filename>'''''<br><br />
'''name''' '''''<filename>'''''<br />
<br />
Defines which texture file to use. File may be any PNG, JPG, TGA, BMP, GIF or PCX file. This instruction must be supplied.<br />
<br />
===== alphacut =====<br />
<br />
'''alphacut''' '''''<cutoff-value>'''''<br />
<br />
Sets the level of transparency at which a pixel in the texture is considered opaque. Pixels with more transparency than the cut-off are not drawn to the screen when rendered. The default setting is 0.32, which is just below the 33% transparency level of Build. If your texture has areas that are more transparent than the default, you can lower the cut-off level to preserve that detail.<br />
<br />
===== nocompress =====<br />
<br />
'''nocompress'''<br />
<br />
Prevents the texture from being compressed using S3TC if texture compression is enabled.<br />
<br />
===== nodownsize =====<br />
<br />
'''nodownsize'''<br />
<br />
Prevents the texture from being downsized.<br />
<br />
===== scale =====<br />
<br />
'''xscale''' '''''<value>'''''<br><br />
'''yscale''' '''''<value>'''''<br />
<br />
Sets the scale of the hightile texture in relation to the original texture. A '''''<value>''''' of 1.0 makes it the same size, higher makes it cover more then the original tile and smaller makes it cover a smaller area. '''xscale'''(aka '''scale''', '''detailscale''', '''intensity''') sets the horizontal scale and '''yscale''' sets the vertical scale.<br />
<br />
==== detail ====<br />
<br />
'''detail''' '''''{ ... }'''''<br />
<br />
Defines a [[Detail_mapping|detail texture]] for the texture. The brace-enclosed block may contain these instructions:<br />
<br />
===== file =====<br />
<br />
'''file''' '''''<filename>'''''<br />
<br />
Specifies which detail texture file to use. File may be any PNG, JPG, TGA, BMP, GIF or PCX file. This instruction must be supplied.<br />
<br />
===== scale =====<br />
<br />
'''scale''' '''''<value>'''''<br />
<br />
'''''<value>''''' is a positive floating-point value that'll determine how much your detail map should repeat on your diffuse map (if you want your detail map to repeat five times, use a 1/5 scale : 0.2).<br />
<br />
==== glow ====<br />
<br />
'''glow''' '''''{ ... }'''''<br />
<br />
Defines a [[Glow_mapping|glow map]] for the texture. The brace-enclosed block may contain these instructions:<br />
<br />
===== file =====<br />
<br />
'''file''' '''''<filename>'''''<br />
<br />
Specifies which glow map file to use. This instruction must be supplied.<br />
<br />
=== tint ===<br />
<br />
'''tint''' '''''{ ... }'''''<br />
<br />
Defines a Hightile texture tint to simulate palette effects normally used on ART-file tiles. The brace-enclosed block may contain these instructions:<br />
<br />
==== pal ====<br />
<br />
'''pal''' '''''<palnum>'''''<br />
<br />
The palette number the tint applies to.<br />
<br />
==== color ====<br />
<br />
'''red''' '''''<value>'''''<br><br />
'''green''' '''''<value>'''''<br><br />
'''blue''' '''''<value>'''''<br><br />
'''r''' '''''<value>'''''<br><br />
'''g''' '''''<value>'''''<br><br />
'''b''' '''''<value>'''''<br />
<br />
Specifies a color component value, in the range of 0 to 255. Unspecified components are assumed to be 255 and any out of range values are clamped to the maximum or minimum as appropriate.<br />
<br />
==== flags ====<br />
<br />
'''flags''' '''''<flags>'''''<br />
<br />
Specifies any special processing effects to use for the tint. The value of flags may be the sum of any of these values:<br />
<br />
* 0 = no effects<br />
* 1 = convert to greyscale<br />
* 2 = invert colors<br />
<br />
=== skybox ===<br />
<br />
'''skybox''' '''''{ ... }'''''<br />
<br />
Defines a skybox that overrides a parallaxing floor or ceiling in OpenGL Polymost rendering mode. The brace-enclosed block may contain these instructions:<br />
<br />
==== tile ====<br />
<br />
'''tile''' '''''<tilenum>'''''<br />
<br />
Specifies the ART file tile to override.<br />
<br />
==== pal ====<br />
<br />
'''pal''' '''''<palnum>'''''<br />
<br />
Specifies the palette number the skybox should happen for.<br />
<br />
==== facename ====<br />
<br />
'''facename''' '''''<filename>'''''<br />
<br />
Defines a single face of the skybox where facename may be any of these keywords appropriate for the face in question:<br />
<br />
Front Right Back Left Top Bottom<br />
ft rt bk lf up dn<br />
front right back left top bottom<br />
forward lt ceiling floor<br />
ceil down<br />
<br />
'''NOTE:''' All six faces are required to be specified.<br />
<br />
=== model ===<br />
<br />
'''model''' '''''<filename> { ... }'''''<br />
<br />
Defines a model to replace certain sprites in the game when running in OpenGL Polymost mode. '''''<filename>''''' is the model file in md2 or md3 format.<br />
<br />
'''Note:''' md2 is considered deprecated.<br />
<br />
The brace-enclosed block may contain these instructions:<br />
<br />
==== scale ====<br />
<br />
'''scale''' '''''<value>'''''<br />
<br />
'''''<value>''''' 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.<br />
<br />
==== shade ====<br />
<br />
'''shade''' '''''<shade-offset>'''''<br />
<br />
'''''<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.<br />
<br />
==== zadd ====<br />
<br />
'''zadd''' '''''<offset>'''''<br />
<br />
'''''<offset>''''' is a (possibly fractional) value specifying a height offset for the model. Quake models are aligned in the center while Build models are aligned at the floor. Using this command will allow Build to use Quake models without modification to the MD2/3 file itself.<br />
<br />
<br />
==== flags ====<br />
<br />
'''flags''' '''''<flags>'''''<br />
<br />
Specifies any special properties the model should have, the values of which should be added together to combine multiple options.<br />
*0: default value<br />
*1: Prevents the the model from being affected by the tints.<br />
<br />
==== skin ====<br />
<br />
'''skin''' '''''{ ... }'''''<br />
Defines a skin to be used on the model for all frames declared after this command. The brace-enclosed block may contain these instructions:<br />
<br />
===== pal =====<br />
<br />
'''pal''' '''''<palnum>'''''<br />
<br />
Specifies which palette this skin maps to.<br />
<br />
===== surface =====<br />
<br />
'''surface''' '''''<surfnum>'''''<br />
<br />
Specifies which MD3 surface this skin should be applied to. This has no significance for MD2 models.<br />
<br />
===== file =====<br />
<br />
'''file''' '''''<filename>'''''<br />
<br />
Specifies the texture file to use for the skin. File may be any PNG, JPG, TGA, BMP, GIF or PCX file<br />
<br />
'''IMPORTANT:''' If your model exists in a subdirectory (ie. the model filename 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.<br />
<br />
==== anim ====<br />
<br />
'''anim''' '''''{ ... }'''''<br />
<br />
Defines an animation from a group of frames in the model. The brace-enclosed block may contain these instructions:<br />
<br />
===== frame =====<br />
<br />
'''frame0''' '''''<framename>'''''<br><br />
'''frame1''' '''''<framename>'''''<br />
<br />
Specifies the names of the start ('''frame0''') and end ('''frame1''') frames of the animation.<br />
<br />
===== fps =====<br />
<br />
'''fps''' '''''<fps>'''''<br />
<br />
Specifies the frame rate at which the animation should play. This value may be fractional.<br />
<br />
===== flags =====<br />
<br />
'''flags''' '''''<flags>'''''<br />
<br />
Specifies any special properties the animation should have, the values of which should be added together to combine multiple options.<br />
<br />
Valid options are:<br />
* 0 = none (looping animation)<br />
* 1 = one-shot (plays beginning to end once and stops on the last frame).<br />
<br />
==== frame ====<br />
<br />
'''frame''' '''''{ ... }'''''<br />
<br />
Defines a range of ART-file tiles to correspond with the given frame/animation of the model. The brace-enclosed block may contain these instructions:<br />
<br />
===== name =====<br />
<br />
'''name''' '''''<framename>'''''<br><br />
'''frame''' '''''<framename>'''''<br />
<br />
If '''''<framename>''''' is identical to the starting frame of an animation, the engine will play that animation, otherwise the replacement will be static. You can choose to use the '''frame''' or '''name''' versions of this instruction as both are identical.<br />
<br />
===== tile =====<br />
<br />
'''tile''' '''''<tilenum>'''''<br><br />
'''tile0''' '''''<tilenum>'''''<br><br />
'''tile1''' '''''<tilenum>'''''<br />
<br />
Use the tile instruction to specify an ART-file tile which this model should replace. Use the '''tile0''' and '''tile1''' instructions together to specify a range of ART-file tiles. If you use '''tile0''', you must also have a '''tile1'''. You may not use the same instruction twice to specify multiple ranges.<br />
<br />
===== smoothduration =====<br />
<br />
'''smoothduration''' '''''<value>'''''<br />
<br />
If smoothduration is non-zero switching from another animation to the one defined by that frame block will trigger an intermediary animation smoothing state of duration '''''<value>''''' seconds.<br />
<br />
===== pal =====<br />
<br />
'''pal''' '''''<value>'''''<br />
<br />
Makes the model definition exclusive for the this pal. This allow to assign different models for different pal.<br />
<br />
==== hud ====<br />
<br />
'''hud''' '''''{ ... }'''''<br />
<br />
Defines a range of ART-file tiles to use with a heads-up-display. The brace-enclosed block may contain these instructions:<br />
<br />
===== tile =====<br />
<br />
'''tile''' '''''<tilenum>'''''<br><br />
'''tile0''' '''''<tilenum>'''''<br><br />
'''tile1''' '''''<tilenum>'''''<br />
<br />
'''tile0''' and '''tile1''' together specify a range of ART-file tiles which this model frame should replace when rendered as part of the HUD. You can specify individual tiles using a single tile command.<br />
<br />
===== offset =====<br />
<br />
'''xadd''' '''''<offset>'''''<br><br />
'''yadd''' '''''<offset>'''''<br><br />
'''zadd''' '''''<offset>'''''<br><br />
'''angadd''' '''''<offset>'''''<br />
<br />
Use these offsets to fine-tune the location of the model placement. '''xadd''', '''yadd''', and '''zadd''' are position offsets relative to the viewer's orienation. You can use floating point values with them. '''angadd''' is a Build angle offset. (512 = 90 degrees, 1024 = 180 degrees, etc...).<br />
<br />
===== hide =====<br />
<br />
'''hide'''<br />
<br />
Some weapons use multiple ART tiles for constructing the gun or animation. Use this option to hide parts that you don't need in your replacement.<br />
<br />
===== nobob =====<br />
<br />
'''nobob'''<br />
<br />
By default, the HUD model offset is affected by the player bobbing offset when the player is walking. Use this option to disable that.<br />
<br />
===== flipped =====<br />
<br />
'''flipped'''<br />
<br />
Use this option to apply the settings inside the hud block only if the object is normally rendered x-flipped (mirror image). Some weapons, such as the devastator, are rendered in 2 pieces, the left devastator is actually a mirror image of the right.<br />
<br />
===== nodepth =====<br />
<br />
'''nodepth'''<br />
<br />
Use this to render a HUD model without the use of the depth buffer. Normally, you should avoid this. The one exception where this is useful is for the spinning nuke menu pointer because it should always be in front - and it just happens to be convex ... which is the one case that is safe with the depth buffer disabled … a rather fortunate coincidence. [[Image:Smile.gif]]<br />
<br />
<br />
==== detail ====<br />
<br />
'''detail''' '''''{ ... }'''''<br />
<br />
Defines a [[Detail_mapping|detail texture]] for the model. The brace-enclosed block may contain these instructions:<br />
<br />
===== file =====<br />
<br />
'''file''' '''''<filename>'''''<br />
<br />
Specifies which detail texture file to use. File may be any PNG, JPG, TGA, BMP, GIF or PCX file. This instruction must be supplied.<br />
<br />
===== scale =====<br />
<br />
'''scale''' '''''<value>'''''<br />
<br />
'''''<value>''''' is a positive floating-point value that'll determine how much your detail map should repeat on your diffuse map (if you want your detail map to repeat five times, use a 1/5 scale : 0.2).<br />
<br />
===== surface =====<br />
<br />
'''surface''' '''''<surfnum>'''''<br />
<br />
Specifies which MD3 surface this detail texture should be applied to. This has no significance for MD2 models.<br />
<br />
==== glow ====<br />
<br />
'''glow''' '''''{ ... }'''''<br />
<br />
Defines a [[Glow_mapping|glow map]] for the model. The brace-enclosed block may contain these instructions:<br />
<br />
===== file =====<br />
<br />
'''file''' '''''<filename>'''''<br />
<br />
Specifies which glow map file to use. This instruction must be supplied.<br />
<br />
===== surface =====<br />
<br />
'''surface''' '''''<surfnum>'''''<br />
<br />
Specifies which MD3 surface this glow map should be applied to. This has no significance for MD2 models.<br />
<br />
=== voxel ===<br />
<br />
'''voxel''' '''''<filename> { ... }'''''<br />
<br />
Defines a voxel to replace sprites. filename is the name of the .KVX file containing the voxel. The brace-enclosed block may contain these instructions:<br />
<br />
==== tile ====<br />
<br />
'''tile''' '''''<tilenum>'''''<br><br />
'''tile0''' '''''<tilenum>'''''<br><br />
'''tile1''' '''''<tilenum>'''''<br />
<br />
Use these instructions to map tiles that should be rendered as a voxels. Use '''tile''' to map a single tile to be rendered as voxels and '''tile0''', '''tile1''' together define a range of tiles to be rendered as voxels. The '''tile0''' instruction should appear before the '''tile1''' instruction to define a correct range.<br />
<br />
==== scale ====<br />
<br />
'''scale''' '''''<value>'''''<br />
<br />
'''''<value>''''' is a (possibly fractional) value specifying a scaling factor for the voxelmodel when it is rendered, eg. 1.5 for one-and-a-half times as big.<br />
<br />
=== music ===<br />
<br />
==== id ====<br />
<br />
'''id''' '''''<value>'''''<br />
<br />
'''''<value>''''' is "Intro", "Briefing", "Loading" or "ExLy"(where x-episode, y-level).<br><br />
<br />
==== file ====<br />
<br />
'''file''' '''''<filename>'''''<br />
<br />
Specifies which music file to use. File may be any MID or OGG(OpenAL is required) file.<br />
<br />
=== sound ===<br />
<br />
==== id ====<br />
<br />
'''id''' '''''<value>'''''<br />
<br />
Specifies the ID of sound. The ID can be found in DEFS.CON.<br />
<br />
==== file ====<br />
<br />
'''file''' '''''<filename>'''''<br />
<br />
Specifies which music file to use. File may be any WAV,VOC,OGG(OpenAL is not required) file.<br />
<br />
== Un-Definitions ==<br />
<br />
The main use for these is for cases in which the .ART files are somewhat different, and you want to ensure compatibility for the new art without new textures or models. A good example of this is the [http://www.freewebtown.com/hendricks266/nwhrp.html Duke: Nuclear Winter HRP] by [[User:Hendricks 266|Hendricks266]]. (see undef.def)<br />
<br />
=== undeftexture ===<br />
<br />
'''undeftexture''' '''''<tile>'''''<br />
<br />
This is for undefining Hightile textures.<br />
<br />
==== undeftexturerange ====<br />
<br />
'''undeftexturerange''' '''''<tile0> <tile1>'''''<br />
<br />
Same as '''undeftexture''', but with a range of tiles.<br />
<br />
=== undefmodel ===<br />
<br />
'''undefmodel''' '''''<tile>'''''<br />
<br />
This is for undefining 3D models.<br />
<br />
==== undefmodelrange ====<br />
<br />
'''undefmodelrange''' '''''<tile0> <tile1>'''''<br />
<br />
Same as '''undefmodel''', but with a range of tiles.<br />
<br />
==== undefmodelof ====<br />
<br />
'''undefmodelof''' '''''<tile>'''''<br />
<br />
Same as '''undefmodel''', but all the tiles grouped together within the same .DEF code block are un-defined.<br />
<br />
Support of '''undefmodelof''' seems to be broken at this time. Using it in your .DEF files will result in crashing upon compiling.<br />
<br />
== Misc ==<br />
<br />
=== alphahack ===<br />
<br />
'''alphahack''' '''''<tilenum> <value>'''''<br />
<br />
'''alphahack''' is a deprecated command to improve alpha filtering of highres art of '''''<tilenum>'''''. '''''<value>''''' is always -1.<br />
<br />
==== alphahackrange ====<br />
<br />
'''alphahackrange''' '''''<tilenum1> <tilenum2> <value>'''''<br />
<br />
Same as '''alphahack''', but with a range of tiles.<br />
<br />
=== animtilerange ===<br />
<br />
'''animtilerange''' '''''<tilenum1> <tilenum2> <speed value> <animation value>'''''<br />
<br />
Animates hightile textures the same way as 8 bit art does. Hightile art needs to be defined first.<br />
<br />
=== dummytile ===<br />
<br />
'''dummytile''' '''''<tilenum> <x-dimension> <y-dimension>'''''<br />
<br />
Used in DEF files to create a blank tile at location '''<''tilenum''>''' of the dimensions '''<''x-dimension''>''' and '''<''y-dimension''>'''. This allows the creation of placeholder tiles for use with definetexture\texture without having to edit .ART files.<br />
<br />
==== dummytilerange ====<br />
<br />
'''dummytilerange''' '''''<tilenum1> <tilenum2> <x-dimension> <y-dimension>'''''<br />
<br />
Same as '''dummytile''', but with a range of tiles.<br />
<br />
=== setuptile ===<br />
<br />
'''setuptile''' '''''<tilenum> <x-dimension> <y-dimension> <x-offset> <y-offset>'''''<br />
<br />
Used in DEF files to setup the properties which are applied to the highres replacement of the tile. This allows the creation of placeholder tiles for use with definetexture\texture without having to edit .ART files.<br />
Unlike '''dummytile''' this command won't draw black squares and accepts the offsets.<br />
<br />
==== setuptilerange ====<br />
<br />
'''setuptilerange''' '''''<tilenum1> <tilenum2> <x-dimension> <y-dimension> <x-offset> <y-offset>'''''<br />
<br />
Same as '''setuptile''', but with a range of tiles.<br />
<br />
=== dummytilefrompic ===<br />
<br />
'''dummytilefrompic''' '''''<tileID> <file>'''''<br />
<br />
=== tilefromtexture ===<br />
<br />
'''tilefromtexture''' '''''{ ... }'''''<br />
<br />
Used to generate an 8-bit tile from an image file.<br />
<br />
==== file ====<br />
<br />
'''file''' '''''<filename>'''''<br><br />
'''name''' '''''<filename>'''''<br />
<br />
==== alphacut ====<br />
<br />
'''alphacut''' '''''<value>'''''<br />
<br />
==== xoffset ====<br />
<br />
<br />
'''xoffset''' '''''<value>'''''<br><br />
'''xoff''' '''''<value>'''''<br />
<br />
==== yoffset ====<br />
<br />
'''yoffset''' '''''<value>'''''<br><br />
'''yoff''' '''''<value>'''''<br />
<br />
=== include ===<br />
<br />
'''include''' '''''<filename>'''''<br><br />
'''#include''' '''''<filename>'''''<br />
<br />
Processes the script commands in '''''<filename>''''' at the point of the '''include''' call.<br />
<br />
=== define ===<br />
<br />
'''define''' '''''<label> <integer-value>'''''<br><br />
'''#define''' '''''<label> <integer-value>'''''<br />
<br />
Declares '''''<label>''''' to represent the numeric value '''''<integer-value>'''''. '''''<integer-value>''''' can be a label, in which case the value of the label given is used.<br />
<br />
'''NOTE:''' You may find it convenient to include DEFS.CON (for JFDuke3D) or NAMES.H to predefine many of the tile names in the art file.<br />
<br />
=== loadgrp ===<br />
<br />
'''loadgrp''' '''''<.GRP\.ZIP file>'''''<br />
<br />
The DEF equivalent of the '''/g''' command line switch. '''loadgrp''' can only be used in the originating .DEF file; it is usually '''duke3d.def''' or the .DEF file specified by the '''/h''' command line switch.<br />
<br />
=== noautoload ===<br />
<br />
'''noautoload'''<br />
<br />
Disables the autoload dir feature.<br />
<br />
=== cachesize ===<br />
<br />
'''cachesize''' '''''<size>'''''<br />
<br />
Specifies the size of the cache in Kb.<br />
<br />
=== fogpal ===<br />
<br />
'''fogpal''' '''''<palette number> <red intensity> <green intensity> <blue intensity>'''''<br />
<br />
'''fogpal''' defines a palette a sector-based fog effect. To use it, change the pal of your sector to the pal defined with '''fogpal'''.<br />
<br />
Intensities range from 0-63. Palettes 26, 27, 28 and 29 are pre-defined for you as white, red, green and blue respectively. Sector visibility controls fog density.<br />
<br />
== Mapster32 ==<br />
<br />
=== 2dcol ===<br />
<br />
'''2dcol''' '''''<colornum> <red> <green> <blue>'''''<br />
<br />
'''2dcol''' is a definition of a color to be used in the 2D mode of [[Mapster32]], in conjunction with '''spritecol''' that works similarly to '''tint''' and '''definetint'''. '''''<colornum>''''' is a unique identifier, similar to [[define|defines]] and [[gamevar|gamevars]]. '''''<red>''''', '''''<green>''''', and '''''<blue>''''' are the RGB color values that are mixed together to get your custom color.<br />
<br />
Certain low values are already hard-coded, and redefining them will change colors of the default layout. If you know the correct value, you can replace the default colors used for '''all''' the sprites. You truly have the power to customize Mapster32. Lime green 2D mode background, anyone?<br />
<br />
=== spritecol ===<br />
<br />
'''spritecol''' '''''<tilenum> <normalcolornum> <blockingcolornum>'''''<br />
<br />
'''spritecol''' is a definition of the color a sprite will appear in 2D mode, instead of the standard sky blue and hot pink, or another special color (like yellow for hard-coded enemies or white for the [[Special_Sprite_Reference_Guide|special sprites]]). '''<''normalcolornum''>''' is the '''<''colornum''>''' of the '''2dcol''' definition of your color for the standard sprite color as defined by '''<''tilenum''>'''. The same goes for '''<''blockingcolornum''>''', except that this value is for when the sprite has the first bit of [[cstat]] set (1) (<code>[']+[B]</code> keys in [[Mapster32]]), which is the blocking flag.<br />
<br />
=== spritehotkey ===<br />
<br />
'''spritehotkey''' '''''<key> <spriteID>'''''<br />
<br />
Pressing a key from 1 to 0 on the upper row before pressing S will make the inserted sprite's picnum change according to this definition.<br />
<br />
=== tilegroup ===<br />
<br />
'''tilegroup''' '''''<groupname> { ... }'''''<br />
<br />
Defines group for tile tile selector(Press T in the tile seletor). Mapster32 loads TILES.CFG on startup.<br />
<br />
==== tile ====<br />
<br />
'''tile''' '''''<tilenum>'''''<br><br />
'''tilerange''' '''''<tilenum1> <tilenum2>'''''<br><br />
'''tiles''' '''''{ <tile1> <tile2> ... <tileN> }'''''<br />
<br />
Adds tiles to the group. Names can be found in DEFS.CON.<br />
<br />
==== hotkey ====<br />
<br />
'''hotkey''' '''''<value>'''''<br />
<br />
Specifies the hotkey for the group.<br />
<br />
==== colors ====<br />
<br />
'''colors''' '''''<value1> <value2>'''''<br />
<br />
Colors are the colors for Blocking OFF and Blocking ON.<br />
<br />
=== alphabet ===<br />
<br />
'''alphabet''' '''''{ ... }'''''<br />
<br />
Defines alphabet for the input text feature(Ctrl+T). Mapster32 loads TILES.CFG on startup.<br />
<br />
==== map ====<br />
<br />
'''map''' '''''<value> <tile>'''''<br />
<br />
==== mapa ====<br />
<br />
'''mapa''' '''''<string> <tile>'''''<br />
<br />
==== maprange ====<br />
<br />
'''maprange''' '''''<value1> <value2> <tile>'''''<br />
<br />
==== maprangea ====<br />
<br />
'''maprangea''' '''''<char1> <char2> <tile>'''''<br />
<br />
==== offset ====<br />
<br />
'''offset''' '''''<value> <offset>'''''<br />
<br />
==== offseta ====<br />
<br />
'''offseta''' '''''<string> <offset>'''''<br />
<br />
== Deprecated Commands ==<br />
<br />
=== definetexture ===<br />
<br />
'''definetexture''' '''''<tile-number> <palette-number> <x-center> <y-center> <x-size> <y-size> <filename>'''''<br />
<br />
Defines a Hightile texture to replace an ART-file picture. '''''<tile-number>''''' may be an number, or a defined label. Use a value of 0 for '''''<x-center>''''' and '''''<y-center>''''' and a value of -1 for '''''<x-size>''''' and '''''<y-size>''''' for now until these values are actually used. '''''<filename>''''' may be any PNG, JPG, TGA, BMP, GIF or PCX file.<br />
<br />
=== definetint ===<br />
<br />
'''definetint''' '''''<palette-number> <red> <green> <blue> <flags'''''<br />
<br />
Defines a Hightile texture tint to simulate palette effects normally used on ART-file tiles. '''''<red>''''', '''''<green>''''', and '''''<blue>''''' are numbers in the range 0 to 255 which specify the color the tint should look like. '''''<flags>''''' specifies any processing effects to use. Valid values are:<br />
* 0 = no effects<br />
* 1 = convert to greyscale<br />
* 2 = invert colours<br />
These values can be added together to produce a combination of effects.<br />
<br />
=== defineskybox ===<br />
<br />
'''defineskybox''' '''''<tile-number> <palette-number> <reserved> <front-face-filename> <right-face-filename> <back-face-filename> <left-face-filename> <top-face-filename> <bottom-face-filename>'''''<br />
<br />
Defines a sky-box composed of six images mapped onto the faces <br />
of a cube to be used when '''''<tile-number>''''' is set as parallaxing in GL Polymost mode. '''''<reserved>''''' should be 0 for now until its meaning is fully conceived.<br />
<br />
=== definemodel ===<br />
<br />
'''definemodel''' '''''<filename> <scale> <shade-offset>'''''<br />
<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.<br />
<br />
==== definemodelskin ====<br />
<br />
'''definemodelskin''' '''''<palette-number> <filename>'''''<br />
<br />
Defines a skin to be used on the model for all frames declared after this command, when the sprite palette is equal to '''''<palette-number>'''''. (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.<br />
<br />
==== selectmodelskin ====<br />
<br />
'''selectmodelskin''' '''''<skin ID>'''''<br />
<br />
Selects a model skin.<br />
<br />
==== definemodelanim ====<br />
<br />
'''definemodelanim''' '''''<start-frame> <end-frame> <frame-rate> <flags>'''''<br />
<br />
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:<br />
<br />
* 0 = none (looping animation)<br />
* 1 = one-shot (plays beginning to end once and stops on the last frame)<br />
<br />
==== definemodelframe ====<br />
<br />
'''definemodelframe''' '''''<frame-name> <first-tile> <last-tile>'''''<br />
<br />
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.<br />
<br />
=== definevoxel ===<br />
<br />
'''definevoxel''' '''''<filename>'''''<br />
<br />
Defines a voxel to replace sprites in the game. See '''definevoxeltiles''' for details on how to specify the ART-file tiles to replace. '''''<filename>''''' is the name of the .KVX file containing the voxel.<br />
<br />
==== definevoxeltiles ====<br />
<br />
'''definevoxeltiles''' '''''<first-tile> <last-tile>'''''<br />
<br />
Defines the range of ART-file tiles to replace with the voxel given in the last preceding '''definevoxel''' instruction.<br />
<br />
[[Category:All commands]]</div>Dr. Kylstienhttps://wiki.eduke32.com/w/index.php?title=Statnum&diff=8392Statnum2009-08-05T15:33:29Z<p>Dr. Kylstien: I remember hearing about statnum 1024, but I haven't tried it myself.</p>
<hr />
<div>Statnums are used by the game internally to see whether something is an actor, player, projectile, etc, and then process it appropriately.<br />
<br />
Some important statnums (there are many more not listed):<br />
<br />
0 -- Sprites that are not defined by the CON code as actors, and are not projectiles, etc, have a statnum of 0. (E.g. the floor texture sprites used to make up a sprite bridge).<br />
<br />
1 -- Actors. Sprites with a statnum of 1 will execute the actor code that applies to their tile number in the CON scripts.<br />
<br />
2 -- Sleepers. Sprites taking a break from code execution (e.g. a Pigcop that has been left alone for long enough will revert to statnum 2, only waking up and going back to statnum 1 upon seeing the player again)<br />
<br />
4 -- Projectiles. These includes RPG, FREEZEBLAST, etc., as well as custom projectiles. It does not include hitscan (bullets), since those are not sprites that exist in the game world (SHOTSPARK1, the sprite spawned by bullets, is not itself a projectile)<br />
<br />
10 -- The player.<br />
<br />
1024 -- Unused sprite. A sprite id with this statnum is invalid, meaning that it has been deleted or just never existed in the map.<br />
[[Category:Sprite structure members]]</div>Dr. Kylstienhttps://wiki.eduke32.com/w/index.php?title=How_to_make_a_health_bar&diff=8390How to make a health bar2009-08-01T16:34:04Z<p>Dr. Kylstien: </p>
<hr />
<div>[[File:Health_bar.jpg]]<br />
<code><pre><br />
gamevar temp 0 2<br />
gamevar temp2 0 2<br />
gamevar xvar 0 2<br />
<br />
define BARSCALE 10<br />
<br />
onevent EVENT_DISPLAYREST {<br />
setvar xvar 0 // set starting x coordinate<br />
getactor[THISACTOR].extra temp // get the player's health.<br />
ifvarg temp 0 { // only proceed if the player has any health.<br />
setvarvar temp2 temp // save a copy for later.<br />
divvar temp BARSCALE // make each column worth 10 hp.<br />
modvar temp2 BARSCALE // gets the remainder of the division so that...<br />
ifvarg temp2 0 {<br />
addvar temp 1 // ...we can round up. each column will only disappear when all 10 hp are gone.<br />
}<br />
whilevarn temp 0 { // repeat for each column<br />
rotatesprite xvar 182 65536 0 NOTCHON 0 8 16 0 0 xdim ydim // draws one column at (xvar,182)<br />
addvar xvar 5 // move to the right<br />
subvar temp 1 // next column<br />
}<br />
}<br />
} endevent<br />
</pre></code></div>Dr. Kylstienhttps://wiki.eduke32.com/w/index.php?title=File:Health_bar.jpg&diff=8389File:Health bar.jpg2009-08-01T16:32:58Z<p>Dr. Kylstien: Demonstration for How_to_make_a_health_bar</p>
<hr />
<div>Demonstration for [[How_to_make_a_health_bar]]</div>Dr. Kylstienhttps://wiki.eduke32.com/w/index.php?title=How_to_make_a_health_bar&diff=8388How to make a health bar2009-08-01T16:30:27Z<p>Dr. Kylstien: Created page with '<code><pre> gamevar temp 0 2 gamevar temp2 0 2 gamevar xvar 0 2 define BARSCALE 10 onevent EVENT_DISPLAYREST { setvar xvar 0 // set starting x coordinate getactor[THISACTOR]....'</p>
<hr />
<div><code><pre><br />
gamevar temp 0 2<br />
gamevar temp2 0 2<br />
gamevar xvar 0 2<br />
<br />
define BARSCALE 10<br />
<br />
onevent EVENT_DISPLAYREST {<br />
setvar xvar 0 // set starting x coordinate<br />
getactor[THISACTOR].extra temp // get the player's health.<br />
ifvarg temp 0 { // only proceed if the player has any health.<br />
setvarvar temp2 temp // save a copy for later.<br />
divvar temp BARSCALE // make each column worth 10 hp.<br />
modvar temp2 BARSCALE // gets the remainder of the division so that...<br />
ifvarg temp2 0 {<br />
addvar temp 1 // ...we can round up. each column will only disappear when all 10 hp are gone.<br />
}<br />
whilevarn temp 0 { // repeat for each column<br />
rotatesprite xvar 182 65536 0 NOTCHON 0 8 16 0 0 xdim ydim // draws one column at (xvar,182)<br />
addvar xvar 5 // move to the right<br />
subvar temp 1 // next column<br />
}<br />
}<br />
} endevent<br />
</pre></code></div>Dr. Kylstienhttps://wiki.eduke32.com/w/index.php?title=Tutorials&diff=8387Tutorials2009-08-01T16:27:49Z<p>Dr. Kylstien: </p>
<hr />
<div>These are a few basic tutorials which show off some things made possible by EDuke32's enhanced [[scripting]] system. Want more examples? Download one of the many existing EDuke32 mods, open up the CON files and dig in!<br />
<br />
* [[Artificial Intelligence 101]]<br />
* [[Eliminate_player_self-damage|Prevent players/actors from inflicting self-damage]]<br />
* [[How_to_Change_the_Loading_Screen_Background|Change the loading screen background]]<br />
* [[How_to_make_a_clock|Make an in-game clock]]<br />
* [[How_to_make_a_sprint_key|Make a sprint key]]<br />
* [[How_to_Make_a_Working_Keypad|Make a working keypad]]<br />
* [[How_to_Make_Controllable_Security_Cameras|Make controllable security cameras]]<br />
* [[How_to_Make_Models_Pitch|Make models pitch on sloped surfaces]]<br />
* [[How_to_Shoot_Different_Kinds_of_RPGs|Make actors shoot different types of RPGs]]<br />
* [[How_to_Make_the_Player_Swim_Like_Modern_FPS|Make the player swim like in a modern FPS]]<br />
* [[How_to_Make_the_Screen_Tilt_While_Using_Jetpack|Make the screen tilt while using jetpack]]<br />
* [[Improve The Third Person View with Zoom|Improve the third person view with zoom]]<br />
* [[Limit_the_height_of_the_player%27s_jump|Limit/extend the player's jumping height]]<br />
* [[Make_actor_aim_vertical|Make an actor aim vertically at another]]<br />
* [[Make_Nightvision_light_rooms|Make the night vision goggles light up darkened areas]]<br />
* [[Make_one_actor_face_another|Make one actor face another]]<br />
* [[Prevent_fall_damage_or_falling_death|Prevent damage/death from long falls]]<br />
* [[Value_controlled_rain_code|Control rain on a fine scale]]<br />
* [[How_to_make_a_health_bar|Make a health bar]]<br />
* These are a series of tutorials that explain fix bugs that exist in the original .CON code.<br />
*# [[Eliminate_Shrunk_Enemies_Attacking_Bug|Eliminate the "shrunk enemies attacking" bug]]<br />
*# [[Enable_and_fix_minibosses|Enable and fix the minibosses]]<br />
[[Category: Tutorials]]</div>Dr. Kylstienhttps://wiki.eduke32.com/w/index.php?title=Change_the_player%27s_jump_height&diff=8285Change the player's jump height2009-06-16T01:57:38Z<p>Dr. Kylstien: setplayer has been able to take constants for a while now: the ZERO var is redundant.</p>
<hr />
<div>You can use the player member [[jumping_counter]] to limit the player's jump to less Olympic heights.<br />
<br />
The [[jumping_counter]] increments from 0 (not jumping) to 1441 as follows:<br />
<br />
0<br />
181<br />
361<br />
541<br />
721<br />
901<br />
1081<br />
1261<br />
1441<br />
<br />
By manually setting the counter to 0 when the counter reaches one of these values, you can decrease the duration of the jump by effectively cancelling it mid-jump.<br />
<br />
You'll need a gamevar to hold the value of [[jumping_counter]].<br />
<br />
<pre>gamevar temp 0 2</pre><br />
<br />
Inside the APLAYER actor, use the following code to cut the jump duration in half:<br />
<br />
<pre><br />
getplayer[THISACTOR].jumping_counter temp<br />
ifvare temp 721 <br />
{<br />
setplayer[THISACTOR].jumping_counter 0 <br />
}</pre><br />
<br />
[[Category: Tutorials]]</div>Dr. Kylstienhttps://wiki.eduke32.com/w/index.php?title=Bits&diff=7306Bits2008-09-29T00:53:37Z<p>Dr. Kylstien: moved special case info closer to top</p>
<hr />
<div>''''''bits'''''' returns a bit-field indicating which buttons the player is pressing. A particular button press can be checked by using [[ifvarand]] with the values listed at the end of this article. <br />
<br />
'''This technique does not work properly with the weapon selection keys''', however. They share four bits in the second-to-lowest byte, which represent the number of the corresponding weapon. They can be decoded as follows:<br />
getinput[THISACTOR].bits temp<br />
shiftvarr temp 8<br />
andvar temp 0xF<br />
switch temp<br />
case 1:<br />
//"1" pressed<br />
break<br />
case 2:<br />
//"2" pressed<br />
break<br />
//etc.<br />
case 10:<br />
//"0" pressed<br />
break<br />
case 11:<br />
//previous weapon<br />
break<br />
case 12:<br />
//next weapon<br />
break<br />
endswitch<br />
<br />
'''Bit values for standard keys:'''<br />
define INPUT_JUMP 1<br />
define INPUT_CROUCH 2<br />
define INPUT_FIRE 4<br />
define INPUT_AIM_UP 8<br />
define INPUT_AIM_DOWN 16<br />
define INPUT_RUNNING 32<br />
define INPUT_LOOK_LEFT 64<br />
define INPUT_LOOK_RIGHT 128<br />
define INPUT_WEAPON_1 256<br />
define INPUT_WEAPON_2 512<br />
define INPUT_WEAPON_3 768<br />
define INPUT_WEAPON_4 1024<br />
define INPUT_WEAPON_5 1280<br />
define INPUT_WEAPON_6 1536<br />
define INPUT_WEAPON_7 1792<br />
define INPUT_WEAPON_8 2048<br />
define INPUT_WEAPON_9 2304<br />
define INPUT_WEAPON_10 2560<br />
define INPUT_WEAPON_PREV 2816<br />
define INPUT_WEAPON_NEXT 3072<br />
define INPUT_STEROIDS 4096<br />
define INPUT_LOOK_UP 8192<br />
define INPUT_LOOK_DOWN 16384<br />
define INPUT_NIGHTVISION 32768<br />
define INPUT_MEDKIT 65536<br />
define INPUT_RESERVED 131072<br />
define INPUT_CENTER_VIEW 262144<br />
define INPUT_HOLSTER_WEAPON 524288<br />
define INPUT_INVENTORY_LEFT 1048576<br />
define INPUT_PAUSE 2097152<br />
define INPUT_QUICK_KICK 4194304<br />
define INPUT_AIM_MODE 8388608<br />
define INPUT_HOLODUKE 16777216<br />
define INPUT_JETPACK 33554432<br />
define INPUT_QUIT 67108864<br />
define INPUT_INVENTORY_RIGHT 134217728<br />
define INPUT_TURN_AROUND 268435456<br />
define INPUT_OPEN 536870912<br />
define INPUT_INVENTORY 1073741824<br />
define INPUT_ESC 2147483648<br />
<br />
<br />
<br />
<br />
[[Category:Input structure members]]</div>Dr. Kylstienhttps://wiki.eduke32.com/w/index.php?title=Bits&diff=7304Bits2008-09-29T00:49:22Z<p>Dr. Kylstien: special case for weapon selection keys</p>
<hr />
<div>''''''bits'''''' returns a bit-field indicating which buttons the player is pressing. A particular button press can be checked by using [[ifvarand]] with the following values:<br />
// bits<br />
define INPUT_JUMP 1<br />
define INPUT_CROUCH 2<br />
define INPUT_FIRE 4<br />
define INPUT_AIM_UP 8<br />
define INPUT_AIM_DOWN 16<br />
define INPUT_RUNNING 32<br />
define INPUT_LOOK_LEFT 64<br />
define INPUT_LOOK_RIGHT 128<br />
define INPUT_WEAPON_1 256<br />
define INPUT_WEAPON_2 512<br />
define INPUT_WEAPON_3 768<br />
define INPUT_WEAPON_4 1024<br />
define INPUT_WEAPON_5 1280<br />
define INPUT_WEAPON_6 1536<br />
define INPUT_WEAPON_7 1792<br />
define INPUT_WEAPON_8 2048<br />
define INPUT_WEAPON_9 2304<br />
define INPUT_WEAPON_10 2560<br />
define INPUT_WEAPON_PREV 2816<br />
define INPUT_WEAPON_NEXT 3072<br />
define INPUT_STEROIDS 4096<br />
define INPUT_LOOK_UP 8192<br />
define INPUT_LOOK_DOWN 16384<br />
define INPUT_NIGHTVISION 32768<br />
define INPUT_MEDKIT 65536<br />
define INPUT_RESERVED 131072<br />
define INPUT_CENTER_VIEW 262144<br />
define INPUT_HOLSTER_WEAPON 524288<br />
define INPUT_INVENTORY_LEFT 1048576<br />
define INPUT_PAUSE 2097152<br />
define INPUT_QUICK_KICK 4194304<br />
define INPUT_AIM_MODE 8388608<br />
define INPUT_HOLODUKE 16777216<br />
define INPUT_JETPACK 33554432<br />
define INPUT_QUIT 67108864<br />
define INPUT_INVENTORY_RIGHT 134217728<br />
define INPUT_TURN_AROUND 268435456<br />
define INPUT_OPEN 536870912<br />
define INPUT_INVENTORY 1073741824<br />
define INPUT_ESC 2147483648<br />
<br />
'''This technique does not work properly with the weapon selection keys''', however. They share four bits in the second-to-lowest byte, which represent the number of the corresponding weapon. They can be decoded as follows:<br />
getinput[THISACTOR].bits temp<br />
shiftvarr temp 8<br />
andvar temp 0xF<br />
switch temp<br />
case 1:<br />
//"1" pressed<br />
break<br />
case 2:<br />
//"2" pressed<br />
break<br />
//etc.<br />
case 10:<br />
//"0" pressed<br />
break<br />
case 11:<br />
//previous weapon<br />
break<br />
case 12:<br />
//next weapon<br />
break<br />
endswitch<br />
<br />
<br />
[[Category:Input structure members]]</div>Dr. Kylstienhttps://wiki.eduke32.com/w/index.php?title=Unsynchronized_events&diff=7263Unsynchronized events2008-09-04T21:05:09Z<p>Dr. Kylstien: /* Staying in Sync in a Multiplayer Game */</p>
<hr />
<div>== Staying in Sync in a Multiplayer Game ==<br />
(This article is also relevant to [[demos]], which work much the same way.)<br />
<br />
'''Synchronized events''' are always triggered on all computers at the same time and under the same conditions, triggered on specific in-game situations. '''Unsynchronized events''', however, are usually triggered on only the local computer so the CON code doesn't have to work the same way on different computers. These events are usually display-related or affect only the local computer.<br />
<br />
In order to understand the interaction of random occurrences and unsynchronized events, you need to understand two things:<br />
# [[randvar]] and [[ifrnd]] are '''NOT RANDOM'''. They step through a pre-determined sequence of numbers that appear to be random.<br />
# In multiplayer, very little information is shared between the different computers. Each computer runs an ''almost independent'' instance of the game, sharing only information about the actions of the players. '''They do not share the outcomes of ifrnd or randvar.'''<br />
<br />
Every time something "random" happens in the game, it '''must happen the same way''' on all of the computers. Since all of them start with the same number and go through the same sequence of numbers at the same times, everything works. But if one computer calls ifrnd or randvar while the others do not, it ends up at a different place in the random sequence. The next time something random happens in the game, it occurs differently on this computer, causing the game to become '''out-of-sync'''. (This isn't even the worst case: Imagine ''each computer'' on a ''wildly'' different place in the sequence, resulting in almost no correlation between what each player sees in the game.)<br />
<br />
Unsynchronized events are not guaranteed to happen at the same time, or at all, between different computers in a multiplayer game. Therefore, it is not safe to use ifrnd or randvar in them, because they could end up out of sequence. It is also not safe to do anything affecting gameplay in these events for the same reason. '''[[Displayrand]] is an exception''' because it does not affect the sequence used by the other commands. '''Therefore it is safe to use in unsynchronized events.''' It should not be used in other events because that would cause the same problems outlined above.<br />
<br />
'''DOs and DON'Ts:'''<br><br />
# Do use [[randvar]],[[randvarvar]], [[ifrnd]] in '''synchronized''' events.<br />
# Do use [[displayrand]], [[displayrandvar]], [[displayrandvarvar]] in '''unsynchronized''' events.<br><br />
# Do not use [[randvar]],[[randvarvar]], [[ifrnd]] in '''unsynchronized''' events.<br />
# Do not use [[displayrand]], [[displayrandvar]], [[displayrandvarvar]] in '''synchronized''' events.<br />
# Do not collect information in '''unsynchronized''' events that later might be used in '''synchronized''' events or actors.<br />
# Do not use local vars(like user options) in '''synchronized''' events. The compiler will warn you about this(note: it won't if a local var is in a state).<br />
# Do not use gameplay related commands in '''unsynchronized''' events. The compiler will warn you about this(note: it won't if a local var is in a state).<br />
<br />
[[Category:Event manipulation]]</div>Dr. Kylstienhttps://wiki.eduke32.com/w/index.php?title=Unsynchronized_events&diff=7262Unsynchronized events2008-09-04T20:58:50Z<p>Dr. Kylstien: /* Staying in sync in multiplayer game */</p>
<hr />
<div>== Staying in Sync in a Multiplayer Game ==<br />
(This article is also relevant to [[demos]], which work much the same way.)<br />
<br />
'''Synchronized events''' are always triggered on all computers at the same time and under the same conditions, triggered on specific in-game situations. '''Unsynchronized events''', however, are usually triggered on only the local computer so the CON code doesn't have to work the same way on different computers. These events are usually display-related or affect only the local computer.<br />
<br />
In order to understand the interaction of random occurrences and unsynchronized events, you need to understand two things:<br />
# [[randvar]] and [[ifrnd]] are '''NOT RANDOM'''. They step through a pre-determined sequence of numbers that appear to be random.<br />
# In multiplayer, very little information is shared between the different computers. Each computer runs an ''almost independent'' instance of the game, sharing only information about the actions of the players. '''They do not share the outcomes of ifrnd or randvar.'''<br />
<br />
Every time something "random" happens in the game, it '''must happen the same way''' on all of the computers. Since all of them start with the same number and go through the same sequence of numbers at the same times, everything works. But if one computer calls ifrnd or randvar while the others do not, it ends up at a different place in the random sequence. The next time something random happens in the game, it occurs differently on this computer, causing the game to become '''out-of-sync'''. (This isn't even the worst case: Imagine ''each computer'' on a ''wildly'' different place in the sequence, resulting in almost no correlation between what each player sees in the game.)<br />
<br />
Unsynchronized events are not guaranteed to happen at the same time, or at all, between different computers in a multiplayer game. Therefore, it is not safe to use ifrnd or randvar in them, because they could end up out of sequence. It is also not safe to do anything affecting gameplay in these events for the same reason. '''[[Displayrand]] is an exception''' because it does not affect the sequence used by the other commands. '''Therefore it is safe to use in unsynchronized events.''' It should not be used in other events because that would cause the same problems outlined above.<br />
<br />
DO and DON'Ts:<br><br />
1. Do use [[randvar]],[[randvarvar]], [[ifrnd]] in '''synchronized''' events.<br><br />
2. Do use [[displayrand]], [[displayrandvar]], [[displayrandvarvar]] in '''unsynchronized''' events.<br><br />
3. Do not use [[randvar]],[[randvarvar]], [[ifrnd]] in '''unsynchronized''' events.<br><br />
4. Do not use [[displayrand]], [[displayrandvar]], [[displayrandvarvar]] in '''synchronized''' events.<br><br />
5. Do not collect information in '''unsynchronized''' events that later might be used in '''synchronized''' events or actors.<br><br />
6. Do not use local vars(like user options) in '''synchronized''' events. The compiler will warn you about this(note: it won't if a local var is in a state).<br><br />
7. Do not use gameplay related commands in '''unsynchronized''' events. The compiler will warn you about this(note: it won't if a local var is in a state).<br><br />
<br />
[[Category:Event manipulation]]</div>Dr. Kylstienhttps://wiki.eduke32.com/w/index.php?title=Unsynchronized_events&diff=7261Unsynchronized events2008-09-04T20:55:20Z<p>Dr. Kylstien: /* Staying in sync in multiplayer game */</p>
<hr />
<div>== Staying in sync in multiplayer game ==<br />
(This article is also relevant to [[demos]], which work much the same way.)<br />
<br />
'''Synchronized events''' are always triggered on all computers at the same time and under the same conditions, triggered on specific in-game situations. '''Unsynchronized events''', however, are usually triggered on only the local computer so the CON code doesn't have to work the same way on different computers. These events are usually display-related or affect only the local computer.<br />
<br />
In order to understand the interaction of random occurrences and unsynchronized events, you need to understand two things:<br />
# [[randvar]] and [[ifrnd]] are '''NOT RANDOM'''. They step through a pre-determined sequence of numbers that appear to be random.<br />
# In multiplayer, very little information is shared between the different computers. Each computer runs an ''almost independent'' instance of the game, sharing only information about the actions of the players. '''They do not share the outcomes of ifrnd or randvar.'''<br />
<br />
Every time something "random" happens in the game, it '''must happen the same way''' on all of the computers. Since all of them start with the same number and go through the same sequence of numbers at the same times, everything works. But if one computer calls ifrnd or randvar while the others do not, it ends up at a different place in the random sequence. The next time something random happens in the game, it occurs differently on this computer, causing the game to become '''out-of-sync'''. (This isn't even the worst case: Imagine ''each computer'' on a ''wildly'' different place in the sequence, resulting in almost no correlation between what each player sees in the game.)<br />
<br />
Unsynchronized events are not guaranteed to happen at the same time, or at all, between different computers in a multiplayer game. Therefore, it is not safe to use ifrnd or randvar in them, because they could end up out of sequence. It is also not safe to do anything affecting gameplay in these events for the same reason. '''[[Displayrand]] is an exception''' because it does not affect the sequence used by the other commands. '''Therefore it is safe to use in unsynchronized events.''' It should not be used in other events because that would cause the same problems outlined above.<br />
<br />
DO and DON'Ts:<br><br />
1. Do use [[randvar]],[[randvarvar]], [[ifrnd]] in '''synchronized''' events.<br><br />
2. Do use [[displayrand]], [[displayrandvar]], [[displayrandvarvar]] in '''unsynchronized''' events.<br><br />
3. Do not use [[randvar]],[[randvarvar]], [[ifrnd]] in '''unsynchronized''' events.<br><br />
4. Do not use [[displayrand]], [[displayrandvar]], [[displayrandvarvar]] in '''synchronized''' events.<br><br />
5. Do not collect information in '''unsynchronized''' events that later might be used in '''synchronized''' events or actors.<br><br />
6. Do not use local vars(like user options) in '''synchronized''' events. The compiler will warn you about this(note: it won't if a local var is in a state).<br><br />
7. Do not use gameplay related commands in '''unsynchronized''' events. The compiler will warn you about this(note: it won't if a local var is in a state).<br><br />
<br />
[[Category:Event manipulation]]</div>Dr. Kylstienhttps://wiki.eduke32.com/w/index.php?title=Gamearray&diff=6889Gamearray2008-05-27T00:04:16Z<p>Dr. Kylstien: </p>
<hr />
<div>A gamearray is a [[Scripting|CON]] version of the [[Wikipedia:Array|array data type]] common in programming languages. A gamearray is defined with: gamearray <name> <size>. The size parameter specifies how many values the array holds. Values in the array are accessed as <name>[<index>] with any command that reads from [[gamevar]]s. However, as of the May 16, 2008 snapshot, some commands may crash when used with a gamearray, so to be safe, use [[setvarvar]] to copy the value to a [[gamevar]]. Values can only be set with [[setarray]].</div>Dr. Kylstienhttps://wiki.eduke32.com/w/index.php?title=Gamearray&diff=6888Gamearray2008-05-26T23:58:29Z<p>Dr. Kylstien: </p>
<hr />
<div>A gamearray is a CON version of the array data type common in programming languages. A gamearray is defined with: gamearray <name> <size>. Values in the array are accessed as <name>[<index>] with any command that reads from [[gamevar]]s. However, as of the May 16, 2008 snapshot, some commands may crash when used with a gamearray, so to be safe, use setvarvar to copy the value to a [[gamevar]]. Values can only be set with [[setarray]].</div>Dr. Kylstienhttps://wiki.eduke32.com/w/index.php?title=Gamearray&diff=6809Gamearray2008-05-12T00:40:03Z<p>Dr. Kylstien: Fixed an inacurracy about reading from arrays.</p>
<hr />
<div>gamearray <name> <size><br />
<br />
Defines a gamearray. Values in the array are accessed as <name>[<index>] with any command that reads from [[gamevar]]s. Values can only be set with [[setarray]].</div>Dr. Kylstienhttps://wiki.eduke32.com/w/index.php?title=Gamearray&diff=6808Gamearray2008-05-11T23:17:14Z<p>Dr. Kylstien: </p>
<hr />
<div>gamearray <name> <size><br />
<br />
Defines an array. Values in the array are accessed as <array>[<index>] <[[gamevar]]>, which assigns the value of <index> from <array> to <[[gamevar]]>.<br />
<br />
See [[setarray]].</div>Dr. Kylstienhttps://wiki.eduke32.com/w/index.php?title=Setarray&diff=6807Setarray2008-05-11T23:16:36Z<p>Dr. Kylstien: </p>
<hr />
<div>setarray <[[gamearray]]>[<index>] <[[gamevar]]><br />
<br />
Sets <[[gamevar]]> to the value of <index> in <[[gamearray]]>. This is the only way to modify a [[gamearray]].</div>Dr. Kylstienhttps://wiki.eduke32.com/w/index.php?title=Setarray&diff=6806Setarray2008-05-11T23:15:00Z<p>Dr. Kylstien: </p>
<hr />
<div>setarray <array>[<index>] <gamevar><br />
<br />
Sets <gamevar> to the value of <index> in <array>. This is the only way to modify an array.</div>Dr. Kylstienhttps://wiki.eduke32.com/w/index.php?title=Setarray&diff=6805Setarray2008-05-11T23:13:37Z<p>Dr. Kylstien: As with my gamearray explanation, this is only intended to be a stop-gap measure.</p>
<hr />
<div>setarray <array>[<index>] <gamevar><br />
<br />
Sets <gamevar> to the value of <index> in <array>.</div>Dr. Kylstienhttps://wiki.eduke32.com/w/index.php?title=Gamearray&diff=6804Gamearray2008-05-11T23:11:18Z<p>Dr. Kylstien: </p>
<hr />
<div>gamearray <name> <size><br />
<br />
Defines an array. Values in the array are accessed as <array>[<index>] <gamevar>, which assigns the value of <index> from <array> to <gamevar>.<br />
<br />
See [[setarray]].</div>Dr. Kylstienhttps://wiki.eduke32.com/w/index.php?title=Gamearray&diff=6803Gamearray2008-05-11T23:10:35Z<p>Dr. Kylstien: This really needs a better treatment, but here is a basic explanation.</p>
<hr />
<div>gamearray <name> <size><br />
<br />
Defines an array. Values in the array are accessed as <array>[<index>] <gamevar>, which assigns the value of <index> from <array> to <gamevar>.</div>Dr. Kylstienhttps://wiki.eduke32.com/w/index.php?title=Category:Editing_C-9_Effects&diff=6522Category:Editing C-9 Effects2008-02-19T02:19:38Z<p>Dr. Kylstien: /* Making the Ceiling Blow Up (And Enemies Fall From the Sky!) */</p>
<hr />
<div>{{Build Intro}}<br />
<strong>NOTE: Much of information on this page is from around 1999. Some may be outdated, and some may be incorrect -- this page exists to get you started with the Level Editing and may not currently cover some of the additional features available in Mapster32.</strong><br />
__NOTOC__<br />
==C-9 Canisters (Visible)==<br />
C-9 is what creates the majority of choreographed explosions in Duke,Nukem 3D. To create an explosive can, simply place a sprite where you want the can to be. Change it to either the C-9 sprite (#1247), the OOZFILTER sprite (#1079), or the exploding barrel sprite (#1238). If you want to place explosive underwater mines, place the BOUNCEMINE sprite (#940). If you own version 1.4 or 1.5 of Duke Nukem 3D, you can use the GUNPOWDERBARREL (#4360) as well.<br />
<br />
==Switch Activated Explosions==<br />
This effect allows you to choreograph explosions and set them off via a switch.<br />
* STEP 1: Place a switch sprite somewhere in your level. This will be where you set off the explosion from. Give the switch sprite a unique lotag value.<br />
* STEP 2: Place one Masterswitch sprite in *every* sector that you want an explosion to take place in. Give every single Masterswitch sprite the same lotag value that you gave the switch. If you want to create a delay between flipping the switch and the first explosion, give the Masterswitch a hitag value of the delay you wish to have.<br />
* STEP 3: Place C-9 sprites (#1247) everywhere you want an explosion to take place. You can raise the sprites to where you want, creating some nicely choreographed explosions.<br />
* NOTE 1: Placing a large number of C-9 sprites can cause your computer to slow drastically if you are running on a slower processor.<br />
* STEP 4: Shrink each C-9 sprite as far as you can width wise. This can be done by using the [5]+[4] key combination on the *numberpad*. When the sprites shrink no farther, you know that you are as small as you can get.<br />
* STEP 5: Give every C-9 sprite a hitag value equal to the lotag value that you gave the switch in step 1.<br />
* STEP 6: Now give each C-9 sprite any lotag value that you want. The lotag value for each C-9 sprite is the delay that the C-9 will wait before exploding.<br />
* NOTE 2: A lotag value of 0 on the C-9 sprites will cause these sprites to *not* explode. Make sure that the lotag value is greater than 0.<br />
* NOTE 3: A lotag value of 96 is roughly one second. Experiment to find out what is best for your situation.<br />
<br />
==Touchplate Activated Explosions==<br />
To create Touchplate activated explosions, follow the exact same procedure in the above section (Switch Activated Explosions). The only change here is that you replace the switch sprite with a Touchplate sprite.<br />
<br />
==Cracked Walls==<br />
This effect is what allows the player to launch some sort of explosive at a crack in a wall, generally forming a hole in the wall in which the player can walk through. <br />
<br />
* STEP 1: Create your "hole" sectors where you want the hole to be. They all should be valid player space. You can use as many sectors as you want, but the more sectors you use, the more work you will have to put into this construction. Make this hole look like you want it to look *after* the explosion has occurred. You can tilt the floor and ceiling as much as you want as well. <br />
* NOTE 1: The floor and ceiling should fit perfectly when lowered together (i.e. - the slope amount for each should be the *exact* same). This is not required, but it certainly makes the effect look better. <br />
* STEP 2: Place a crack sprite (#546, #547, #548, or #549) on the wall in front of the hole sectors. Give the crack sprite a unique hitag value. <br />
* NOTE 2: It is recommended to make the crack sprite slightly transparent. This can be done by pressing the [T] key on the sprite while in 3D mode. <br />
* STEP 3: Place one sector effector sprite in each hole sector. Give each sprite the same hitag value that you gave the crack sprite. Now give each a lotag value of 13. <br />
* STEP 4: Place C-9 sprites throughout your hole if you want to have explosions when the hole is blown open. If you do not wish to have any explosions take place, skip this step. Shrink each C-9 sprite as far as you can width wise (with the [4]+[5] key combination on the *numberpad*). When the sprites shrink no farther, you know that you are as small as you can get. Give each C-9 sprite the same hitag value that you gave the crack sprite. Now give each C-9 sprite a lotag value equal to the delay that you want the C-9 to have before exploding. <br />
* STEP 5: You are now completely finished! Take a look at the tutorial map if you do not fully understand.<br />
<br />
==Fixing The "Texture Problem"==<br />
This is a common problem that occurs when making cracked walls and it can make a level look very ugly. The problem is that, when a cracked wall is blown up, the textures above and below the hole misalign. To fix this problem, simply press the [O] (the letter o, not the number zero) key on the misaligned walls in 3D mode. The problem will correct itself, and will be correct in the game. The tutorial map shows the effect with this problem, and without this problem. Note that no aligning is needed on the textures at all.<br />
<br />
==Making the Ceiling Blow Up (And Enemies Fall From the Sky!)==<br />
First seen in Episode 1, Level 2, this effect is one of the coolest, and one of the most complex effects there is. When constructed correctly, this effect can look '''quite''' nice. <br />
<br />
* STEP 1: Construct the sector that will explode. Make it look as if the explosion has already taken place. The ceiling for this sector should have a parallaxed sky, and this texture '''MUST''' appear in at least one other place on the map. If it does not, this effect will not work correctly! If you are not using parallax in your level, simple parallax the ceiling of the sector you will make in step 3. <br />
* STEP 2: Place one Touchplate sprite in the sector that you want to trigger the explosion from. Do *not* place this Touchplate in the sector that will explode. Give this Touchplate sprite a hitag value of 1 and a unique lotag value. <br />
* STEP 3: Create a small sector in an area of your map that will never be accessed by the player (i.e. - this sector should be by itself in the corner of your map or somewhere of the sort). In this sector, place one C-9 sprite. Give this C-9 sprite a hitag value equal to the lotag value of the Touchplate, and leave the lotag set as 0. Also place one Masterswitch sprite in this sector. Give this Masterswitch sprite a lotag value equal to the Touchplate lotag value, and leave the hitag value set at 0. <br />
* STEP 4: Place 2 sector effector sprites in the sector that will explode. Give one of these sprites a lotag value of 33, and leave the hitag set at 0. Then give the other sprite a lotag value of 13 and a hitag equal to the Touchplate lotag value. Raise the sprite with the lotag of 33 as far up as it goes (press [CTRL]+[PGUP] to do this). Raise the sprite with the lotag of 13 to the height of the ceiling of the surrounding sector. This part can be tricky, as you must make the sector effector with lotag of 13 *exactly* as high as the ceiling of the surrounding sector, or it won't look right. <br />
* NOTE 1: The angle for the sector effector sprite with the lotag of 13 should be straight down. If it is not, this effect will not work properly. <br />
* STEP 5: Place a few Respawn sprites (#9) in the sector that will explode, giving each a lotag value equal to the Touchplate lotag. Give each a hitag value equal to the sprite number that you wish to spawn. Raise each sprite up to the ceiling level. <br />
* STEP 6: Place one more sector effector sprite in the sector that will explode and give it a hitag equal to the Touchplate lotag. Also give this sprite a lotag of 8. This simulates the effect of light coming in through the hole, so make sure that the surrounding sector shade and the shade of the exploding sector is darker than 0. Leave the shade of this sprite set at 0 (it isn't required to be left at zero - just as long as the shade is brighter than the surroundings). <br />
* STEP 7: Place some C-9 sprites in the sector that will explode. Give them a hitag equal to the Touchplate lotag, and a lotag equal to the delay you wish them to wait before exploding. Raise these to any height that you want. Be sure to shrink them all the way width- wise with the [4]+[5] key combination on the numberpad. You are now finished! Take a look at the tutorial map if you do not fully understand.</div>Dr. Kylstienhttps://wiki.eduke32.com/w/index.php?title=Category:Editing_C-9_Effects&diff=6521Category:Editing C-9 Effects2008-02-19T02:15:59Z<p>Dr. Kylstien: /* Fixing The ‘Texture Problem’ */</p>
<hr />
<div>{{Build Intro}}<br />
<strong>NOTE: Much of information on this page is from around 1999. Some may be outdated, and some may be incorrect -- this page exists to get you started with the Level Editing and may not currently cover some of the additional features available in Mapster32.</strong><br />
__NOTOC__<br />
==C-9 Canisters (Visible)==<br />
C-9 is what creates the majority of choreographed explosions in Duke,Nukem 3D. To create an explosive can, simply place a sprite where you want the can to be. Change it to either the C-9 sprite (#1247), the OOZFILTER sprite (#1079), or the exploding barrel sprite (#1238). If you want to place explosive underwater mines, place the BOUNCEMINE sprite (#940). If you own version 1.4 or 1.5 of Duke Nukem 3D, you can use the GUNPOWDERBARREL (#4360) as well.<br />
<br />
==Switch Activated Explosions==<br />
This effect allows you to choreograph explosions and set them off via a switch.<br />
* STEP 1: Place a switch sprite somewhere in your level. This will be where you set off the explosion from. Give the switch sprite a unique lotag value.<br />
* STEP 2: Place one Masterswitch sprite in *every* sector that you want an explosion to take place in. Give every single Masterswitch sprite the same lotag value that you gave the switch. If you want to create a delay between flipping the switch and the first explosion, give the Masterswitch a hitag value of the delay you wish to have.<br />
* STEP 3: Place C-9 sprites (#1247) everywhere you want an explosion to take place. You can raise the sprites to where you want, creating some nicely choreographed explosions.<br />
* NOTE 1: Placing a large number of C-9 sprites can cause your computer to slow drastically if you are running on a slower processor.<br />
* STEP 4: Shrink each C-9 sprite as far as you can width wise. This can be done by using the [5]+[4] key combination on the *numberpad*. When the sprites shrink no farther, you know that you are as small as you can get.<br />
* STEP 5: Give every C-9 sprite a hitag value equal to the lotag value that you gave the switch in step 1.<br />
* STEP 6: Now give each C-9 sprite any lotag value that you want. The lotag value for each C-9 sprite is the delay that the C-9 will wait before exploding.<br />
* NOTE 2: A lotag value of 0 on the C-9 sprites will cause these sprites to *not* explode. Make sure that the lotag value is greater than 0.<br />
* NOTE 3: A lotag value of 96 is roughly one second. Experiment to find out what is best for your situation.<br />
<br />
==Touchplate Activated Explosions==<br />
To create Touchplate activated explosions, follow the exact same procedure in the above section (Switch Activated Explosions). The only change here is that you replace the switch sprite with a Touchplate sprite.<br />
<br />
==Cracked Walls==<br />
This effect is what allows the player to launch some sort of explosive at a crack in a wall, generally forming a hole in the wall in which the player can walk through. <br />
<br />
* STEP 1: Create your "hole" sectors where you want the hole to be. They all should be valid player space. You can use as many sectors as you want, but the more sectors you use, the more work you will have to put into this construction. Make this hole look like you want it to look *after* the explosion has occurred. You can tilt the floor and ceiling as much as you want as well. <br />
* NOTE 1: The floor and ceiling should fit perfectly when lowered together (i.e. - the slope amount for each should be the *exact* same). This is not required, but it certainly makes the effect look better. <br />
* STEP 2: Place a crack sprite (#546, #547, #548, or #549) on the wall in front of the hole sectors. Give the crack sprite a unique hitag value. <br />
* NOTE 2: It is recommended to make the crack sprite slightly transparent. This can be done by pressing the [T] key on the sprite while in 3D mode. <br />
* STEP 3: Place one sector effector sprite in each hole sector. Give each sprite the same hitag value that you gave the crack sprite. Now give each a lotag value of 13. <br />
* STEP 4: Place C-9 sprites throughout your hole if you want to have explosions when the hole is blown open. If you do not wish to have any explosions take place, skip this step. Shrink each C-9 sprite as far as you can width wise (with the [4]+[5] key combination on the *numberpad*). When the sprites shrink no farther, you know that you are as small as you can get. Give each C-9 sprite the same hitag value that you gave the crack sprite. Now give each C-9 sprite a lotag value equal to the delay that you want the C-9 to have before exploding. <br />
* STEP 5: You are now completely finished! Take a look at the tutorial map if you do not fully understand.<br />
<br />
==Fixing The "Texture Problem"==<br />
This is a common problem that occurs when making cracked walls and it can make a level look very ugly. The problem is that, when a cracked wall is blown up, the textures above and below the hole misalign. To fix this problem, simply press the [O] (the letter o, not the number zero) key on the misaligned walls in 3D mode. The problem will correct itself, and will be correct in the game. The tutorial map shows the effect with this problem, and without this problem. Note that no aligning is needed on the textures at all.<br />
<br />
==Making the Ceiling Blow Up (And Enemies Fall From the Sky!)==</div>Dr. Kylstienhttps://wiki.eduke32.com/w/index.php?title=Category:Editing_C-9_Effects&diff=6520Category:Editing C-9 Effects2008-02-19T02:14:58Z<p>Dr. Kylstien: /* Cracked Walls */</p>
<hr />
<div>{{Build Intro}}<br />
<strong>NOTE: Much of information on this page is from around 1999. Some may be outdated, and some may be incorrect -- this page exists to get you started with the Level Editing and may not currently cover some of the additional features available in Mapster32.</strong><br />
__NOTOC__<br />
==C-9 Canisters (Visible)==<br />
C-9 is what creates the majority of choreographed explosions in Duke,Nukem 3D. To create an explosive can, simply place a sprite where you want the can to be. Change it to either the C-9 sprite (#1247), the OOZFILTER sprite (#1079), or the exploding barrel sprite (#1238). If you want to place explosive underwater mines, place the BOUNCEMINE sprite (#940). If you own version 1.4 or 1.5 of Duke Nukem 3D, you can use the GUNPOWDERBARREL (#4360) as well.<br />
<br />
==Switch Activated Explosions==<br />
This effect allows you to choreograph explosions and set them off via a switch.<br />
* STEP 1: Place a switch sprite somewhere in your level. This will be where you set off the explosion from. Give the switch sprite a unique lotag value.<br />
* STEP 2: Place one Masterswitch sprite in *every* sector that you want an explosion to take place in. Give every single Masterswitch sprite the same lotag value that you gave the switch. If you want to create a delay between flipping the switch and the first explosion, give the Masterswitch a hitag value of the delay you wish to have.<br />
* STEP 3: Place C-9 sprites (#1247) everywhere you want an explosion to take place. You can raise the sprites to where you want, creating some nicely choreographed explosions.<br />
* NOTE 1: Placing a large number of C-9 sprites can cause your computer to slow drastically if you are running on a slower processor.<br />
* STEP 4: Shrink each C-9 sprite as far as you can width wise. This can be done by using the [5]+[4] key combination on the *numberpad*. When the sprites shrink no farther, you know that you are as small as you can get.<br />
* STEP 5: Give every C-9 sprite a hitag value equal to the lotag value that you gave the switch in step 1.<br />
* STEP 6: Now give each C-9 sprite any lotag value that you want. The lotag value for each C-9 sprite is the delay that the C-9 will wait before exploding.<br />
* NOTE 2: A lotag value of 0 on the C-9 sprites will cause these sprites to *not* explode. Make sure that the lotag value is greater than 0.<br />
* NOTE 3: A lotag value of 96 is roughly one second. Experiment to find out what is best for your situation.<br />
<br />
==Touchplate Activated Explosions==<br />
To create Touchplate activated explosions, follow the exact same procedure in the above section (Switch Activated Explosions). The only change here is that you replace the switch sprite with a Touchplate sprite.<br />
<br />
==Cracked Walls==<br />
This effect is what allows the player to launch some sort of explosive at a crack in a wall, generally forming a hole in the wall in which the player can walk through. <br />
<br />
* STEP 1: Create your "hole" sectors where you want the hole to be. They all should be valid player space. You can use as many sectors as you want, but the more sectors you use, the more work you will have to put into this construction. Make this hole look like you want it to look *after* the explosion has occurred. You can tilt the floor and ceiling as much as you want as well. <br />
* NOTE 1: The floor and ceiling should fit perfectly when lowered together (i.e. - the slope amount for each should be the *exact* same). This is not required, but it certainly makes the effect look better. <br />
* STEP 2: Place a crack sprite (#546, #547, #548, or #549) on the wall in front of the hole sectors. Give the crack sprite a unique hitag value. <br />
* NOTE 2: It is recommended to make the crack sprite slightly transparent. This can be done by pressing the [T] key on the sprite while in 3D mode. <br />
* STEP 3: Place one sector effector sprite in each hole sector. Give each sprite the same hitag value that you gave the crack sprite. Now give each a lotag value of 13. <br />
* STEP 4: Place C-9 sprites throughout your hole if you want to have explosions when the hole is blown open. If you do not wish to have any explosions take place, skip this step. Shrink each C-9 sprite as far as you can width wise (with the [4]+[5] key combination on the *numberpad*). When the sprites shrink no farther, you know that you are as small as you can get. Give each C-9 sprite the same hitag value that you gave the crack sprite. Now give each C-9 sprite a lotag value equal to the delay that you want the C-9 to have before exploding. <br />
* STEP 5: You are now completely finished! Take a look at the tutorial map if you do not fully understand.<br />
<br />
==Fixing The ‘Texture Problem’==<br />
<br />
==Making the Ceiling Blow Up (And Enemies Fall From the Sky!)==</div>Dr. Kylstienhttps://wiki.eduke32.com/w/index.php?title=Category:Editing_C-9_Effects&diff=6519Category:Editing C-9 Effects2008-02-19T02:13:27Z<p>Dr. Kylstien: /* Touchplate Activated Explosions */</p>
<hr />
<div>{{Build Intro}}<br />
<strong>NOTE: Much of information on this page is from around 1999. Some may be outdated, and some may be incorrect -- this page exists to get you started with the Level Editing and may not currently cover some of the additional features available in Mapster32.</strong><br />
__NOTOC__<br />
==C-9 Canisters (Visible)==<br />
C-9 is what creates the majority of choreographed explosions in Duke,Nukem 3D. To create an explosive can, simply place a sprite where you want the can to be. Change it to either the C-9 sprite (#1247), the OOZFILTER sprite (#1079), or the exploding barrel sprite (#1238). If you want to place explosive underwater mines, place the BOUNCEMINE sprite (#940). If you own version 1.4 or 1.5 of Duke Nukem 3D, you can use the GUNPOWDERBARREL (#4360) as well.<br />
<br />
==Switch Activated Explosions==<br />
This effect allows you to choreograph explosions and set them off via a switch.<br />
* STEP 1: Place a switch sprite somewhere in your level. This will be where you set off the explosion from. Give the switch sprite a unique lotag value.<br />
* STEP 2: Place one Masterswitch sprite in *every* sector that you want an explosion to take place in. Give every single Masterswitch sprite the same lotag value that you gave the switch. If you want to create a delay between flipping the switch and the first explosion, give the Masterswitch a hitag value of the delay you wish to have.<br />
* STEP 3: Place C-9 sprites (#1247) everywhere you want an explosion to take place. You can raise the sprites to where you want, creating some nicely choreographed explosions.<br />
* NOTE 1: Placing a large number of C-9 sprites can cause your computer to slow drastically if you are running on a slower processor.<br />
* STEP 4: Shrink each C-9 sprite as far as you can width wise. This can be done by using the [5]+[4] key combination on the *numberpad*. When the sprites shrink no farther, you know that you are as small as you can get.<br />
* STEP 5: Give every C-9 sprite a hitag value equal to the lotag value that you gave the switch in step 1.<br />
* STEP 6: Now give each C-9 sprite any lotag value that you want. The lotag value for each C-9 sprite is the delay that the C-9 will wait before exploding.<br />
* NOTE 2: A lotag value of 0 on the C-9 sprites will cause these sprites to *not* explode. Make sure that the lotag value is greater than 0.<br />
* NOTE 3: A lotag value of 96 is roughly one second. Experiment to find out what is best for your situation.<br />
<br />
==Touchplate Activated Explosions==<br />
To create Touchplate activated explosions, follow the exact same procedure in the above section (Switch Activated Explosions). The only change here is that you replace the switch sprite with a Touchplate sprite.<br />
<br />
==Cracked Walls==<br />
<br />
==Fixing The ‘Texture Problem’==<br />
<br />
==Making the Ceiling Blow Up (And Enemies Fall From the Sky!)==</div>Dr. Kylstienhttps://wiki.eduke32.com/w/index.php?title=Category:Editing_C-9_Effects&diff=6518Category:Editing C-9 Effects2008-02-19T02:10:40Z<p>Dr. Kylstien: /* Switch Activated Explosions */</p>
<hr />
<div>{{Build Intro}}<br />
<strong>NOTE: Much of information on this page is from around 1999. Some may be outdated, and some may be incorrect -- this page exists to get you started with the Level Editing and may not currently cover some of the additional features available in Mapster32.</strong><br />
__NOTOC__<br />
==C-9 Canisters (Visible)==<br />
C-9 is what creates the majority of choreographed explosions in Duke,Nukem 3D. To create an explosive can, simply place a sprite where you want the can to be. Change it to either the C-9 sprite (#1247), the OOZFILTER sprite (#1079), or the exploding barrel sprite (#1238). If you want to place explosive underwater mines, place the BOUNCEMINE sprite (#940). If you own version 1.4 or 1.5 of Duke Nukem 3D, you can use the GUNPOWDERBARREL (#4360) as well.<br />
<br />
==Switch Activated Explosions==<br />
This effect allows you to choreograph explosions and set them off via a switch.<br />
* STEP 1: Place a switch sprite somewhere in your level. This will be where you set off the explosion from. Give the switch sprite a unique lotag value.<br />
* STEP 2: Place one Masterswitch sprite in *every* sector that you want an explosion to take place in. Give every single Masterswitch sprite the same lotag value that you gave the switch. If you want to create a delay between flipping the switch and the first explosion, give the Masterswitch a hitag value of the delay you wish to have.<br />
* STEP 3: Place C-9 sprites (#1247) everywhere you want an explosion to take place. You can raise the sprites to where you want, creating some nicely choreographed explosions.<br />
* NOTE 1: Placing a large number of C-9 sprites can cause your computer to slow drastically if you are running on a slower processor.<br />
* STEP 4: Shrink each C-9 sprite as far as you can width wise. This can be done by using the [5]+[4] key combination on the *numberpad*. When the sprites shrink no farther, you know that you are as small as you can get.<br />
* STEP 5: Give every C-9 sprite a hitag value equal to the lotag value that you gave the switch in step 1.<br />
* STEP 6: Now give each C-9 sprite any lotag value that you want. The lotag value for each C-9 sprite is the delay that the C-9 will wait before exploding.<br />
* NOTE 2: A lotag value of 0 on the C-9 sprites will cause these sprites to *not* explode. Make sure that the lotag value is greater than 0.<br />
* NOTE 3: A lotag value of 96 is roughly one second. Experiment to find out what is best for your situation.<br />
<br />
==Touchplate Activated Explosions==<br />
<br />
==Cracked Walls==<br />
<br />
==Fixing The ‘Texture Problem’==<br />
<br />
==Making the Ceiling Blow Up (And Enemies Fall From the Sky!)==</div>Dr. Kylstienhttps://wiki.eduke32.com/w/index.php?title=Category:Editing_C-9_Effects&diff=6517Category:Editing C-9 Effects2008-02-19T02:06:19Z<p>Dr. Kylstien: /* C-9 Canisters (Visible) */</p>
<hr />
<div>{{Build Intro}}<br />
<strong>NOTE: Much of information on this page is from around 1999. Some may be outdated, and some may be incorrect -- this page exists to get you started with the Level Editing and may not currently cover some of the additional features available in Mapster32.</strong><br />
__NOTOC__<br />
==C-9 Canisters (Visible)==<br />
C-9 is what creates the majority of choreographed explosions in Duke,Nukem 3D. To create an explosive can, simply place a sprite where you want the can to be. Change it to either the C-9 sprite (#1247), the OOZFILTER sprite (#1079), or the exploding barrel sprite (#1238). If you want to place explosive underwater mines, place the BOUNCEMINE sprite (#940). If you own version 1.4 or 1.5 of Duke Nukem 3D, you can use the GUNPOWDERBARREL (#4360) as well.<br />
<br />
==Switch Activated Explosions==<br />
<br />
==Touchplate Activated Explosions==<br />
<br />
==Cracked Walls==<br />
<br />
==Fixing The ‘Texture Problem’==<br />
<br />
==Making the Ceiling Blow Up (And Enemies Fall From the Sky!)==</div>Dr. Kylstienhttps://wiki.eduke32.com/w/index.php?title=EVENT_DISPLAYSBAR&diff=6516EVENT DISPLAYSBAR2008-02-17T21:15:59Z<p>Dr. Kylstien: New page: This event is used to display the status bar. Setting RETURN to a non-zero value will prevent the status bar from being rendered. The area where the big status bar would normally appea...</p>
<hr />
<div>This event is used to display the status bar. Setting [[RETURN]] to a non-zero value will prevent the status bar from being rendered. The area where the big status bar would normally appear remains, however, and will contain visual glitches.</div>Dr. Kylstienhttps://wiki.eduke32.com/w/index.php?title=PLR_MORALE&diff=6507PLR MORALE2008-02-16T05:11:52Z<p>Dr. Kylstien: Quick fix for clarity.</p>
<hr />
<div>PLR_MORALE is a gamevar that is used to override shield amount which is shown at the status bar.<br />
<br />
It doesn't change the shield amount. It just changes the value displayed at the status bar.<br />
The default value is -1. When this variable is -1, the status bar shows the actual shield amount. If not, it shows PLR_MORALE instead.<br />
<br />
This variable can be useful for debugging. If you want to know a variable's value, just set PLR_MORALE to it. This way, you can see the value at the status bar and it won't affect the gameplay.<br />
<br />
This variable was used to display the player's morale in [[WW2GI]].</div>Dr. Kylstienhttps://wiki.eduke32.com/w/index.php?title=PLR_MORALE&diff=6506PLR MORALE2008-02-16T05:08:14Z<p>Dr. Kylstien: Added an explanation for the name, tried to improve the writing style of the article.</p>
<hr />
<div>PLR_MORALE is a gamevar that is used to override shield amount which is shown at the status bar.<br />
<br />
It doesn't change the shield amount. It just a visual illusion at the status bar.<br />
The default value is -1. When this variable is -1, the status bar shows the actual shield amount. If not, it shows PLR_MORALE instead.<br />
<br />
This variable can be useful for debugging. If you want to know a variable's value, just set PLR_MORALE to it. This way, you can see the value at the status bar and it won't affect the gameplay.<br />
<br />
This variable was used to display the player's morale in [[WW2GI]].</div>Dr. Kylstienhttps://wiki.eduke32.com/w/index.php?title=Cheatkeys&diff=6401Cheatkeys2007-11-23T02:12:29Z<p>Dr. Kylstien: </p>
<hr />
<div>cheatkeys <scan code> <scan code><br />
<br />
This command defines the two key-presses that must begin every cheat code.<br />
<br />
[[Category:EDuke32 specific commands]]<br />
[[Category:Game manipulation]]</div>Dr. Kylstienhttps://wiki.eduke32.com/w/index.php?title=Cheatkeys&diff=6400Cheatkeys2007-11-23T02:11:17Z<p>Dr. Kylstien: New page: cheatkeys <scan code> <scan code> This command defines the two key-presses that must begin every cheat code.</p>
<hr />
<div>cheatkeys <scan code> <scan code><br />
<br />
This command defines the two key-presses that must begin every cheat code.</div>Dr. Kylstienhttps://wiki.eduke32.com/w/index.php?title=Extbits&diff=6263Extbits2007-08-24T23:38:11Z<p>Dr. Kylstien: New page: The extbits member of the input structure is a bit-field like bits. The following defines show what these bits indicate: <pre> define INPUT_MOVE_FORWARD 1 define INPUT_MOVE_BACKWARD 2 ...</p>
<hr />
<div>The extbits member of the input structure is a bit-field like [[bits]]. The following defines show what these bits indicate:<br />
<pre><br />
define INPUT_MOVE_FORWARD 1<br />
define INPUT_MOVE_BACKWARD 2<br />
define INPUT_STRAFE_lEFT 4<br />
define INPUT_STRAFE_RIGHT 8<br />
define INPUT_TURN_LEFT 16<br />
define INPUT_TURN_RIGHT 32<br />
</pre><br />
[[Category:Input structure members]]</div>Dr. Kylstienhttps://wiki.eduke32.com/w/index.php?title=Category:Input_structure_members&diff=6262Category:Input structure members2007-08-24T23:25:36Z<p>Dr. Kylstien: </p>
<hr />
<div>[[Category:Game manipulation]]</div>Dr. Kylstienhttps://wiki.eduke32.com/w/index.php?title=Category:Input_structure_members&diff=6261Category:Input structure members2007-08-24T23:24:26Z<p>Dr. Kylstien: New page: Category:Player manipulation</p>
<hr />
<div>[[Category:Player manipulation]]</div>Dr. Kylstienhttps://wiki.eduke32.com/w/index.php?title=Bits&diff=6260Bits2007-08-24T22:35:23Z<p>Dr. Kylstien: </p>
<hr />
<div>''''''bits'''''' returns a bit-field indicating which buttons the player is pressing. A particular button press can be checked by using [[ifvarand]] with the following values:<br />
<pre><br />
define INPUT_JUMP 1<br />
define INPUT_CROUCH 2<br />
define INPUT_FIRE 4<br />
define INPUT_AIM_UP 8<br />
define INPUT_AIM_DOWN 16<br />
define INPUT_RUNNING 32<br />
define INPUT_LOOK_LEFT 64<br />
define INPUT_LOOK_RIGHT 128<br />
define INPUT_WEAPON_1 256<br />
define INPUT_WEAPON_2 512<br />
define INPUT_WEAPON_3 768<br />
define INPUT_WEAPON_4 1024<br />
define INPUT_WEAPON_5 1280<br />
define INPUT_WEAPON_6 1536<br />
define INPUT_WEAPON_7 1792<br />
define INPUT_WEAPON_8 2048<br />
define INPUT_WEAPON_9 2304<br />
define INPUT_WEAPON_10 2560<br />
define INPUT_WEAPON_PREV 2816<br />
define INPUT_WEAPON_NEXT 3072<br />
define INPUT_STEROIDS 4096<br />
define INPUT_LOOK_UP 8192<br />
define INPUT_LOOK_DOWN 16384<br />
define INPUT_NIGHTVISION 32768<br />
define INPUT_MEDKIT 65536<br />
define INPUT_RESERVED 131072<br />
define INPUT_CENTER_VIEW 262144<br />
define INPUT_HOLSTER_WEAPON 524288<br />
define INPUT_INVENTORY_LEFT 1048576<br />
define INPUT_PAUSE 2097152<br />
define INPUT_QUICK_KICK 4194304<br />
define INPUT_AIM_MODE 8388608<br />
define INPUT_HOLODUKE 16777216<br />
define INPUT_JETPACK 33554432<br />
define INPUT_QUIT 67108864<br />
define INPUT_INVENTORY_RIGHT 134217728<br />
define INPUT_TURN_AROUND 268435456<br />
define INPUT_OPEN 536870912<br />
define INPUT_INVENTORY 1073741824<br />
define INPUT_ESC 2147483648<br />
</pre><br />
[[Category:Input structure members]]</div>Dr. Kylstienhttps://wiki.eduke32.com/w/index.php?title=Svel&diff=6259Svel2007-08-24T22:33:26Z<p>Dr. Kylstien: </p>
<hr />
<div>The svel member of the input structure indicates the inputs assigned to movement and strafe as they relate to the BUILD y axis. Therefore the value has more in common with [[posyv]] than the player's "strafe velocity".<br />
[[Category:Input structure members]]</div>Dr. Kylstienhttps://wiki.eduke32.com/w/index.php?title=Fvel&diff=6258Fvel2007-08-24T22:32:41Z<p>Dr. Kylstien: </p>
<hr />
<div>The fvel member of the input structure indicates the inputs assigned to movement and strafe as they relate to the BUILD x axis. Therefore the value has more in common with [[posxv]] than the player's "forward velocity".<br />
[[Category:Input structure members]]</div>Dr. Kylstienhttps://wiki.eduke32.com/w/index.php?title=Svel&diff=6257Svel2007-08-24T22:31:44Z<p>Dr. Kylstien: </p>
<hr />
<div>The svel member of the input structure indicates the inputs assigned to movement and strafe as they relate to the BUILD y axis. Therefore the value has more in common with [[posyv]] than the player's "strafe velocity".</div>Dr. Kylstienhttps://wiki.eduke32.com/w/index.php?title=Svel&diff=6256Svel2007-08-24T22:31:20Z<p>Dr. Kylstien: </p>
<hr />
<div>The svel member of the input structure indicates the inputs assigned to movement and strafe as they relate to the BUILD y axis. Therefore the value has more in common with [[posyv]] than the player's "sideways velocity".</div>Dr. Kylstienhttps://wiki.eduke32.com/w/index.php?title=Svel&diff=6255Svel2007-08-24T22:31:07Z<p>Dr. Kylstien: New page: The svel member of the input structure indicates the inputs assigned to movement and strafe as they relate to the BUILD y axis. Therefore the value has more in common with posyv than t...</p>
<hr />
<div>The svel member of the input structure indicates the inputs assigned to movement and strafe as they relate to the BUILD y axis. Therefore the value has more in common with [[posyv]] than the player's "forward velocity".</div>Dr. Kylstienhttps://wiki.eduke32.com/w/index.php?title=Fvel&diff=6254Fvel2007-08-24T22:29:57Z<p>Dr. Kylstien: New page: The fvel member of the input structure indicates the inputs assigned to movement and strafe as they relate to the BUILD x axis. Therefore the value has more in common with posxv than t...</p>
<hr />
<div>The fvel member of the input structure indicates the inputs assigned to movement and strafe as they relate to the BUILD x axis. Therefore the value has more in common with [[posxv]] than the player's "forward velocity".</div>Dr. Kylstien