bedhead 12 Posted December 16, 2014 Report Share Posted December 16, 2014 (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 December 17, 2014 by bedhead Quote Link to post Share on other sites
nbohr1more 2160 Posted December 17, 2014 Report Share Posted December 17, 2014 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 Quote 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
Moonbo 843 Posted December 17, 2014 Report Share Posted December 17, 2014 Check out Obsttorte's thread in the editors guild, I'm pretty sure he pull something like that off. Quote But you should walk having internal dignity. Be a wonderful person who can dance pleasantly to the rhythm of the universe.-Sun Myung Moon My work blog: gfleisher.blogspot.com Link to post Share on other sites
SteveL 1042 Posted December 17, 2014 Report Share Posted December 17, 2014 I suspect the biggest issue wouldn't be a coding one, it'd be creating new animations for the player hands. Quote Link to post Share on other sites
bedhead 12 Posted December 17, 2014 Author Report Share Posted December 17, 2014 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. Quote Link to post Share on other sites
SteveL 1042 Posted December 17, 2014 Report Share Posted December 17, 2014 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" Quote Link to post Share on other sites
bedhead 12 Posted December 18, 2014 Author Report Share Posted December 18, 2014 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. Quote Link to post Share on other sites
bedhead 12 Posted December 18, 2014 Author Report Share Posted December 18, 2014 Found tdm_player_thief.def and all the tdm_weapon.def under the tdm_defs01.pk4md5 animations are in tdm_player01.pk4 Trying to wrap my head around how all these are connected and making a weapon script. Quote Link to post Share on other sites
Springheel 4645 Posted December 18, 2014 Report Share Posted December 18, 2014 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. Quote TDM Missions: A Score to Settle * A Reputation to Uphold * A New Job * A Matter of Hours Video Series: Springheel's Modules * Speedbuild Challenge * New Mappers Workshop * Building Traps Link to post Share on other sites
bedhead 12 Posted December 22, 2014 Author Report Share Posted December 22, 2014 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. Quote Link to post Share on other sites
bedhead 12 Posted December 22, 2014 Author Report Share Posted December 22, 2014 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. Quote Link to post Share on other sites
Obsttorte 1505 Posted December 22, 2014 Report Share Posted December 22, 2014 @bedhead: Check my signature for my mapping thread. Quote 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 post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.