Page 1 of 1

MaterialManagerSettings - Potential typos

Posted: 2014-02-05 11:33
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: .

Re: MaterialManagerSettings - Potential typos

Posted: 2014-02-05 12:51
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

Re: MaterialManagerSettings - Potential typos

Posted: 2014-02-05 14:28
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 :) .