Jump to content
Sign in to follow this  
Meatball0311

How to config a units language?

Recommended Posts

I want my unit to have Russian faces, but I want them to speak english (with American accent). How would I config this in the config.cpp?

Share this post


Link to post
Share on other sites

this is the base USMC soldier, minus inherited values.

class USMC_Soldier_Base: SoldierWB {
accuracy = 2;
camouflage = 1.8;
cost = 80000;
displayname = "Rifleman";
facetype = "Man";
faction = "USMC";
genericnames = "EnglishMen";
icon = "\Ca\characters2\data\icon\i_soldier_CA.paa";
identitytypes[] = {"USMC_Glasses", "Head_USMC"};  // Check
languages[] = {"EN"};  // Check
model = "\ca\characters2\USMC\usmc_soldier";
picture = "\Ca\characters\data\Ico\i_null_CA.paa";
portrait = "\Ca\characters\data\portraits\comBarHead_usmc_soldier_ca";
scope = 0;
vehicleclass = "Men";
class HitPoints: HitPoints {
	class HitHead: HitHead {
		armor = 0.85;
	};
	class HitBody: HitBody {
		armor = 1;
		passthrough = 0.8;
	};
};
class Wounds {
	mat[] = {"Ca\characters2\usmc\marines\data\usmc_soldier.rvmat", "ca\characters2\data\USMC_soldier_W1.rvmat", "ca\characters2\data\USMC_soldier_W2.rvmat", "Ca\characters2\usmc\marines\data\usmc_soldier_at.rvmat", "ca\characters2\data\USMC_soldier_W1.rvmat", "ca\characters2\data\USMC_soldier_W2.rvmat", "Ca\characters2\usmc\marines\data\usmc_soldier_CO.rvmat", "ca\characters2\data\USMC_soldier_W1.rvmat", "ca\characters2\data\USMC_soldier_W2.rvmat", "Ca\characters2\usmc\marines\data\usmc_soldier_DMR.rvmat", "ca\characters2\data\USMC_soldier_W1.rvmat", "ca\characters2\data\USMC_soldier_W2.rvmat", "Ca\characters2\usmc\marines\data\usmc_soldier_med.rvmat", "ca\characters2\data\USMC_soldier_W1.rvmat", "ca\characters2\data\USMC_soldier_W2.rvmat", "Ca\characters2\usmc\marines\data\usmc_soldier_mine.rvmat", "ca\characters2\data\USMC_soldier_W1.rvmat", "ca\characters2\data\USMC_soldier_W2.rvmat", "Ca\characters2\usmc\marines\data\usmc_soldier_saw.rvmat", "ca\characters2\data\USMC_soldier_W1.rvmat", "ca\characters2\data\USMC_soldier_W2.rvmat", "Ca\characters2\usmc\marines\data\usmc_soldier_scout.rvmat", "ca\characters2\data\USMC_soldier_W1.rvmat", "ca\characters2\data\USMC_soldier_W2.rvmat", "Ca\characters2\usmc\marines\data\usmc_soldier_tl.rvmat", "ca\characters2\data\USMC_soldier_W1.rvmat", "ca\characters2\data\USMC_soldier_W2.rvmat", "Ca\characters2\usmc\marines\data\usmc_Crew.rvmat", "ca\characters2\data\USMC_soldier_W1.rvmat", "ca\characters2\data\USMC_soldier_W2.rvmat", "ca\characters2\usmc\data\usmc_officer_body.rvmat", "ca\characters2\data\USMC_soldier_W1.rvmat", "ca\characters2\data\USMC_soldier_W2.rvmat", "Ca\characters2\USMC\data\us_Crew.rvmat", "Ca\characters2\USMC\data\W1_us_crew.rvmat", "Ca\characters2\USMC\data\W2_us_crew.rvmat"};
	tex[] = {};
};
class TalkTopics: TalkTopics {
	core_en = "Core_Full";  // Check
};
};

Can't give you a straight down answer, but you might copy over these values and test, try one by one and in that order

1) languages[] = {"EN"}; // best guess, could be enough

2) identitytypes[] = {"USMC_Glasses", "Head_USMC"}; // these identities seem to relate with CfgVoice where RadioProtocol is referenced, this might have unintended consequences though

3) core_en // instead of "core_ru" > this is related with "Greetings" action menu dialogs, not RadioProtocol used

Report your tests, I am actually curious...

Edited by gammadust

Share this post


Link to post
Share on other sites

I think you Might Need all for it to Work right, as I think I Forgot one and now I have guys Speaking both Russian and English...

But you do need the Identitytypes, not the Glasses but the head as well as the Talktopics block

Share this post


Link to post
Share on other sites
class CfgVehicles

{

class USMC_Soldier_Base;

class USMC_Soldier_Pilot;

class mar_fighter_pilot: USMC_Soldier_Base

{

vehicleClass = "mar_aviator";

displayName = "USMC Fighter Pilot";

model = "\mar_pilot\data\units\pilot\mar_fighter_pilot";

weapons[] = {};

magazines[] = {};

respawnWeapons[] = {};

respawnMagazines[] = {};

identityTypes[] = {"Head_RU"};

faceType = "Man";

scope = 2;

nightVision = 1;

nameSound = "officer";

attendant = 1;

canHideBodies = 1;

canDeactivateMines = "true";

accuracy = 2;

sensitivity = 2;

camouflage = 0.6;

class HitHead

{

armor = 0.7;

material = -1;

name = "head_hit";

passThrough = 1;

};

class HitBody

{

armor = 1;

material = -1;

name = "body";

passThrough = 1;

};

class HitHands

{

armor = 0.5;

material = -1;

name = "hands";

passThrough = 1;

};

class HitLegs

{

armor = 0.5;

material = -1;

name = "legs";

passThrough = 1;

};

class Wounds {

tex[] = {};

mat[] = {};

};

};

I am actually not getting any sound now... what it was doing was speaking english when the unit was a group leader (english commands), but when it was not in a group.. it would speak Russian.

---------- Post added at 07:38 AM ---------- Previous post was at 07:31 AM ----------

They are still talking Russian....

Share this post


Link to post
Share on other sites

"1) languages[] = {"EN"}; // best guess, could be enough" ? makes no change?

Share this post


Link to post
Share on other sites

I added languages[] = {"EN"] and still doesnt work. It is weird.. if I am a unit leader my commands are in English, but other sayings are in Russian...

How would I define TalkTopics in my config.cpp?

Share this post


Link to post
Share on other sites

Try:

class TalkTopics: TalkTopics {
core_[b]ru[/b] = "Core_Full";  // Check
};

And

languages[] = {"[b]RU[/b]"};

Share this post


Link to post
Share on other sites
I added languages[] = {"EN"} and still doesnt work. It is weird.. if I am a unit leader my commands are in English, but other sayings are in Russian...

which ones exacly?

Also this one might be a longer shot than earlier but (this is part of USMC_Soldier_Base also, it is an inherited value, did not figure which parent):

class SpeechVariants {
class Default {
speechplural[] = {"veh_men"};
speechsingular[] = {"veh_man"};
};
class EN: Default {
speechplural[] = {"veh_men"};
speechsingular[] = {"veh_man"};
};
class CZ {
speechplural[] = {"veh_men_CZ"};
speechsingular[] = {"veh_man_CZ"};
};
class CZ_Akuzativ {
speechplural[] = {"veh_men_CZ4P"};
speechsingular[] = {"veh_man_CZ4P"};
};
class RU {
speechplural[] = {"veh_men_RU"};
speechsingular[] = {"veh_man_RU"};
};
};

might be also related, I also suspect not every wording/expressions have not been translated from english to russian, or vice versa, meaning some expressions might only be found in one language alone.

The previous seams to be related in how the engine handles sentence syntax more than any thing else... but might worth a try.

Edited by gammadust

Share this post


Link to post
Share on other sites

I am not having any success with this... so let me revise my question.

I want to only use certain faces.. for example face01 thru face20 for my unit. Is there a way to limit the random face selection?

Share this post


Link to post
Share on other sites

I figured out how to make a new Identity..

class CfgIdentities
{
class Head_MSOT
{
 name="";
 face="Face45";
 glasses="None";
 speaker="Male01EN";
 pitch=1.1;
};
};

However, that is just for one face type. I would like to have various face types per Identity.

How can I make a custom CfgIdentities, that will randomly select between Face01, Face02, Face03..... Face20?

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  

×