Jump to content
The Dark Mod Forums

Adding new weapons to TDM for beginners


Recommended Posts

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
Link to post
Share on other sites

Hmm. I think you'd need to use idWeapon scripting to do this. I tried looking back in the wiki and I don't see custom "player" weapons but I did see some info on custom AI weapons

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to post
Share on other sites

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.

Link to post
Share on other sites

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"

Link to post
Share on other sites

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.

Link to post
Share on other sites

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.

Link to post
Share on other sites

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.

Link to post
Share on other sites

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.

×
×
  • Create New...