project-navigation
Personal tools

Author Topic: Multi-role weapons  (Read 3418 times)

Offline alzyrian

  • Cannon Fodder
  • **
  • Posts: 7
    • View Profile
Multi-role weapons
« on: March 27, 2012, 04:11:29 pm »
By multi-roll weapons, i mean weapons that check against different attack skill types based on the fire mode.  I usually end up with a few soldiers that have decent stats in assault/sniper, or assault/close, or sniper/close and would be nice to have a single weapon that they can use that leverages their best skills.

I have already done this myself with my customized vhs rifle.  I added the vhs to the main game, then modified its rifle stats a little to diversify it from the assault rifle (less ammo capacity, more expensive).  I then made a copy of the assault rifle ammo and made ammo specific to the vhs rifle that was slightly more powerful while trying not to make it overpowered (due to less ammo in the weapon). I made the ammo skill check either close (shorter range burst), assault or sniper, depending on what type of shot was being taken.  I also made the reaction fire only one for each type, snap shot(assault), close burst, or precision shot (sniper). 

Based on the changes I have made, a soldier that is only proficient with assault (or close, or shiper etc..) and nothing else, gains no benefit from having this weapon, same for sniper, or close. due to the higher magazine capacity of the assault rifle and smg, higher damage of the sniper riffle, and ability to carry something in the off hand with the pistol (works for someone that has good close/HE skill).

At this point, i can easily modify ammo to use different skills based on shot type, but would only do that for things that seem logical. E G.an assault rifle can be used by a sniper in single shot mode and based on the skill of the sniper, the shot would do more damage than an assault skill single shot (better aiming or body hit selection etc..). Maybe the SMG with an assault shot mode (2 shot assault with slightly longer range but lower damage?).

My question from this topic is about having multiple (really just 2) ammo for a single weapon both loaded at the same time, E.G an under barrel grenade launcher for an assault rifle.  I could make additional custom ammo for the rifle but the idea is to have two ammo type loaded at once for this purpose.  I was not sure if this was even possible. 

All I have done so far is modify ufo files to make slight game play modifications to weapons, amours, crafts, etc to see the effect on the game and make things more fun or difficult based on my tastes.

Thanks.

Here is my vhs rifle and ammo.

// =======================
// VHS ASSAULT RIFLE
// =======================
item vhs
{
   name         "_VHS Assault Rifle"
   model         weapons/vhs/vhs
   weapon         true
   type         rifle
   animationindex   1
   holdtwohanded   false
   firetwohanded   true
   shape         "1 0 4 1"
   shape         "0 1 5 1"
   center         "-3 -3 1"
   scale         1.2
   ammo         18
   reload      10
   reloadsound      weapons/reload-rifle
   price         1800
   size         20
   is_primary      true
}

item vhs_ammo
{
   name         "_VHS +P Rifle Magazine"
   model         weapons/assault/assault_clip
   type         ammo
   animationindex   0
   shape         "0 0 1 2"
   center         "0 0 0"
   scale         1.25
   price         70
   size         3
   is_primary      true
   dmgtype         normal

   weapon_mod vhs
   {
      firedef
      {
         name      "_Snap Shot"
         skill      assault
         projtl      bullet
         impact      bulletImpact
         hitbody      null
         firesnd      weapons/bullet-rifle-1x
         impsnd      impact/bullet-impact
         bodysnd    impact/bullet-bodyimpact
         speed      3000
         spread      "1.5 1.5"
         crouch      0.7
         range      80
         shots      1
         ammo      1
         time      10
         damage      "48 8"
         dmgweight   normal_medium
         reaction   true
      }
      firedef
      {
         name      "_Short Range Burst"
         skill      close
         projtl      bullet
         impact      bulletImpact
         hitbody      null
         firesnd      weapons/bullet-rifle-1x
         impsnd      impact/bullet-impact
         bodysnd    impact/bullet-bodyimpact
         speed      3000
         spread      "2 2"
         crouch      0.7
         range      40
         shots      4
         ammo      4
         delaybetweenshots   5
         time      12
         damage      "48 8"
         dmgweight   normal_medium
         reaction   true
      }
      firedef
      {
         name            "_Double Tap"
         skill            assault
         projtl            bullet
         impact            bulletImpact
         hitbody            null
         firesnd            weapons/bullet-rifle-1x
         impsnd            impact/bullet-impact
         bodysnd          impact/bullet-bodyimpact
         speed            3000
         spread            "1.2 1.2"
         crouch            0.7
         range            80
         shots            2
         ammo            2
         delaybetweenshots   5
         time            14
         damage            "48 8"
         dmgweight         normal_medium
         reaction         false
      }
      firedef
      {
         name      "_Precision Shot"
         skill      sniper
         projtl      bullet
         impact      bulletImpact
         hitbody      null
         firesnd      weapons/bullet-rifle-1x
         impsnd      impact/bullet-impact
         bodysnd    impact/bullet-bodyimpact
         speed      3000
         spread      "1 1"
         crouch      0.7
         range      80
         shots      1
         ammo      1
         time      16
         damage      "60 10"
         dmgweight   normal_medium
         reaction   true
      }
      firedef
      {
         name      "_Head Shot"
         skill      sniper
         projtl      bullet
         impact      bulletImpact
         hitbody      null
         firesnd      weapons/bullet-rifle-1x
         impsnd      impact/bullet-impact
         bodysnd    impact/bullet-bodyimpact
         speed      3000
         spread      "0.7 0.7"
         crouch      0.7
         range      80
         shots      1
         ammo      1
         time      18
         damage      "80 15"
         dmgweight   normal_medium
         reaction   false
      }

   }
}

Offline H-Hour

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 1923
    • View Profile
Re: Multi-role weapons
« Reply #1 on: March 27, 2012, 04:35:21 pm »
Hi alzyrian,

I am planning to make similar but not as diverse changes to the weapon balancing for 2.5. Basically, I am going to make all aimed shots use the Sniper skill and all snap shot / auto modes use the Assault skill. It's part of a more general set of changes to weapon stats detailed here. At the moment, only the Skills/Weapons section will be implemented.

My question from this topic is about having multiple (really just 2) ammo for a single weapon both loaded at the same time, E.G an under barrel grenade launcher for an assault rifle.  I could make additional custom ammo for the rifle but the idea is to have two ammo type loaded at once for this purpose.  I was not sure if this was even possible. 

My understanding is that this is not possible at the moment. A weapon can only have one ammo loaded at a time. A really bad hack that you could do would be to have a single ammo but different firemodes. So you could have a firemode that shoots a grenade and one that shoots a bullet. I believe they would have to take from the same ammo pool (so if you have 30 rounds, a grenade or a bullet each count as one), but you could force the grenade to subtract more ammo for each shot. It would not be pretty but could be a personal modification if you want it.

Offline alzyrian

  • Cannon Fodder
  • **
  • Posts: 7
    • View Profile
Re: Multi-role weapons
« Reply #2 on: March 27, 2012, 04:53:32 pm »
Thanks for the information H-Hour.  I checked out the link you posted to Proposals and it looks like the 2.5 weapon modes and skills will be more diverse like I am thinking of.

I had considered making that hack you mentioned as well by adding another weapon mode to my assault_ammo and vhs_ammo for a grenade shot, using like 5 ammo and having it have a blast radius and blast damage.  Something like:

      firedef
      {
         name      "_Grenade Shot"
         skill      explosive
         projtl      grenl_ammo
         impact      explosionGrenade
         hitbody      explosionGrenade
         firesnd      weapons/grenade_launcher
         impsnd      weapons/explosion-grenade
         bodysnd            weapons/explosion-grenade
                        bncsnd      weapons/grenade-bounce
         spread      "0 2"
         launched     true
         range      15
         shots      1
         ammo      5
         time      12
         damage      "15 2"
         spldmg      "60 10"
         splrad      3
         dmgweight   blast
         reaction   false
      }


Thanks again.  Ill keep playing around with my ufo files.