Jump to content
Sign in to follow this  
Borse

setIdentity

Recommended Posts

I need some assistance in giving NPC's new names.

I am aware that there have been threads on this in the past, but I have tried the tips given there and have not gotten it to work so please bear with me.

My issue:

I have an officer at my starting position that I would like to rename so that when aiming at him something other than "rifleman" appears as his name.

This is what I have done so far:

In my Arma 3\missions\missionname - folder, I have created a text file named "Description.ext". This file is then in addition to the "mission.sqm" file already there.

As I just created the description file it is completely blank except for the example I give below.

Into the blank document I have tried pasting the following:

//--- Idenditätenclass CfgIdentities{ class Name {  name="Name";  face="Face01";  glasses="Tactical";  speaker="Male01EN";  pitch=1.1; }; };

I have also tried without "//--- Idenditäten" at the beginning. (I'm not german, so that was included later on after a tip in an old thread).

In the Init field of the unit in question I have typed "this setIdentity Name".

Is there something else I need to enter into this document in addition for it to work? Is there something else that I am missing completely?

Also, I only need to change his name, and so his face and glasses etc. can stay unchanged. Can I simply delete those portions that I do not need or do they have to be there for it to work?

Thanks in advance for any help.

Share this post


Link to post
Share on other sites

I think the syntax would be:

this setIdentity "Name";

I would recommend changing name to something more unique though.

Share this post


Link to post
Share on other sites

you provide your current description.ext file, then you put jshocks code in the unit init field.

Share this post


Link to post
Share on other sites

class CfgIdentities
{
class Stranger
{
	name="Stranger"; //Name you want to call unit
               nameSound = "Stranger"; // Arma 3 only! When you issue a command, you'll refer to this unit by its name
	face="GreekHead_A3_09"; //units face
	glasses="None"; //if you want the unit to have glasses
	speaker="Male06ENG"; //how the unit sounds
	pitch=1.1; //how high or low units voice is
};
};

And to call it for a specific unit, use what JShock said

this setIdentity "Stranger"

in the units initialization box (I put it first, but I'm not sure if it matters).

Hope this helps.:)

Share this post


Link to post
Share on other sites

As far as I know, it's not even necessary anymore to setIdentity in the description.ext. If it's only for the name you want to change, use setName, so simply write this setName "John Doe"; in the unit's init line.

Share this post


Link to post
Share on other sites

But the code provided above won't change what he is asking for, no?

"I have an officer at my starting position that I would like to rename so that when aiming at him something other than "rifleman" appears as his name. "

You can set his name with setName, but this one is only visible in the team-tab or soldier info at the bottom screen. When pointing at him, he still will be "rifleman". I'll guess to get the named effect, the displayName from the config needs to be overwritten or something? I don't think that this will work, though.

Edited by Lexx

Share this post


Link to post
Share on other sites
class CfgIdentities
{
class Stranger
{
	name="Stranger"; //Name you want to call unit
               nameSound = "Stranger"; // Arma 3 only! When you issue a command, you'll refer to this unit by its name
	face="GreekHead_A3_09"; //units face
	glasses="None"; //if you want the unit to have glasses
	speaker="Male06ENG"; //how the unit sounds
	pitch=1.1; //how high or low units voice is
};
};

And to call it for a specific unit, use what JShock said

this setIdentity "Stranger"

in the units initialization box (I put it first, but I'm not sure if it matters).

Hope this helps.:)

I copied this exact text into my Description.ext file, and put

this setIdentity "Stranger";

in the init field of the unit in question.

It's still not showing up with anything other than the generic "rifleman" text when aiming at him.

The setName command is not working either and does not seem to affect the names of any of the squad members on the bottom left UI.

Share this post


Link to post
Share on other sites

By default that cannot be overwritten without a config change, I tried that a while back and as far as I can tell it simply doesn't work.

Share this post


Link to post
Share on other sites
Use cursorTarget (https://community.bistudio.com/wiki/cursorTarget) to display name and rank on a hovered unit.

That wiki page wasn't the most helpful. This is really my first ever mission, so could you explain that a bit more?

---------- Post added at 12:05 ---------- Previous post was at 11:42 ----------

Also, I only need to change his name, and so his face and glasses etc. can stay unchanged. Can I simply delete those portions that I do not need or do they have to be there for it to work?

To answer my own question here - yes, you apparently have to define a face and glasses and everything for this to work. Not doing so and only entering the desired name will produce an error.

Would there be a way to set "face = whatever" ? To say that I only want to change the name and nothing else, ie. I want the face that I gave him in the armory and exported from there.

Also, I DID get the setIdentity to work. Turns out I was being a complete moron. As it happens, simply naming the file the way everyone says isn't enough. Obviously, the file extension had to be changed as well (duh).

While it is now working, setIdentity only changes the name shown on the bottom left of the screen if he is in your squad. The green floating text when pointing at him will not be changed by this.

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  

×