Duke4.net Forums: modding Duke Nukem 3D weapons - Duke4.net Forums

Jump to content

  • 2 Pages +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

modding Duke Nukem 3D weapons

#1

Hi, I have no clue on how to mod Duke Nukem weapons. I want to add a desert eagle to the game.

Can someone give me a tutorial, please?

This post has been edited by dukenukemforevernever: 11 August 2016 - 11:28 AM

1

User is offline   Danukem 

  • Duke Plus Developer

#2

The closest thing to tutorials out there are mods that change the weapons and don't change much else. Maybe someone can provide links to some of those, because I don't have any handy.

If you want to change the behavior and properties of weapons, then you do it by editing/adding CON scripting code in the game. There is information about that scripting language that can be found here, but it will be difficult for you to determine what aspects of scripting you need to focus on. That's why I would suggest looking at existing mods.

If you want to change the appearance of the weapons, then you need to understand how art tiles work in Duke 3D and how to replace them. Tiles can be edited, replaced, and new ones can be added. Models can also be added to be drawn in the place of defined art tiles. To add models, you should look at examples such as in the HRP.

It's hard, and there are many things you need to know. Making a good tutorial is hard, too, which is why they don't exist.
0

#3

I have learned to mod and other things through Youtube videos. Videos are the best way to make tutorials. Btw how did you ,learn to mod?

I have seen a desert eagle in a Duke 3D mod, what files would I have to import from there to add to a non modded Duke 3D game?

After that I will have to place the desert eagle in the game to the location where it will be found, and place the ammo to locations they will be found, is that easy to do?
0

User is offline   stumppy84 

#4

Is weapon behavior in the cons? I always thought that they were mostly hard coded.. Say you want the pistol to shoot rockets instead of bullets, wouldn't you have to change the source code? I know you can change the enemies weapons...
0

User is offline   Fox 

  • Fraka kaka kaka kaka-kow!

#5

In the original Duke Nukem 3D for DOS they are hard-coded. However in Eduke32 you can do that using CON.
0

User is offline   Danukem 

  • Duke Plus Developer

#6

View PostFox, on 11 August 2016 - 02:06 PM, said:

In the original Duke Nukem 3D for DOS they are hard-coded. However in Eduke32 you can do that using CON.


To be completely accurate, the weapons are hardcoded in EDuke32 as well, but using CON script it is possible to override all of the hardcoded weapon behavior.
0

User is offline   xenoxols 

#7

This isn't exactly on topic, but I feel the need to point it out. EDuke32's documentation sucks. If there is good documentation then it is hard to find. I have tried to get into it like I did with ZDoom (which has really good documentation) but I the time commitment is too big. I don't want this to come across as an insult, just a suggestion to improve the documentation and tutorials.
2

User is offline   Hendricks266 

  • Weaponized Autism

  #8

You're not wrong.
0

User is offline   Danukem 

  • Duke Plus Developer

#9

On the positive side, community members are usually very helpful if you ask for help on something specific that you want to do.

View Postdukenukemforevernever, on 11 August 2016 - 11:40 AM, said:

I have learned to mod and other things through Youtube videos. Videos are the best way to make tutorials. Btw how did you ,learn to mod?


I downloaded Duke 3D, opened up GAME.CON and looked at the script. I could understand some of it from the context. I tried some edits to see how things worked. I looked at guides such as ones in the link I provided above. I asked a lot of questions, got some helpful answers, and made a lot of mistakes.

View Postdukenukemforevernever, on 11 August 2016 - 11:40 AM, said:

I have seen a desert eagle in a Duke 3D mod, what files would I have to import from there to add to a non modded Duke 3D game?


That depends on a lot of factors. In general, you would need the art or model for the weapon (the model would be md3 and the art could be in various formats), then you may or may not need a .def file with commands for adding the art or model (you would not need a .def file if the weapon used 8-bit art in the original palette). You would also need code in the CON scripting language to add the weapon or change the behavior of the standard pistol. That file could potentially have any name ending in the .CON extension (but if the name is not GAME.CON or EDUKE.CON, then you would need to use a .bat or shortcut to tell the game to use the file). Finally, you would need the gun sounds, which could either replace the original pistol sounds with the same names, or they could have new names and be added to the game via CON script.

View Postdukenukemforevernever, on 11 August 2016 - 11:40 AM, said:

After that I will have to place the desert eagle in the game to the location where it will be found, and place the ammo to locations they will be found, is that easy to do?


If the desert eagle replaces Duke's standard pistol, then you don't need to place it or its ammo in maps, since the new pistol and its ammo would simply replace the standard sprites.
0

User is offline   Fox 

  • Fraka kaka kaka kaka-kow!

#10

View PostTrooper Dan, on 11 August 2016 - 02:19 PM, said:

To be completely accurate, the weapons are hardcoded in EDuke32 as well, but using CON script it is possible to override all of the hardcoded weapon behavior.

You can manipulate the kickback_pic to make a weapon from zero.
0

User is offline   Danukem 

  • Duke Plus Developer

#11

View PostFox, on 11 August 2016 - 03:02 PM, said:

You can manipulate the kickback_pic to make a weapon from zero.


You can do a lot of things, but I don't understand how that relates to the post you were quoting (unless it's just an example of using CON to override hardcoded behavior).
0

User is offline   Fox 

  • Fraka kaka kaka kaka-kow!

#12

Yeah, you can completely rewrite the weapons code. The WEAPONX variables are just shortcuts. But for mods that are not very Duke-esque I have used the first approach.
0

User is offline   Micky C 

  • Honored Donor

#13

View PostTrooper Dan, on 11 August 2016 - 02:55 PM, said:

On the positive side, community members are usually very helpful if you ask for help on something specific that you want to do.


That starts to lose its effectiveness as members trickle away from the community over time. It's a slow process but on-going.

IMO more community members should start writing documentation. I myself have written the wiki's TROR mapping guide which has helped out a lot of people. I've also written a speed-mapping guide, and a guide to making good maps. I'm not sure if the latter two are hosted anywhere other than my google docs account though.

I've tried to get into scripting for eduke a few times over the years and just couldn't really get into it. It's not that I can't code; I'm a whiz with analytical languages such as fortran and R, but the current guides lack some of the extreme basics that they seem to assume you already know.
0

User is offline   Danukem 

  • Duke Plus Developer

#14

View PostMicky C, on 11 August 2016 - 03:35 PM, said:

the current guides lack some of the extreme basics that they seem to assume you already know.


I'm not sure what you mean. What I found when I was learning is that the "extreme basics" were covered, but there wasn't any one guide that took me by the hand and covered everything in the perfect order. A big part of the challenge in writing documentation is that the knowledge that a modder needs is divided into several different, related but disparate categories. In my experience, the most difficult aspect of modding Duke 3D is learning about all the quirky hardcoded behavior of the game engine and various actors and effectors. That's not something that is easily addressed in tutorials. Another challenge is that our scripting system has a very large number of primitives. This can be very handy, but it also makes it hard to document and potentially very confusing. Unlike Doom, Duke 3D had a scripting language when it shipped, and all of the additions since then have to be compatible with it, which of course leads to complications.

This is still a good document when it comes to learning how to script with the old commands (which still work): http://wiki.eduke32.com/wiki/Confaq42
If you have a good grasp of that, and then you look at wiki entries on how to use gamevars, events, and access struct members, then you can do pretty much anything. Potentially. But admittedly, it's not an efficient or user-friendly journey.
0

#15

We need some user-friendly guides/tutorials. :/
0

User is offline   Danukem 

  • Duke Plus Developer

#16

View Postdukenukemforevernever, on 10 August 2016 - 02:19 PM, said:

Hi, I have no clue on how to mod Duke Nukem weapons. I want to add a desert eagle to the game.



View Postdukenukemforevernever, on 12 August 2016 - 12:38 AM, said:

We need some user-friendly guides/tutorials. :/


I have a question for you. Do you actually have the art or model with animation ready to put into the game? If not, all the tutorials in the world won't get Duke his desert eagle. If you do, go ahead and post it -- you may be surprised at how much help you get.
1

#17

"I have a question for you. Do you actually have the art or model with animation ready to put into the game? If not, all the tutorials in the world won't get Duke his desert eagle."

That's not true, to make the art I first have to know the requirements for it (e.g., how many frames are needed). Besides, learning how to add a weapon to the game is the hardest part, making the art is not a problem and will depend on how skilled I am at drawing.

This post has been edited by dukenukemforevernever: 12 August 2016 - 12:26 PM

0

User is offline   stumppy84 

#18

Yeah it would be cool if someone wrote up a basic weapon tutorial for us noobs. But I understand as that sounds like it requires a bit of effort..
0

User is offline   MusicallyInspired 

  • The Sarien Encounter

#19

If you want to just replace the image and not import a model or something, just use Editart.
0

User is offline   stumppy84 

#20

View PostMusicallyInspired, on 12 August 2016 - 07:12 PM, said:

If you want to just replace the image and not import a model or something, just use Editart.


Yeah, I'm talking more about weapon behavior or coding.
0

User is offline   Danukem 

  • Duke Plus Developer

#21

View Postdukenukemforevernever, on 12 August 2016 - 12:24 PM, said:

"I have a question for you. Do you actually have the art or model with animation ready to put into the game? If not, all the tutorials in the world won't get Duke his desert eagle."

That's not true, to make the art I first have to know the requirements for it (e.g., how many frames are needed). Besides, learning how to add a weapon to the game is the hardest part, making the art is not a problem and will depend on how skilled I am at drawing.


Difficulty is relative to skillset. To me, the coding seems very easy because I know how to do it and have coded many weapons for this game. But making new art is extremely difficult for me because I lack those skills.

I can show you exactly which art needs to be replaced. This album contains the original pistol tiles, all labeled for you:

http://imgur.com/a/zUvfi

I recommend producing tiles of the same proportions at a resolution of your choice (you could use the same scale or a higher scale). If you want to maintain compatibility with the classic 8-bit renderer, then you will need to use the Duke 3D color palette. If not, then you can use whatever colors you like. I recommend exporting the completed tiles in .png format. Note that you do not necessarily need to replace the clip tile, the hand tile or the hand holding clip tile -- it depends on whether you want your own desert eagle clip art.

This post has been edited by Trooper Dan: 12 August 2016 - 09:33 PM

0

User is offline   MusicallyInspired 

  • The Sarien Encounter

#22

Start with the art then mess with the coding. At least you'd have something to show.
0

User is offline   Danukem 

  • Duke Plus Developer

#23

View PostMusicallyInspired, on 13 August 2016 - 07:08 AM, said:

Start with the art then mess with the coding. At least you'd have something to show.


Yeah, the coding will be easy. I would like to see some evidence that he is actually willing to make an effort before I spend any time writing code or a code tutorial, though.

@dukenukemforevernever: Keep in mind that you have the option of keeping the original number of frames (advantage: you can just swap them in to the same tile numbers and the pistol will work correctly), OR you can make more elaborate animations if you like (in that case code would need to be added to display the animations on different tile numbers, with correct timing, etc)
0

User is offline   Mblackwell 

  • Evil Overlord

#24

In the end what you'll want is:

http://wiki.eduke32....efined_gamevars

These WEAPONx_SOMETHING vars are what will get you most of the way there. Tweaking just a couple of the values for the pistol would do a good job of it. I won't say which though because you should read up on it! Between the art and the basic code it shouldn't really take long, actually!

When I was learning CON I did it completely by task. I started with a simple small task like "give an enemy more health" or "play different pickup sound effect" and by going one step at a time I was able to string together larger bits.

I used a version of this information (which I still have on my HDD):
http://wiki.eduke32.com/wiki/Confaq42

To learn EDuke I actually used some FAQ pages which don't exist anymore and had some incorrect information in retrospect, but still got me started. I have them on my HDD somewhere... However they don't render correctly in a modern browser. Maybe I should throw them at Hendricks.
0

#25

"Difficulty is relative to skillset. To me, the coding seems very easy because I know how to do it and have coded many weapons for this game. But making new art is extremely difficult for me because I lack those skills."


That's YOUR situation, not a beginner's situation. Modding requires a specific way to do it. For art you can just draw a poop and it wouldn't matter as long as you like it.
0

User is offline   Hendricks266 

  • Weaponized Autism

  #26

The quickest way is to add the weapons.con.sample that comes in the samples folder to your CON files. It disables the hardcoded weapon code and replaces it with CON reimplementations that are exactly equivalent. From there you can begin to make modifications.
0

User is offline   Danukem 

  • Duke Plus Developer

#27

View Postdukenukemforevernever, on 15 August 2016 - 11:33 AM, said:

"Difficulty is relative to skillset. To me, the coding seems very easy because I know how to do it and have coded many weapons for this game. But making new art is extremely difficult for me because I lack those skills."


That's YOUR situation, not a beginner's situation. Modding requires a specific way to do it. For art you can just draw a poop and it wouldn't matter as long as you like it.


Are you trying to start an argument? People have been providing helpful information, and you seem more interested in debating than actually making something. No one person has any special obligation to write tutorials. Anyone with the time and interest can gather the relevant information and do it.
0

User is offline   MusicallyInspired 

  • The Sarien Encounter

#28

View Postdukenukemforevernever, on 15 August 2016 - 11:33 AM, said:

That's YOUR situation, not a beginner's situation. Modding requires a specific way to do it. For art you can just draw a poop and it wouldn't matter as long as you like it.


That's the key isn't it.

No need to be snippy. No one's saying you should know how to do it just because others do. We're telling you it's not as hard as you think it is. That's all. Take Hendrick's advice and just experiment.

This post has been edited by MusicallyInspired: 15 August 2016 - 12:33 PM

0

User is offline   stumppy84 

#29

View PostHendricks266, on 15 August 2016 - 11:40 AM, said:

The quickest way is to add the weapons.con.sample that comes in the samples folder to your CON files. It disables the hardcoded weapon code and replaces it with CON reimplementations that are exactly equivalent. From there you can begin to make modifications.


Thanks for this! Do I just put weapons.con in the directory? Or do I need to paste it into GAME.CON?
1

User is offline   Hendricks266 

  • Weaponized Autism

  #30

You can add the line "include weapons.con" to GAME.CON. Be sure you've actually renamed the file. (Turn on showing file extensions in Windows Explorer.)
0

Share this topic:


  • 2 Pages +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic


All copyrights and trademarks not owned by Voidpoint, LLC are the sole property of their respective owners. Play Ion Fury! ;) © Voidpoint, LLC

Enter your sign in name and password


Sign in options