TerminX, on 11 January 2014 - 03:16 AM, said:
you had better get used to the idea of players being able to set options in the menu and keep them that way without some poorly thought out mod functionality coming by and changing them to different values.
While I agree with the letter of this statement, unfortunately, it's not so clear-cut. The reality of the situation is that
userdef is a hodgepodge of shit that doesn't belong in the same struct. Here's a grep of the Duke 64 mod for "setuserdef":
DISPLAY.CON: setuserdef[THISACTOR].const_visibility DEFAULTVISIBILITY
DISPLAY.CON: setuserdef[THISACTOR].const_visibility DEFAULTVISIBILITY
DISPLAY.CON: setuserdef[THISACTOR].const_visibility DEFAULTVISIBILITY
GAME2.CON: setuserdef[THISACTOR].eog 1
GAME2.CON: setuserdef[THISACTOR].volume_number LASTVOLUME
GAME2.CON: setuserdef[THISACTOR].level_number LASTLEVEL
GAME2.CON: setuserdef[THISACTOR].eog 0
GAME2.CON: setuserdef[THISACTOR].volume_number 7
GAME2.CON: setuserdef[THISACTOR].volume_number TEMP
GAME2.CON: setuserdef[THISACTOR].volume_number MUSICVOLUME
GAME2.CON: setuserdef[THISACTOR].volume_number TEMP
HUD.CON: setuserdef[THISACTOR].screen_size 3
HUD.CON: setuserdef[THISACTOR].screen_size 3
HUD.CON: setuserdef[THISACTOR].screen_size 4
SCREENS.CON: setuserdef[THISACTOR].volume_number NEXTVOLUME
SCREENS.CON: setuserdef[THISACTOR].level_number NEXTLEVEL
SCREENS.CON: setuserdef[THISACTOR].volume_number TEMP2
SCREENS.CON: setuserdef[THISACTOR].level_number TEMP3
Just here we can see some different use cases.
const_visibility is effectively changing a
gamestartup value during gameplay. I think everything in gamestartup should be modifiable. Most is, such as
smaxammo, but not everything. I'm looking at QSIZE.
eog is a "game state" that works around hardcoded behavior, completely transparently to a player. (It's not a choice of any sort.)
level_number and volume_number are used to work around the inadequacies of
qgetsysstr (with STR_MAPNAME) and
starttrack, among other things.
Manipulating
screen_size is pretty much necessary to build a custom HUD. As with all of the above, there should be a better way.
It definitely needs cleaning up for Lunatic.
TerminX, on 11 January 2014 - 03:16 AM, said:
I'm not positive, but that may be caused by the game originally having a bug where the stayput versions of those enemies were omitted from an internal list of enemy sprites. If I'm remembering that correctly, I'm guessing they play the sounds now because the bug was fixed.
I'm too lazy to check but I may have fixed STAYPUTs at Fox's request along with the minibosses, and perhaps NEWBEAST too.