View Full Version : Player Language Skill Gains
pfyon
06-17-2009, 11:50 AM
I'm in the process of modifying all the quests/chat interaction with npcs so the npcs speak their native language, and won't respond unless the player uses that language as well. This is an attempt to make languages seem more meaningful.
Where is the code stored for language skill gains? I'm wondering if it's possible to give players the abillity to skillup in languages by listening to npcs speak. On live, you could gain skill points by practicing speaking/listening to other people speak the language.
Shendare
06-17-2009, 12:17 PM
I don't believe the code functionality currently exists for automatic language skill-ups.
My plan is to implement some awesome quest-based language learning in my custom server.
First the player has to gain enough faction with the race through race-specific story-based questing that gets them familiar with the race's role in the world, then they can learn the language through race-specific questing that will help make the player more familiar with the history and motivations of the race.
That's my plan, anyway. :)
- Shendare
realityincarnate
06-17-2009, 12:41 PM
The language skill up code is handled in zone/client.cpp, under ChannelMessageSend(). When I added it, I only put in functionality for group messages (channel #2), but you could modify that to allow any other channel type you want by just adding it to the if statement.
Shendare
06-17-2009, 12:47 PM
Oh! When was that added in?
Or am I misremembering it not being an available feature?
- Shendare
pfyon
06-17-2009, 01:08 PM
Excellent, thanks, will go look into it.
realityincarnate
06-17-2009, 02:48 PM
I don't remember exactly when, but it was added early-ish this year. It was part of the change that added language support for tells and group messages (and drunk talk).
pfyon
06-17-2009, 02:55 PM
Any idea where I can find the corresponding IDs for channels? According to that function, channel id 2 is group (I assume), but I don't know what the other ones are.
Andrew80k
06-17-2009, 02:55 PM
I don't remember exactly when, but it was added early-ish this year. It was part of the change that added language support for tells and group messages (and drunk talk).
Around rev 500, early May.
From the changelog.txt:
==05/09/2009==
realityincarnate: Modified quest::say to allow npcs to speak in other languages, added $langid quest variable
realityincarnate: Made low language skill/drunkenness a bit less understandable
realityincarnate
06-17-2009, 04:51 PM
Any idea where I can find the corresponding IDs for channels? According to that function, channel id 2 is group (I assume), but I don't know what the other ones are.
The easiest place to find them is probably ChannelMessageReceived(), still in client.cpp. I don't have convenient source access at the moment, but I think they're listed in a switch statement there.
Andrew80k
06-17-2009, 05:05 PM
The easiest place to find them is probably ChannelMessageReceived(), still in client.cpp. I don't have convenient source access at the moment, but I think they're listed in a switch statement there.
Yep.
They are:
0 -- Guild
2 -- Group
3 -- shout
4 -- Auction
5 -- OOC
6 -- Broadcast
7 -- Tell
8 -- say
11 -- GMSay
15 -- Raid
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.