Donkha's coding blog

.con EDuke32 UDL for Notepad++

Table of Contents

  1. Description
  2. Download & Installation
  3. Detection Conflicts
  4. Revision History

Description

UDL stands for User Defined Language, this is a syntax highlight extension for the text editor Notepad++.
CON scripts are used in Duke Nukem 3D, this also contains the functions and aliases for EDuke32/Ion Fury.
Operators and setters are separated from the getters’ color for convenience.

Some generic sample code as preview using Lucida Console font:

npp_con_udl If you want to double-check the keywords, look into the engine's source code for this file: eduke32\source\duke3d\src\gamedef.cpp
And good luck because this isn’t exactly sorted for what we wanna do here.


Download & Installation

  1. Get the archive from Dropbox: direct download (6kb) / archive preview.
  2. Extract the .xml files (or just pick one: the _DM version is for dark mode) into your Notepad++\userDefineLangs\ folder then restart the application.
  3. (optional) UDLs aren't themes, to enable the dark mode go to:
    Settings -> Preferences... -> Dark Mode -> [x] Enable dark mode, then if you already have .con files opened, select: Language -> CON EDuke32 Script (dark mode).

Note: If you install both .xml files, the next .con file opened will use the relevant UDL depending if the dark mode is enabled or not.


Detection Conflicts

  • The command action to change the current actor's action, takes priority over the conflicting definition of an action.
  • Cannot add actor as the deprecated version of useractor in Folders in code1, open because it would conflict with the detection of both: actor the structure access and ifactor the condition.

Revision History

  • 2022 Aug. 10:
    • Changed the internal name to CON Eduke32 Script
    • Added a dark mode based on Zenburn's colors named CON Eduke32 Script (dark mode)
    • Added in Keywords1: #define, #include, gamestartup, precache, string
    • Corrected in Keywords4: ifactorstayput to ifactornotstayput
    • Added in Keywords5: getangle, getarrayseq, getngcflags, gmaxammo, playervar
    • Added in Keywords6: calchypotenuse, copy(array), displayrand, displayrandvar, displayrandvarvar, divr, divrd(div), divru, divscale, mulscale, sectorofwall, setactorangle(deprecated), setactorsoundpitch, setarrayseq, setarraysequence, seti, setinput, setmusicposition, setngcflags, setplayerangle(deprecated), setsprite, settiledata, smaxammo
    • Added in Keywords7: al, addlog, addweaponvar, angoffvar, betaname(deprecated), checkactivatormotion, checkavailinven, checkavailweapon, clipmovenoslide, debris, debug, digitalnumber(deprecated), digitalnumberz(deprecated), dist, dragpoint, drawline256, drawlinergb, enhanced, eqspawnvar, eshootvar, eshootvar, espawnvar, findnearactorvar, findnearactor3dvar, findnearactorzvar, findnearspritevar, findnearspritezvar, findnearsprite3dvar, guniqhudid, hitradiusvar, mail, mikesnd, myos(deprecated), myospal(deprecated), myospalx(deprecated), myosx(deprecated), neartag, nextsectorneighborz, nextspritesect, nextspritestat, palfrom, paper, prevspritesect, prevspritestat, preloadtrackslotforswap, print, qspawnvar, rayintersect, respawnhitag, sectclearinterpolation, sectgethitag(deprecated), sectgetlotag(deprecated), sectsetinterpolation, setaspect, setcfgname, setdefname, setgamename, setgamepalette, shadeto, shoot, shootvar, showview, showviewq16, showviewq16unbiased, showviewunbiased, soundoncevar, spawnceilingglass, spawnwallstainedglass, spawnwallglass, spgethitag(deprecated), sectgetlotag(deprecated), spriteflags, starttrackvar, stopsoundvar, strength, zshootvar
    • Added in Keywords8 all iteration tokens: activelights, allsectors, allsprites, allspritesbysect, allspritesbystat, allwalls, drawnsprites, lights, loopofwall, range, spritesofsector, spritesofstatus, sprofsec, sprofstat, wallsofsector, walofsec
    • Moved time from Keywords7 to Keywords5
    • Moved scalevar, sqrt from Keywords7 to Keywords6
    • Removed a duplicate of qstrdim from Keywords7
    • Removed switch from Keywords7 was a duplicate from the switch statement in Keywords3
    • Removed : from Operators1 those aren't needed in switch statement's cases and thus were bad practice
  • 2021 Jan. 11:
    • Initial release
Thoughts? Leave a comment