Making or wanting help making your own asset? Check in here
Mats391
PR:BF2 Lead Developer
Posts: 7643 Joined: 2010-08-06 18:06
Post
by Mats391 » 2013-07-17 20:43
I tried to create a finite medikit that can get reloaded from common ammo supplies. My approach is having a weapon that fires mini field dressings, but there is a problem with that: you can always fire this weapon and you lose information if your patient is healed or not.
To solve this i made it a burst weapon that fires as many projectiles to heal a patient fully.
This is how it looks so far. All numbers need tweaking obviously.
Code: Select all
rem *** Generated with Bf2Editor.exe [created: 2005/3/23 15:53]
GeometryTemplate.compressVertexData 1
GeometryTemplate.maxTextureRepeat 16
ObjectTemplate.activeSafe GenericFireArm medikit
ObjectTemplate.creator FLI-1:fli
ObjectTemplate.modifiedByUser nfe
ObjectTemplate.setNetworkableInfo HandFireArmsInfo
ObjectTemplate.saveInSeparateFile 1
ObjectTemplate.castsDynamicShadow 1
ObjectTemplate.cullRadiusScale 10
rem ---BeginComp:WeaponHud ---
ObjectTemplate.createComponent WeaponHud
ObjectTemplate.weaponHud.selectIcon Ingame\Weapons\Icons\Hud\Selection\Medkit.tga
ObjectTemplate.weaponHud.specialAbilityIcon Ingame\Weapons\Icons\Hud\SpecialKitIcons\medkit.tga
ObjectTemplate.weaponHud.hudName "killed"
ObjectTemplate.weaponHud.guiIndex 115
ObjectTemplate.weaponHud.altGuiIndex 0
ObjectTemplate.weaponHud.showClips 0
ObjectTemplate.weaponHud.disableOnSprint 1
rem ---EndComp ---
rem ---BeginComp:SingleFireComp ---
ObjectTemplate.createComponent SingleFireComp
ObjectTemplate.fire.roundsPerMinute 60
ObjectTemplate.fire.addFireRate 1
ObjectTemplate.fire.firelaunchdelay 1
ObjectTemplate.fire.burstsize 10
rem ---EndComp ---
rem ---BeginComp :D efaultAmmoComp --
ObjectTemplate.createComponent DefaultAmmoComp
ObjectTemplate.ammo.ammoType 1
ObjectTemplate.ammo.magSize 100
ObjectTemplate.ammo.nrOfMags 1
rem ---EndComp ---
rem ---BeginComp :D efaultSoundComp ---
ObjectTemplate.createComponent DefaultSoundComp
ObjectTemplate.sound.noisy 0
rem ---EndComp ---
rem ---BeginComp :D efaultAnimationComp ---
ObjectTemplate.createComponent DefaultAnimationComp
rem ObjectTemplate.animation.loopingFire 1
rem ---EndComp ---
ObjectTemplate.geometry medikit
ObjectTemplate.hasMobilePhysics 0
ObjectTemplate.aiTemplate medikit_ai
ObjectTemplate.material 74
rem -------------------------------------
ObjectTemplate.addTemplate S_medikit_Fire1P
ObjectTemplate.addTemplate S_medikit_Fire1P_Outdoor
ObjectTemplate.addTemplate S_medikit_Fire3P
ObjectTemplate.addTemplate S_medikit_BoltClick
ObjectTemplate.addTemplate S_medikit_TriggerClick
ObjectTemplate.addTemplate S_medikit_SwitchFireRate
ObjectTemplate.addTemplate S_medikit_Reload1P
ObjectTemplate.addTemplate S_medikit_Reload3P
ObjectTemplate.addTemplate S_medikit_Deploy1P
ObjectTemplate.addTemplate S_medikit_Deploy3P
ObjectTemplate.addTemplate S_medikit_Zoom
rem -------------------------------------
ObjectTemplate.animationSystem1P Objects/Weapons/Handheld/medikit/AnimationSystem1p.inc
ObjectTemplate.animationSystem3P Objects/Weapons/Handheld/medikit/AnimationSystem3p.inc
ObjectTemplate.projectileTemplate HealProjectile
ObjectTemplate.velocity 10
ObjectTemplate.itemIndex 4
ObjectTemplate.delayToUse 2.5
ObjectTemplate.create GenericProjectile HealProjectile
ObjectTemplate.setNetworkableInfo BasicInfo
ObjectTemplate.createNotInGrid 1
rem ObjectTemplate.setGeometry medikit_dressing
rem ---BeginComp:StickyCollisionComp ---
ObjectTemplate.createComponent StickyCollisionComp
ObjectTemplate.collision.bouncing 1
ObjectTemplate.collision.maxStickAngle 360
ObjectTemplate.collision.stickToVehicles 0
rem ---EndComp ---
rem ---BeginComp:ReplenishDetonationComp ---
ObjectTemplate.createComponent ReplenishDetonationComp
ObjectTemplate.detonation.triggerRadius 0.25
ObjectTemplate.detonation.triggerType MTYPco
ObjectTemplate.detonation.replenishingType RTHeal
ObjectTemplate.detonation.replenishingStrength 5
rem ---EndComp ---
rem ---BeginComp :D efaultProjSoundComp ---
ObjectTemplate.createComponent DefaultProjSoundComp
rem ---EndComp ---
rem ---BeginComp :D efaultPenetrateComp ---
ObjectTemplate.createComponent DefaultPenetrateComp
ObjectTemplate.penetrate.allowSolidPenetration 0
rem ---EndComp ---
ObjectTemplate.floaterMod 0
ObjectTemplate.hasMobilePhysics 1
ObjectTemplate.hasCollisionPhysics 1
ObjectTemplate.physicsType Point
ObjectTemplate.collisionGroups 8
ObjectTemplate.material 73
rem -------------------------------------
ObjectTemplate.timeToLive CRD_NONE/1/0/0
ObjectTemplate.material 73
ObjectTemplate.hasOnTimeEffect 1
ObjectTemplate.armingDelay 0
ObjectTemplate.mass 10
ObjectTemplate.gravitymodifier 10
ObjectTemplate.localPredictOnClient 1
ObjectTemplate.damage 0
ObjectTemplate.soundFilename "common/sound/Heal_loop.wav"
ObjectTemplate.loopCount 1
ObjectTemplate.stopType 1
ObjectTemplate.is3dSound 1
ObjectTemplate.volume 1
ObjectTemplate.reverbLevel 1
ObjectTemplate.halfVolumeDistance 3
ObjectTemplate.activeSafe Sound S_medikit_Fire1P
ObjectTemplate.modifiedByUser nfe
ObjectTemplate.soundFilename "common/sound/Heal_loop.wav"
ObjectTemplate.loopCount 0
ObjectTemplate.stopType 2
ObjectTemplate.is3dSound 0
ObjectTemplate.volume 0.53
ObjectTemplate.reverbLevel 1
ObjectTemplate.activeSafe Sound S_medikit_Fire1P_Outdoor
ObjectTemplate.modifiedByUser nfe
ObjectTemplate.activeSafe Sound S_medikit_Fire3P
ObjectTemplate.modifiedByUser nfe
ObjectTemplate.soundFilename "common/sound/Heal_loop.wav"
ObjectTemplate.loopCount 0
ObjectTemplate.stopType 2
ObjectTemplate.is3dSound 1
ObjectTemplate.volume 0.2
ObjectTemplate.reverbLevel 1
ObjectTemplate.minDistance 1
ObjectTemplate.halfVolumeDistance 3
ObjectTemplate.activeSafe Sound S_medikit_BoltClick
ObjectTemplate.modifiedByUser nfe
ObjectTemplate.activeSafe Sound S_medikit_TriggerClick
ObjectTemplate.modifiedByUser nfe
ObjectTemplate.activeSafe Sound S_medikit_SwitchFireRate
ObjectTemplate.modifiedByUser nfe
ObjectTemplate.activeSafe Sound S_medikit_Reload1P
ObjectTemplate.modifiedByUser nfe
ObjectTemplate.soundFilename "objects/weapons/handheld/medikit/sounds/medikit_deploy.wav"
ObjectTemplate.loopCount 1
ObjectTemplate.is3dSound 0
ObjectTemplate.stopType 1
ObjectTemplate.volume 0.21
ObjectTemplate.pitch 1
ObjectTemplate.pan 0.5
ObjectTemplate.reverbLevel 1
ObjectTemplate.activeSafe Sound S_medikit_Reload3P
ObjectTemplate.modifiedByUser nfe
ObjectTemplate.soundFilename "objects/weapons/handheld/medikit/sounds/medikit_deploy.wav"
ObjectTemplate.loopCount 1
ObjectTemplate.is3dSound 1
ObjectTemplate.stopType 1
ObjectTemplate.volume 0.21
ObjectTemplate.pitch 1
ObjectTemplate.reverbLevel 1
ObjectTemplate.minDistance 0.5
ObjectTemplate.halfVolumeDistance 2
ObjectTemplate.activeSafe Sound S_medikit_Deploy1P
ObjectTemplate.modifiedByUser nfe
ObjectTemplate.soundFilename "objects/weapons/handheld/medikit/sounds/medikit_deploy.wav"
ObjectTemplate.loopCount 1
ObjectTemplate.is3dSound 0
ObjectTemplate.stopType 0
ObjectTemplate.volume 0.21
ObjectTemplate.pitch 1
ObjectTemplate.pan 0.5
ObjectTemplate.reverbLevel 1
ObjectTemplate.activeSafe Sound S_medikit_Deploy3P
ObjectTemplate.modifiedByUser nfe
ObjectTemplate.soundFilename "objects/weapons/handheld/medikit/sounds/medikit_deploy.wav"
ObjectTemplate.loopCount 1
ObjectTemplate.is3dSound 1
ObjectTemplate.stopType 0
ObjectTemplate.volume 0.21
ObjectTemplate.pitch 1
ObjectTemplate.reverbLevel 1
ObjectTemplate.minDistance 0.5
ObjectTemplate.halfVolumeDistance 2
ObjectTemplate.activeSafe Sound S_medikit_Zoom
ObjectTemplate.modifiedByUser nfe
Currently there is a problem with the animation, need to fiddle with that.
I also tried to do the same for the wrench but to no success. I just used same code and replaced material of the projectile to 84 (engineer ability material) and the trigger to MTYVehicle. Any idea why its no repairing vehicles?
Mineral : TIL that Wire-guided missiles actually use wire
Moszeusz6Pl
Retired PR Developer
Posts: 939 Joined: 2010-06-24 13:41
Post
by Moszeusz6Pl » 2013-07-18 06:46
I think that it don't work for vehicles, because they cannot be healed fro boxes like ammo and health ones. Maybe try creating do it through supply?
Mats391
PR:BF2 Lead Developer
Posts: 7643 Joined: 2010-08-06 18:06
Post
by Mats391 » 2013-07-18 11:27
[R-DEV]Moszeusz6Pl wrote: I think that it don't work for vehicles, because they cannot be healed fro boxes like ammo and health ones. Maybe try creating do it through supply?
yep that works, thanks.
Code: Select all
rem *** Generated with Bf2Editor.exe [created: 2005/2/1 12:1]
GeometryTemplate.compressVertexData 1
GeometryTemplate.maxTextureRepeat 16
ObjectTemplate.activeSafe GenericFireArm wrench
ObjectTemplate.creator TLO-1:tlo
ObjectTemplate.modifiedByUser tda
ObjectTemplate.setNetworkableInfo HandFireArmsInfo
ObjectTemplate.saveInSeparateFile 1
ObjectTemplate.castsDynamicShadow 1
ObjectTemplate.cullRadiusScale 10
rem ---BeginComp:WeaponHud ---
ObjectTemplate.createComponent WeaponHud
ObjectTemplate.weaponHud.selectIcon Ingame\Weapons\Icons\Hud\Selection\wrench.tga
ObjectTemplate.weaponHud.specialAbilityIcon Ingame\Weapons\Icons\Hud\SpecialKitIcons\wrench.tga
ObjectTemplate.weaponHud.hudName "killed"
ObjectTemplate.weaponHud.guiIndex 0
ObjectTemplate.weaponHud.altGuiIndex 0
ObjectTemplate.weaponHud.showClips 0
ObjectTemplate.weaponHud.disableOnSprint 1
rem ---EndComp ---
rem ---BeginComp:SingleFireComp ---
ObjectTemplate.createComponent SingleFireComp
ObjectTemplate.fire.roundsPerMinute 30
ObjectTemplate.fire.addFireRate 2
ObjectTemplate.createComponent DefaultAmmoComp
ObjectTemplate.ammo.magSize 100
ObjectTemplate.ammo.nrOfMags 1
rem ---EndComp ---
rem ---BeginComp :D efaultSoundComp ---
ObjectTemplate.createComponent DefaultSoundComp
ObjectTemplate.sound.noisy 0
rem ---EndComp ---
rem ---BeginComp :D efaultAnimationComp ---
ObjectTemplate.createComponent DefaultAnimationComp
ObjectTemplate.animation.loopingFire 1
rem ---EndComp ---
ObjectTemplate.geometry wrench
ObjectTemplate.hasMobilePhysics 0
rem -------------------------------------
ObjectTemplate.addTemplate S_wrench_Fire1P
ObjectTemplate.addTemplate S_wrench_Fire1P_Outdoor
ObjectTemplate.addTemplate S_wrench_Fire3P
ObjectTemplate.addTemplate S_wrench_BoltClick
ObjectTemplate.addTemplate S_wrench_TriggerClick
ObjectTemplate.addTemplate S_wrench_SwitchFireRate
ObjectTemplate.addTemplate S_wrench_Reload1P
ObjectTemplate.addTemplate S_wrench_Reload3P
ObjectTemplate.addTemplate S_wrench_Deploy1P
ObjectTemplate.addTemplate S_wrench_Deploy3P
ObjectTemplate.addTemplate S_wrench_Zoom
rem -------------------------------------
ObjectTemplate.animationSystem1P Objects/Weapons/Handheld/Wrench/AnimationSystem1p.inc
ObjectTemplate.animationSystem3P Objects/Weapons/Handheld/Wrench/AnimationSystem3p.inc
ObjectTemplate.projectileTemplate HealProjectile_Vehicle
ObjectTemplate.velocity 10
ObjectTemplate.itemIndex 4
ObjectTemplate.delayToUse 3
ObjectTemplate.create GenericProjectile HealProjectile_Vehicle
ObjectTemplate.setNetworkableInfo BasicInfo
ObjectTemplate.createNotInGrid 1
rem ---BeginComp:StickyCollisionComp ---
ObjectTemplate.createComponent StickyCollisionComp
ObjectTemplate.collision.bouncing 1
ObjectTemplate.collision.maxStickAngle 360
ObjectTemplate.collision.stickToVehicles 0
rem ---EndComp ---
rem ---BeginComp :D efaultProjSoundComp ---
ObjectTemplate.createComponent DefaultProjSoundComp
rem ---EndComp ---
rem ---BeginComp :D efaultPenetrateComp ---
ObjectTemplate.createComponent DefaultPenetrateComp
ObjectTemplate.penetrate.allowSolidPenetration 0
rem ---EndComp ---
rem -------------------------------------
ObjectTemplate.addTemplate wrench_sup
rem -------------------------------------
rem ObjectTemplate.geometry medikit_dressing
ObjectTemplate.floaterMod 0
ObjectTemplate.hasMobilePhysics 1
ObjectTemplate.hasCollisionPhysics 1
ObjectTemplate.physicsType Point
ObjectTemplate.collisionGroups 8
ObjectTemplate.material 91
rem -------------------------------------
ObjectTemplate.timeToLive CRD_NONE/2/0/0
ObjectTemplate.hasOnTimeEffect 1
ObjectTemplate.armingDelay 0
ObjectTemplate.mass 10
ObjectTemplate.gravitymodifier 10
ObjectTemplate.localPredictOnClient 1
ObjectTemplate.damage 0
ObjectTemplate.create SupplyObject wrench_sup
ObjectTemplate.radius 1
ObjectTemplate.workOnVehicles 1
ObjectTemplate.workOnSoldiers 0
ObjectTemplate.healSpeed 0.1
ObjectTemplate.refillAmmoSpeed 0
ObjectTemplate.healStorageSize 0.1
ObjectTemplate.ammoStorageSize 0
ObjectTemplate.sharedStorageSize 0
ObjectTemplate.destroyWhenEmptyStorage 1
ObjectTemplate.activeSafe Sound S_wrench_Fire1P
ObjectTemplate.modifiedByUser tda
ObjectTemplate.soundFilename "common/sound/Repair_loop.wav"
ObjectTemplate.loopCount 0
ObjectTemplate.stopType 1
ObjectTemplate.is3dSound 0
ObjectTemplate.volume 0.46
ObjectTemplate.reverbLevel 1
ObjectTemplate.activeSafe Sound S_wrench_Fire3P
ObjectTemplate.modifiedByUser tda
ObjectTemplate.soundFilename "common/sound/repair_loop.wav"
ObjectTemplate.loopCount 0
ObjectTemplate.is3dSound 1
ObjectTemplate.stopType 1
ObjectTemplate.volume 0.4
ObjectTemplate.pitch 1
ObjectTemplate.reverbLevel 1
ObjectTemplate.pitchEnvelope 0/1/0/2/0/1/0/1/0/
ObjectTemplate.volumeEnvelope 0/1/0/1/1/1/0/0.9/1/
ObjectTemplate.minDistance 1
ObjectTemplate.halfVolumeDistance 3
ObjectTemplate.activeSafe Sound S_wrench_BoltClick
ObjectTemplate.modifiedByUser tda
ObjectTemplate.activeSafe Sound S_wrench_TriggerClick
ObjectTemplate.modifiedByUser tda
ObjectTemplate.activeSafe Sound S_wrench_SwitchFireRate
ObjectTemplate.modifiedByUser tda
ObjectTemplate.activeSafe Sound S_wrench_Reload1P
ObjectTemplate.modifiedByUser tda
ObjectTemplate.activeSafe Sound S_wrench_Reload3P
ObjectTemplate.modifiedByUser tda
ObjectTemplate.activeSafe Sound S_wrench_Deploy1P
ObjectTemplate.modifiedByUser tda
ObjectTemplate.soundFilename "objects/weapons/handheld/wrench/sounds/wrench_deploy_1p.wav"
ObjectTemplate.loopCount 1
ObjectTemplate.is3dSound 0
ObjectTemplate.stopType 0
ObjectTemplate.volume 0.36
ObjectTemplate.pitch 1
ObjectTemplate.pan 0.5
ObjectTemplate.reverbLevel 1
ObjectTemplate.activeSafe Sound S_wrench_Deploy3P
ObjectTemplate.modifiedByUser tda
ObjectTemplate.soundFilename "objects/weapons/handheld/wrench/sounds/wrench_deploy_3p.wav"
ObjectTemplate.loopCount 1
ObjectTemplate.is3dSound 1
ObjectTemplate.stopType 0
ObjectTemplate.volume 0.36
ObjectTemplate.pitch 1
ObjectTemplate.reverbLevel 1
ObjectTemplate.minDistance 0.5
ObjectTemplate.halfVolumeDistance 1
ObjectTemplate.activeSafe Sound S_wrench_Zoom
ObjectTemplate.modifiedByUser tda
It has same minor problem as the medikit tho, you can always use it. And you wont be able to disarm mines with this, but i never liked the all in one tool anyway
Mineral : TIL that Wire-guided missiles actually use wire
Heavy Death
Posts: 1303 Joined: 2012-10-21 10:51
Post
by Heavy Death » 2013-07-25 00:24
Yet another good simple out of the box thinking example. So if i understand correctly, it poops out field dressings that heal from minimum to maximum in one burst.
What i would do; make smallers bursts 10 seconds each, and 1/3 of the full min->max ammount. So one burst would take 10 seconds, patch up minor wounds, medium wounds get 20 seconds and 2 bursts and finally, full healing after a revive would require 30 sec and 3 bursts.
That would be overall better IMO; medic would have control over his supply, and there would be more interaction between the casualty and the medic, for instance asking how much damage approximately he recieved, so the medic wouldnt waste too much bursts.
qubolo
Posts: 59 Joined: 2010-12-01 23:54
Post
by qubolo » 2013-07-25 01:36
That is actually a great idea, finite medic supplies enforce more teamplay by attempts to save his bursts, and make him more supply dependent.
Moszeusz6Pl
Retired PR Developer
Posts: 939 Joined: 2010-06-24 13:41
Post
by Moszeusz6Pl » 2013-07-25 07:05
Does those small field dressings are able to use instantly and are disappearing after others are placed. I don't want a situation like in vanilla, when you could drop 3 medic bags near the corner before pooping up, so you was immune to first 3 shoots, unless it was a headshoot.
Mats391
PR:BF2 Lead Developer
Posts: 7643 Joined: 2010-08-06 18:06
Post
by Mats391 » 2013-07-25 07:35
[R-DEV]Moszeusz6Pl wrote: Does those small field dressings are able to use instantly and are disappearing after others are placed. I don't want a situation like in vanilla, when you could drop 3 medic bags near the corner before pooping up, so you was immune to first 3 shoots, unless it was a headshoot.
They usable instantly, only fly about 1m and only stay for 1second at a firerate of 1projectile/second.
Mineral : TIL that Wire-guided missiles actually use wire