Jump to content
The Dark Mod Forums

Adding new weapons to TDM for beginners


bedhead

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 comment
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 comment
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 comment
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 comment
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 comment
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 comment
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 comment
Share on other sites

@bedhead: Check my signature for my mapping thread. :)

FM's: Builder Roads, Old Habits, Old Habits Rebuild

Mapping and Scripting: Apples and Peaches

Sculptris Models and Tutorials: Obsttortes Models

My wiki articles: Obstipedia

Texture Blending in DR: DR ASE Blend Exporter

Link to comment
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.

  • Recent Status Updates

    • OrbWeaver

      Does anyone actually use the Normalise button in the Surface inspector? Even after looking at the code I'm not quite sure what it's for.
      · 2 replies
    • Ansome

      Turns out my 15th anniversary mission idea has already been done once or twice before! I've been beaten to the punch once again, but I suppose that's to be expected when there's over 170 FMs out there, eh? I'm not complaining though, I love learning new tricks and taking inspiration from past FMs. Best of luck on your own fan missions!
      · 4 replies
    • The Black Arrow

      I wanna play Doom 3, but fhDoom has much better features than dhewm3, yet fhDoom is old, outdated and probably not supported. Damn!
      Makes me think that TDM engine for Doom 3 itself would actually be perfect.
      · 6 replies
    • Petike the Taffer

      Maybe a bit of advice ? In the FM series I'm preparing, the two main characters have the given names Toby and Agnes (it's the protagonist and deuteragonist, respectively), I've been toying with the idea of giving them family names as well, since many of the FM series have named protagonists who have surnames. Toby's from a family who were usually farriers, though he eventually wound up working as a cobbler (this serves as a daylight "front" for his night time thieving). Would it make sense if the man's popularly accepted family name was Farrier ? It's an existing, though less common English surname, and it directly refers to the profession practiced by his relatives. Your suggestions ?
      · 9 replies
    • nbohr1more

      Looks like the "Reverse April Fools" releases were too well hidden. Darkfate still hasn't acknowledge all the new releases. Did you play any of the new April Fools missions?
      · 5 replies
×
×
  • Create New...