Page 1 of 2

weapon crash

Posted: Mon Aug 15, 2005 8:52 pm
by Sudi
I followed the tutorial on how to add a simple weapon but RF crashes when i start with the settings.
Take a look please.
inventory.ini
[Gun]
category = weapon
image = mp5.bmp
imagealpha = a_mp5.bmp
text = Mp5

player.ini
[Gun]
initial = 0
low = 0
high = 1

[Bullet]
initial = 0
low = 0
high = 50
usedecrease = true


weapon.ini
[Bullet]
type = projectile
actor = proj.act
rotation = 0 0 0
scale = 1
animation =
gravity = false
bounce = true
speed = 1500
lifetime = 10
boundingbox = 2
explosion = GeneralExplosion
actorexplosion = GeneralExplosion
showboth = true
bonelevel = true
shakeamount = 0
shakedeacay = 0
damage = 10
altdamage = 0
explosionradius = 1
explosiondamage = 1
deacal = 1
effect0 = SlowSmoke
attachactor = true

[Gun]
type= weapon
slot = 1
firerate = 1
category = projectile
projectile = Bullet
attribute = health
ammunition = Bullet
ammopershot = 1
forceviewto = firstperson
shotpermagazine = 5

viewactor = weapons\mp5first.act
viewlaunchoffset = 50 50 0
viewlaunchbone = joint2
viewanimationspeed = 8
viewattackanim = mp5fire
muzzleflash = GeneralExplosion
crosshair = crosshair.bmp
crosshairalpha = a_crosshair.bmp
zoomamount = 0
allowzoommove = false
recoilamount = 5
recoildecay = 1
bobamount = 20

I dont know do i need anything else btw all the bmps and act files are there at least last time i checked.

Posted: Mon Aug 15, 2005 11:27 pm
by GD1
check the animation names. remember they are case sensitive and use the names from the .mot files, not what you name them in actor studio. that is almost always the problem when something like this happens.

Posted: Tue Aug 16, 2005 10:30 am
by Sudi
i already noticed that with the animation name so that isn't the problem...is it maybe bc i didn't specify everything?

Posted: Tue Aug 16, 2005 7:43 pm
by GD1
ok, check the explosion names and settings in the explosion and effect .ini's for errors. also, Decal is spelled wrong (you used Deacal), but i dont think that would cause a crash.

try saving the settings you have there in a different file, then copy over the existing settings from another weapon and see if it runs. If it works just customize those. if not, then you most likely have a problem with the Actor or the Animation files.

Posted: Wed Aug 17, 2005 1:45 am
by Sudi
what other weapon i had to make my own setup bc the premade stuff isn't included anymore....and yeah all the effects an explosions exist.
i'm really lost.

Posted: Wed Aug 17, 2005 2:58 am
by GD1
hmmm........ thats strange. RF has always had example content.

try using this:
;
; 5.7mm armor piercing round
;

[5.7mm]
type = projectile
actor = projectile\proj.act
rotation = 0 0 0
scale = 0.1
gravity = false
bounce = false
speed = 10000
lifetime = 1
boundingbox = 0.1
explosion =
actorexplosion =
showboth = false
attachactor = false
bonelevel = false
damage = 5
altdamage = 5
explosionradius = 0
explosiondamage = 0
decal = 0
impactsound =
and this:
;
; Five-SeveN Tactical Pistol
;


[Five-seveN]
type = weapon
slot = 2
firerate = 0.50
catagory = projectile
projectile = 5.7mm
attribute = health
ammunition = 5.7mmbullet
ammopershot = 1
shotpermagazine = 8
loosemag = true
worksunderwater = true
attacksound = projectile\rockexp.wav
reloadsound = Weapon\reload3.wav
emptysound = Weapon\click.wav
muzzleflash = PFlash

;
; 1st person
;
viewactor = weapon\Five-seveN.act
viewfillcolor = 128 128 128
viewambientcolor = 128 128 128
viewrotation = -6.20 88.20 2.10
viewoffset = 12.70 -9.80 -34.90
viewscale = 0.30
viewlaunchoffset = 0 0 0
viewanimspeed = 1
viewarmanim = arm
viewidleanim = Idle
viewattackanim = Shoot
viewwalkanim = Idle
viewreloadanim = Reload
viewkeyreloadanim = Reload
viewattackemptyanim = Idle
viewlaunchbone = firebone
crosshair = crosshairs\pistol.bmp
crosshairalpha = crosshairs\a_pistol.bmp
crosshairfixed = true
recoilamount = 5
recoildecay = 10
;
; 3rd person
;
playeractor = weapon\psaw.act
playerfillcolor = 128 128 128
playerambientcolor = 128 128 128
playerrotation = 0 180 0
playerscale = 1
playerlaunchoffset = 0 0 10
playerbone = Bip01 R Hand

shootup = slash2
shootdwn = slash1
aimup = slashaim2
aimdwn = slashaim1
modify the settings to fit ur weapon and replace psaw.act with any existing actor file in the media/actors directory.

From looking at this id say its crashing because you missed the idle, arm and reload animations. add these in and what your using should run fine.

Posted: Wed Aug 17, 2005 7:35 am
by wiseman2
if you downloaded the compact version from here...you can redownload the full one from several places including my site... I know the rf072demo file here http://www.mapvault.com/uploads/rf/ has all the weapons in it...

I know this doesn't have all the fixes the 072a version has, but you can just copy the weapons, and any other media from the demo, and move them to your install...

Posted: Wed Aug 17, 2005 11:40 am
by Sudi
Thx. i tried to modify the ini like u said and i used the a sample weapon from the demo since my own model just has a shoot anim. anyways its now kinda working...the game starts but i can't use the weapon...it appears in the inventory and it says there i have one of the weapon avaible ...and i typed in the player ini that the initial amount is one so i should have the gun....but when i press the weapon slot key nothing happens. or are the weapon slot keys on the numpad?

Posted: Wed Aug 17, 2005 3:48 pm
by AndyCR
the "real" weapon slot is i believe if i remember correctly one higher than the weapon slot you entered, so weapon slot 3 is the 4 key, etc.

at least, thats how it was in the 071 days.

Posted: Wed Aug 17, 2005 4:20 pm
by Sudi
good to know but i tried every number....nothing happend. i'm really lost!

Posted: Thu Aug 18, 2005 8:17 pm
by GD1
you might wanna check the control.ini and make sure the weapon slot buttons are in there.

Posted: Thu Aug 18, 2005 9:56 pm
by Jay
If you can do scripting, you can make a script that can cycle through the available weapons by pressing one single key.

Posted: Fri Aug 19, 2005 10:16 am
by QuestOfDreams
check your realityfactory.log file if rf crashes

Posted: Fri Aug 19, 2005 10:25 am
by Sudi
I probably now know why it crashes....i used a wrong sized texture on the actor! so that problem should be solved for now but still the prob that the weapon isn't useable

Posted: Mon Aug 22, 2005 11:33 am
by Sudi
OK now it cant be my fault in doing something wrong....i used a premade weapon with a premade weapon setup in the ini file....then i only added it to the player and ineventory ini......Rf doesn't crash when starting but!!
The weapon doesn't show up when i press the apropriat weapon slot key...first i thought it just might be of screen so icant see it but i defined sounds so there should be a sound played when u choose the weapon...nothing same thing when i press fire. hope someone nows a solution.