Jump to content

Recommended Posts

Posted (edited)

Hello!

Thank you for your time taking to read and understand my predicament!

Does anyone know how to work with voice types in papyrus , specifically how to re-use the default sounds from them?

I know that the form script (that the actor script extends)  has a GetVoiceType function to get the voice type of a certain Actor/NPC, so I can get that  stored in a VoiceType variable in papyrus (as well as the actor variable itself)

However I have no idea how to get a list of the generic topics available to that voice type, that an actor using that voice type might be able to say (looking for standardized names, that most voice types might have, maybe different list for humanoids, and critters).
For instance if I want to make that actor say or play its default hurt sound or similar usual shared sounds, how would I go about doing that?  


I am aware that most actors have some standard combat topics that can maybe be called with the
myactor.Say(DialogueTopic) command,

Does anyone know how to figure out in a papyrus script which default sounds/topics a certain actor/voicetype has, and what their IDs are so I may call them in a papyrus script by name?
If I look in the CK in the quest list, I can find some default/generic quests with some topics, but some topics have ids, while other like combat grunts, have no id's so I have no clue how to ask for those to be played.  ( Edit:  in the  end  I found out they all have form iDs, I just didn't know where to look )initially)

I am not looking into finding individual sound files, I just want to ask the fallout engine to play the correct "hurt", the correct "affirmative" or "negative" sound for that actor race.
I don't want to have to reinvent the wheel, and build an entire parallel system, backwards engineer which individual sound files are used for each topic, and create new sound assets pointing to those audio files  for those just so I can call that individual sound manually.


For instance this is the combat grunt topic, it seems to have no discernable topic info ID, so  I have no clue how I would call it manually from a papyrus script, even if I have the voicetype or actor variable already populated.
Other topics seems to have topic info IDs, but no clue exactly where to find the standardized shared list with those names.

imageo.png

imageop.webp

Edited by MySModAlice
clarity
Posted (edited)

After more digging I found  SayCustom - ObjectReference - the Fallout4 CreationKit Wiki

So in theory if I edit the topics that interest me (or duplicate them and and add certain keywords to them)  I might be able to use that saycustom function and have an actor autoselect qualified topics and invoke them based on themhaving the keyword.

For instance I make thee custom keywords in my mod  for
GeneralAffirmativeTopic ,
GeneralNegativeTopic,
GeneralHitTopic,
and i go around add these three keywords  to what I consider qualifying generic topics (from all races), I can in theory then just invoke them based on SayCustom and the keywords?
And the selection would be automatic ?... 

But how to even add those keywords to the topic? 
There is no apparent way to add new keywords. 

Still would love to learn of more perspectives on the above. 

Edited by MySModAlice
Posted
  On 6/11/2025 at 9:24 AM, MySModAlice said:

If I look in the CK in the quest list, I can find some default/generic quests with tome topics, but some topics have ids, while other like combat grunts, have no id's so I have no clue how to ask for those to be played. 

Expand  

Not everything has an Editor ID, but everything does have a Form ID, which is what you use in script properties. AFAIK the Editor ID is really just an optional thing for human convenience 🙂

Posted (edited)
  On 6/11/2025 at 10:13 AM, NeinGaming said:

Not everything has an Editor ID, but everything does have a Form ID, which is what you use in script properties. AFAIK the Editor ID is really just an optional thing for human convenience 🙂

Expand  

Thank you.
So I would go in the let's say " Dialogue Generic"  quest, combat tab, find the "hit"  topic, write down its  formID, and load that into a topic variable in a papyrus and have the humanoid actors " say" that?

I had hoped to have something that would work across all races without going through and managing a bunch of different formids, since the game already knows that allocation better than me. 
Maybe do that individually for each individual race, and have the topics invidualized per race maybe it works ( but still pretty sure unique NPC's who had a different voice types won' t work, as they are found in different quests, and with different topic form id's for their "hit" equivalent)


I had hoped to have something like
MyActor.PlayMyHitSound(),
and it would select his correct hit sound no mater if the actor was generic humanoid, a unique humanoid, or a critter. 
 

Untitled.png

Edited by MySModAlice
Posted

I would use FOEdit for this one, you can filter on types, words and more, and there is a script somewhere on Nexusmods, originally for Skyrim but works for FO4 too, which let's you output filtered data to file, any field/s you like.

Posted
  On 6/11/2025 at 9:24 AM, MySModAlice said:

Hello!

I know that the form script (that the actor script extends)  has a GetVoiceType function to get the voice type of a certain Actor/NPC, so I can get that  stored in a VoiceType variable in papyrus (as well as the actor variable itself)

However I have no idea how to get a list of the generic topics available to that voice type, that an actor using that voice type might be able to say (looking for standardized names, that most voice types might have, maybe different list for humanoids, and critters).
For instance if I want to make that actor say or play its default hurt sound or similar usual shared sounds, how would I go about doing that?  

Expand  

It's not possible in vanilla Papyrus. You can call Object Reference Say() if you know the akTopicToSay, or Say() if you have a Topic with a linked Dialogue Subtype typed Keyword. For the vanilla NormalToAlert, CombatToNormal subtypes, the native code performs the Topic query (i.e. resolves the Say request and finds an actual Topic based on the available running Quests, Topics and Conditions), based on the Actor's VoiceType. If you're interested, I think I can add a similar function to Garden of Eden SE in the next update.

These are currently available to lookup Topics. They're useful if you know the dialogue Quests applicable to the NPC but not the Topics themselves:

   ; # returns all Topics of this quest ( e.g. COMPiperHellos [00162C56] )
Topic[] Function GetAllQuestTopics(Quest akQuest) native global

; # returns the Topic/Topics with the given subtype
Topic[] Function GetQuestTopicsBySubtype(Quest akQuest, int aiSubtype) native global

There's a partial list of the Dialogue Subtypes in the .psc as well, e.g. aiSubtype = 20 is REFU/Refusal. I have the full list by now so I should update it anyway.

  • Like 1
Posted (edited)
  On 6/12/2025 at 11:32 AM, LarannKiar said:

It's not possible in vanilla Papyrus. You can call Object Reference Say() if you know the akTopicToSay, or Say() if you have a Topic with a linked Dialogue Subtype typed Keyword. For the vanilla NormalToAlert, CombatToNormal subtypes, the native code performs the Topic query (i.e. resolves the Say request and finds an actual Topic based on the available running Quests, Topics and Conditions), based on the Actor's VoiceType. If you're interested, I think I can add a similar function to Garden of Eden SE in the next update.

These are currently available to lookup Topics. They're useful if you know the dialogue Quests applicable to the NPC but not the Topics themselves:

   ; # returns all Topics of this quest ( e.g. COMPiperHellos [00162C56] )
Topic[] Function GetAllQuestTopics(Quest akQuest) native global

; # returns the Topic/Topics with the given subtype
Topic[] Function GetQuestTopicsBySubtype(Quest akQuest, int aiSubtype) native global

There's a partial list of the Dialogue Subtypes in the .psc as well, e.g. aiSubtype = 20 is REFU/Refusal. I have the full list by now so I should update it anyway.

Expand  

Thank you so much!

A way to simply invoke an actor's standardized "hit" "death" "attack" taunt" and so on would be marvelous (or to programmatically get their ID's/names so they can then be called via a Say function), without mod authors having to go on an insane hunting spree in F04Edit or creation kit to populate an Excel sheet with their form IDs) would be fantastic.
It is much more tedious to make mod features that makes actors react, and that seamlessly integrate with the sandbox, without that. 
The example above is very illuminating. 

Going through most races/factions and figuring out their dialogue quests is a bit tedious,  but not impossible. 
Still, most unique NPCs I imagine are out of luck,  unless I also do that manually for eachof them and have some correspondence array in the papyrus script with each race/faction/unique Actor,  and their dialogue quests, so I know where to correctly source the topics from.
It does mean that the feature will only work with the supported races/factions (and not any custom races/factions that might appear later and would have their topics in other dialogue quests that are not referenced in the correspondence arrays), which is not ideal, but it is what it is. 

It is frustrating, though, because the game already has that correspondence and it uses it already, why would we have to build a parallelsystem in the script file that does the same thing?

 

Edited by MySModAlice
Posted

The dialogue system was not designed to be triggered from Papyrus.

The base game calls Say() 4 times and SayCustom() 85 times against specific dialog with unique topic names or keywords compared to the tens of thousands of lines of actual dialog that do not have unique topic names or keywords to call.

As I dislike the dialogue/scene system I have used Say() with my own custom topics a lot. That includes copying base game FUZ content (use LazyVoiceFinder) to new topics so I can name or keyword without hacking base game forms. Cook with the tools in the kitchen and don't leave a mess behind.

  • Like 1
Posted (edited)
  On 6/13/2025 at 9:36 AM, SKKmods said:

The dialogue system was not designed to be triggered from Papyrus.

The base game calls Say() 4 times and SayCustom() 85 times against specific dialog with unique topic names or keywords compared to the tens of thousands of lines of actual dialog that do not have unique topic names or keywords to call.

As I dislike the dialogue/scene system I have used Say() with my own custom topics a lot. That includes copying base game FUZ content (use LazyVoiceFinder) to new topics so I can name or keyword without hacking base game forms. Cook with the tools in the kitchen and don't leave a mess behind.

Expand  

Indeed.
Using the the existing associations that the game itself uses (instead of trying to build a whole new parallel/redundant association system for these topics) is precisely what I would ideally want to do.
The sample from LarannKiar combined with the subtypes list is more than enough to go on I think.  They do not have unique names or keywords, but they do have specific subtypes already set , which is precisely what I want to access them by.
Had they stored somewhere also the correspondence between unique actor<-> quests  where they store their unique replies, that would have been perfect, but in extremis, I can rebuild that as a parallel list, and make that list user-updatable somehow, for instance if they install new mod with new unique characters.
 

Edited by MySModAlice
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...