Jump to content


Photo

how adding modern weapons to a FM


8 replies to this topic

#1 freyk

freyk

    Member

  • Member
  • PipPip
  • 429 posts

Posted 25 January 2017 - 07:26 AM

For my comming modern-time themed FM "The Dark Mission", i would like to add modern weapons.

The weapon that I have in mind is the Fort 12 from RWM Pack c (a replacement for d3 pistol)
(And when it is working, i'm going to change the object, so it doesnt use proprietary sound, textures, etc.)
At this moment i only can spawn the weapon and cannot pick it up or use it .
The console show some things that the weapon needs, but cannot find it in the d3 pak files.
I hope you can help me.


I installed the weapon by copying RWM_Pack_æ.pk4 (from rwmpackc) and pak001,2,3,4 and 8 (from d3) to the folder of my fm.
my log spawning and giving the fort 12 (replacement for pistol)

Spoiler


Weapon in action:
Spoiler
.

Attached Files


Edited by freyk, 26 January 2017 - 07:40 AM.


#2 demagogue

demagogue

    Mod hero

  • Active Developer
  • PipPipPipPipPip
  • 5158 posts

Posted 26 January 2017 - 02:42 AM

Somebody (Sotha?) recently made a gun mod. So you should search for that and use it.

 

The sourcecode has been changed quite substantially from Doom3, and weapon use is one area that's been changed. So you either have to use a clever mod like that one, or you have to reconstruct the changed Doom3 code for gun use and recompile a new executable, and it may have been taken out of the TDM code altogether, in which case you'd have to take it from the original Doom3 code and put it back in TDM.


Posted Image

#3 Destined

Destined

    Advanced Member

  • Member
  • PipPipPip
  • 1120 posts

Posted 26 January 2017 - 03:00 AM

Sotha's guns were only for AI use, not the player. For the player, I fear you will have to make a new gun model that includes the arms. When you take a look at the player's weapons you will see that each weapon consists of the weapon itself, the player's arm(s) and a camera point so the game knows from which perspective to look. Maybe for starters you can try to exchange the weapon in one of these models. Still, you will need new animations for the gun, including getting, drawing and putting away the gun, as well as shooting and idle.

 

Edit: You can find the models and animations in the tdm_player.pk4 under models/md5/weapons.


Edited by Destined, 26 January 2017 - 03:05 AM.


#4 demagogue

demagogue

    Mod hero

  • Active Developer
  • PipPipPipPipPip
  • 5158 posts

Posted 26 January 2017 - 03:13 AM

The key question is if that requires sourcecode change or if making the models and animations are sufficient to get it working in game.

 

A modern branch works best if it can be opened like a normal FM.


Posted Image

#5 Destined

Destined

    Advanced Member

  • Member
  • PipPipPip
  • 1120 posts

Posted 26 January 2017 - 03:42 AM

I am not sure. It should work with the right definitions and animations (at least in my head, but that has been wrong often enough ;) ). I would treat the gun like the bow, with the drawing animation replaced by an aiming animation. Even the tiring may make sense, when you hold the gun up for a longer time (although I have never actually held a gun, so I am not qualified to judge that). The projectile would have to be changed, of course. One point, that just occured to me, that might need coding assistance, would be that decals have to be created when the bullet hits a wall etc. I am not sure if this can be done via the definition.



#6 Obsttorte

Obsttorte

    Scripting guru, Mapper

  • Active Developer
  • PipPipPipPip
  • 4920 posts

Posted 26 January 2017 - 06:03 AM

You don't need source code changes me thinks. Check for the files that are used by the bow for example. You have to create said files for your weapon, too. What you need at least are

  • a scriptobject handling the weapons behaviour
  • a viewmodel (playerhand + weapon)
  • an entity definition for the weapon
  • another one for the ammonition
  • maybe a few more things depending on the weapon

FM's: Builder Roads, Old Habits, Old Habits Rebuild
WIP's: Several. Although after playing Thief 4 I really wanna make a city mission.
Mapping and Scripting: Apples and Peaches
Sculptris Models and Tutorials: Obsttortes Models
My wiki articles: Obstipedia
Let's Map TDM YouTube playlist: ObstlerTube
Texture Blending in DR: DR ASE Blend Exporter

End of shameless self promotion.

#7 freyk

freyk

    Member

  • Member
  • PipPip
  • 429 posts

Posted 26 January 2017 - 07:39 AM

With my little experience, i have seen those files in the pak file of the weapon.

(and added missing objects from d3 to tdm, like the arm model by copying the d3 files.)

 

I will try to compare the existing files with the crossbow ones.

(but some help from somebody would be nice)


Edited by freyk, 26 January 2017 - 08:19 AM.


#8 Obsttorte

Obsttorte

    Scripting guru, Mapper

  • Active Developer
  • PipPipPipPip
  • 4920 posts

Posted 27 January 2017 - 12:27 AM

I'm not sure whether it is a good idea to use the arm model from the original doom 3, as it is an asset which is (in difference to the source code) still copyright protected.


FM's: Builder Roads, Old Habits, Old Habits Rebuild
WIP's: Several. Although after playing Thief 4 I really wanna make a city mission.
Mapping and Scripting: Apples and Peaches
Sculptris Models and Tutorials: Obsttortes Models
My wiki articles: Obstipedia
Let's Map TDM YouTube playlist: ObstlerTube
Texture Blending in DR: DR ASE Blend Exporter

End of shameless self promotion.

#9 freyk

freyk

    Member

  • Member
  • PipPip
  • 429 posts

Posted 27 January 2017 - 03:51 AM

I know.
and in this test stage, i would like to add this gun for test purposes and want to proceed.
(so i can see which other objects are missing or have to be replaced)

Or are there other modern guns i can use?
(how about the guns from Phantasm?)

Edited by freyk, 27 January 2017 - 03:58 AM.




Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users