Jump to content
Sign in to follow this  
vitamin

Questions about replacing BIS units

Recommended Posts

I want to replace default units with the new ones and picked RHS Naval Infantry for OPFOR. But since these units use Facestex2, their config is a bit different than the default one (or ECP in my case). AFAIK, I need to add three new lines to every soldier's class and these new sections are: model, hiddenSelections, and wounds. But what about this part:

animated=1;
class animations
{
class Fset
{
	type="rotation";
	animPeriod=0.01;
	selection="Fset1";
	axis="Fset2";
	angle0=0;
	angle1=1;
};
};
class EventHandlers
{
Init="[_this select 0] exec ""\facestex2\rus_faces.sqs""; [_this select 0,0] exec ""\bd_grenadepack\AddNewUnit.sqs""";
};

Do I need to copy it to the main config either?

And second thing, I'd like to ask if someone could tell me if these values below for SoldierEB class are OK?

cost=40000;
accuracy=0.700000;
armor=4.0;
armorStructural=1.6; 
armorHead=0.8;
armorBody=3.5;
armorHands=0.5;
armorLegs=0.3;

The first two values are from ECP config, and the rest comes from RHS config. I don't know why but ECP doesn't have these armor parameters defined for soldiers. And I'd like to add them (IIRC, WGL has those too in their config) but I'm not sure if the values are OK. Has anyone made any experiments with them maybe? Do they seem to be reasonable, or maybe should be changed?

EDIT:

Class EventHandlers is needed - without it faces look wrong. All armor parameters in ECP are defined in class Man - no need to add them to every soldier's class then.

Edited by vitamin

Share this post


Link to post
Share on other sites

I changed model of default BIS West soldier and it looks like this:

class SoldierWB : Soldier
  {
     //model="MC vojakW2";
     //hiddenSelections[]={"medic"};
     model="\HYK_USsol\wl\HYK_USsol_wl85.p3d";
     hiddenSelections[]={"goou","goostu","googu","good","goostd","googd","medic","mic","holster"};
     HYK_USsolWL85_Wounds
     moves="CfgMovesMC";
     vehicleClass="Men";
     scope=2;
     side=1;
     accuracy=0.700000;
     displayName="$STR_DN_SOLDIER";
     weapons[]={"M16","Throw","Put"};
     magazines[]={"M16","M16","M16","M16","HandGrenade","HandGrenade","HandGrenade","HandGrenade","HandGrenade","HandGrenade"};
     cost=40000;
     #ifdef SOLDIER_MOVING_SOUND
     SOLDIER_MOVING_SOUND
     #endif
     animated=1;
     class animations
     {
   class Fset
   {
	    type="rotation";
	    animPeriod=0.01;
	    selection="Fset1";
	    axis="Fset2";
	    angle0=0;
	    angle1=1;
   };
     };
     class EventHandlers
     {
        Init="[_this select 0] exec ""\HYK_BISfaces\faceinit.sqs"""; 
     };
  };

But there is a problem with faces when soldiers start in vehicles, static guns or aircrafts. Here's an example:

iok8cj.jpg

Why does it happen and how to fix this?

And second thing, I cannot find 'SoldierGSniper' class in the main config file - where is it then?

Share this post


Link to post
Share on other sites

Instead of adding Init Eventhandler, I'd just replace face textures defined in wounds[] that hides under class Man - this way You can also define wound textures for all replaced models. That should fix the problem with soldiers in vehicles (I think...).

As for Resistance Sniper - his class is hidden in Resistance config. O.pbo or something like that.

Share this post


Link to post
Share on other sites

Could you be more specific please about this texture replacement?

As for Res Sniper - I found it in 'O_WP.pbo'. BTW, if I add this class to main config will it replace the original one from addon?

Share this post


Link to post
Share on other sites
Could you be more specific please about this texture replacement?

In config You have class Man* - this is "base-class" for every (human) unit in game. In it You'll find "wounds[]" value which lists every texture used on human models in game: uniforms and faces. The same "wound[]" value, but with different texture paths, You can find in HYK's addon. So Your job is to find what are paths to face textures in HYK's addon, and paste them to original config, HOWEVER I'm not sure if this will surely fix Your problem, but this is the only "weak point" I can imagine.

As for Res Sniper - I found it in 'O_WP.pbo'. BTW, if I add this class to main config will it replace the original one from addon?

From what I understand - no: if there are two units with identical classnames, the one in addon takes higher priority.

*If You're using Commented Config 1.91 by BIS, then You need to modify woundsFaces.hpp file.

Share this post


Link to post
Share on other sites

It's strange but the main config (from ECP in my case) already has all face wound textures listed, and these textures are exactly the same as listed in HYK's config. Hyakushiki added only uniform textures - there are no new face textures in his addon. Or I overlooked something maybe. But the truth is I really don't understand why it's not working?

Share this post


Link to post
Share on other sites

I did something like this recently, except I used HYK 1.53 to get away from the whole face ordeal :)

Share this post


Link to post
Share on other sites
It's strange but the main config (from ECP in my case) already has all face wound textures listed, and these textures are exactly the same as listed in HYK's config. Hyakushiki added only uniform textures - there are no new face textures in his addon. Or I overlooked something maybe. But the truth is I really don't understand why it's not working?

Then just try to write those paths manually - if You can open .pbo to check config, You can also find those textures ;) Check if there are wounded variants too.

BTW: OFPL mod "walked around" this problem with EventHandler script in init of the... vehicle. But this gives You identical faces of gunner and driver/pilot.

Share this post


Link to post
Share on other sites

@krzychuzokecia - I found those textures (they are in 'HYK_BISfaces.pbo') and I added all of them to the wounds in Man class but it didn't help at all:(

@Zulu1 - thanks for letting me know about that older version of HYK soldiers. I guess I will have to use it instead of 2.05 because I cannot figure out this problem with faces.

Share this post


Link to post
Share on other sites

Another question - do I need to add section of 'CfgModels' to main config after replacing some BIS models with 3rd party addons? Or it isn't necessary?

Share this post


Link to post
Share on other sites

1.

Another question - do I need to add section of 'CfgModels' to main config after replacing some BIS models with 3rd party addons? Or it isn't necessary?

It is not necessary so long as you have the addon active - ie. while starting up, the game has been able to read the addon's CfgModels in the addons config.

2. As suggested by Zulu1, you can keep your youthful hair attached to your head if you avoid units which require facestex2. How about improved RHS Motorized Infantry (Reskinned by ShadowNX) as the OPFOR?

3. If you're using ECP, you don't need to add an EventHandler for the bd_grenadepack

4.

But there is a problem with faces when soldiers start in vehicles, static guns or aircrafts. Here's an example:

Why does it happen and how to fix this?

Does this problem cure itself if you wait for several seconds, or turn away and look again?

There are two options, and they depend on how committed you are to changing to facestex2:

If you are prepared to change every human model in the game and not play with any addon that introduces new models:

Edit the CfgFaces section of your config to point at facestex2 textures instead, and also CfgFaceWounds while you're at it. Then you wouldn't need any scripts at all.

You want to change models for a specific side, and are prepared to not use any addons with new models for that side:

There's a section in the config where "class Soldiers" are defined for each "class <Side>". Change the face=... line for each soldier on that side.

None of the above:

Write better scripts than in facestex2. These would start by checking if the unit is in a vehicle, and might also check the config name of the unit to be certain that the script should run on it.

Edited by -rageQuit-
I'm allowed to post links now.

Share this post


Link to post
Share on other sites

Custom heads like in facetex2 proved not to work on a ded server like with LOL clan addons, and in SP mode any saved game looses custom face textures. So the moral of the story is to avoid any sort of custom head models or face textures.

Share this post


Link to post
Share on other sites

I did as you all suggested me and got rid of Facestex2 (I had no clue it would give me so much problems).

@rageQuit - thanks for information on CfgModels.

Share this post


Link to post
Share on other sites

I would like to ask about two things:

1. Is changing loadouts of soldiers a good idea? I'd like to add them more ammo, and remove hand grenades. Can this cause any problems while playing BIS missions/campaigns?

2. Where I can find speed of sprinting soldiers in config file? I'd like to decrease it a little bit.

Share this post


Link to post
Share on other sites
I would like to ask about two things:

1. Is changing loadouts of soldiers a good idea? I'd like to add them more ammo, and remove hand grenades. Can this cause any problems while playing BIS missions/campaigns?

2. Where I can find speed of sprinting soldiers in config file? I'd like to decrease it a little bit.

1 - I think it won't cause many problems, as long as you keep the loadout of the specialists the same - engineers should still have enough mines, and you shouldn't give them any more ammo than they can carry in their inventory, that might lead to issues.

2 - you can find it under CfgMovesMC - it's "class CombatSprintF: Default" - just change the speed value. It's a negative value, though, -0.4, so changing it to -0.5 would make it slower.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×