Duke Nukem 3D: 20th Anniversary World Tour

Duke Nukem 3D: 20th Anniversary World Tour

Hail to the Mod, Baby!
The home of Duke Nukem 3D: 20th Anniversary World Tour workshop maps from the passionate members of the Duke community.
Jian Hou Zi 22 Apr, 2020 @ 4:52pm
Script memory allocation is insufficient for add-ons
I don't suppose anybody knows of a parameter or patch that increases the amount of memory allocated for the CON scripts?

Duke Nukem 3D v1.5 had this problem where if your CON files got too large the compiler would mess up and give false errors, like
Parameter 'LIZARD_BEG' is undefined
or
State 'rf' not found
even though those labels are clearly declared before the point of error. (I'm guessing too many labels resulted in previously declared labels being overwritten.)

To get around this, I put a lot of effort into optimizing my new code and the original code written by 3D Realms.

I just updated one of my old add-ons to be compatible with the Anniversary World Tour edition. I also optimized the new code from Gearbox (removed redundant curly braces, replaced duplicate bodies of code with calls to generic statements, removed a semi-colon which doesn't belong to the script language!, etc). With how sloppy Gearbox's new code was, I assumed they must have accommodated it by increasing the script memory allocation, but was surprised when my updated script failed with false errors like v1.5 did when the script was too large.

The workaround I found was to replace the code for the new monsters with the following:

actor FIREFLY TROOPSTRENGTH ATROOPSTAND state checktrooppalette state troopcode cactor LIZTROOP enda actor BOSS5 BOSS2STRENGTH cactor BOSS2 enda actor BOSS5STAYPUT BOSS2STRENGTH cactor BOSS2 enda

This replaces the firefly trooper with the standard trooper and the gimped flaming Cycloid Emperor with the standard Cycloid Emperor (which is actually an improvement since the new monsters were so poorly designed).

(I almost forgot: You don't actually see any error descriptions unless you use
|more
on the command line.)

My updated script without the workaround compiles perfectly with eDuke32, but, call me crazy, I'd like to get it working with World Tour as well.
< >
Showing 1-1 of 1 comments
Redxplatinum 3 29 Apr, 2020 @ 3:02pm 
That is awesome, but I think there's already a CON file that makes the boss fight more challenging.
< >
Showing 1-1 of 1 comments
Per page: 1530 50