Page 1 of 1

Re: [HELP] Changing impact effect of a weapon

Posted: 2010-09-20 17:34
by Rudd
I think you should be looking in the explosions/impacts effects?

Re: [HELP] Changing impact effect of a weapon

Posted: 2010-09-20 17:59
by Rhino
effects are triggered by two materials coming into contact with each other. ie, the material of the projectile coming into contact with the terrain material or w/e.

Re: [HELP] Changing impact effect of a weapon

Posted: 2010-09-20 20:55
by Sniperdog
The impact effect for the HAT is found here:

mods\pr\objects\effects_server.zip/impacts/explosions/e_exp_medium

Re: [HELP] Changing impact effect of a weapon

Posted: 2010-09-20 21:06
by Amok@ndy
he is not trying to replace the effect but creating a new one and adding it to the hat without replacing the old one

Re: [HELP] Changing impact effect of a weapon

Posted: 2010-09-21 03:15
by Rhino
[quote=""'[R-CON"]Amok@ndy;1446298']he is not trying to replace the effect but creating a new one and adding it to the hat without replacing the old one[/quote]

and what did I say?

[R-DEV]Rhino wrote:effects are triggered by two materials coming into contact with each other. ie, the material of the projectile coming into contact with the terrain material or w/e.
[quote="SirCommandant""]Yes I know.
In only want to know how i change the impact effect of the HAT.
I made a new one and wanted to test it.[/quote]

If you really know what I'm saying you really know the answer... If effects are triggered by two materials coming into contact with each other, then crating a new one is fairly obvious... If you still haven't got it you need to define a new trigger for materials coming into contact in guess where? The material settings....

If you want to change the impact effect of the HAT not to use a standard explosion, then you obviously need to change the effect for the material used by the H-AT.....

"Yes I know" is a pointless response when you dont have a clue what I'm on about.

Re: [HELP] Changing impact effect of a weapon

Posted: 2010-09-21 11:02
by Rhino
SirCommandant wrote:OK,
I thoght the effcttriggering is handled like it is at the vehicles, where you can clearly say wich effect is going to be played when the projectile of the vehicle weapon is hitiing the ground (or something else)
Well "Yes I know" isn't really the response when you dont know :p

and effect trigger for vehicles is also done by materials... The effects your thinking of is you define the effect when a weapon is fired, ie, the smoke puffs/muzzle flash effects. Impact effects are triggered via materials....

Re: [HELP] Changing impact effect of a weapon

Posted: 2010-09-21 11:57
by Rhino
dont use the BF2 editor's material editor its shit and dont work.

If you go into your \pr_edit\common\Material\ folder you should find a "MaterialEditor.exe", if not you can download it on the BFeditor forums if you look around for it.

open that up and then you will have all the materials, you pick your source material, ie, the projectile, which for a bullet, or more precisest a 5.56mm round from an assault rifle, which if you search for "556" you will find it, and then you select your destination material, ie, dirt, and then you have all the material properties you need like its damage the projectile dose to that material etc. In the "Material Settings props" bit you will also see some "set effect template"s and "Set sound tempests", and for each one you will notice they have a file for them, ie, one of the dirt templates is "e_bhit_s_dirt", ie, when a bullet hits the dirt, that's the effect that is played.

Image

If you want to change the effect, put in a new effect there and you can also add one by clicking the add prop button.

Re: [HELP] Changing impact effect of a weapon

Posted: 2010-09-21 13:38
by Rhino
irrc yes but aint done it for a while. most likley something your not doing or doing wrong.

Like mentioned before in this topic, the simplest way to test a new effect is just to replace an old effect, rather than adding a brand new one.

Re: [HELP] Changing impact effect of a weapon

Posted: 2010-09-22 22:35
by Sniperdog
I already opened the HAT in the editor and found the value for the impact effect, but I couldn't change it.
This is because the projectiles are stored in a seperate files which are not listed in the HAT tweaks.

If you made a new effect it will be much easier to simply place the new effect in the effects_server.zip and then reference your new effect in the given projectiles folders.

To find what HAT weapon a given faction uses go to

Code: Select all

objects/kits_server.zip\<faction_name>\<faction_name>_at.con
and you can see the HAT weapon being used in that file.

for the us it is this:

Code: Select all

rem -------------------------------------
ObjectTemplate.addTemplate kni_knife
ObjectTemplate.addTemplate klappspaten
ObjectTemplate.addTemplate usrif_m4iron_6
[u][b]ObjectTemplate.addTemplate usatp_predator[/b][/u]
ObjectTemplate.addTemplate hgr_smoke
ObjectTemplate.addTemplate binocular
ObjectTemplate.addTemplate medikit_dressing
ObjectTemplate.addTemplate hgr_incendiary
rem -------------------------------------
Next go to the file for that weapon which can be found at

Code: Select all

objects\weapons_server.zip/Handheld/<weapon_name>/<weapon_name>.tweak
and search for a line like this one:

Code: Select all

ObjectTemplate.projectileTemplate [u][b]at_predator[/b][/u]
The part underlined is the projectile name and to find that you would go to:

Code: Select all

C:\Program Files (x86)\EA GAMES\Battlefield 2\mods\pr_repo\objects\weapons_server.zip/Armament/missiles/<projectile_name>/<projectile_name>.tweak
and you will see this line:

Code: Select all

ObjectTemplate.detonation.endEffectTemplate [u][b]e_exp_medium[/b][/u]
Change the underlined part to the name of your effect which you should have added to this directory:

Code: Select all

objects\effects_server.zip/impacts/explosions
Doing this via materials would be extraneous in this situation as you should want your effect to play no matter what material the missile impacts and also when it detonates via some sort of trigger. The explosion effect is the way this was meant to be done.


I very much like that you are playing around with the effects though as it is an area where we currently don't really have a specialist in atm, so if you keep it up and make something worthwhile we may take a look :)

Re: [HELP] Changing impact effect of a weapon

Posted: 2010-09-23 06:49
by Rhino
Ah ye that's right SD. I was thinking of the impact effect rather than the explosion of the rocket itself after it "destroyed itself" :)