Homebrew [WIP] Duke Nukem 3D

  • Thread starter Thread starter MasterFeizz
  • Start date Start date
  • Views Views 142,222
  • Replies Replies 482
  • Likes Likes 43
Progress Update: I still can't figure out why the game won't close properly on the updated base code, so I'm going to focus on the "stable" code I've got now and apply the changes I've made to that instead. So for those waiting for a .CIA release, I'll probably be releasing that by the end of this week.
 
I'm messing around with launch arguments and .def files.

I successfully redirected the music files and .grp's to their own folders using .def files and loading them with the '-h [file.def]' command-line argument trough an .xml.

It works for both Duke it out in D.C. and Life's a Beach.
However Nuclear Winter requires 'SelectedGRP = "nwinter.grp"' set in the eduke32.cfg.

This could be solved with loading an alternative .cfg with a command-line argument, but i could not get it to work correctly.

A few struggles:

  • It seems the -cfg argument isn't recognized by eDuke.
  • Only one command-line argument is accepted at once.
  • Loading an additional folder -j [folder], with an alternative .cfg or .def doesn't override the ones in the game-root.

Any chance of getting this working, or could you shed some light on what would be the best way to launch mods?
Also, you mentioned setting the working-dir in the .xml, could you explain on what commands i could use?
 
I'm messing around with launch arguments and .def files.

I successfully redirected the music files and .grp's to their own folders using .def files and loading them with the '-h [file.def]' command-line argument trough an .xml.

It works for both Duke it out in D.C. and Life's a Beach.
However Nuclear Winter requires 'SelectedGRP = "nwinter.grp"' set in the eduke32.cfg.

This could be solved with loading an alternative .cfg with a command-line argument, but i could not get it to work correctly.

A few struggles:

  • It seems the -cfg argument isn't recognized by eDuke.
  • Only one command-line argument is accepted at once.
  • Loading an additional folder -j [folder], with an alternative .cfg or .def doesn't override the ones in the game-root.

Any chance of getting this working, or could you shed some light on what would be the best way to launch mods?
Also, you mentioned setting the working-dir in the .xml, could you explain on what commands i could use?

You can use -game_dir to overwrite the working dir, and -game_grp to set the main .grp

--------------------- MERGED ---------------------------

Here is a launcher for the nuclear winter addon:
Code:
<shortcut>
    <name>Duke Nukem: Nuclear Winter</name>
    <executable>/3ds/eduke3d/eduke3d.3dsx</executable>
    <arg>-gamegrp addons/nwinter.grp -x nwinter.con</arg>
</shortcut>
 
Last edited by MasterFeizz,
Code:
<shortcut>
   <name>Duke Caribbean: Life's a Beach</name>
   <icon>/3ds/eDuke3D/eDukeVC.smdh</icon>
     <executable>/3ds/eDuke3D/eDuke3D.3dsx</executable>
   <arg>-game_dir AddOn/DukeVC/</arg>
   
</shortcut>

When launching this .xml, the argument gets recognized as -g the 'extra group file' command resulting in (from .log):

Could not find file "ame_dir AddOn/DukeVC/.grp".
 
Make sure you are not using a malformed xml, also this the file that I use for launching life's a beach:
Code:
<shortcut>
    <name>Duke Caribbean: Life's a Beach</name>
    <executable>/3ds/eduke3d/eduke3d.3dsx</executable>
    <arg>-g addons/vacation.grp</arg>
</shortcut>
 
  • Like
Reactions: Benja81
I've been successfully loading Duke: DC and Life's a Beach using:
Code:
<shortcut>
    <name>Duke it out in D.C.</name>
    <icon>/3ds/eDuke3D/eDukeDC.smdh</icon>
    <executable>/3ds/eDuke3D/eDuke3D.3dsx</executable>
    <arg>-hAddOn/DukeDC/DukeDC.def</arg>
</shortcut>

Loading the .def allows us to load the .grp and relocate the music files.
While keeping the default duke3d.def in the eduke root for auto-loading with Atomic Edition.
(see attached file, which contains the exact setup i'm using successfully right now)

Duke Nukem: Nuclear Winter however, does load the .grp but not as main game file.
The main menu shows 'Nuclear Winter' but only the Atomic Edition episodes are available.


Back to using your example, i still get the same result.
I've created the .xml with notepad++ and made sure the formatting was right.

eduke32.log said:
EDuke32 2.0.0devel r(?) (32-bit)
Compiled May 2 2016 03:01:19
Application parameters: -game_grp AddOn/DukeNW/nwinter.grp -x nwinter.con
Using sdmc:/3ds/eduke3d/ for game data
Searching for game data...
Using "duke3d.grp" as main game data file.
Could not find file "ame_grp AddOn/DukeNW/nwinter.grp -x nwinter.con".
Initializing timer
Compiling: GAME.CON (151190 bytes)
Including: DEFS.CON (35992 bytes)
Including: USER.CON (45482 bytes)
GAME.CON: In actor `ORGANTIC':
GAME.CON:3967: warning: found `else' with no `if'.
GAME.CON: In state `pigshootenemystate':
GAME.CON:5890: warning: found `else' with no `if'.
Found 2 warning(s), 0 error(s).
Resizing code buffer to 16189*4 bytes
Script compiled in 450276902ms, 16181*4b, language version 1.4+
2036/11264 labels, 330/2048 variables, 2/512 arrays
125 quotes, 207 actors
WARNING: Calculated sine table differs from original!
 

Attachments

I've been successfully loading Duke: DC and Life's a Beach using:
Code:
<shortcut>
    <name>Duke it out in D.C.</name>
    <icon>/3ds/eDuke3D/eDukeDC.smdh</icon>
    <executable>/3ds/eDuke3D/eDuke3D.3dsx</executable>
    <arg>-hAddOn/DukeDC/DukeDC.def</arg>
</shortcut>

Loading the .def allows us to load the .grp and relocate the music files.
While keeping the default duke3d.def in the eduke root for auto-loading with Atomic Edition.
(see attached file, which contains the exact setup i'm using successfully right now)

Duke Nukem: Nuclear Winter however, does load the .grp but not as main game file.
The main menu shows 'Nuclear Winter' but only the Atomic Edition episodes are available.


Back to using your example, i still get the same result.
I've created the .xml with notepad++ and made sure the formatting was right.

I accidentally wrote -game_grp while it's supposed to be -gamegrp
 
Actually, i was using Gridlauncher. Using the homebrew launcher seems to solve most of the issues!
All arguments getting recognized as well as multiple arguments.
stupid gridlauncher...

Thanks, now i got it working as intended.
No problem, I was using a custom Homebrew Launcher a while back that caused some weird issues also
 
This is awesome! Except for the menu and the slow loading times, this is running perfectly on my N3DS. Could you implement a menu at the start where we could choose which GRP file we'd like to load?
 
This is awesome! Except for the menu and the slow loading times, this is running perfectly on my N3DS. Could you implement a menu at the start where we could choose which GRP file we'd like to load?
Maybe a menu which lets you choose which "command line parameters" file you want to use, different mods or addons require different parameters. I was able to speed up loading a little by precaching only regular sounds, and not trying to upgrade them to ogg. For now you can use .xml shortcuts to launch different grps
 
I guess you're right, I just thought I'd rather not clutter up my HBL too much.
Getting really exited playing this again, I bought a bundle with all the classics a few months ago, but it looks awful on a 4k screen - the 3DS screen size is just perfect!
 
  • Like
Reactions: MasterFeizz

Site & Scene News

Popular threads in this forum