Laser and shit

If possible, how do you modify a BAR M1918 to have it shoot lasers?
yes, seriously
the sound can stay the same
agsn, not joking
(as a sidenote it would also be nice to be able to put something like a scope on it)

1 Like

I think you gotta save up 5000 points and put it through the pack-a-punch machine

4 Likes

PPSH is the better upgrade tho. They call it the reaper for a reason.

1 Like

you can try editing the guns ammo in entities.blk
something like the example that @Devenddar made here:
(basic info about it )
u can try searching in the editor for guns that uses lasers as ammo and copy their gun__Shells and gun__ammoHolders and use them in the entities.blk file that u have to create

for the scope, I think there’s nothing u can do right now … Only guns with apposite slots for scopes or bayonettes can mount them afaik

but I’m not an expert so… Maybe there’s something that I’m missing

2 Likes

In inglese, per favore (moderatori si arrabbieranno)

1 Like

Something like it?

First Person View

Third Person View


(on videos I used colt_monitor_gun).

Well…

One of ways - customProps property (without entities.blk).

You will need to edit customProps property. Click on + that will appears when you will move mouse to property.
image
And then add initialComponents as Object.
image
After that need to add gun__shells as array. Inside gun__shells you will need to put shells as text and paste line from railgun weapon. And it should work fine after pickup. Yep. By this way you can edit weapon properties.

Another way - entities.blk.

You will need to edit your browning gun.

Need to add _override:b=yes if you want replace all brownings. Or create copy (for item version too) and add _use:t="WEAPON_GUN" and _use:t="WEAPON_GUN_ITEM". (Before latest update it was extends).

Entities.blk code example:

lasergun_gun{
  _use:t="colt_monitor_gun"

  gun__shotFreq:r=9.5
  gun__reloadTime:r=5.0
  gun__altReloadTime:r=4.5
  gun__locName:t="Lasergun"
  gun__adsSpeedMult:r=0.45
  gun__ignoreWeaponVelocity:b=yes
  weap__sprintLerpFactor:r=0.75
  weap__dofNearAmountPercent:r=0.0
  melee_weapon__attackAt:r=0.65
  melee_weapon__attackTime:r=1.35
  item__template:t="lasergun_item"
  item__name:t="Lasergun"
  item__weight:r=6.45

  "gun__canPierceHPEntity:tag"{
  }

  "gun__firingModes:array"{
    "mode:object"{
      modeType:t="automatic"
    }

    "mode:object"{
      modeType:t="burst"
      shotFreqMult:r=0.75
      burstSize:i=3
    }

    "mode:object"{
      modeType:t="burst"
      burstSize:i=1
    }
  }

  "gun__firingModeNames:array"{
    mode:t="full_auto"
    mode:t="semi_auto_3_shots"
    mode:t="semi_auto"
  }

  "gun__shells:array"{
    shells:t="%ugm/lasergun_laser.blk"
  }

  _group{
    _tags:t="sound"
    gun_sound__forceOneshot:b=yes
    gun_sound__forceOneshotEnemy:b=yes
  }

  "gun_sound__shotPath:shared:object"{
    _tags:t="sound"
    hero:t="events/moonbase/player/weapon/railgun"
    enemy:t="events/moonbase/enemy/weapon/railgun"
  }
}

lasergun_item{
  _use:t="colt_monitor_gun_item"

  item__weapTemplate:t="lasergun_gun"
  item__name:t="Lasergun"
}

Seperate file (lasergun_laser.blk) that contains laser code:

mass:r=0.0096
cartridgeMass:r=0.0218
caliber:r=0.0076
speed:r=3215.0
maxDistance:r=2000.0
bulletType:t="ball"
hitPowerMult:r=10000.0
effectiveDistance:r=4000.0
relativeVelHitShift:p2=300.0, 1000.0
relativeVelArmorShift:p2=200.0, 1000.0

hitpower{
  HitPower10m:p2=1.0, 10.0
  HitPower100m:p2=0.9, 100.0
  HitPower200m:p2=0.8, 300.0
  HitPower400m:p2=0.7, 400.0
  HitPower600m:p2=0.3, 600.0
  HitPower1000m:p2=0.1, 1000.0
  HitPower1500m:p2=0.01, 1500.0
}

armorpower{
  ArmorPower0m:p2=45.0, 5.0
  ArmorPower1500m:p2=35.0, 1500.0
}

visual{
  range_percent_of_ammo:p2=100.0, 0.0
  traceFreq:i=10
  tracer:t="37mmBlue"
}

tracer{
  beam:b=yes
  beamTime:r=0.5
  beamRadius:r=2.2
  headColor:c=2, 255, 255, 255
  luminosity:r=35.0
  beamFadeDist:r=3.0
  beamBeginFadeTime:r=0.05
  beamEndFadeTime:r=0.15
  beamScrollSpeed:r=10.0
}

Property hitpower set damage for laser or any other projectile. But probably it will incorrect work because of gun__canPierceHPEntity tag (oh just noted that there also hitPowerMult = 10000). You can change sounds in properties gun_sound__shotPath. In video they’re kinda… Uh… Not best.

1 Like

yes, maybe without the shitty pew pew but yes, thx

and it would be better with red lasers

what line, sorry?

You will need to edit headColor:c=2, 255, 255, 255. Probably set to 255,0,0,255.

Well… There is also code for blaster projectiles:

mass:r=0.001
cartridgeMass:r=0.001
caliber:r=0.001
speed:r=625.0
maxDistance:r=100000.0
bulletType:t="ball"
hitPowerMult:r=5.5
gravityMult:r=0.0
correctionPenetrationByRelativeVelocity:p2=300.0, 1000.0
correctionDamageByRelativeVelocity:p2=300.0, 1000.0
relativeVelHitShift:p2=300.0, 1000.0

hitpower{
  HitPower0m:p2=1.25, 1.0
  HitPower5m:p2=1.00, 5.0
  HitPower100m:p2=0.95, 100.0
  HitPower250m:p2=0.90, 250.0
  HitPower500m:p2=0.85, 500.0
  HitPower750m:p2=0.75, 750.0
  HitPower1000m:p2=0.55, 1000.0
  HitPower1250m:p2=0.25, 1250.0
  HitPower1500m:p2=0.05, 1500.0
  HitPower1750m:p2=0.01, 1750.0
  HitPower17500m:p2=0.01, 17500.0
}

armorpower{
  ArmorPower0m:p2=12.5, 1.0
  ArmorPower5m:p2=3.00, 5.0
  ArmorPower100m:p2=2.75, 100.0
  ArmorPower250m:p2=2.50, 250.0
  ArmorPower500m:p2=2.25, 500.0
  ArmorPower750m:p2=1.75, 750.0
  ArmorPower1000m:p2=1.00, 1000.0
  ArmorPower1250m:p2=0.25, 1250.0
  ArmorPower1500m:p2=0.05, 1500.0
  ArmorPower1750m:p2=0.01, 1750.0
  ArmorPower17500m:p2=0.01, 17500.0
}

visual{
  range_percent_of_ammo:p2=100.0, 0.0
  traceFreq:i=10
  tracer:t="37mmRed"
}

tracer{
  ignitionTime:r=0.001
  smokeColor:c=235, 1, 1, 215
  smokeTime:r=100.0
  smokeRadius:r=1.0
  headColor:c=245, 1, 1, 235
  luminosity:r=10000.0
  burnTime:r=100.0
}

Check gun__shells from railgun weapon. And copy and paste it on your customProps if you will use it way.

isn’t there a weapon which shoots red lasers, I think the one modelled after the Soviet carbine or something

Yes. There is gun__shells code from this weapon: content/enlisted_extra/gamedata/weapons/bullets/blaster_bullet.blk.

does not work for some reason

image

Well… Are you sure that you paste correctly?



And yeah. It’s kinda fast projectile.

could it be a problem regarding the magazines?

Shouldn’t. I used default browning m1918 and him magazine.

Projectile depends on ammo only when you do it for launchers (bazooka).

dunno but when I tipe it in the usual green flash is missing, almost like it doesn’t find the blk

could the fact that I edited it to have 40 shells be a problem?

You mean this flash effects?
image
Well… You probably can’t edit color and can add it only using entities.blk. Because property gun_flash_fx__template is shared array and you can’t add it using customProps. Also it’s locked in editor. In code it probably will be shared:array instead array.