|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Quests::Q&A This is the quest support section |
05-07-2009, 12:29 AM
|
Dragon
|
|
Join Date: Apr 2009
Location: California
Posts: 814
|
|
Can NPCs speak in other languages?
Is there any built-in functionality for quest NPCs to speak in /say in languages other than common? Like a quest::sayLang(12, "Hey, $name! I'm speaking in Elder Elvish!"); ? Players who were fluent in the language would see it properly, but others nearby would see a garbled message just like players speaking in unfamiliar tongues.
Also, on a related note, I know in EQLive there was at least one quest where the NPC only responded when spoken to in the proper language (Elder Dragon, I think it was). Is there currently any way for a quest script in EVENT_SAY to determine what language the player was speaking when they spoke?
Thanks in advance!
- Shendare
|
05-07-2009, 06:45 AM
|
|
Developer
|
|
Join Date: Mar 2003
Posts: 1,497
|
|
Not that I know of.. however, you can script a skill check. Something along the lines of this method:
Code:
if ($text=~/hail/i) {
if ($client->GetSkill(XX) > 50) {
quest::say("Your skill is above 50, so you can understand me.");
}
else {
quest::say("Gjoiwjf hoiaw oihaf 28? oi ahwue whiuhaw wewe=");
}
}
|
|
|
|
05-07-2009, 09:49 AM
|
Dragon
|
|
Join Date: Apr 2009
Location: California
Posts: 814
|
|
Thanks for the reply!
Yeah, when I couldn't find any built-in support for NPC languages after searching high and low, I had actually gone so far as to start putting together a full-on Perl-based speech scrambling system checking language skill and scrambling the text word by word based on (skill / 100) times word complexity based on each letter's frequency of use in English, ord() numeric hashes by each character for consistency instead of randomness, supporting different vocal sounds for different languages so each language would have its own distinct gibberish sound, etc. It was feeling pretty impressive!
Then I realized that if the NPC simply does a quest::say('Blah blah'), other players nearby who DO speak the language will get the scrambled message as well, even though it was only the player interacting with the NPC who didn't know the language (and vice-versa, those without the language could perfectly hear what the NPC said as long as someone else was talking to them).
So, I figured I'd use Client->Message, so that only the speaker got the language-based speech, but then everyone else around is going to be hearing a one-sided conversation, as though hearing someone talk on their cell phone. "Hail, NPC!" "What tasks?" "What Sword of Ultimate Power?"
So I thought maybe I could have the NPC check for all nearby players and do a skill check on each of them, sending a customized scrambled message to each one individually, but at that point I threw my hands up in the air and gave it up as a poor solution.
Even if I could manage to put it together somehow with the EntityList and Client classes and such, I'd basically be graduating from "a lot of work" to "completely reinventing the wheel on the Emu server's /say code" in order to do it, and it would probably take way too much server CPU power when you ended up with several dozen players interacting with NPCs, and just being near NPCs while others are interacting with them.
So, I came back to the forums hoping that either:
1) The functionality is already there, it's just not often used, so it isn't in the regular helpful tutorials and posts scattered around.
2) It's not there, but it shouldn't be too difficult to implement, and a Dev might be willing to look into it (related: is there any way to bribe a dev?).
But perhaps it would most likely end up being a third option.
3) Devs have their own tasks to work on. If you want the functionality added to the emulator then figure out SVN, check stuff out, and dig into the source code yourself to see what you can come up with.
The list ends up being in ascending order of how long it would likely end up taking to be able to get it working. LOL.
- Shendare
|
|
|
|
05-07-2009, 10:41 AM
|
Fire Beetle
|
|
Join Date: Apr 2009
Location: ABQ
Posts: 28
|
|
As I recall the frequency of the one-sided conversation was pretty high on live. i remember standing there wondering just what the heck was going on, and checked my chat log to see this or wingnut talking to themselves (like using /s when you mean to use/g or/t) or what. Sounds like your simplest bet.
J
__________________
Now and then we had a hope that if we lived and were good, God would permit us to be pirates.
- Life on the Mississippi
"And don't they wear the bulliest clothes! Oh no! All gold and silver and di'monds," said Joe, with enthusiasm.
- The Adventures of Tom Sawyer
|
05-07-2009, 11:03 AM
|
Dragon
|
|
Join Date: Apr 2009
Location: California
Posts: 814
|
|
Perhaps, but for the sake of real Norrathian flavour, I'll probably end up going with #3 if #2 doesn't work out.
If I get a definitive "There is no current way to do that" answer, I'll try posting in the Feature Request forum and see what response I receive.
Thanks for the input!
- Shendare
|
05-07-2009, 11:03 AM
|
Hill Giant
|
|
Join Date: Dec 2007
Posts: 182
|
|
hehe, just add this
quest::emote("whispers softly to $name.);
and then on the next one put something like
quest::emote("motions for $name to lower his voice and resumes whispering.");
and then lastly
quest::emote("rolls her eys in disgust and whispers gruffly.");
AR PEE and problem solved, win win! That way they look less silly and it still fits.
|
05-07-2009, 11:14 AM
|
Developer
|
|
Join Date: Dec 2007
Posts: 122
|
|
If no one beats me to it, I'll take a look at this and try to get some functions in over the next day or two. It'll just depend on how much work interferes with life.
|
05-10-2009, 12:44 AM
|
Dragon
|
|
Join Date: Apr 2009
Location: California
Posts: 814
|
|
Bug Report: $langid always returns 0. We know it's exporting, at least, because it's returning 0 and not undef.
The speaking part is working flawlessly, however!
|
05-10-2009, 08:29 AM
|
Developer
|
|
Join Date: Dec 2007
Posts: 122
|
|
Could you give me an example of how you're using $langid? It seems to work fine for me, but my only tests have been simple things like
Code:
quest::say("Your language id is $langid");
and
type things.
|
|
|
|
05-10-2009, 01:04 PM
|
Dragon
|
|
Join Date: Apr 2009
Location: California
Posts: 814
|
|
I'm really sorry. It was just as I was drifting to sleep last night that I realized, "Bonehead! I didn't give him anything to go on beyond 'It's not working'!"
At any rate, this is my little test .pl file:
felwithea/Exterminator_Valern.pl
Code:
# Exterminator Valern, felwithea
sub EVENT_SAY
{
my $langName = (
!defined($langid) ? 'undefined' :
($langid < 0) ? 'undefined' :
($langid > 26) ? 'undefined' :
('Common Tongue', 'Barbarian' , 'Erudian' , 'Elvish' , 'Dark Elvish' , 'Dwarvish' , 'Troll' , 'Ogre' , 'Gnomish', # 00 - 08
'Halfling' , 'Thieves Cant', 'Old Erudian', 'Elder Elvish', 'Froglok' , 'Goblin' , 'Gnoll' , 'Combine Tongue', 'Elder Teir`dal', # 09 - 17
'Lizardman' , 'Orcish' , 'Faerie' , 'Dragon' , 'Elder Dragon', 'Dark Speech', 'Vah Shir', 'Unknown1' , 'Unknown2')[$langid]); # 18 - 26
quest::say("Hail, $name! You're speaking $langName ( $langid )!", 3);
}
And this is what I get:
Code:
Current Language is Elvish. (2)
You say, 'Hail, Exterminator Valern'
Exterminator Valern says, in Elvish, 'Hail, Palren! You're speaking Common Tongue ( 0 )!'
Current Language is Elder Elvish. (4)
You say, 'Hail, Exterminator Valern'
Exterminator Valern says, in Elvish, 'Hail, Palren! You're speaking Common Tongue ( 0 )!'
Current Language is Common Tongue. (1)
You say, 'Hail, Exterminator Valern'
Exterminator Valern says, in Elvish, 'Hail, Palren! You're speaking Common Tongue ( 0 )!'
I tried with both the SoF and Titanium client, in case it was an SoF packet thing. Sorry again for the lack of information earlier!
I can try downloading and compiling the most recent rev and trying again. I believe it was Rev488 that I compiled for this run.
- Shendare
|
|
|
|
05-10-2009, 01:38 PM
|
Dragon
|
|
Join Date: Apr 2009
Location: California
Posts: 814
|
|
Strangely, with Rev492 $langid is now returning 3.
Code:
Welcome to EverQuest!
You have entered Northern Felwithe.
You say, 'Hail, Exterminator Valern'
Exterminator Valern says, in Elvish, 'Hail, Palren! You're speaking Elvish ( 3 )!'
Current Language is Common Tongue. (1)
You say, 'Hail, Exterminator Valern'
Exterminator Valern says, in Elvish, 'Hail, Palren! You're speaking Elvish ( 3 )!'
Current Language is Elvish. (2)
You say, 'Hail, Exterminator Valern'
Exterminator Valern says, in Elvish, 'Hail, Palren! You're speaking Elvish ( 3 )!'
You say, '#reloadqst'
Clearing quest memory cache.
Current Language is Elder Elvish. (4)
You say, 'Hail, Exterminator Valern'
Exterminator Valern says, in Elvish, 'Hail, Palren! You're speaking Elvish ( 3 )!'
Changing the NPC's spoken language didn't change the $langid behavior, either.
|
05-10-2009, 02:10 PM
|
Developer
|
|
Join Date: Dec 2007
Posts: 122
|
|
I'm glad you included the full output like that. I don't know if I would have ever figured out what was going on without seeing the "Current Language is..." text.
So here's what I've found so far: if you change the language by right clicking on the main chat box and selecting a language, everything works fine. But if you use the /language command (which I forgot existed), it doesn't seem to actually change the language (even though it does update it in the select language box).
I'll try to figure out what's going on with /language; hopefully it'll be something simple and I'll be able to get a fix out tonight or tomorrow.
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -4. The time now is 09:08 AM.
|
|
|
|
|
|
|
|
|
|
|
|
|