#453 PlayFlavor LUA re-design

Closed
opened 1 year ago by image · 1 comments
image commented 1 year ago

PlayFlavor for some NPCs involves language and multiple messages for garbled/ungarbled used for the same part of the conversation/speech

Advise a new function:

PlayFlavorID(NPC, Type, ID, Index, Target, language)

Type maps the ID field:

0: Spawn ID
1: Spawn Group ID
2: Distinct ID (won't tie to spawn id or spawn group id, just maps to type 2, identifier = id)

based on a new table:

type - type noted above
identifier - spawn_id / spawn_group_id / etc
index
mp3_string
text_string
emote_string
key1
key2
garbled
PlayFlavor for some NPCs involves language and multiple messages for garbled/ungarbled used for the same part of the conversation/speech Advise a new function: PlayFlavorID(NPC, Type, ID, Index, Target, language) Type maps the ID field: ``` 0: Spawn ID 1: Spawn Group ID 2: Distinct ID (won't tie to spawn id or spawn group id, just maps to type 2, identifier = id) ``` based on a new table: ``` type - type noted above identifier - spawn_id / spawn_group_id / etc index mp3_string text_string emote_string key1 key2 garbled ```
image commented 1 year ago
Collaborator

here are some voiceovers just for a quick example:

the function for the NPC is as follows to send to all players:

PlayFlavorID(NPC, 2, 100, 0, nil, 18)
PlayFlavorID(NPC, type, id, index, Player(specify to send only), language)

ideally type fields can be whatever you want, but its limited to 0,1,2

type = 2, free id selection
type = 1, spawn group id
type = 0, spawn id

in any cases you set the ID via the LUA function so you can use whatever identifier you like, this seemed like a good practice to follow

These first are examples that can randomly select

insert into voiceovers set type_id=2,id=100,indexed=0,mp3_string="voiceover/english/gnoll_base_1/ft/gnoll/gnoll_base_1_1_garbled_2f8caa7b.mp3", text_string="Krovel grarggt ereverrrn", key1=3999652656, key2=427507713, garbled=1;
insert into voiceovers set type_id=2,id=100,indexed=0,mp3_string="voiceover/english/gnoll_base_1/ft/gnoll/gnoll_base_1_2_garbled_fe1eedd8.mp3", text_string="Rrrrevvvvnarrr    jahht      ttekkkman", key1=1674950709, key2=3936377565, garbled=1;
insert into voiceovers set type_id=2,id=100,indexed=0,mp3_string="voiceover/english/gnoll_base_1/ft/gnoll/gnoll_base_1_3_garbled_fad67c0f.mp3", text_string="Grrrolven brakth kerrtt", key1=2579932316, key2=1973717234, garbled=1;
insert into voiceovers set type_id=2,id=100,indexed=0,mp3_string="voiceover/english/gnoll_base_1/ft/gnoll/gnoll_base_1_3_garbled_3eefc118.mp3", text_string="Vologrrren  aggart   renevenn", key1=3980060701, key2=1422372699, garbled=1;

These additional two examples have a garble_link_id set to 1, so they will accompany each other when one or the other is randomly selected


PlayFlavorID(NPC, 2, 100, 1, nil, 18)
PlayFlavorID(NPC, type, id, index, Player(specify to send only), language)

insert into voiceovers set type_id=2,id=100,indexed=1,mp3_string="voiceover/english/gnoll_base_1/ft/gnoll/gnoll_base_1_2_garbled_2f8caa7b.mp3", text_string="Krovel grarggt ereverrrn", key1=2385604574, key2=3717589402, garbled=1,garble_link_id=1;
insert into voiceovers set type_id=2,id=100,indexed=1,mp3_string="voiceover/english/sean_wellfayer/qey_harbor/100_qst_sean_wellfayer_multhail1_5dca659c.mp3", text_string="I don't think fishing interests you.  Perhaps you should be on your way!", key1=1997164956, key2=747011072, garbled=0,garble_link_id=1;
here are some voiceovers just for a quick example: the function for the NPC is as follows to send to all players: ``` PlayFlavorID(NPC, 2, 100, 0, nil, 18) PlayFlavorID(NPC, type, id, index, Player(specify to send only), language) ``` ideally type fields can be whatever you want, but its limited to 0,1,2 ``` type = 2, free id selection type = 1, spawn group id type = 0, spawn id in any cases you set the ID via the LUA function so you can use whatever identifier you like, this seemed like a good practice to follow ``` These first are examples that can randomly select ``` insert into voiceovers set type_id=2,id=100,indexed=0,mp3_string="voiceover/english/gnoll_base_1/ft/gnoll/gnoll_base_1_1_garbled_2f8caa7b.mp3", text_string="Krovel grarggt ereverrrn", key1=3999652656, key2=427507713, garbled=1; insert into voiceovers set type_id=2,id=100,indexed=0,mp3_string="voiceover/english/gnoll_base_1/ft/gnoll/gnoll_base_1_2_garbled_fe1eedd8.mp3", text_string="Rrrrevvvvnarrr jahht ttekkkman", key1=1674950709, key2=3936377565, garbled=1; insert into voiceovers set type_id=2,id=100,indexed=0,mp3_string="voiceover/english/gnoll_base_1/ft/gnoll/gnoll_base_1_3_garbled_fad67c0f.mp3", text_string="Grrrolven brakth kerrtt", key1=2579932316, key2=1973717234, garbled=1; insert into voiceovers set type_id=2,id=100,indexed=0,mp3_string="voiceover/english/gnoll_base_1/ft/gnoll/gnoll_base_1_3_garbled_3eefc118.mp3", text_string="Vologrrren aggart renevenn", key1=3980060701, key2=1422372699, garbled=1; ``` These additional two examples have a garble_link_id set to 1, so they will accompany each other when one or the other is randomly selected ``` PlayFlavorID(NPC, 2, 100, 1, nil, 18) PlayFlavorID(NPC, type, id, index, Player(specify to send only), language) insert into voiceovers set type_id=2,id=100,indexed=1,mp3_string="voiceover/english/gnoll_base_1/ft/gnoll/gnoll_base_1_2_garbled_2f8caa7b.mp3", text_string="Krovel grarggt ereverrrn", key1=2385604574, key2=3717589402, garbled=1,garble_link_id=1; insert into voiceovers set type_id=2,id=100,indexed=1,mp3_string="voiceover/english/sean_wellfayer/qey_harbor/100_qst_sean_wellfayer_multhail1_5dca659c.mp3", text_string="I don't think fishing interests you. Perhaps you should be on your way!", key1=1997164956, key2=747011072, garbled=0,garble_link_id=1; ```
image referenced this issue from a commit 1 year ago
Sign in to join this conversation.
Loading...
Cancel
Save
There is no content yet.