1. How to set up a monolog? In other words I know how to script a conversation but how do you make the npc speak without having a dialog square put up?
2. After one learns to set up a monolog for a npc how do you vary the comments so one can cue up diffrent monologs each time one clicks on the npcs?
(Would be directed to the Administration/DMs/Builders of this server)
3. If NPC's do not have an active heartbeat script or any waypoints upon them how straining would it be to have NPC's in a Guild House for example? Is there any problems with having a NPC with a Dialog script or a monolog script, and if so is there any limits or guidelines for numbers of NPC's and how they should be set up to have minimal impact on the servers resources?
As you may notice this is a question about Guild House implementation and I would like to make the Area as optimal as possible before turning it in. This due to having minimum changes or unexpected "Wait what? We can't have al those in there....) later on.
Thank you on forehand!
Regards: Darker
NPC Speech/Comments (No Dialog)
Moderators: Moderator, Developer, DM
-
Darker_Thought
- Posts: 490
- Joined: Wed Mar 10, 2010 1:23 pm
- Location: Sweden!
NPC Speech/Comments (No Dialog)
"NWNScript is what happens when you ask Satan to turn C into a scripting language." - DM Doom
-
gedweyignasia
- Custom Content
- Posts: 1353
- Joined: Sat Nov 23, 2013 11:27 pm
- Location: EST/UTC-4
Re: NPC Speech/Comments (No Dialog)
1. Use the FloatingTextStringOnCreature or SpeakString. Delay each subsequent line by 5.0f seconds or more.
If you are okay storing the strings as local variables:
Then edit the object's variables in the toolset so that it has for n, m, ... = 1, 2, 3, ...
2. If you don't want them to repeat something, just make the dialogues progressive. Pick n = 1 for the first monologue, then n=2 for the second, etc. (Use a local integer to keep track, but remember to have a case for when it's the final dialogue!)
If you are okay storing the strings as local variables:
Code: Select all
void speakMonologue(object oSpeaker, int nMonologue) {
int numLines = GetLocalInt(oSpeaker,"monologue_" + IntToString(nMonologue) + "_length");
int ctr; // Line counter
for (ctr=0;ctr<numlines;ctr++) {
AssignCommand(oSpeaker,DelayCommand(5.0f * ctr,SpeakString("monologue_" + IntToString(nMonologue) + "_line_" + IntToString(ctr),TALKVOLUME_TALK)));
}
}
Code: Select all
monologue_n_length = 3
monologue_n_line_0 = "Hi!"
monologue_n_line_1 = "I'm a friendly NPC!"
monologue_n_line_2 = "But I don't like you. Jerk."
monologue_m_length = 2
monologue_m_line_0 = "I have nothing further to talk to you about today."
monologue_m_line_1 = "Get lost, man! Really. Scram."2. If you don't want them to repeat something, just make the dialogues progressive. Pick n = 1 for the first monologue, then n=2 for the second, etc. (Use a local integer to keep track, but remember to have a case for when it's the final dialogue!)
-
Darker_Thought
- Posts: 490
- Joined: Wed Mar 10, 2010 1:23 pm
- Location: Sweden!
Re: NPC Speech/Comments (No Dialog)
I admit though Im not a novice at building areas Im very bad with scripting...So I should copy paste this...and put it where? xDgedweyignasia wrote:1. Use the FloatingTextStringOnCreature or SpeakString. Delay each subsequent line by 5.0f seconds or more.
If you are okay storing the strings as local variables:Then edit the object's variables in the toolset so that it has for n, m, ... = 1, 2, 3, ...Code: Select all
void speakMonologue(object oSpeaker, int nMonologue) { int numLines = GetLocalInt(oSpeaker,"monologue_" + IntToString(nMonologue) + "_length"); int ctr; // Line counter for (ctr=0;ctr<numlines;ctr++) { AssignCommand(oSpeaker,DelayCommand(5.0f * ctr,SpeakString("monologue_" + IntToString(nMonologue) + "_line_" + IntToString(ctr),TALKVOLUME_TALK))); } }
Code: Select all
monologue_n_length = 3 monologue_n_line_0 = "Hi!" monologue_n_line_1 = "I'm a friendly NPC!" monologue_n_line_2 = "But I don't like you. Jerk." monologue_m_length = 2 monologue_m_line_0 = "I have nothing further to talk to you about today." monologue_m_line_1 = "Get lost, man! Really. Scram."
2. If you don't want them to repeat something, just make the dialogues progressive. Pick n = 1 for the first monologue, then n=2 for the second, etc. (Use a local integer to keep track, but remember to have a case for when it's the final dialogue!)
"NWNScript is what happens when you ask Satan to turn C into a scripting language." - DM Doom
-
gedweyignasia
- Custom Content
- Posts: 1353
- Joined: Sat Nov 23, 2013 11:27 pm
- Location: EST/UTC-4
Re: NPC Speech/Comments (No Dialog)
Ummm... It's not quite something ready to be copy/pasted. You'd need to do a little scripting work of your own.
-
Darker_Thought
- Posts: 490
- Joined: Wed Mar 10, 2010 1:23 pm
- Location: Sweden!
Re: NPC Speech/Comments (No Dialog)
Oooh...wait I got it after moving through the options againgedweyignasia wrote:Ummm... It's not quite something ready to be copy/pasted. You'd need to do a little scripting work of your own.
Thank you for the help! ^^
Atleast I set up for a single comment...Ill settle for it
"NWNScript is what happens when you ask Satan to turn C into a scripting language." - DM Doom
-
Duster47
- Retired Staff
- Posts: 3727
- Joined: Mon Nov 16, 2009 7:57 pm
- Location: Florida, USA
Re: NPC Speech/Comments (No Dialog)
A one-liner dialog will not be accepted. Scripts for NPC interactions in non-public guild areas need a really good reason to have a chance at being accepted.
If the NPC is not actually speaking, or a one-liner, I highly recommend simply using the Examine description. Write as much as you want.
If the NPC is not actually speaking, or a one-liner, I highly recommend simply using the Examine description. Write as much as you want.
PC1 = Nerys, Emissary and Skald of the Greyfox tribe, last seen roaming north near Secomber
PC2 = Valqis Sanejmeh; far away cartographer, Oracle of Nut at chaltin QulDaq, former navigator of the Sea Seeker, Reader of Candlekeep and sometime performer.
PC2 = Valqis Sanejmeh; far away cartographer, Oracle of Nut at chaltin QulDaq, former navigator of the Sea Seeker, Reader of Candlekeep and sometime performer.