Data Realms Fan Forums
http://45.55.195.193/

Help Needed with Grenade Launcher!
http://45.55.195.193/viewtopic.php?f=1&t=45862
Page 1 of 1

Author:  NikolaAnicic007 [ Thu Nov 27, 2014 11:05 am ]
Post subject:  Help Needed with Grenade Launcher!

So...I followed some instructions about making a grenade launcher, and I made it work, but when I try to fire a round, the game crashes...

Here's the code, I'd pay attention to *AddAmmo = TDExplosive* etc.

Code:
AddDevice = MOSRotating
   PresetName = Impact Grenade Payload
   Mass = 0.75
   RestThreshold = -500
   HitsMOs = 1
   GetsHitByMOs = 1
   SpriteFile = ContentFile
      FilePath = NeoTech.rte/Devices/N-G/NGrenadenew.bmp
   FrameCount = 1
   SpriteOffset = Vector
      X = -2
      Y = -7
   EntryWound = AEmitter
      CopyOf = Dent Metal No Spark
   ExitWound = AEmitter
      CopyOf = Dent Metal No Spark
   GoldValue = 10
   AngularVel = 7
   AtomGroup = AtomGroup
      AutoGenerate = 1
      Material = Material
         CopyOf = Military Stuff
      Resolution = 2
      Depth = 0
   DeepGroup = AtomGroup
      AutoGenerate = 1
      Material = Material
         CopyOf = Military Stuff
      Resolution = 4
      Depth = 10
   DeepCheck = 1
   GibSound = Sound
      Priority = 1000
      AddSample = ContentFile
         Path = Base.rte/Sounds/Explode1.wav
      AddSample = ContentFile
         Path = Base.rte/Sounds/Explode2.wav
   EffectOnGib = 1
   EffectAlwaysShows = 1
   ScreenEffect = ContentFile
      Path = Base.rte/Effects/Glows/YellowHuge.bmp
   GibImpulseLimit = 1
   GibWoundLimit = 3
   AddGib = Gib
      GibParticle = MOPixel
         CopyOf = Glow Explosion Huge
   AddGib = Gib
      GibParticle = MOSParticle
         CopyOf = Side Thruster Blast Ball 1
      Count = 15
      MinVelocity = 40
      MaxVelocity = 85
   AddGib = Gib
      GibParticle = MOSParticle
         CopyOf = Fire Puff Large
      Count = 5
      MinVelocity = 6
      MaxVelocity = 10
      LifeVariation = 0.25
   AddGib = Gib
      GibParticle = MOSParticle
         CopyOf = Fire Puff Medium
      Count = 80
      MinVelocity = 9
      MaxVelocity = 20
      LifeVariation = 0.30
   AddGib = Gib
      GibParticle = MOSParticle
         CopyOf = Fire Puff Small
      Count = 100
      MinVelocity = 19
      MaxVelocity = 40
      LifeVariation = 0.50
   AddGib = Gib
      GibParticle = MOPixel
         CopyOf = Grenade Fragment Gray
      Count = 500
      MinVelocity = 20
      MaxVelocity = 45
   AddGib = Gib
      GibParticle = MOPixel
         CopyOf = Grenade Fragment Yellow
      Count = 450
      MinVelocity = 20
      MaxVelocity = 45
   AddGib = Gib
      GibParticle = MOPixel
         CopyOf = Air Blast
      Count = 360
      MinVelocity = 40
      MaxVelocity = 65

AddAmmo = TDExplosive
PresetName = "Neon" Grenade
   Description = NeoTech grenade, created to destroy tissue, but do minimal damage to walls...
   AddToGroup = Grenades
   AddToGroup = Bombs
   Mass = 0.15
   RestThreshold = -500
   HitsMOs = 1
   GetsHitByMOs = 1
   ScriptPath = NeoTech.rte/Devices/N-G/ImpactFuze.lua
   SpriteFile = ContentFile
      FilePath = NeoTech.rte/Devices/N-G/NGrenadenew.bmp
   FrameCount = 1
   SpriteOffset = Vector
      X = -2
      Y = -7
   EntryWound = AEmitter
      CopyOf = Dent Metal No Spark
   ExitWound = AEmitter
      CopyOf = Dent Metal No Spark
   GoldValue = 5
   AngularVel = 7
   AtomGroup = AtomGroup
      AutoGenerate = 1
      Material = Material
         CopyOf = Military Stuff
      Resolution = 2
      Depth = 0
   DeepGroup = AtomGroup
      AutoGenerate = 1
      Material = Material
         CopyOf = Military Stuff
      Resolution = 4
      Depth = 10
   DeepCheck = 1
   JointStrength = 100
   JointStiffness = 0.5
   JointOffset = Vector
      X = 0
      Y = 3
   DrawAfterParent = 0
   StanceOffset = Vector
      X = 8
      Y = 5
   StartThrowOffset = Vector
      X = -12
      Y = -5
   EndThrowOffset = Vector
      X = 12
      Y = -5
   MinThrowVel = 10
   MaxThrowVel = 17
   TriggerDelay = 10000
   ActivatesWhenReleased = 1
   GibImpulseLimit = 5000
   GibWoundLimit = 4
   AddGib = Gib
      GibParticle = MOSParticle
         CopyOf = Gib Military Tiny A
      Offset = Vector
         X = 0
         Y = -3
   AddGib = Gib
      GibParticle = MOSParticle
         CopyOf = Gib Military Tiny A
      Offset = Vector
         X = -3
         Y = -1
   AddGib = Gib
      GibParticle = MOSParticle
         CopyOf = Gib Metal Grey Micro A
      Offset = Vector
         X = -3
         Y = 1
   AddGib = Gib
      GibParticle = MOSParticle
         CopyOf = Gib Metal Grey Micro A
      Offset = Vector
         X = 1
         Y = 1
   AddGib = Gib
      GibParticle = MOSParticle
         CopyOf = Gib Metal Grey Micro A
      Offset = Vector
         X = -2
         Y = -3

         
AddAmmo = Magazine
   PresetName = Magazine Neon Grenade Launcher
   Mass = 2
   HitsMOs = 0
   GetsHitByMOs = 0
   SpriteFile = ContentFile
      FilePath = Base.rte/Null.bmp
   FrameCount = 1
   SpriteOffset = Vector
      X = -1
      Y = -1
   ParentOffset = Vector
      X = 0
      Y = 0
   AtomGroup = AtomGroup
      AutoGenerate = 1
      Material = Material
         CopyOf = Bullet Metal
      Resolution = 2
      Depth = 0
   DeepGroup = AtomGroup
      AutoGenerate = 1
      Material = Material
         CopyOf = Bullet Metal
      Resolution = 3
      Depth = 1
   DeepCheck = 0
   JointStrength = 200
   JointStiffness = 1
   DrawAfterParent = 1
   RoundCount = 6
   RTTRatio = 0
   RegularRound = TDExplosive
      CopyOf = "Neon" Grenade
   TracerRound = None
   Discardable = 0

AddDevice = HDFirearm
   PresetName = "Neon" Grenade Launcher
   AddToGroup = Weapons
   AddToGroup = Primary Weapons
   AddToGroup = Heavy Weapons
   AddToGroup = Explosive Weapons
   AddToGroup = Neo Technologies
   Description = Six-shot grenade launcher.  Used for AA Support or Infantry elimination.
   Mass = 7
   HitsMOs = 0
   GetsHitByMOs = 1
   SpriteFile = ContentFile
      FilePath = NeoTech.rte/Devices/NGL/GrenadeLauncher.bmp
   FrameCount = 1
   SpriteOffset = Vector
      X = -14
      Y = -8
   EntryWound = AEmitter
      CopyOf = Dent Metal
   ExitWound = AEmitter
      CopyOf = Dent Metal
   GoldValue = 150
   AtomGroup = AtomGroup
      AutoGenerate = 1
      Material = Material
         CopyOf = Military Stuff
      Resolution = 4
      Depth = 0
   DeepGroup = AtomGroup
      AutoGenerate = 1
      Material = Material
         CopyOf = Military Stuff
      Resolution = 4
      Depth = 10
   DeepCheck = 0
   JointStrength = 100
   JointStiffness = 0.5
   JointOffset = Vector
      X = -7
      Y = 1
   DrawAfterParent = 0
   StanceOffset = Vector
      X = 3
      Y = 6
   SharpStanceOffset = Vector
      X = 4
      Y = 2
   SupportOffset = Vector
      X = 3
      Y = 5
   SharpLength = 150
   Magazine = Magazine
      CopyOf = Magazine Neon Grenade Launcher
   Flash = Attachable
      CopyOf = Muzzle Flash Shotgun
   FireSound = Sound
      AddSample = ContentFile
         FilePath = Ronin.rte/Effects/Sounds/ThumperFire.wav
   EmptySound = Sound
      AddSample = ContentFile
         FilePath = Base.rte/Devices/EmptyClick3.wav
   ReloadStartSound = Sound
      AddSample = ContentFile
         FilePath = Base.rte/Devices/ReloadStart.wav
   ReloadEndSound = Sound
      AddSample = ContentFile
         FilePath = Base.rte/Devices/ReloadEnd.wav
   RateOfFire = 500
   ReloadTime = 2500
   FullAuto = 0
   FireIgnoresThis = 1
   ShakeRange = 1
   SharpShakeRange = 1
   NoSupportFactor = 1
   ParticleSpreadRange = 0
   ShellSpreadRange = 8
   ShellAngVelRange = 0
   MuzzleOffset = Vector
      X = 12
      Y = -1
   EjectionOffset = Vector
      X = 12
      Y = -1
   AddPieSlice = Slice
      Description = Impact Mode
      Direction = 1
      Icon = Icon
         PresetName = Neon Grenade Launcher Impact
         FrameCount = 2
         BitmapFile = ContentFile
            FilePath = Ronin.rte/Devices/Sprites/PieIcons/IconImpact.bmp
      ScriptPath = Ronin.rte/Devices/Weapons/ThumperGrenadeLauncherPie.lua
      FunctionName = ThumperGrenadeLauncherImpact
   AddPieSlice = Slice
      Description = Bounce Mode
      Direction = 2
      Icon = Icon
         PresetName = Thumper Grenade Launcher Bounce
         FrameCount = 2
         BitmapFile = ContentFile
            FilePath = Ronin.rte/Devices/Sprites/PieIcons/IconBounce.bmp
      ScriptPath = Ronin.rte/Devices/Weapons/ThumperGrenadeLauncherPie.lua
      FunctionName = ThumperGrenadeLauncherBounce
   AddGib = Gib
      GibParticle = MOPixel
         CopyOf = Spark Yellow 1
      Count = 6
      Spread = 2.25
      MaxVelocity = 20
      MinVelocity = 8
   AddGib = Gib
      GibParticle = MOPixel
         CopyOf = Spark Yellow 2
      Count = 5
      Spread = 2.25
      MaxVelocity = 20
      MinVelocity = 8
   AddGib = Gib
      GibParticle = MOPixel
         CopyOf = Drop Oil
      Count = 4
      Spread = 2.25
      MaxVelocity = 10
      MinVelocity = 1
   AddGib = Gib
      GibParticle = MOSParticle
         CopyOf = Gib Metal Rust Micro A
      Count = 6
      Spread = 2.25
      MaxVelocity = 15
      MinVelocity = 5
   AddGib = Gib
      GibParticle = MOSParticle
         CopyOf = Gib Metal Grey Micro A
      Count = 5
      Spread = 2.25
      MaxVelocity = 15
      MinVelocity = 5
   AddGib = Gib
      GibParticle = MOSRotating
         CopyOf = Gib Device Small H
      Count = 1
      Spread = 2.25
      MaxVelocity = 10
      MinVelocity = 1
   AddGib = Gib
      GibParticle = MOSRotating
         CopyOf = Gib Device Small J
      Count = 1
      Spread = 2.25
      MaxVelocity = 10
      MinVelocity = 1
   AddGib = Gib
      GibParticle = MOSRotating
         CopyOf = Ronin Gib G
      Count = 1
      Spread = 2.25
      MaxVelocity = 10
      MinVelocity = 1
   GibWoundLimit = 7


I also got NO error message which is weird...

Author:  Arcalane [ Thu Nov 27, 2014 12:11 pm ]
Post subject:  Re: Help Needed with Grenade Launcher!

Indentation. You didn't indent the PresetName line for the AddAmmo part.

Author:  NikolaAnicic007 [ Thu Nov 27, 2014 1:27 pm ]
Post subject:  Re: Help Needed with Grenade Launcher!

Code:

AddAmmo = TDExplosive
   PresetName = Neon Grenade
   Mass = 0.15
   RestThreshold = -500
   HitsMOs = 1
   GetsHitByMOs = 1
   ScriptPath = NeoTech.rte/Devices/N-G/ImpactFuze.lua
   SpriteFile = ContentFile
      FilePath = NeoTech.rte/Devices/N-G/NGrenadenew.bmp
   FrameCount = 1
   SpriteOffset = Vector
      X = -2
      Y = -7
   EntryWound = AEmitter
      CopyOf = Dent Metal No Spark
   ExitWound = AEmitter
      CopyOf = Dent Metal No Spark
   GoldValue = 5
   AngularVel = 7
   AtomGroup = AtomGroup
      AutoGenerate = 1
      Material = Material
         CopyOf = Military Stuff
      Resolution = 2
      Depth = 0
   DeepGroup = AtomGroup
      AutoGenerate = 1
      Material = Material
         CopyOf = Military Stuff
      Resolution = 4
      Depth = 10
   DeepCheck = 1
   JointStrength = 100
   JointStiffness = 0.5
   JointOffset = Vector
      X = 0
      Y = 3
   DrawAfterParent = 0
   StanceOffset = Vector
      X = 8
      Y = 5
   StartThrowOffset = Vector
      X = -12
      Y = -5
   EndThrowOffset = Vector
      X = 12
      Y = -5
   MinThrowVel = 20
   MaxThrowVel = 37
   TriggerDelay = 10000
   ActivatesWhenReleased = 1
   GibImpulseLimit = 5000
   GibWoundLimit = 4
   AddGib = Gib
      GibParticle = MOSParticle
         CopyOf = Gib Military Tiny A
      Offset = Vector
         X = 0
         Y = -3
   AddGib = Gib
      GibParticle = MOSParticle
         CopyOf = Gib Military Tiny A
      Offset = Vector
         X = -3
         Y = -1
   AddGib = Gib
      GibParticle = MOSParticle
         CopyOf = Gib Metal Grey Micro A
      Offset = Vector
         X = -3
         Y = 1
   AddGib = Gib
      GibParticle = MOSParticle
         CopyOf = Gib Metal Grey Micro A
      Offset = Vector
         X = 1
         Y = 1
   AddGib = Gib
      GibParticle = MOSParticle
         CopyOf = Gib Metal Grey Micro A
      Offset = Vector
         X = -2
         Y = -3

         
AddAmmo = Magazine
   PresetName = Magazine Neon Grenade Launcher
   Mass = 2
   HitsMOs = 0
   GetsHitByMOs = 0
   SpriteFile = ContentFile
      FilePath = Base.rte/Null.bmp
   FrameCount = 1
   SpriteOffset = Vector
      X = -1
      Y = -1
   ParentOffset = Vector
      X = 0
      Y = 0
   AtomGroup = AtomGroup
      AutoGenerate = 1
      Material = Material
         CopyOf = Bullet Metal
      Resolution = 2
      Depth = 0
   DeepGroup = AtomGroup
      AutoGenerate = 1
      Material = Material
         CopyOf = Bullet Metal
      Resolution = 3
      Depth = 1
   DeepCheck = 0
   JointStrength = 200
   JointStiffness = 1
   DrawAfterParent = 1
   RoundCount = 6
   RTTRatio = 0
   RegularRound = Round
      CopyOf = Neon Grenade
   TracerRound = None
   Discardable = 0


.still doesn't work.

Edit: Now I made it NOT crash the game .-.

Author:  CaveCricket48 [ Thu Nov 27, 2014 3:09 pm ]
Post subject:  Re: Help Needed with Grenade Launcher!

You're trying to use a TDExplosive as a Round. A TDEXplosive is not a Round.

You need this piece of code in between the TDExplosive and the Magazine:

Code:
AddAmmo = Round
   PresetName = Round Cannon
   ParticleCount = 1
   Particle = TDExplosive
      CopyOf = Frag Shell
   Shell = MOSRotating
      CopyOf = Cannon Casing
   FireVelocity = 90
   ShellVelocity = 10
   Separation = 5


Change the CopyOfs to use your things, and have the Magazine use that as a Round.

Author:  NikolaAnicic007 [ Thu Nov 27, 2014 7:38 pm ]
Post subject:  Re: Help Needed with Grenade Launcher!

Thank you!

Edit:
---------------------------
RTE Aborted! (x_x)
---------------------------
Could not match property Error happened in NeoTech.rte/Devices/NGL/NGL.ini at line 182!

The last frame has been dumped to 'abortscreen.bmp'

You can copy this message with Ctrl+C
---------------------------
OK
---------------------------

This is the lines from 177-186
Code:
AddAmmo = Round
   PresetName = Round Cannon
   ParticleCount = 1
   Particle = TDExplosive
      CopyOf = Neon Grenade
   Shell = MOSRotating
     CopyOf = Impact Grenade Payload
   FireVelocity = 90
   ShellVelocity = 10
   Separation = 5

Author:  Corpsey [ Fri Nov 28, 2014 5:34 pm ]
Post subject:  Re: Help Needed with Grenade Launcher!

Looks like an indentation error... you can actually see that one CopyOf is not spaced right.

Author:  NikolaAnicic007 [ Sat Nov 29, 2014 2:14 pm ]
Post subject:  Re: Help Needed with Grenade Launcher!

Epic...fail...Thanks for the help!
Indentations!!! *atomicheadfacedeskpalm*

Page 1 of 1 All times are UTC [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/