View unanswered posts | View active topics It is currently Mon Dec 30, 2024 10:39 pm



Reply to topic  [ 8 posts ] 
 Error when trying to add a Custom Weapon 
Author Message
User avatar

Joined: Wed Mar 12, 2008 9:27 pm
Posts: 3
Reply with quote
Post Error when trying to add a Custom Weapon
I've made a little nifty FN-P90 weapon and it's giving me an error when I run the game and it checks through all the files then when it gets to the file where I added the weapon that's when I get the error.

(didn't IMG tag it to save bandwidth on the forum)
http://img217.imageshack.us/img217/5163/errorsx1.png

Code:
AddAmmo = Magazine
   InstanceName = Magazine FNP90
   Mass = 2
   HitsMOs = 0
   GetsHitByMOs = 0
   SpriteFile = ContentFile
      FilePath = Base.rte/Devices/SMGs/FNP90-MAG.bmp
   FrameCount = 1
   SpriteOffset = Vector
      X = -3
      Y = -4
   EntryWound = AEmitter
      CopyOf = Dent Metal
   ExitWound = AEmitter
      CopyOf = Dent Metal
   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 = 1
   JointStrength = 200
   JointStiffness = 1
   JointOffset = Vector
      X = 0
      Y = -3
   ParentOffset = Vector
      X = 1
      Y = 0
   DrawAfterParent = 0
   RoundCount = 30
   RTTRatio = 4
   RegularRound = Round
      CopyOf = Round SMG
   TracerRound = Round
      CopyOf = Round SMG Tracer
   AddGib = Gib
      GibParticle = MOPixel
         CopyOf = Spark Yellow 1
      Count = 5
      Spread = 2.25
      MaxVelocity = 20
      MinVelocity = 8
   AddGib = Gib
      GibParticle = MOSParticle
         CopyOf = Gib Metal Rust Micro A
      Count = 4
      Spread = 2.25
      MaxVelocity = 15
      MinVelocity = 5
   GibWoundLimit = 1

AddDevice = HDFirearm
   InstanceName = FNP90
   AddToGroup = Weapons
   AddToGroup = Automatics
   AddToGroup = Subguns
   Mass = 10
   HitsMOs = 0
   GetsHitByMOs = 1
   SpriteFile = ContentFile
      FilePath = Base.rte/Devices/SMGs/FNP90-WEAPON.bmp
   FrameCount = 2
   SpriteOffset = Vector
      X = -7
      Y = -4
   EntryWound = AEmitter
      CopyOf = Dent Metal
   ExitWound = AEmitter
      CopyOf = Dent Metal
   GoldValue = 20
   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 = 1
   JointStrength = 75
   JointStiffness = 0.5
   JointOffset = Vector
      X = -3
      Y = 3
   DrawAfterParent = 0
   StanceOffset = Vector
      X = 6
      Y = 5
   SharpStanceOffset = Vector
      X = 7
      Y = -2
   SupportOffset = Vector
      X = 5
      Y = 4
   SharpLength = 165
   Magazine = Magazine
      CopyOf = Magazine SMG
      ParentOffset = Vector
         X = 3
         Y = 1
   Flash = Attachable
      CopyOf = Muzzle Flash SMG
   FireSound = Sound
      AddSample = ContentFile
         FilePath = Base.rte/Devices/SMGs/M1601.wav
      AddSample = ContentFile
         FilePath = Base.rte/Devices/SMGs/M1602.wav
      AddSample = ContentFile
         FilePath = Base.rte/Devices/SMGs/M1603.wav
      AddSample = ContentFile
         FilePath = Base.rte/Devices/SMGs/M1604.wav
      AddSample = ContentFile
         FilePath = Base.rte/Devices/SMGs/M1605.wav
      AddSample = ContentFile
         FilePath = Base.rte/Devices/SMGs/M1606.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 = 800
   ReloadTime = 1500
   FullAuto = 1
   FireIgnoresThis = 1
   ShakeRange = 12
   SharpShakeRange = 3
   NoSupportFactor = 3
   ParticleSpreadRange = 3
   ShellSpreadRange = 8
   ShellAngVelRange = 2
   MuzzleOffset = Vector
      X = 10
      Y = 0
   EjectionOffset = Vector
      X = 1
      Y = -1
   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 = 4
      Spread = 2.25
      MaxVelocity = 15
      MinVelocity = 5
   AddGib = Gib
      GibParticle = MOSRotating
         CopyOf = Gib Device Small K
      Count = 1
      Spread = 2.25
      MaxVelocity = 10
      MinVelocity = 1
   AddGib = Gib
      GibParticle = MOSRotating
         CopyOf = Gib Device Small I
      Count = 1
      Spread = 2.25
      MaxVelocity = 10
      MinVelocity = 1
   GibWoundLimit = 3


That's the Code in the SMGs.ini config file in the directory:
"Cortex Command\Base.rte\Devices\SMGs"

All I did was change the names of the image files and the instance file etc.
I tried looking up the ".\System\ConfigFile.ccp" but couldn't find it.

I made this post in need of help and made it as detailed as I could in hope someone would help me and because the Wikipedia page didn't show how to add a weapon and I couldn't find a tutorial on the forum.

Thanks in advance. :D

I also think people should respect the forums more, and when posting should keep it clean and understandable from what I've seen.


Wed Mar 12, 2008 11:33 pm
Profile
User avatar

Joined: Fri Dec 29, 2006 7:42 pm
Posts: 1871
Location: UK
Reply with quote
Post Re: Error when trying to add a Custom Weapon
I think the problem is that it couldn't locate the sprite mentioned here.

Code:
 FilePath = Base.rte/Devices/SMGs/FNP90-WEAPON.bmp


Check the location, and whether the sprite is named with the correct syntax.

I reserve the right to be completely wrong.


Wed Mar 12, 2008 11:39 pm
Profile
User avatar

Joined: Wed Mar 12, 2008 9:27 pm
Posts: 3
Reply with quote
Post Re: Error when trying to add a Custom Weapon
Image

That's the P90 I've made but I made it in Photoshop and made a transparent alpha and the background purple like the other weapons but if I needed to do anything else please tell me.


Wed Mar 12, 2008 11:49 pm
Profile
User avatar

Joined: Fri Jan 25, 2008 4:40 am
Posts: 97
Location: New York
Reply with quote
Post Re: Error when trying to add a Custom Weapon
Wait did you edit the SMG's ini file to create your weapon? If so then change this:

Code:
   Magazine = Magazine
      CopyOf = Magazine SMG
To the correct name of the magazine.


Thu Mar 13, 2008 12:00 am
Profile
User avatar

Joined: Wed Mar 12, 2008 9:27 pm
Posts: 3
Reply with quote
Post Re: Error when trying to add a Custom Weapon
It's giving me this error now after I fixed that Magazine SMG bit to my magazine.

http://img72.imageshack.us/img72/5682/error2yh4.png

Line 211 is:

FrameCount = 1

From:
Code:
AddAmmo = Magazine
   InstanceName = Magazine FNP90
   Mass = 2
   HitsMOs = 0
   GetsHitByMOs = 0
   SpriteFile = ContentFile
      FilePath = Base.rte/Devices/SMGs/FNP90-MAG.bmp
   FrameCount = 1
   SpriteOffset = Vector
      X = -3
      Y = -4
   EntryWound = AEmitter
      CopyOf = Dent Metal
   ExitWound = AEmitter
      CopyOf = Dent Metal
   AtomGroup = AtomGroup


Thu Mar 13, 2008 12:32 am
Profile
User avatar

Joined: Tue Jan 01, 2008 3:34 am
Posts: 115
Location: canadiania
Reply with quote
Post Re: Error when trying to add a Custom Weapon
Haha I made a P90 as my first weapon as well :D
You have to always make sure the pictures + file paths are correct, or you will run into problems but otherwise, im not much of a good coder.


Thu Mar 13, 2008 12:53 am
Profile
User avatar

Joined: Fri Feb 16, 2007 8:43 pm
Posts: 1695
Location: AH SHIT FUCK AUGH
Reply with quote
Post Re: Error when trying to add a Custom Weapon
Code:
AddDevice = HDFirearm
   InstanceName = FNP90
   AddToGroup = Weapons
   AddToGroup = Automatics
   AddToGroup = Subguns
   Mass = 10
   HitsMOs = 0
   GetsHitByMOs = 1
   SpriteFile = ContentFile
      FilePath = Base.rte/Devices/SMGs/FNP90-WEAPON.bmp
   FrameCount = 2 <--- That's it

Looks like you didn't make a firing animation/image for the gun, judging by the first error.
To fix, make it go FrameCount = 1 instead.

Oh yes, when spriting, it is DEADLY important to make it in the right palette, or else you'd
just get a fudged up sprite in game.
An easy way to do this is to copy the original sprite into the palette.bmp, and then crop
it into the right size. Or just make it in the palette.bmp image from the start :P

Edit: Hmm, after seeing the second error, i don't know exactly what to do. That type of
error is a real bugger, as it isn't very accurate in pointing out the line.
Wait... I see something.
Code:
AddAmmo = Magazine
   InstanceName = Magazine FNP90
   Mass = 2
   HitsMOs = 0
   GetsHitByMOs = 0
   SpriteFile = ContentFile
      FilePath = Base.rte/Devices/SMGs/FNP90-MAG.bmp <--- OSHI-
   FrameCount = 1

Is there any sprite file in that folder named FNP90-MAG.bmp?


Thu Mar 13, 2008 7:58 pm
Profile WWW

Joined: Thu Aug 30, 2007 10:29 pm
Posts: 1
Reply with quote
Post Re: Error when trying to add a Custom Weapon
I actually fixed everything my self and went on to making the Stargate SG-1 Team. :)
When I finish I'll release it. ;P


Sat Mar 15, 2008 2:36 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 8 posts ] 

Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.
[ Time : 0.046s | 15 Queries | GZIP : Off ]