Description: Missing RP event with Jane, Nova & Jessel
[23:56:59] Jane says: [Thalassian] I'm right here, daddy. You've been asleep all day long. You sure must be tired!
[23:57:28] Nova holds a sea shell up to her ear.
[23:57:30] Nova says: [Thalassian] Jane will love this one!
[23:57:55] Nova shakes the dirt loose from the shell.
[23:57:57] Nova says: [Thalassian] I think I can see the Sunwell from here!
[23:58:21] Nova shakes the dirt loose from the shell.
[23:58:24] Nova says: [Thalassian] Oooh! Look, a shiny one!
[23:58:37] Jessel wakes up, startled.
[23:58:39] Jessel says: [Thalassian] Was... Was it all a dream? Azuremyst, Bloodmyst, Zangarmarsh, Shadowmoon... even Zul'Aman... Jane! Jane where are you!
[23:58:46] Jane says: [Thalassian] I'm right here, daddy. You've been asleep all day long. You sure must be tired!
[23:58:51] Jessel says: [Thalassian] Ah, wonderful. It was all just a dream...
[23:58:51] Jane resumes playing on the beach.
[23:59:02] Nova holds a sea shell up to her ear.
Current behaviour: No RP event
Expected behaviour: There should be an RP event, they talk and run around and the father sleeps and wakes up every few minutes. Also manny the cat disappears. Need some formation on the cats and the kids.
Youtube: https://www.youtube.com/watch?v=pF3cU1rY2go
Need to create SAI script for this. @dr-j might be a fun project for you?
Branch(es): 3.3.5 / 6.x
TC hash/commit: 1e1fcd6847619629f4b6642faaccb81c4cf3755e
Operating system: Windows
I once saw that event north on Sunstrider Isle, it is a nice touch. It adds some extra life to the area. :)
core_version: TrinityCore rev. e7a12edb833f 2016-05-18 11:06:24 +0200 (3.3.5 branch) (Unix, Release)
db_version: TDB 335.61
Current behaviour: Jane (entry: 20098 guid: 71601) and Jessel (entry: 20100 guid: 71602)
seem both to behave partially correctly, but Nova (entry: 20244 guid: 71940) doesn't.
core_version: TrinityCore rev. e7a12ed 2016-05-18 11:06:24 +0200 (3.3.5 branch) (Unix, Release)
db_version: TDB 335.61
The emote text seems to be missing from both Jessel (entry: 20100 guid: 71602) and Jane (entry: 20098 guid: 71601).
Source: Youtube: https://www.youtube.com/watch?v=pF3cU1rY2go
This will add the missing lines to creature_text and smart_scripts.
Suggested Fixes:
-- Add missing emote lines for NPC entry 20098 (Jane) and entry 20100 (Jessel)
SET @Jane := 20098;
SET @Jessel := 20100;
DELETE FROM `creature_text` WHERE `entry`= @Jane AND `groupid`= 1 AND `id`= 0;
DELETE FROM `creature_text` WHERE `entry`= @Jessel AND `groupid`= 2 AND `id`= 0;
INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`BroadcastTextId`,`TextRange`,`comment`) VALUES
(@Jane, 1,0,'%s resumes playing on the beach.',16,0,100,0,0,0,17599,0,'Jane'),
(@Jessel,2,0,'%s wakes up, startled.',16,0,100,0,0,0,17595,0,'Jessel');
-- Add SmartAI script lines for Jane and Jessel emotes
DELETE FROM `smart_scripts` WHERE `entryorguid`= @Jane AND `source_type`= 0 AND `id`= 1;
DELETE FROM `smart_scripts` WHERE `entryorguid`= @Jessel AND `source_type`= 0 AND `id`= 5;
INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
(@Jane, 0,1,0,1,0,100,0,140000,140000,300000,300000,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Jane - Out Of Combat - Say Emote (all Phases) (No Repeat)'),
(@Jessel,0,5,0,1,0,100,0,120000,120000,300000,300000,1,2,0,0,0,0,0,1,0,0,0,0,0,0,0,'Jessel - Out Of Combat - Say Emote (all Phases) (No Repeat)');
edit:
Tested Queries: Yes
For some reason, Jessel won't sit up (emote 13) / lay down again (emote 12) (SMART_ACTION_PLAY_EMOTE). This is weirdness level over 9000 to me, sorry.
edit 2:
suggestions / cleanup by tkrokli + added missing value.
If I may add a suggestion for some TC SQL codestyle cleanup:
-- Add missing emote lines for NPC entry 20098 (Jane) and entry 20100 (Jessel)
SET @Jane := 20098;
SET @Jessel := 20100;
DELETE FROM `creature_text` WHERE `entry`= @Jane AND `groupid`= 1 AND `id`= 0;
DELETE FROM `creature_text` WHERE `entry`= @Jessel AND `groupid`= 2 AND `id`= 0;
INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`BroadcastTextId`,`TextRange`,`comment`) VALUES
(@Jane,1,0,'Jane resumes playing on the beach.',16,0,100,0,0,0,0,0,'Jane_resumes_playing'),
(@Jessel,2,0,'Jessel wakes up, startled.',16,0,100,0,0,0,0,0,'Jessel_wakes_up_startled');
-- Add SmartAI script lines for Jane and Jessel emotes
DELETE FROM `smart_scripts` WHERE `entryorguid`= @Jane AND `source_type`= 0 AND `id`= 1;
DELETE FROM `smart_scripts` WHERE `entryorguid`= @Jessel AND `source_type`= 0 AND `id`= 5;
INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
(@Jane, 0,1,0,1,0,100,0,140000,140000,300000,300000,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Jane - Out of Combat - Emote 'Jane_resumes_playing' (Phase 1) (No Repeat)"),
(@Jessel,0,5,0,1,0,100,0,120000,120000,300000,300000,1,2,0,0,0,0,0,1,0,0,0,0,0,0,0,"Jessel - Out of Combat - Emote 'Jessel_wakes_up_startled' (Phase 1) (No Repeat)");
(SET @Entry := value; is not required as such, just a common practice when an entry repeats a lot)
@tkrokli thanx! Sorry about those.
"If you reference anything more than 3 times, use a variable." (https://trinitycore.atlassian.net/wiki/display/tc/SQL+Guidelines)
p.s. see what you did there. :D
@tkrokli @Kittnz
What about this for Nova? :baby_chick:
(Tested Query: Yes)
-- NPC "Nova" (entry 20244)
SET @Nova :=20244;
-- pre insert deletions
DELETE FROM `creature_text` WHERE `entry`=@Nova and`groupid`=0 and`id`=0;
DELETE FROM `creature_text` WHERE `entry`=@Nova and`groupid`=0 and`id`=1;
DELETE FROM `creature_text` WHERE `entry`=@Nova and`groupid`=0 and`id`=2;
DELETE FROM `creature_text` WHERE `entry`=@Nova and`groupid`=1 and`id`=0;
DELETE FROM `creature_text` WHERE `entry`=@Nova and`groupid`=1 and`id`=1;
DELETE FROM `creature_text` WHERE `entry`=@Nova and`groupid`=1 and`id`=2;
DELETE FROM `creature_text` WHERE `entry`=@Nova and`groupid`=1 and`id`=3;
-- add lines to creature_text
INSERT INTO `world`.`creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES
(@Nova,1,0,'I think I can see the Sunwell from here!',12,10,100,1,0,0,17918,0,'Nova'),
(@Nova,1,1,'Can you really hear the ocean from one of these shells?',12,10,100,1,0,0,17919,0,'Nova'),
(@Nova,1,2,'Oooh! Look, a shiny one!',12,10,100,1,0,0,17920,0,'Nova'),
(@Nova,1,3,'Jane will love this one!',12,10,100,1,0,0,17921,0,'Nova'),
(@Nova,0,0,'%s picks up a sea shell.',16,0,100,1,0,0,17922,0,'Nova'),
(@Nova,0,1,'%s holds a sea shell up to her ear.',16,0,100,0,0,0,17923,0,'Nova'),
(@Nova,0,2,'%s shakes the dirt loose from the shell.',16,0,100,0,0,0,17924,0,'Nova');
-- pre insert deletions
DELETE FROM `smart_scripts` WHERE `entryorguid`=@Nova and`source_type`=0 and`id`=1 and`link`=0;
DELETE FROM `smart_scripts` WHERE `entryorguid`=@Nova and`source_type`=0 and`id`=0 and`link`=0;
-- add smart script
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(@Nova,0,0,0,1,0,100,0,10000,10000,25000,60000,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Nova - Out Of Combat - Say Emote (all Phases) (No Repeat)'),
(@Nova,0,1,0,1,0,100,0,11000,11000,25000,60000,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Nova - Out Of Combat - Say Line (all Phases) (No Repeat)');
-- make the NPC template use SmartAI
UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@Nova;
-- set random movement around a new set spawn dist
UPDATE `creature` SET `position_x`=10513.5,`position_y`=-6503.91,`position_z`=2.70913,`orientation`=5.2344,`spawndist`=10,`MovementType`=1 WHERE `guid`=71940;
Found the broadcast_text.IDs by using this query on TDB 335.61:
SELECT * FROM `broadcast_text` WHERE `Language`= 10 AND `ID` BETWEEN 17000 AND 18000;
ID Language MaleText FemaleText EmoteID0 EmoteID1 EmoteID2 EmoteDelay0 EmoteDelay1 EmoteDelay2 SoundId Unk1 Unk2 VerifiedBuild
----- -------- ---------------------------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------- -------- -------- -------- ----------- ----------- ----------- ------- ------ ------ -------------
17595 10 %s wakes up, startled. 0 0 0 0 0 0 0 0 1 18019
17596 10 Was... Was it all a dream? Azuremyst, Bloodmyst, Zangarmarsh, Shadowmoon... even Zul'Aman... Jane! Jane where are you! 0 0 0 0 0 0 0 0 1 18019
17597 10 Ah, wonderful. It was all just a dream... 0 0 0 0 0 0 0 0 1 18019
17598 10 I'm right here, daddy. You've been asleep all day long. You sure must be tired! 0 0 0 0 0 0 0 0 1 18019
17599 10 %s resumes playing on the beach. 0 0 0 0 0 0 0 0 1 18019
17918 10 I think I can see the Sunwell from here! 0 0 0 0 0 0 0 0 1 18019
17919 10 Can you really hear the ocean from one of these shells? 0 0 0 0 0 0 0 0 1 18019
17920 10 Oooh! Look, a shiny one! 0 0 0 0 0 0 0 0 1 18019
17921 10 Jane will love this one! 0 0 0 0 0 0 0 0 1 18019
17922 10 %s picks up a sea shell. 0 0 0 0 0 0 0 0 1 18019
17923 10 %s holds a sea shell up to her ear. 0 0 0 0 0 0 0 0 1 18019
17924 10 %s shakes the dirt loose from the shell. 0 0 0 0 0 0 0 0 1 18019
----- -------- ---------------------------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------- -------- -------- -------- ----------- ----------- ----------- ------- ------ ------ -------------
Some simplifications/improvements can be made by merging the SQL queries:
-- Add missing Emote & Say lines for NPC entry 20098(Jane), 20100(Jessel) and 20244(Nova)
SET @Jane := 20098;
SET @Jessel := 20100;
SET @Nova := 20244;
UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`= @Nova;
-- Set random movement around a new set spawndist for Nova
UPDATE `creature` SET `position_x`= 10513.5,`position_y`= -6503.91,`position_z`= 2.70913,`orientation`= 5.2344,`spawndist`= 10,`MovementType`= 1 WHERE `id`= @Nova;
DELETE FROM `creature_text` WHERE `entry`= @Jane AND `groupid`= 1 AND `id`= 0;
DELETE FROM `creature_text` WHERE `entry`= @Jessel AND `groupid`= 2 AND `id`= 0;
DELETE FROM `creature_text` WHERE `entry`= @Nova AND `groupid` IN (0,1) AND `id` IN (0,1,2,3);
INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`BroadcastTextId`,`TextRange`,`comment`) VALUES
(@Jessel,2,0,'%s wakes up, startled.', 16,10,100,0,0,0,17595,0,'Jessel'),
(@Jane, 1,0,'%s resumes playing on the beach.', 16,10,100,0,0,0,17599,0,'Jane'),
(@Nova, 1,0,'I think I can see the Sunwell from here!', 12,10,100,1,0,0,17918,0,'Nova'),
(@Nova, 1,1,'Can you really hear the ocean from one of these shells?',12,10,100,1,0,0,17919,0,'Nova'),
(@Nova, 1,2,'Oooh! Look, a shiny one!', 12,10,100,1,0,0,17920,0,'Nova'),
(@Nova, 1,3,'Jane will love this one!', 12,10,100,1,0,0,17921,0,'Nova'),
(@Nova, 0,0,'%s picks up a sea shell.', 16,10,100,0,0,0,17922,0,'Nova'),
(@Nova, 0,1,'%s holds a sea shell up to her ear.', 16,10,100,0,0,0,17923,0,'Nova'),
(@Nova, 0,2,'%s shakes the dirt loose from the shell.', 16,10,100,0,0,0,17924,0,'Nova');
-- Add SmartAI script lines for Jane, Jessel and Nova
DELETE FROM `smart_scripts` WHERE `entryorguid`= @Jane AND `source_type`= 0 AND `id`= 1;
DELETE FROM `smart_scripts` WHERE `entryorguid`= @Jessel AND `source_type`= 0 AND `id`= 5;
DELETE FROM `smart_scripts` WHERE `entryorguid`= @Nova AND `source_type`= 0 AND `id` IN (0,1);
INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
(@Jane, 0,1,0,1,0,100,0,140000,140000,300000,300000,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Jane - Out of Combat - Say emote (No Repeat)"),
(@Jessel,0,5,0,1,0,100,0,120000,120000,300000,300000,1,2,0,0,0,0,0,1,0,0,0,0,0,0,0,"Jessel - Out of Combat - Say emote (No Repeat)"),
(@Nova, 0,0,0,1,0,100,0, 10000, 10000, 25000, 60000,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Nova - Out Of Combat - Say Line (No Repeat)'),
(@Nova, 0,1,0,1,0,100,0, 11000, 11000, 25000, 60000,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Nova - Out Of Combat - Say Line (No Repeat)');
creature_text for @Nova yet, safe to delete any entries (merged her DELETE FROM lines)Language = 10 to the emote lines (type = 16).broadcast_text.IDs to creature_text.BroadcastTextId%s in creature_text.text for the emotes (%s points to self)creature_text lines in order of BroadcastTextId, but that might be wrong.id instead of guid for the creature table update, id is unique enough.creature_text lines in the same groupid? If true, it could be useful to put a specific comment text explaining it, like in my example.3, 5: Yup, I already had those broadcast ids added to my first post.
1: I'm not sure about the 6.x branch
2: type = 16 is always language = 0
8: didn't want to affect other spawns
9: yes, it should choose lines randomly like I think this should be working
10: Haven't experienced that on blizz
Maybe you should stick with the way the comments are done in other SAI rows?
Thanks, good points all of them. I will get back to this in a couple of days when I get home from vacation.
Also Manny the cat also disappears and comes back (i don't really know why, i need to check on retail). Great job so far. At the moment busy doing some spawning in ghostlands etc
@Kittnz Thanks for informing. I will look into that this evening (CET) and update my Nova code.
edit: still on it. ^^掳
Maybe you should stick with the way the comments are done in other SAI rows?
The SAI comment format usually is: "NPC name - Event - Action (flags)".
Could you point out where I should change my comment suggestions?
Could you point out where I should change my comment suggestions?
@tkrokli Sure! My thinking is Emote 'JANE_EMOTE_0' and Emote 'JESSEL_EMOTE_0' won't add much up to clarification, since they both have only one line to say each.
Both putting (Phase 1) and like I suggested before (all Phases) doesn't keep up continuity. In SAI, event_phase_mask=0 means all Phases, which is actually more precise and more easy to understand.
Then, you made the suggestion Emote Line, but there is a considerable difference between Say Emote and Play Emote. Both are different action_type, where one results in "saying" a line of text, presented as recognizable "emote text" (like when typing /me 123 ingame) and the other makes the AI play an emote animation (sit, sleep, talk animation).
(SMART_ACTION_TALK != SMART_ACTION_PLAY_EMOTE)
At last, I may add that it seems that comment for creature_text only holds the NPC name.
OK, I removed those capitalized texts from my creature_text comment lines. My mind was set on core scripts where that format is used in enum, but that is not the case here. SQL updated. Also, check this:
SELECT `entry`,`groupid`,`id`,`comment` FROM `creature_text`
WHERE `groupid` <> 0 OR `id` <> 0 ORDER BY `entry`,`groupid`,`id`;
From what I can see, there are several different codestyles applied to the comments (in addition to all the 228 lines with no comment text at all) in the creature_text table. Not at all sure which one to use.
@tkrokli Thank you, one moment plz.
edit:
Had a crash. Ahh, yes.
You can tell by some comment entries a la "SAY_AGGRO" WHERE entry=17306, sure.
IMHO, there are two problems about this.
First, the goal and also the point of SmartAI is to move these scripts out of the core. And second, creature_text actually doesn't hold the information which is described in comment fields like "on Aggro" (WHERE entry=61) (cmp https://trinitycore.atlassian.net/wiki/display/tc/creature_text).
This is actually defined in either scripts or in the smart_scripts table.
On the other hand, all share (more or less well-written) the NPC name; some only do.
Alas, according to the wiki entries, and unlike to the wiki page about smart_scripts, there is no common handling of entries for the comment field defined.
https://trinitycore.atlassian.net/wiki/display/tc/creature_text#creature_text-comment
edit: hope my sql talking doesn't annoy you.
Most helpful comment
If I may add a suggestion for some TC SQL codestyle cleanup:
(
SET @Entry := value;is not required as such, just a common practice when an entry repeats a lot)