https://wiki.projectskyfire.org/index.php?title=Creature_speech&feed=atom&action=historyCreature speech - Revision history2024-03-28T08:43:43ZRevision history for this page on the wikiMediaWiki 1.39.1https://wiki.projectskyfire.org/index.php?title=Creature_speech&diff=167&oldid=prevMarqin: decat2011-09-18T20:57:03Z<p>decat</p>
<p><b>New page</b></p><div>This is step-by-step guide to make your creature talking.<br />
<br />
1. Get the text. You can use wowpedia for that ([http://www.wowpedia.org/Sinestra_%28tactics%29 example]).<br />
<br />
2. Get speech entries. They can be found in dbc, which you could explore by using any utility that reads dbc - for example, [https://github.com/Sovak/DBC-Viewer dbc-viewer] or [http://depositfiles.com/ru/files/z94ney371 dbc-util] (simplier in use). Just read with chosen utility `SoundEntries.dbc` and find entries. For bosses, that could be done just by doing text search of boss-name. For example, for Sinestra, with dbc-util, you firstly convert dbc to csv, then open it in excel and `ctrl-f -> Sinestra -> enter`. From that entries you will need two fields: speech-sound-id and speech-sound-name, they are 1st and 3rd columns correspondingly.<br />
<br />
3. Associate texts with sounds. Now you need to dive into the client mpq-files. You can use [http://www.zezula.net/en/mpq/download.html mpq-editor] for that. Just try different mpq's until you find your creature somewhere in Sounds/creatures/. In target-creature's folder you will see sound files named just as values of speech-sound-name field from step 2. Listen to this files and put in correspondence texts with speech-sound-id's.<br />
<br />
Now if you want to make speech random appearing in game, or prepare it for manual invoking from C++ code, you should firstly add speech-data in `creature_text` table.<br />
In `entry` you should put creature-entry, in `id` - relative index of speech phrase (for later use from C++ code), in `groupid` <br />
- indexes that describe phrase's group (if are the same for two rows within same creature, then both phrases appear at one time),<br />
in `sound` - speech-sound-id, in `text` - associated text, in `probability` - probability of appearing randomly in game (0 for manual-only usage).<br />
<br />
Example:<br />
<pre><br />
DELETE FROM `creature_text` WHERE `entry` = 45213;<br />
INSERT INTO `creature_text`<br />
(`entry`,`id`,`sound`,`text`)<br />
VALUES<br />
(45213, 0, 20199 -- aggro<br />
, 'We were fools to entrust an imbecile like Cho''gall with such a sacred duty. I will deal with you intruders myself!'),<br />
(45213, 1, 20200 -- death<br />
, 'Deathwing... I have fallen... the brood... is lost...'),<br />
...<br />
<br />
UPDATE `creature_text` c<br />
SET `probability` = 0,<br />
`groupid` = c.`id`,<br />
`type` = 1<br />
WHERE `entry` = 45213;<br />
</pre><br />
<br />
To invoke speech from C++ you could use CreatureAI::Talk method (pass `creature_text`.`id` into it).<br />
<br />
<br />
[[Category:Guides]]</div>Marqin