Duke4.net Forums: DNF Modding Discoveries - Duke4.net Forums

Jump to content

Hide message Show message
Welcome to the Duke4.net Forums!

Register an account now to get access to all board features. After you've registered and logged in, you'll be able to create topics, post replies, send and receive private messages, disable the viewing of ads and more!

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

DNF Modding Discoveries  "Posting my findings on DNF"

User is offline   Futuretime23 

  • 28

#1

So I decided to post some of the findings I made while modding DNF. Some of these aren't new though, but are worth mentioning again.

First off, Noesis is a godsend. This is a key tool for any and all DNF modding (the other being a hex editor)

How to do engine/dngame gameplay mods:

In order to get some gameplay mods going, what I did was extract megapackage.dat and copy dngame.u and engine.u to the system folder of DNF. Any mods you make to these scripts will override the scripts in megapackage.dat This works on ALL versions of DNF as far as I know.

I keep a downgraded copy of DNF to have access to the SOS console which helps out a lot for doing this. For example, say I want to make Duke walk fast, I go to engine.u and replace the three 260 floats with say 390. (2 of the floats are for single player, namely one is for a level load and one's for a checkpoint load. the third I believe is for MP Duke as he has different variables than SP Duke)

You can make the ego regen disable mod also permanent in this way (I need to find the variables for the recovery rate again though) as well as other mods. It's possible to read the .u scripts with the unreal tournament packaging tool, just be prepared to see a lot of unknownfunctions show up.


How to get past the weapon limit:

This doubles as an explanation as to how the weapon limit works in DNF.
The guns, items, pipe/trip and the fists in DNF have a bIsPrimaryWeapon property. By default, items, pipe bombs, tripmines and the fists have this set to false while the guns all have them set to true. This places the guns in the limit, i.e, PrimaryWeapon1: RPG, PrimaryWeapon2: Machinegun, etc.

In order to get past the weapon limit, you need to set each gun's bIsPrimaryWeapon property to false. Unfortunately I haven't been able to do this via dngame.u (where all of the guns and their scripts are located) because ATM it's unknown what byte handles this property.
An alternative way consists of doing it via set commands, for example, set rpg bisprimaryweapon false. On 1.00 and 1.01 with SOS console this is fairly easy, but it can be a pain in 1.03 since you need to edit the user.ini and bind this command, which for some godforsaken reason, keeps resetting randomly. Fortunately there's a way around this by editing your inputs in 1.00 with the sos console and then copying that user.ini to 1.03. It seems to work so far.

What are the issues with this mod?

Unfortunately, you can't use the mouse wheel to cycle thru your guns as the SwapWeaponsDown and Up command don't work well by using this old weapon select logic. You need to use keybindings to select each gun. For example 1=useweapon dngame.pistol_gold and so on.
Also, because of how the weapon wheel for controllers work, I don't believe the weapon limit mod works with it since the logic for that specifically points towards PrimaryWeapons. Speaking of which, another issue I've encountered is that infinite ammo boxes no longer give ammo. This is because it's programmed to give ammo to your current PrimaryWeapons. And also, the first gun pickup will only give you the ammo on the current clip, but not other pickups of the same gun. No clue why, maybe it's a glitch or it's an old piece of leftover code back when initial pickups weren't meant to give you full ammo?

Another thing, but this is relating to how the weapon limit bypass mod is working for now, is that occassionally some guns may reset back to their default true setting for the bisprimaryweapon property. Press the bind to reenable that and reload the checkpoint if the guns disappeared entirely. Typically, if this happens, the guns just drop on the floor and you can pick em up again with what ammo they originally had.

For the record, I have not tried this in MP (each gun has a MP counterpart) or the DLC. Only in the SP campaign.

I'll probably either edit this post later or make a new one and put some other findings I made (like replacing enemies/pickups/npcs in maps, or editing specific variables for enemies, weapons, items, etc)
12

User is offline   zwieback 

  • 78

#2

very cool stuff! keep up the good work :)

"Some people are “for” things. They are for Freedom, or for technical superiority, or for a sports team, or whatever. Some people are “against” things. They are against political candidates, or Games, or people from certain places, or whatever. Some people define themselves on the basis of what they want, others on the basis of what they do not want."
1

User is offline   Futuretime23 

  • 28

#3

So here's a classic style gameplay mod for DNF.
Attached File  DNF Classic style gameplay v0,1.rar (1.29MB)
Number of downloads: 31
Installation is as follows: extract the engine.u and dngame.u files in DNF's system folder, while in order to disable the weapon limit, you need to grab one of the user.ini files depending on which mode you are gonna play (multiplayer or single player)
and replace your user.ini file in Steam/userdata/"PlayerID"/57900/remote with the one you selected.
To get the user.ini to save permanently, I believe you have to (please correct me if wrong) launch dnf first, replace your user ini while dnf is running, set it to read only, then quit the game.
The Engine.u and dngame.u mods are the following: no ego or health regen, faster movement (walk speed has gone from 260 to 390. Duke walks faster than he can sprint. Jump speed has gone from 280 in sp and 330 in mp to 420 in both)

In order to disable the weapon limit, press X on the keyboard. Keys have been rebinded (items are on the F1-F3 keys, pipe bomb is g and trip mine is q)
Occasionally it will forget you set each gun to not be a primary weapon, so if that happens, press X again and reload a checkpoint.
The gun bindings are as follows: 1 is gold pistol, 2 is shotgun, 3 is machinegun, 4 is at laser, 5 is at captain laser, 6 is rpg, 7 is railgun, 8 is shrink ray, 9 is devastator, 0 is freeze ray and backspace is enforcer gun.

I haven't added any of the DLC guns yet and I haven't tested the MP version of the weapon limit disabler in a real match (I'd assume the host and the players would have to have the same user.ini config? idk)

Have fun! I'll do an updated version some day so you don't need to rely on hitting X to disable the weapon limit, but until then, stay tuned I guess lol
4

User is offline   M.C. Jammer 

  • Richard Shead 2: Banned Harder
  • 116

#4

Didn't know any of this was possible, but great job there
1

User is online   fuegerstef 

  • 613

#5

Great work. :)

A few free casual games by me: http://gamejolt.com/...uegerstef/2615/
1

User is offline   Futuretime23 

  • 28

#6

So, the old save system STILL exists in DNF, to an extent.
On your downgraded copy (or via key bindings I assume, in 1.03. Haven't tested it there yet though) open up the sos console and type save_mode 0
then type savegame. Next time you load your savefile, you'll go back to your last save.
This still functions even when you die, or quit to main menu. If you quit the game, you need to switch back to the old save_mode before you can reload your save. 1 save slot only it seems.
1

User is offline   Honza 

  • 13

#7

View PostFuturetime23, on 17 June 2018 - 12:55 AM, said:

So here's a classic style gameplay mod for DNF.
Attachment DNF Classic style gameplay v0,1.rar
Installation is as follows: extract the engine.u and dngame.u files in DNF's system folder, while in order to disable the weapon limit, you need to grab one of the user.ini files depending on which mode you are gonna play (multiplayer or single player)
and replace your user.ini file in Steam/userdata/"PlayerID"/57900/remote with the one you selected.
To get the user.ini to save permanently, I believe you have to (please correct me if wrong) launch dnf first, replace your user ini while dnf is running, set it to read only, then quit the game.
The Engine.u and dngame.u mods are the following: no ego or health regen, faster movement (walk speed has gone from 260 to 390. Duke walks faster than he can sprint. Jump speed has gone from 280 in sp and 330 in mp to 420 in both)

In order to disable the weapon limit, press X on the keyboard. Keys have been rebinded (items are on the F1-F3 keys, pipe bomb is g and trip mine is q)
Occasionally it will forget you set each gun to not be a primary weapon, so if that happens, press X again and reload a checkpoint.
The gun bindings are as follows: 1 is gold pistol, 2 is shotgun, 3 is machinegun, 4 is at laser, 5 is at captain laser, 6 is rpg, 7 is railgun, 8 is shrink ray, 9 is devastator, 0 is freeze ray and backspace is enforcer gun.

I haven't added any of the DLC guns yet and I haven't tested the MP version of the weapon limit disabler in a real match (I'd assume the host and the players would have to have the same user.ini config? idk)

Have fun! I'll do an updated version some day so you don't need to rely on hitting X to disable the weapon limit, but until then, stay tuned I guess lol


First of all - thank you for the effort.

2 questions:

1) Does it work on the refill boxes? I tried some of the boss fights where you need the refill box and as far as I know I can't refill when this is in place.

2) Regarding no health regen - since there are no healthpacks, it seems quite challenging - or how does it work? :)
1

User is offline   Futuretime23 

  • 28

#8

View PostHonza, on 29 June 2018 - 11:51 AM, said:

First of all - thank you for the effort.

2 questions:

1) Does it work on the refill boxes? I tried some of the boss fights where you need the refill box and as far as I know I can't refill when this is in place.

2) Regarding no health regen - since there are no healthpacks, it seems quite challenging - or how does it work? :)

1) boxes are coded to give ammo to primaryweapons, not to your weapons. I need to take a look into this.
2) DNF by design (or lack thereof, see baker's posts about his role in DNF) will never save how much ego and health you currently have left. This is regardless of whether you are using the old save system (set save_mode 0 and use savegame command) or the checkpoint system.
So you if die, advance to the next level, or reload a checkpoint, you'll always be given back full health.
1

User is offline   Futuretime23 

  • 28

#9

New update for the classic style DNF gameplay mod!
Attached File  DNF Classic style gameplay mod V0.2.rar (1.29MB)
Number of downloads: 21
Instructions are included in the rar file.
New for this update: dlc guns, swim speed is now 2x as fast, you can hold your breath for 30 sec instead of 15, and falling damage is now far less frequent. Ammo pickups have been adjusted as well.
1

User is offline   Honza 

  • 13

#10

View PostFuturetime23, on 09 July 2018 - 05:54 PM, said:

New update for the classic style DNF gameplay mod!
Attachment DNF Classic style gameplay mod V0.2.rar
Instructions are included in the rar file.
New for this update: dlc guns, swim speed is now 2x as fast, you can hold your breath for 30 sec instead of 15, and falling damage is now far less frequent. Ammo pickups have been adjusted as well.


so the ammo boxes now replenish all?
0

User is offline   Futuretime23 

  • 28

#11

View PostHonza, on 10 July 2018 - 08:25 AM, said:

so the ammo boxes now replenish all?

No, not yet. I've tried editing the set dukeplayer binfiniteammo hint true command to give dngame.rpgammo, but no luck. Keep in mind, this was for 1.03, it's possible this idea works for 1.00 (they may have filtered out the give console command)
0

User is offline   Duke4Beta 

  • 20

#12

Hello!

First of all, I'd just like to say how grateful I am to have played Duke Nukem Forever, and actually have fun.

I cranked the weapon pickup ammo way up, so I'd always have rockets.

Certainly changes the gameplay, and makes it feel way better!

Ego rewards are more rewarding to me now, for some reason.

I want to download flawless wide-screen to enable the SOS console, and give suggestions, but I'm not sure how to get the version in which DNF is supported?

Thanks a ton! LOVE the mod! It's quite good. :)

It makes me wonder what exactly gearbox did? I mean, some of these changes are so simple, and yet make the game feel completely different.

:/

Hopefully we're able to reverse engineer the modern DNF from the dev tools released whenever the >2001 builds release.

Hopefully they are leaked "as is".

Wonder if that'll actually happen.

What do you think the possibilities of the raw folder dumps becoming available to the public are?
1

User is offline   Futuretime23 

  • 28

#13

View PostDuke4Beta, on 11 July 2018 - 04:17 PM, said:

Hello!

First of all, I'd just like to say how grateful I am to have played Duke Nukem Forever, and actually have fun.

I cranked the weapon pickup ammo way up, so I'd always have rockets.

Certainly changes the gameplay, and makes it feel way better!

Ego rewards are more rewarding to me now, for some reason.

I want to download flawless wide-screen to enable the SOS console, and give suggestions, but I'm not sure how to get the version in which DNF is supported?

Thanks a ton! LOVE the mod! It's quite good. :)

It makes me wonder what exactly gearbox did? I mean, some of these changes are so simple, and yet make the game feel completely different.

:/

Hopefully we're able to reverse engineer the modern DNF from the dev tools released whenever the >2001 builds release.

Hopefully they are leaked "as is".

Wonder if that'll actually happen.

What do you think the possibilities of the raw folder dumps becoming available to the public are?


Well, thank you for the feedback. the sos console is disabled in 1.03, even with FW it doesn't work. To my knowledge, it's still possible to use the editactor, object, traceactor, defactor windows but you need to bind them to keys via editing the user.ini with notepad++. You can enable it in 1.00 without the need for FW. Just edit a bind, say Tilde= and put | Type
Personally, I'd rather see an official release by Randy that includes the most complete version of DNF 2001 (which would be Dec. 2002) and official SDK for DNF 2011 and 2002.
0

User is offline   Duke4Beta 

  • 20

#14

View PostFuturetime23, on 11 July 2018 - 08:11 PM, said:

Well, thank you for the feedback. the sos console is disabled in 1.03, even with FW it doesn't work. To my knowledge, it's still possible to use the editactor, object, traceactor, defactor windows but you need to bind them to keys via editing the user.ini with notepad++. You can enable it in 1.00 without the need for FW. Just edit a bind, say Tilde= and put | Type
Personally, I'd rather see an official release by Randy that includes the most complete version of DNF 2001 (which would be Dec. 2002) and official SDK for DNF 2011 and 2002.



Hey! I'm so sorry, but I have some further questions. I do understand how to edit the commands, but not sure of the specific commands to get the edit actor window, etc? Would love to mess with these. Is there a list somewhere?
0

User is offline   Futuretime23 

  • 28

#15

View PostDuke4Beta, on 13 July 2018 - 10:54 PM, said:

Hey! I'm so sorry, but I have some further questions. I do understand how to edit the commands, but not sure of the specific commands to get the edit actor window, etc? Would love to mess with these. Is there a list somewhere?


well, you put editactor or editobject and then class=
so for example, editactor class=dukeplayer brings you up duke's properties editobject could be for something like duke's mp assets, or other objects where the editactor command doesn't work.
There's a list of classes here: http://dukenukem.wik...iki/Cheat_codes (list of summons at the end) but you can also find classes by using the UTPT and reading dngame.u, dndecorations.u etc
I should mention, the class NEEDS to be loaded in the map, otherwise you can't edit it at all.
0

User is offline   Duke4Beta 

  • 20

#16

Wow, so I find it amazing just how many RPG elements are left into the game's code, that can be found by UTPT,

such as the food class for instance, "CookedBonus", under the snacks category.

Cool little touch, having to cook the food to provide better health, that's my guess anyways.

This post has been edited by Duke4Beta: 14 July 2018 - 04:44 PM

1

User is offline   Duke4Beta 

  • 20

#17

Posted Image

And what about these upgrade variables?

This post has been edited by Duke4Beta: 14 July 2018 - 04:44 PM

0

User is offline   Futuretime23 

  • 28

#18

View PostDuke4Beta, on 14 July 2018 - 04:41 PM, said:

And what about these upgrade variables?

Some of these are still used in the game.
Zoom mode was repurposed to the zoom function when you (by default) right click.
Heat Vision was turned into Duke Vision.
ViewMode I have no clue what it's for, and SOS I assume is the message that would have shown up when you got a SOS upgrade (there's a unused DL complete sound for this in sounds.dat)
Heat Vision is curious because it does have some vars where you can adjust color of fog IIRC and enemies have a cloaking option. Consider that DNF 1998 had invisible ant mans and I don't think it's a stretch to say invisible/camo enemies would have been present in DNF 2001 as well. As for how you were supposed to spot them, prob the heat vision mode. IIRC, one of the textures for the sunglasses is called thermal.

This post has been edited by Futuretime23: 14 July 2018 - 09:04 PM

2

User is offline   NUKEMDAVE 

  • 488

#19

Are there not any settings still existing that enables ego to be gained from killing enemies? I know that in the Jace Hall gameplay footage, you could see ego being gained from killing enemies. As much as I like seeing the regenerating ego gone just as much as anyone else, I can see it being very annoying for many attempting to play the game with no way to gain ego, especially on hardest difficulty and even with checkpoints that restore it to full.

This post has been edited by NUKEMDAVE: 16 July 2018 - 01:16 PM

0

User is offline   Futuretime23 

  • 28

#20

View PostNUKEMDAVE, on 16 July 2018 - 01:16 PM, said:

Are there not any settings still existing that enables ego to be gained from killing enemies? I know that in the Jace Hall gameplay footage, you could see ego being gained from killing enemies. As much as I like seeing the regenerating ego gone just as much as anyone else, I can see it being very annoying for many attempting to play the game with no way to gain ego, especially on hardest difficulty and even with checkpoints that restore it to full.

Haven't found that sadly. Same thing with the ego trip (barring a few sound leftovers and textures) What I did find was the limbegoboost code and the gibegoboost but they do nothing atm. Cigars were also meant to give back ego per puff, and using toilets as well.
I want to reenable this stuff, but as a sidenote, there are ways to gain back ego, namely executions and steroid kills. The thing, obviously, is that you don't always have steroids on you, and enemies only have a 20% chance of being executable. Next update, I intend to fix the execution chances (probably buff it to be 50%) and implement the beer as medkit idea. I do want, if possible, to reenable the limb and gib ego boosts as well as gaining back ego from interacting with parts of the environment (currently, only eating food gives back anything, and even then it's health, not ego)
BTW, Baker mentioned Shrink Ray executions gave back ego, but it seems the code is absent/removed. Haven't found it yet.

Keep in mind, the mod is still an extremely early WIP atm and it's more of a proof of concept at this point than anything else.
2

User is offline   NUKEMDAVE 

  • 488

#21

Ah, I see. I played around with it a bit, but not a whole lot yet. I did die several times, but I really wasn't taking survival seriously. I applaud your efforts, though, and I hope you continue working on this because someone needed to make this happen sooner or later.

If it turns out you can't enable more ways to gain ego, I'd suggest making a separate version available that keeps the regenerating ego in. I guess it depends on how the feedback turns out on the mod, but I know some people will be annoyed. :D
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic


All copyrights and trademarks are property of their respective owners. Instead of reading this text, you could be playing Ion Maiden! ;) © 2018 Voidpoint, LLC

Enter your sign in name and password


Sign in options