Damage System

Ask questions, discuss ideas, get answers
=ArA=DeathFromAbove
Posts: 48
Joined: Sun Oct 18, 2009 11:38 pm

Damage System

Post by =ArA=DeathFromAbove »

I am having some issues with changing the damage values on the minigun projectile in BFV. This gun is pretty useless in the AC-47 and used as a portable spawned gun. So I wanted to increase the the impact of the projectile.

Unfortunately, i have had no luck in seeing any of the shooting times reduce ie. its not more powerful. Heres my code:

Code: Select all

ObjectTemplate.active Minigun_Projectile
ObjectTemplate.damageType 1
ObjectTemplate.material 518
ObjectTemplate.material2 518
ObjectTemplate.radius 30
ObjectTemplate.ForceOnExplosion 60
ObjectTemplate.YModOnExplosion 2

MaterialManager.Material 518
MaterialManager.MaterialAttGroup 518
MaterialManager.MaterialDefGroup 518
MaterialManager.materialDamage 20
This should assign a brand new material code to the minigun projectile (tried to add forceonexplosion to it too - not sure if bullet projectiles can have this added). and then created the material and assigned damage to that of 20 hp instead of 7 which is for material 224 (browning also the minigun_projectile). So it should almost be 3 times as powerful compared to the original.

Next I created the damage code as follows:

Code: Select all

rem * ***************************************************
rem * ***** Minigun - DIRECT DAMAGE *****
rem * ***************************************************

rem * *************************************************
rem *		Infantry target
rem * *************************************************
MaterialManager.attGroup 518
MaterialManager.defGroup 40
MaterialManager.damageMod 4
MaterialManager.setEffectTemplate e_blood01

MaterialManager.attGroup 518
MaterialManager.defGroup 41
MaterialManager.damageMod 2.5
MaterialManager.setEffectTemplate Em_BloodSmoke

MaterialManager.attGroup 518
MaterialManager.defGroup 42
MaterialManager.damageMod 1
MaterialManager.setEffectTemplate e_blood01

rem * *************************************************
rem *		scout cars target
rem * *************************************************

MaterialManager.attGroup 518
MaterialManager.defGroup 39
MaterialManager.damageMod 1
MaterialManager.setEffectTemplate e_RichoMetalHeavy

MaterialManager.attGroup 518
MaterialManager.defGroup 43
MaterialManager.damageMod 1
MaterialManager.setEffectTemplate e_RichoMetalHeavy

MaterialManager.attGroup 518
MaterialManager.defGroup 44
MaterialManager.damageMod 1
MaterialManager.setEffectTemplate e_RichoMetalHeavy

rem * *************************************************
rem *		Light Vehicle target
rem * *************************************************

MaterialManager.attGroup 518
MaterialManager.defGroup 45
MaterialManager.damageMod 1
MaterialManager.setEffectTemplate e_RichoMetalHeavy

MaterialManager.attGroup 518
MaterialManager.defGroup 46
MaterialManager.damageMod 1
MaterialManager.setEffectTemplate e_RichoMetalHeavy

MaterialManager.attGroup 518
MaterialManager.defGroup 47
MaterialManager.damageMod 1
MaterialManager.setEffectTemplate e_RichoMetalHeavy

MaterialManager.attGroup 518
MaterialManager.defGroup 48
MaterialManager.damageMod 1
MaterialManager.setEffectTemplate e_RichoMetalHeavy

MaterialManager.attGroup 518
MaterialManager.defGroup 49
MaterialManager.damageMod 1
MaterialManager.setEffectTemplate e_RichoMetalHeavy

rem * *************************************************
rem *		Heavy Vehicle target
rem * *************************************************

MaterialManager.attGroup 518
MaterialManager.defGroup 50
MaterialManager.damageMod 0.5
MaterialManager.setEffectTemplate e_RichoMetalHeavy

MaterialManager.attGroup 518
MaterialManager.defGroup 51
MaterialManager.damageMod 0.5
MaterialManager.setEffectTemplate e_RichoMetalHeavy

MaterialManager.attGroup 518
MaterialManager.defGroup 52
MaterialManager.damageMod 0.5
MaterialManager.setEffectTemplate e_RichoMetalHeavy

MaterialManager.attGroup 518
MaterialManager.defGroup 53
MaterialManager.damageMod 0.5
MaterialManager.setEffectTemplate e_RichoMetalHeavy

MaterialManager.attGroup 518
MaterialManager.defGroup 54
MaterialManager.damageMod 0.5
MaterialManager.setEffectTemplate e_RichoMetalHeavy

rem * *************************************************
rem *		Ship target
rem * *************************************************

MaterialManager.attGroup 518
MaterialManager.defGroup 55
MaterialManager.damageMod 0.5
MaterialManager.setEffectTemplate e_RichoMetalHeavy

MaterialManager.attGroup 518
MaterialManager.defGroup 56
MaterialManager.damageMod 0.5
MaterialManager.setEffectTemplate e_RichoMetalHeavy

MaterialManager.attGroup 518
MaterialManager.defGroup 57
MaterialManager.damageMod 0.5
MaterialManager.setEffectTemplate e_RichoMetalHeavy

MaterialManager.attGroup 518
MaterialManager.defGroup 58
MaterialManager.damageMod 0.5
MaterialManager.setEffectTemplate e_RichoMetalHeavy

MaterialManager.attGroup 518
MaterialManager.defGroup 59
MaterialManager.damageMod 0.5
MaterialManager.setEffectTemplate e_RichoMetalHeavy

rem * *************************************************
rem *		Planes target
rem * *************************************************

MaterialManager.attGroup 518
MaterialManager.defGroup 60
MaterialManager.damageMod 2
MaterialManager.setEffectTemplate e_RichoCascadesPlane

MaterialManager.attGroup 518
MaterialManager.defGroup 61
MaterialManager.damageMod 2
MaterialManager.setEffectTemplate e_RichoCascadesPlane

MaterialManager.attGroup 518
MaterialManager.defGroup 62
MaterialManager.damageMod 2
MaterialManager.setEffectTemplate e_RichoCascadesPlane

MaterialManager.attGroup 518
MaterialManager.defGroup 63
MaterialManager.damageMod 2
MaterialManager.setEffectTemplate e_RichoCascadesPlane

MaterialManager.attGroup 518
MaterialManager.defGroup 64
MaterialManager.damageMod 2
MaterialManager.setEffectTemplate e_RichoCascadesPlane

rem * *************************************************
rem *		Helicopter target
rem * *************************************************

MaterialManager.attGroup 518
MaterialManager.defGroup 73
MaterialManager.damageMod 5
MaterialManager.setEffectTemplate e_RichoCascadesPlane

MaterialManager.attGroup 518
MaterialManager.defGroup 74
MaterialManager.damageMod 5
MaterialManager.setEffectTemplate e_RichoCascadesPlane

MaterialManager.attGroup 518
MaterialManager.defGroup 75
MaterialManager.damageMod 5
MaterialManager.setEffectTemplate e_RichoCascadesPlane
Accordingly I set the various groups for infantry, light, heavy, planes and helos to group 518 as noted above and also increased various damagemod values ie. increased helo to 5.

All of this is map side in the OST.

Can anyone see what i am missing?
Coroner47
Posts: 213
Joined: Tue Nov 24, 2009 5:11 am
Location: Canada

Re: Damage System

Post by Coroner47 »

I don't see anything wrong with the code & i change materials mapside all the time. Where is this OST file being run from? I've found that certain things can only be done in certain places mapside. For instance, your code i would be running in Coop.con, Conquest.con, TDM.con & CTF.con on 1 of my maps.
Image
Pray hard, die fast
=ArA=DeathFromAbove
Posts: 48
Joined: Sun Oct 18, 2009 11:38 pm

Re: Damage System

Post by =ArA=DeathFromAbove »

Im running it in the ost.con file. Ill try switching it over to the conquest.con file.
=ArA=DeathFromAbove
Posts: 48
Joined: Sun Oct 18, 2009 11:38 pm

Re: Damage System

Post by =ArA=DeathFromAbove »

I have tried this code in the conquest.con and OST.con files and still there is no change in killing time for this new material.

Any other ideas????
User avatar
N!tro
Posts: 10
Joined: Thu Jan 14, 2010 5:55 pm

Re: Damage System

Post by N!tro »

You need to define the mat before telling the game what it will do to others mats

Code: Select all

MaterialManager.material 518
MaterialManager.materialAttGroup 518
MaterialManager.materialDefGroup 518
MaterialManager.materialDamage 10
I've always modded the damage system directly in the game.rfa so i don't even know if a brand new mat codes can work from ost (and don't wanna know thanks)
So here's how i'd do:
The define code above goes in materialManagerdefine.con
Then create a new con file with codes you wrote for the new 518 mat, name that file Minigun.con or whatever place it in the damage_system folder, open materialManagerSettings.con and add

Code: Select all

run damage_system/Minigun
with the other run lines at the bottom.
This way keeps everything clear in structure
It should work like that if don't forget a detail...
(I find 5 for helis is a bit rough lol)
=ArA=DeathFromAbove
Posts: 48
Joined: Sun Oct 18, 2009 11:38 pm

Re: Damage System

Post by =ArA=DeathFromAbove »

Nitro thanks for the heads up.

I went in and updated the game.rfa to define the new material 518 as explained and didnt forget to run the .con file in the damage system folder as explained, however, I still have no change to the effectiveness of this projectile on heuys.

The damagemod of 5 on the helos was put there while testing to provide a clear indication whether the projectile killed faster using the new material as compared to the original material.

I assume I still need to active the minigun_projectile and assign the new material 518 to it in the OST map side.

I believe the problem now stems from the fact I am using the mortar to spawn the minigun with the following code in the patch:

Code: Select all

ObjectTemplate.active USMortar
ObjectTemplate.projectileTemplate AC-47MiniGun_PCO3
ObjectTemplate.spawnOverGroundOnly 0
ObjectTemplate.deployOnGround 0

objecttemplate.active AC-47MiniGun_PCO3
ObjectTemplate.geometry stationary_m60_post_m1
ObjectTemplate.setSoldierExitLocation 0/0.5/0 0/0/0
ObjectTemplate.TimeToLive 10
ObjectTemplate.VehicleCategory VCSea
rem ^^^needed to spawn vehicle successfully
ObjectTemplate.canConvertToAmmo 1
ObjectTemplate.hasCollisionPhysics 1
ObjectTemplate.HasResponsePhysics 1
rem ObjectTemplate.explosionRadius 2
rem ObjectTemplate.explosionDamage 2
rem ObjectTemplate.explosionForceMod 2
ObjectTemplate.setEntryRadius 0.5
ObjectTemplate.seatFlags c_SeatIsOutside
ObjectTemplate.seatFlags c_SeatShowfullBodySoldier
In this instance a PCO is being spawned as the projectile template. I have added the new material to the minigun projectile and then the mortar etc. still it does not have any effect.
User avatar
N!tro
Posts: 10
Joined: Thu Jan 14, 2010 5:55 pm

Re: Damage System

Post by N!tro »

Damagetype 1 works with all projectiles no worries
I tested your material code
As a try on hastings I assigned it to the UH1_GunProjectile wich Quad50 uses and it works fine...pushes and blows everything around
So it should work with any projectile you assign 518
The fact you use the AC-47MiniGun_PCO3 instead of a mortar as projectile doesn't affect the minigun properties.
:?: Must have messed up somewhere cause everything is ok
freddy
Posts: 1267
Joined: Sun Oct 18, 2009 4:58 pm

Re: Damage System

Post by freddy »

so it makes same damage as original? or no damage at all?
=ArA=DeathFromAbove
Posts: 48
Joined: Sun Oct 18, 2009 11:38 pm

Re: Damage System

Post by =ArA=DeathFromAbove »

It appears to be the same damage as the original material 224 for the minigun_projectile.

Nitro, I completely agree that the projectile is still from the minigun.

I will review what i have done in game.rfa again.
=ArA=DeathFromAbove
Posts: 48
Joined: Sun Oct 18, 2009 11:38 pm

Re: Damage System

Post by =ArA=DeathFromAbove »

Ok I also had the same result as you Nitro when i switched the projectile to the huey, quad and mig.

Ill retry the minigun.

EDIT

Ok i replaced the uh1projectile with the minigun and no impact.

Although the AC-47 weapon.con file says the minigun projectile - the AI uses the browning and im going to try that now.

EDIT

Ok, I tested the ac-47 minigun and it has the same impact as the code above for spawning the stationary minigun. There is something weird about that minigun projectile. Im going to try the browning now to see by chance because the AI uses the browning in the ac-47 minigun that it might work. Otherwise im lost on this.

EDIT

Ok, so i decided to mess with the tracer and it worked awesome. Anyone think why the minigun_projectile wouldnt work?
Post Reply