Neverwinter Vault

Expand AllContract All -Site -My Profile -Features

Neverwinter Nights 2

-NWN2 Files -NWN2 Game Info -NWN2 Resources -NWN2 Community

Neverwinter Nights

-NWN Files -NWN Game Info -NWN Resources -NWN Community

Vault Network
RPG Vault
VN Boards
IGN Vault
Vault Wiki
· Age of Conan
· Anarchy Online
· Asheron's Call
· Dark Age of Camelot
· City of Heroes
· D&D
· EVE Online
· EverQuest
· EverQuest 2
· Final Fantasy
· Guild Wars
· Lineage 2
· Lord of the Rings Online
· Middle Earth
· Neverwinter Nights
· Pirates of the Burning Sea
· Rise of the Argonauts
· Star Wars Galaxies
· Tabula Rasa
· The Matrix Online
· The Witcher
· Titan Quest
· Two Worlds
· Vanguard
· Warhammer
· World of Warcraft

Planet Network
Planet Hub

IGN
Games
Cheats
Entertainment

The Web   The Site  



NWN SCRIPTS

- Jump to comments -
Title  Farchilde's Naming Trick.
Author  Farchilde
Submitted / Updated  06-17-2006 / 11-22-2006
Category  Creature Related
Expansions  HOTU-1.67
Format  Module Only
Type  Type - Other
Description
It's amazing what a simple " " can do...

This is a very simple system for getting NPC's name to be revealed only after the PC speaks with them and the NPC introduces himself/herself. But it is more too, under this system the NPC's name will only be revealed to the PC who he introduced himself/herself to, and not all the PC's that percieve him/her, other PC's will still not "see" his/her name.

I did this because of a thread I read in the NWN2 forums where it was said "I always thought it stupid you knew an NPC's name before you met him".

Here is the short run down of how it works.

Simply import the Erf into your module and select yes to overwrite all resources, "x2_def_percept" will be overwritten.

In any line **except the very first line, this will not work and the entire conversation will not activate if you put this in the first line of the dialogue** of the conversation file for any NPC where they speak their name somewhere in that conversation, put the script "reveal_name". Make sure the PC has to see and **use** the line of dialogue where this script is in the "actions taken" tab. The best place in my opinion would be **all** the "End Dialogue" lines in the conversation, but any line that will be used will do except the first.

And you are good to go, the NPC's name will be revealed to only the one he/she introduced him/herself too.

***Note please don't use this if in your conversation the NPC never says his/her name. :P

***To use this system with default NPC's/creatures always make sure "x2_def_percept" is the script name in the "On_Percieved" tab in the creature script properties. Most cases it already is, but some default creatures in the toolset have a different script (earlier one).

***Right now this is not persistent in multiplayer but could very very easily be adapted to persistence. Although names will be revealed only to the player the NPC greeted, that player would see the name disappear if another player came into the area with the NPC who wasn't "introduced" yet, of course the original player would still know the NPC's name. I know using conditionals the appearance of the NPC only introducing him/herself once per player can be easily adapted.

Included in the rar is the Erf for importing and a small demo mod to see it in action. To use the demo, talk to the NPC, then go into the other area and use the switch, then when you go back to him he will not have a name. This was the only way I could test multiple players without multiple players. :P

Enjoy!

PS: To all scripters out there this entire system is based of the difference between "" and " " ;)

Files

NameTypeSizeDownloads
NameModandErf.rarNameModandErf.rar
Submitted: 06-17-2006 / Last Updated: 06-17-2006
rar11.08Kb152
The small demo module and Erf as well.
SCORE OUT OF 10
9.63
4 votes
View Stats
Cast Your Vote!

PORTFOLIO
Add this entry to your portfolio so you can track it
Manage your existing portfolios or create a new one.
SCREENS
No Images




You Must Be Logged In to Participate.
Comments (12):

Posted by ShaDoOoW at 2009-01-29 15:11:34    Voted 9.00 on 01/29/09
Great idea.

Shame, this cannot be implementated in MP properly, but in SP this is totally perfect! However scripts could be better, i suggest move that ExecuteScript to nw_c2_default2, then there won't be that issue and builder won't need to change anything in creature properties.

Jereniva: I would avoid setting any variable if it's possible, and this is possible. If you will want this for SP, you can just call in onspawn script SetName(OBJECT_SELF," "); to hide true name. And SetName(OBJECT_SELF,""); in onconversation...
_________________________
[Boost System] [Door System] [Devastating Critical Immunity] [HIPS remake] [Circle Kick Mode] [1.69 Full 2da Source]

Posted by Jereniva at 2006-06-24 17:40:03    
after this line, "NPC's conversation you can use" it should read CUSTOM102, in brackets. I guess the board doesn't like the greather than/less than symbols.

Posted by Jereniva at 2006-06-24 17:38:01    
I love the idea, but this seems so complicated - Am I missing something?

In the toolset, give all NPCs a string variable called sNPCname, and when you place the NPC, adjust that variable's value to the name you want for the NPC.

in the standard OnConversation (nw_c2_default4) script, put:

SetCustomToken(102, GetLocalString(OBJECT_SELF, "sNPCname"));
I'm using token 102 for that, obviously use whatever one you want.

Now, anywhere in the NPC's conversation you can use and during conversation, it will display the NPC's name.
Other players will still just see "Male Half-elf" on a mouse-over.

If this is a single-player module and you don't care, you can put this script in the Action Taken of whatever line the NPC reveals the name first:
SetName(OBJECT_SELF, GetLocalString(OBJECT_SELF, "sNPCname"));

Posted by Farchilde at 2006-06-19 04:36:23    
One final note about this ""/" " variation, it appears that (at least in my demo, as Bob Mcfly is named with both slots, first/last) first and last names do not matter.

"" will always set the creature's name to it's given name in the toolset, and " " will always blank it out. Though since all creatures have first and last name slots one would think it would actually have to be """"/" "" ".

Odd, I don't get it but meh. :P

Posted by Farchilde at 2006-06-19 04:26:15    
Actually to give you more of an idea, there is lots of things one can do with this ""/" " variation.

Although it is 5 am here and I didn't test this it should work. :P

If you were to to put this as the NPC's default heartbeat...

void main()
{
ExecuteScript("nw_c2_default1",OBJECT_SELF);
object oPC = GetNearestCreature(CREATURE_TYPE_PLAYER_CHAR, PLAYER_CHAR_IS_PC,OBJECT_SELF, 1, CREATURE_TYPE_PERCEPTION, PERCEPTION_SEEN);
object oTarget = OBJECT_SELF;
if (GetIsInCombat(OBJECT_SELF)) return;
if (GetTag(GetItemInSlot(INVENTORY_SLOT_HEAD,OBJECT_SELF)) == "NPC_Helmet")
{
SetName(oTarget, " ");
}
else
{
SetName(oTarget, "");
}
}

And this in a line of conversation where he would remove a helm he would have equipped before talking to the PC...

void main()
{
object oPC = GetPCSpeaker();
ActionUnequipItem(GetItemInSlot(INVENTORY_SLOT_HEAD,OBJECT_SELF));
}

As long as you tagged the NPC's Helmet as NPC_Helmet (and he had it equipped prior to the conversation :P), he would appear to take of his helm and only after (6 seconds after propably but hey, NWN isn't perfect :P) the player would "recognize" him...

"Oh hey Bob! it's you!" Cool huh? :P

Posted by Farchilde at 2006-06-18 20:58:49    
when you clicked on the level did the VFX show? Because if not then the script "switch" of LocalInt's didn't run, hence why I put the VFX in.

Posted by Alabore at 2006-06-18 20:51:13    Voted 10.00 on 06/18/06
Tested it out on single player alone.
It does require some more tweaking: clicking once on the lever did not clear name out, but the idea is great.

Always thought that being able to read chars' names was odd.
As if people strolled by wearing "Hi, my
name is Bob" badges. :D

...

Also, tried to attack the char; his name didn't appear either.
Implications for game-play are interesting.

Foes, common folk, shopkeepers, all could benefit from this script.

Posted by Farchilde at 2006-06-18 20:48:19    
A basic explanation:

Because this uses the SetName function, and a creature can only have one name, this is a case of one or the other, eith er the true name will be displayed, or no name, it cannot be both at the same time for two different players. Hence it will always work fine for a one (single) player module.

This was my original intention.

It -could- work in multi as I explained, but what will happen is that player A and B will log in (using the demo mod as an example), niether will "see" the NPC's name, when player A has the conversation the same will be displayed. Player B will also see it unless he was to go to the second area and come back. then niether would see the name again. If player A was to have the conversation and player B stayed in the area while player A left and pulled the switch, player B would see the name vanish when player A re-entered the area. If player A did not pull the switch, player B would not see the name vanish.

This sounds a little confusing, and I used On_Percieved instead of On_ Heartbeat because this is just a demo of the basic concept. I can only script so much and my concern was mainly single player modules. If I used on heartbeat and a normal multiplayer module was implemented with this sytem, the NPC would most likely never have a name displayed because a player that he hasn't "met" would almost always be within the vicinity to activate the heartbeat, whether this was area wise/global or whatever.

...Okay, that was a little long winded, but think of it this way. When the NPC sees a player he hasnt "talked to" yet, his name is "turned off" when he sees a player he has, his name is "turned on", i.e. the beauty of LocalInt's.

But since his name cannot be "off" and "on" at the same time, yes in multi this will lead to a "dissappearing name" effect.

As I say feel free to expand on this, I put it up as something to work from.

Posted by Talmud at 2006-06-18 16:48:05    
Actually, it seems to work as intended sometimes, but not others. I will see if I can investigate further.

Posted by Talmud at 2006-06-18 16:18:25    
Needs a little tweaking - currently it works the opposite way from that intended in multiplayer. If a player talks to the npc, everyone else can see the name, but the one who talked to the npc can't.

Posted by roane242 at 2006-06-18 15:37:11    Voted 9.75 on 06/18/06
Me too. Great idea! I'm going to test it out in the Anchorome module I'm working on.

Posted by Fleshmelter at 2006-06-18 14:40:01    Voted 9.75 on 06/18/06
I voted on it without testing for the simple concept of it, excellent idea!
_________________________
PW Action Server:
| Chaosgate |


You must be Logged In to post comments in this section.

 
Most recent posts on the MMO General Boards
Analyst: Star Wars: The Old Republic Could...Analyst: Star Wars: The Old Republic Could Sell 3M: more numbers
- last reply by Acao on Aug 15, 2011 06:15 PM
which class will your first character be
- last reply by Blisteringballs on Aug 15, 2011 05:50 PM
New Community Content!
- posted by Vault_News on Aug 15, 2011 05:00 PM
New Community Content!
- posted by Vault_News on Aug 15, 2011 04:00 PM
NWN Idea Database Update
- posted by Vault_News on Aug 15, 2011 03:46 PM
Missing Votes for NWN2 Hall of Fame
- posted by Vault_News on Aug 15, 2011 03:40 PM
Missing Votes for NWN Hall of Fame
- posted by Vault_News on Aug 15, 2011 03:39 PM
Random Questions and game altering suggest...Random Questions and game altering suggestions!!!
- last reply by ArkadyTepes on Aug 15, 2011 03:22 PM
State of the game?
- last reply by LyricOpera on Aug 15, 2011 01:37 PM
Yesterday streaming, now demanding downloa...Yesterday streaming, now demanding download :(
- last reply by Sinane-tk on Aug 15, 2011 10:23 AM
 

   


IGN Entertainment
By continuing past this page, and by your continued use of this site, you agree to be bound by and abide by the User Agreement.
Copyright 1996-2011, IGN Entertainment, Inc. | Support | Privacy Policy | User Agreement | RSS Feeds
IGN’s enterprise databases running Oracle, SQL and MySQL are professionally monitored and managed by Pythian Remote DBA.


NWN2 Hall of Fame

HOF NWN2 Tutorials


View all Hall of Fame entries


Neverwinter Nights 2

TOP NWN2 Modules

NEW Modules

NEW Reviews

NEW INTL. Modules

TOP Hakpaks

TOP Gameworlds

TOP Tutorials

TOP Prefab:Areas

TOP Blueprints

TOP Plugins

TOP UI

TOP Other

TOP Visual Effects

TOP Scripts

TOP Tools

TOP Movies

TOP Models

TOP Characters





Hall of Fame

HOF NWN Modules


View all Hall of Fame entries


TOP NWN Modules

NEW NWN Modules

NEW Reviews

TOP Intl. Modules

TOP NWN Hakpaks

TOP NWN Gameworlds

TOP NWN Models

TOP NWN Portraits

TOP NWN Scripts

TOP NWN Prefabs

TOP NWN Other

TOP NWN Movies

TOP Sounds

TOP NWN Textures

TOP NWN Creatures

TOP NWN Characters