MaterialManagerSettings - Potential typos

If you find a bug within PR:BF2 (including PRSP), please report it here.
Post Reply
User avatar
Senshi
PR:BF2 Developer
Posts: 358
Joined: 2010-04-29 10:44

MaterialManagerSettings - Potential typos

Post by Senshi »

Another bugreport caused by my script running into an exception:
In the material\materialmanagersettings.con the following Cells differ from all others:

Line 9902:

Code: Select all

MaterialManager.createCell 48 111
MaterialManager.damageMod 0
MaterialManager.setSoundTemplate 0 S_Knife_Metal_Surface
MaterialManager.setEffectTemplate e_knife_metalsolid
Line 53338:

Code: Select all

MaterialManager.createCell 176 17
MaterialManager.damageMod 0.015
MaterialManager.setDecalTemplate 0 decal_l_glass_vehicle
MaterialManager.setSoundTemplate 0 S_Glass_Large
MaterialManager.setEffectTemplate e_bhit_20mm_glass
The difference is that their "setEffectTemplate" lines are missing the "0" parameter in between.
I do not know what this middle parameter actually does, only that it is always there in any mod I know and that it is always zero. I also do not know if it actually causes issues ingame, at the most it probably causes a missing effect if you hit some materials, hardly game-breaking.

Anyway, should be easy to verify and fix if necessary, so here goes.

If someone knows what the middle "0" is actually good for, I also would appreciate an explanation on that :idea: .
M42 Zwilling
Retired PR Developer
Posts: 613
Joined: 2012-06-10 11:27

Re: MaterialManagerSettings - Potential typos

Post by M42 Zwilling »

Thanks for reporting, fixed. :)

I'm not 100% sure what the first argument does there. It isn't always 0, as it can be another integer when there are multiple effects set for one collision:

Code: Select all

MaterialManager.createCell 3762 18
MaterialManager.damageMod 0.2
MaterialManager.setEffectTemplate 0 e_bhit_s_glass_vehicle
MaterialManager.setEffectTemplate 1 e_bhit_s_ricochet
MaterialManager.setEffectTemplate 2 e_bhit_s_glass_vehicle_exit
Image


"How many posts have there been about how much better PR was back in 0.X? The fact is that if we played the older versions we would start to remember the shortcomings, but we tend to hold onto the good memories tighter than the bad ones." - Murphy
User avatar
Senshi
PR:BF2 Developer
Posts: 358
Joined: 2010-04-29 10:44

Re: MaterialManagerSettings - Potential typos

Post by Senshi »

Ah, didn't see those multiple ones yet (well, could have searched for them easily ;) ). In this case I'm pretty sure it's just an array index due to the "seteffecttemplate". As in: they use "set" here, unlike "add" which is used for other list-building tasks (addtemplate).

Thanks for the reply! Another small token of understanding acquired :) .
Post Reply

Return to “PR:BF2 Bugs”