NetDuke32: Difference between revisions

From EDukeWiki
Jump to navigation Jump to search
Some formatting and information updates.
Line 10: Line 10:
=== DEF Tokens ===
=== DEF Tokens ===
*'''addplayercolor <palnum> <name>''' - Adds a palswap to the list of selectable player colors for multiplayer.
*'''addplayercolor <palnum> <name>''' - Adds a palswap to the list of selectable player colors for multiplayer.
::Example: '''''addplayercolor 17 "Green (Blue Skin)"'''''
::Example: <code>addplayercolor 17 "Green (Blue Skin)"</code>


*'''delplayercolor <palnum>''' - Deletes a palswap from the list of selectable player colors for multiplayer. A value of -1 deletes them all. (Make sure to define your own after!)
*'''delplayercolor <palnum>''' - Deletes a palswap from the list of selectable player colors for multiplayer. A value of -1 deletes them all. (Make sure to define your own after!)
::Example: '''''delplayercolor 23''''' (This would make "Yellow" un-selectable)
::Example: <code>delplayercolor 23</code> (Which would make "Yellow" un-selectable.)


=== GameVars ===
=== GameVars ===
*'''predicting''' (Read-only) - Returns the processing state of NetDuke32's prediction system. Useful to prevent desynchronization or visual artifacts in certain scenarios; For example, trying to call "'''''spawn'''''" in player code that is normally predicted would result in a de-sync, but guarding it with "'''''ifvare predicting 0'''''" will make sure it only happens during the canonical gamestate, preserving synchronization.
*'''predicting''' (Read-only) - Returns the processing state of NetDuke32's prediction system. Useful to prevent desynchronization or visual artifacts in certain scenarios; For example, trying to call <code>spawn</code> in player code that is normally predicted would result in a de-sync, but guarding it with <code>ifvare predicting 0</code> will make sure it only happens during the canonical gamestate, preserving synchronization.
::Values:
::Values:
::: 0 = Currently processing canonical gamestate.
::: 0 = Currently processing canonical gamestate.
Line 26: Line 26:
=== Structure Members ===
=== Structure Members ===
==== UserDefs (get/setuserdef[].) ====
==== UserDefs (get/setuserdef[].) ====
'''dmflags''' - A bitfield containing a series of gameplay-affecting flags, such as friendly fire, respawning items, whether or not FOV changes are allowed, etc.
*'''teampal <teamnum>''' - Team's palette number.
::Example: <code>getuserdef[].teampal 2 TEMP // Gets team's palswap.</code>
*'''teamfrags <teamnum>''' - Team's frag count.
::Example: <code>getuserdef[].teampal 2 TEMP // Gets team's frag count.</code>
*'''teamsuicides <teamnum>''' - Team's number of suicides.
::Example: <code>setuserdef[].teamsuicides 2 0 // Sets team's suicides to 0.</code>
 
*'''dmflags''' - A bitfield containing a series of gameplay-affecting flags, such as friendly fire, respawning items, whether or not FOV changes are allowed, etc.
::Flags:
::Flags:
:::DMFLAG_FRIENDLYFIRE            = 1
:::DMFLAG_FRIENDLYFIRE            = 1
Line 40: Line 47:
:::DMFLAG_ALLOWVISIBILITYCHANGE    = 1024
:::DMFLAG_ALLOWVISIBILITYCHANGE    = 1024


'''m_dmflags''' - Same as above, but contains the flags selected in the menu, before being confirmed and transferred to '''dmflags''' when starting a new map.
*'''m_dmflags''' - Same as above, but contains the flags selected in the menu, before being confirmed and transferred to '''dmflags''' when starting a new map.


== Links ==
== Links ==

Revision as of 15:42, 7 April 2022

About

NetDuke32 is a multiplayer-centric port based on EDuke32. Started late 2015 as a series of maintenance builds of EDuke32-OldMP, it has since branched out and evolved. NetDuke32 brings new features, QoL (Quality of Life) and netcode improvements, and tries to improve the overall multiplayer experience.

Features

(Page is a work in progress)

Documentation

NetDuke32 has a few few exclusive DEF tokens, GameVars, and structure members to access a few of its unique features. They will be listed here.

DEF Tokens

  • addplayercolor <palnum> <name> - Adds a palswap to the list of selectable player colors for multiplayer.
Example: addplayercolor 17 "Green (Blue Skin)"
  • delplayercolor <palnum> - Deletes a palswap from the list of selectable player colors for multiplayer. A value of -1 deletes them all. (Make sure to define your own after!)
Example: delplayercolor 23 (Which would make "Yellow" un-selectable.)

GameVars

  • predicting (Read-only) - Returns the processing state of NetDuke32's prediction system. Useful to prevent desynchronization or visual artifacts in certain scenarios; For example, trying to call spawn in player code that is normally predicted would result in a de-sync, but guarding it with ifvare predicting 0 will make sure it only happens during the canonical gamestate, preserving synchronization.
Values:
0 = Currently processing canonical gamestate.
1 = Currently predicting upcoming gamestate.
2 = Making corrections to any mispredictions.
  • numteams (Read-only) - Returns the number of currently defined teams for TDM.
  • DMFLAGS - Gets or sets the current DMFlags. See UserDefs section for a list of flags.

Structure Members

UserDefs (get/setuserdef[].)

  • teampal <teamnum> - Team's palette number.
Example: getuserdef[].teampal 2 TEMP // Gets team's palswap.
  • teamfrags <teamnum> - Team's frag count.
Example: getuserdef[].teampal 2 TEMP // Gets team's frag count.
  • teamsuicides <teamnum> - Team's number of suicides.
Example: setuserdef[].teamsuicides 2 0 // Sets team's suicides to 0.
  • dmflags - A bitfield containing a series of gameplay-affecting flags, such as friendly fire, respawning items, whether or not FOV changes are allowed, etc.
Flags:
DMFLAG_FRIENDLYFIRE = 1
DMFLAG_NOMONSTERS = 2
DMFLAG_RESPAWNMONSTERS = 4
DMFLAG_RESPAWNITEMS = 8
DMFLAG_RESPAWNINVENTORY = 16
DMFLAG_MARKERS = 32
DMFLAG_NOEXITS = 64
DMFLAG_WEAPONSTAY = 128
DMFLAG_NOPLAYERID = 256
DMFLAG_NOFOVCHANGE = 512
DMFLAG_ALLOWVISIBILITYCHANGE = 1024
  • m_dmflags - Same as above, but contains the flags selected in the menu, before being confirmed and transferred to dmflags when starting a new map.

Links