Randomizing soldier uniforms
Posted: Tue May 11, 2010 1:29 pm
Well, this is just an idea that occurred to me, but I've never seen it in any mod.
In BF42 soldiers are uniquely defined for a team. Meaning, all soldiers in a team are "clones". However, there are existing variations (e.g. in Vanilla three different faces). The very same should be applicable to the soldiers' body, that is defining the body uniform. This would mean you could make a team use different uniforms for its soldiers, independent from the kits chosen. I think it would be nice to have some variation there, perfomance drawback is minimal and it would be a fancy visual plus.
How to? This would be the way to do it (not tested):
HungarianSoldier\geometries.con
Et voìla, you got randomized uniforms!
As stated before, these uniforms will be distributed completely randomly and are NOT kit-associated (only "extras" like backpacks, hippacks, helmet etc. are kit-related!)
Though that would be another interesting project: would it be possible to make animatedmeshes part of kits? I fear not, as throughout the game only "KitParts" are used, and AFAIK they are all simpleobjects attached to a specific bone...
Also, does anyone know what this code used in kitparts does?
In BF42 soldiers are uniquely defined for a team. Meaning, all soldiers in a team are "clones". However, there are existing variations (e.g. in Vanilla three different faces). The very same should be applicable to the soldiers' body, that is defining the body uniform. This would mean you could make a team use different uniforms for its soldiers, independent from the kits chosen. I think it would be nice to have some variation there, perfomance drawback is minimal and it would be a fancy visual plus.
How to? This would be the way to do it (not tested):
HungarianSoldier\geometries.con
Now you only need to copy the GerBody.sm two times and rename all of them to "Ger1Body, Ger2Body and Ger3Body", then either use 3dsmax to assign a new uniform texture, or just open the corresponding ".rs" file and change the texture path there:GeometryTemplate.create AnimatedMesh Soldier/3PHunBody1
GeometryTemplate.setSkin animations/GerBody.skn
GeometryTemplate.file Ger1Body
GeometryTemplate.setLodRange 0 0 1 30 2 80
GeometryTemplate.setLodRange 3 150 4 210 5 230
GeometryTemplate.setLodPercent 0 1.0
GeometryTemplate.setLodPercent 1 0.7
GeometryTemplate.setLodPercent 2 0.3
GeometryTemplate.setLodPercent 3 0.2
GeometryTemplate.setLodPercent 4 0.1
GeometryTemplate.setLodPercent 5 0.05
GeometryTemplate.create AnimatedMesh Soldier/3PHunBody2
GeometryTemplate.setSkin animations/GerBody.skn
GeometryTemplate.file Ger2Body
GeometryTemplate.setLodRange 0 0 1 30 2 80
GeometryTemplate.setLodRange 3 150 4 210 5 230
GeometryTemplate.setLodPercent 0 1.0
GeometryTemplate.setLodPercent 1 0.7
GeometryTemplate.setLodPercent 2 0.3
GeometryTemplate.setLodPercent 3 0.2
GeometryTemplate.setLodPercent 4 0.1
GeometryTemplate.setLodPercent 5 0.05
GeometryTemplate.create AnimatedMesh Soldier/3PHunBody3
GeometryTemplate.setSkin animations/GerBody.skn
GeometryTemplate.file Ger3Body
GeometryTemplate.setLodRange 0 0 1 30 2 80
GeometryTemplate.setLodRange 3 150 4 210 5 230
GeometryTemplate.setLodPercent 0 1.0
GeometryTemplate.setLodPercent 1 0.7
GeometryTemplate.setLodPercent 2 0.3
GeometryTemplate.setLodPercent 3 0.2
GeometryTemplate.setLodPercent 4 0.1
GeometryTemplate.setLodPercent 5 0.05
Code: Select all
subshader "GerBody_Material14" "StandardMesh/Default"
{
lighting true;
lightingSpecular false;
materialDiffuse 0.4 0.4 0.4;
texture "texture/Germun_r";
}
subshader "GerBody_Material15" "StandardMesh/Default"
{
lighting true;
lightingSpecular false;
materialDiffuse 0.4 0.4 0.4;
texture "texture/Germov_r";
}
As stated before, these uniforms will be distributed completely randomly and are NOT kit-associated (only "extras" like backpacks, hippacks, helmet etc. are kit-related!)
Though that would be another interesting project: would it be possible to make animatedmeshes part of kits? I fear not, as throughout the game only "KitParts" are used, and AFAIK they are all simpleobjects attached to a specific bone...
Also, does anyone know what this code used in kitparts does?
Code: Select all
ObjectTemplate.setCopyLinksCount 0