Jump to content
System downtime for updates - Sunday 13 July 2025 ×
The Dark Mod Forums

Recommended Posts

Posted (edited)

Hi I want to try adding or replacing existing weapons in TDM. I was wondering if anyone have resources or guide for me to read up.

 

For starters I want to try to replace the player's short sword with the builder's hammer and change the attack range of the weapon and the sound effects.

 

For background reference, I have no experience with game development, but I have some knowledge of C programming if that helps. This is purely as an exercise for me to learn.

Edited by bedhead
Posted

I found a few resources that is related to what I'm trying to do in this exercise but it's for doom 3. I guess TDM should still be the same?

 

http://www.iddevnet.com/doom3/

It's under the topic - "How do I add a weapon?"

 

I also found the weapon script that nbohr1more mentioned from this site.

http://www.iddevnet.com/doom3/script_weapon.php

 

@Moonbo which thread is that?

 

@SteveL well I'm trying to keep this exercise as simple as possible. I was hoping to replace the sword with a hammer within the animation. It's not like the hammer deforms so I was hoping I could just use the same one. But I'm not too familiar with how TDM handles these things so it may be as difficult as you'd describe. But even then, I'm not afraid to pick up animation skills.

Posted

Sure, see what you can do with existing animations first. You can probably get away wth simply swapping a model to start with.

 

Obsttorte's thread is call "Apples and Peaches" iirc.

 

I can see one or two relevant threads with this google search:

site:thedarkmod.com "custom OR new weapon"

Posted

Went through 13 pages of Apple and Peaches and didnt see anything about custom player weapons. The other threads didnt go into details of to accomplish what I want to do.

 

I'll treat this problem as a doom 3 mod and follow the steps on iddev.

 

If anyone know what the filenames that I should be interested in are or where to look, please let me know. It would save me some time and ill be very grateful.

Posted

Found tdm_player_thief.def and all the tdm_weapon.def under the tdm_defs01.pk4

md5 animations are in tdm_player01.pk4

 

Trying to wrap my head around how all these are connected and making a weapon script.

Posted

I'm pretty sure that the weapon model is just def_attached to the player, though I'm not sure precisely where that would be done. tdm_player_thief.def is where I'd look first. You won't have to change any animations unless you want the player to swing the weapon differently.

 

Obsttorte did demo a new player pistol, which might have some useful info for you.

Posted

In the file - tdm_weapon_base.def it mentions about "model" and "model_view".

 

"Model" is followed by an .lwo file.

Looking at the tdm_weapon_shortsword def model is followed by shortsword.lwo. I checked the model list and tried replacing it to hammer.lwo. I suspect "model" may be referring to the third person weapon model.

 

"Model_view" mentions something about first person model which is what I want. But I'm not sure what to replace the text that follows it.

 

Also ran into a linux problem. I extracted the pk4 using 7zip to edit the defs. Then rezipped then into a .zip with 7zip and renamed the file extension to .pk4. This caused some seg fault and ctd.

Posted

As a note to the pk4 problem. I tried this workflow with unmodified .def files and still get ctd. I hope someone can chime in as to why this is happening or provide a technique to create pk4 in linux.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recent Status Updates

    • JackFarmer

      "The Year of the Rat." 
      😄

      Al Stewart must be proud of you!
      Happy testing!
      @MirceaKitsune
      · 1 reply
    • datiswous

      I posted about it before, but I think the default tdm logo video looks outdated. For a (i.m.o.) better looking version, you can download the pk4 attached to this post and plonk it in your tdm root folder. Every mission that starts with the tdm logo then starts with the better looking one. Try for example mission COS1 Pearls and Swine.
      tdm_logo_video.pk4
      · 2 replies
    • JackFarmer

      Kill the bots! (see the "Who is online" bar)
      · 3 replies
    • STiFU

      I finished DOOM - The Dark Ages the other day. It is a decent shooter, but not as great as its predecessors, especially because of the soundtrack.
      · 5 replies
    • JackFarmer

      What do you know about a 40 degree day?
      @demagogue
      · 4 replies
×
×
  • Create New...