Jump to content

Starfield quest modding observations, questions, hints


Recommended Posts

Posted

I retried, now all wem files are external, ok why not. But reload wwise data in CK ignores my soundbank - none of my events are visible.

Posted
2 hours ago, zaira said:

I retried, now all wem files are external, ok why not. But reload wwise data in CK ignores my soundbank - none of my events are visible.

try my build SFSound.7zall I did was literally copy pasted and edited a vanilla event Bethesda have made xD

Posted

Thanks to support from @Djlegends I am able to create sound effects now.
There are the following points to set up if you start from scratch instead of adapting the existing Starfield Wwise project:

  • Wwise project settings "Source Settings": "Default Conversion Settings"
  • Wwise project settings "SoundBanks":  Disable "Allow Sound..." + "Use SoundBank names" + "Generated header file" and enable all other flags. Set SoundBank Paths to StarfieldFolder\Data\Sound\soundbanks
  • Wwise audio file property for each file : enable Stream flag
  • Ini file : StarfieldFolder\CreationKitCustom.ini

    [Audio]

    bProcessAudioForPC=1  

    bProcessAudioForXB=0

    sPathToVoiceOutputPC=

    sPathToVoiceOutputXB=

    bLogWwiseConverionOutput=1

    sPathToWwiseProj=<path to your project>

  • Generate Soundbank in WWise

  • cd to StarfieldFolder\Data\Sound\soundbanks and delete all init bank files

  • enjoy

Posted
59 minutes ago, zaira said:

Thanks to support from @Djlegends I am able to create sound effects now.
There are the following points to set up if you start from scratch instead of adapting the existing Starfield Wwise project:

  • Wwise project settings "Source Settings": "Default Conversion Settings"
  • Wwise project settings "SoundBanks":  Disable "Allow Sound..." + "Use SoundBank names" + "Generated header file" and enable all other flags. Set SoundBank Paths to StarfieldFolder\Data\Sound\soundbanks
  • Wwise audio file property for each file : enable Stream flag
  • Ini file : StarfieldFolder\CreationKitCustom.ini

    [Audio]

    bProcessAudioForPC=1  

    bProcessAudioForXB=0

    sPathToVoiceOutputPC=

    sPathToVoiceOutputXB=

    bLogWwiseConverionOutput=1

    sPathToWwiseProj=<path to your project>

  • Generate Soundbank in WWise

  • cd to StarfieldFolder\Data\Sound\soundbanks and delete all init bank files

  • enjoy

yea the extra stuff is meant to be deleted once you archived you audio xD

Posted (edited)

Now it's time to talk about batch LIP file & wem generation.

 

I create voice sentences via vits & torch & cuda in a batch. My mods are very dialogue centric, processing thousand of sentences manually would cost way more time than I have available for my hobby.


Lip files:

 

There is a command line tool Tools\LipGenerator\LipGenerator.exe. It requires an actor.facefx - which is likely the one present in Tools\FaceFX\StarfieldHumanXXX.facefx - and an actoranalysis.facefx. I have no idea where to find it. Propably it's Tools\FaceFX\GenesisDefault.facefx.

I managed to create LIP files by feeding the generator's actoranalysis parameter with the actor and/or the GenesisDefault file, but I have no idea if this is right. I probably need to extract all ba2 files to find the actoranalysis file. Otherwise, I have to reverse engineer CK's Lip generation - I am sure that CK uses the command line tool internally as well. I could write a genator proxy which dumps the input parameters.

 

But maybe one of you knows more about this topic.

 

WEM files:


Actually, I have no idea how to batch convert my wav files into wem files from command-line.

Edited by zaira
Posted (edited)
2 hours ago, zaira said:

Now it's time to talk about batch LIP file & wem generation.

 

Convert .wav files to .wem format using WWise.

From my experience, wav files need to be in 24 bit format. WWise won't work with 32bit. You can use a program like Mediahuman audio converter to change your wav files to 24 bit if needed.

Launch Wwise through Wwise Launcher, create new project with any name, untick everything in "Import Factory Assets"
Go to Project > Project Settings > Source Settings and set "Default Conversion Settings" to "Vorbis Quality High".
Dialogue files need to be Vorbis, some sound files must be encoded as PCM. You might need to experiment with this.
The rule is simple, keep the same encoding as original .wem file had.
Go to Project > Import Audio files > Add Folders and add folder with your .wav files from step 3 and click Import.

If Import Conflict Manager pops out, go to "%USERPROFILE%\Documents\WwiseProjects\your-project-name\Originals\SFX" and delete all inside of it, then repeat the above step.
Go to Project > Convert All Audio Files and click "Convert". The resulting files will be in "%USERPROFILE%\Documents\WwiseProjects\your-project-name\.cache\Windows\SFX\name-of-import-folder"

 

Rename the converted files.

After WWise processes the wav files to wem their file names will be changed and need to be changed back (but with the .wem extension)

Get PowerToys (PowerRename): https://learn.microsoft.com/windows/powertoys/

Go to output folder in explorer, right-click on empty space and launch PowerRename, rename all files so their names are identical to the original ones, e.g. "0047cc70.wem"

Place all the files in the same directory structure as the original ones in .ba2 archives, for example "Starfield\Data\sound\voice\starfield.esm\<your-modded-npc-name>".

 

Making Lip Files

You will need to have both the .wem and the .wav files in the sound\voices\yourmod.esm\yournpc folder

zip that plus your esm into a zip or 7z file and install it as a mod with MO2.

Launch the CK2 through MO2 with your mod active

In CK2 select the folder icon in the upper, select your esm, click OK.

Once its done loading, select audio > run facefx compiler

Select your esm (or starfield esm if working on an existing character) and click compile.

Magic Happens

If you don't run into any errors, the FaceFx output will be in MO2's overwrite folder.

 

Helpful guides I copied and pasted from

A step-by-step guide on AI voice modding at Starfield Nexus - Mods and Community

https://www.nexusmods.com/starfield/mods/12576

Edited by Reigor
Posted
9 hours ago, zaira said:

Now it's time to talk about batch LIP file & wem generation.

 

I create voice sentences via vits & torch & cuda in a batch. My mods are very dialogue centric, processing thousand of sentences manually would cost way more time than I have available for my hobby.


Lip files:

 

There is a command line tool Tools\LipGenerator\LipGenerator.exe. It requires an actor.facefx - which is likely the one present in Tools\FaceFX\StarfieldHumanXXX.facefx - and an actoranalysis.facefx. I have no idea where to find it. Propably it's Tools\FaceFX\GenesisDefault.facefx.

I managed to create LIP files by feeding the generator's actoranalysis parameter with the actor and/or the GenesisDefault file, but I have no idea if this is right. I probably need to extract all ba2 files to find the actoranalysis file. Otherwise, I have to reverse engineer CK's Lip generation - I am sure that CK uses the command line tool internally as well. I could write a genator proxy which dumps the input parameters.

 

But maybe one of you knows more about this topic.

 

WEM files:


Actually, I have no idea how to batch convert my wav files into wem files from command-line.

CK has a way to batch convert wav to wem... or was it for lipsync

Posted (edited)
12 hours ago, Djlegends said:

CK has a way to batch convert wav to wem... or was it for lipsync

Yes, for WEM - Wwise or CK, I don't remember, but I want a complete build pipeline similar to what I have for Skyrim.

Edited by zaira
  • 3 weeks later...
Posted

For myself, I am working on a Mod called Plot Armor: A Death Alternative. The player and their ship are made essential and when either gets to 0 health it will trigger a scenario. So far I have gotten the preventdeath function I made to move the player to the Neon Reliant surgical bed, equip them in patient clothes, and their spaceship show up at the spaceport.

 

The problem I am running into now is the spaceship combat. I cannot get it to move the player or the ship to a different location by a script. player.moveto works in console while in space, in space combat, and after the hull is 0 health, but not in the script. Debug message boxes and fade to black isn't working either. I know the function is activating because I have a command to restore the spaceship's health which does fire off. So I'm missing something.

Here is the code, some stuff has been commented out as I have been experimenting in trying to get this to work. 

 

Scriptname PlotArmorScript extends Quest
 
ActorValue Property Health Auto Const
ObjectReference Property NeonSurgicalBed Auto Const
ObjectReference Property NASurgicalBed Auto Const
ObjectReference Property AkilaSurgicalBed Auto Const
ObjectReference Property CydoniaSurgicalBed Auto Const
ObjectReference Property KeyBed Auto Const
 
Armor Property HospitalClothes Const Auto
ObjectReference Property NeonPlayerShipLandingMarkerRef Auto Const
 
Int GameStart = 0
 
Event OnInit()
RegisterForRemoteEvent(Game.GetPlayer(), "OnPlayerLoadGame")
If (GameStart == 0)
Game.GetPlayer().SetEssential(True)
Game.GetPlayerHomeSpaceShip().SetEssential(True)
EndIf
EndEvent
 
Event Actor.OnPlayerLoadGame(Actor akSender)
;if making spaceship essential needed.
EndEvent
 
Event OnActorValueChanged(ObjectReference akObjRef, ActorValue akActorValue)
If akObjRef == Game.GetPlayer() && akActorValue == Health
        If Game.GetPlayer().GetValue(Health) <= 1.0
            PreventDeath()
        EndIf
    EndIf
    If akObjRef == Game.GetPlayerHomeSpaceShip() && akActorValue == Health
        If Game.GetPlayerHomeSpaceship().GetValue(Health) <= 1.0
            debug.MessageBox("Preventing Destruction!")
            PreventDestruction()
        EndIf
    EndIf    
EndEvent
 
Function PreventDeath()
    Game.FadeOutGame(True, True, 2.0, 2.0)
    Game.GetPlayer().RestoreValue(Health, 1000)
    ;Game.getplayer().addperk (damagereduction)
    Utility.Wait(1.0)
    TriggerRandomScenario()
EndFunction
 
Function PreventDestruction()
    ;Game.FadeOutGame(True, True, 2.0, 2.0) ; Doesn't seem to work in space
    SpaceshipReference PlayerShip = Game.GetPlayerHomeSpaceShip() as SpaceshipReference
    Actor Player = Game.GetPlayer()
    ObjectReference SafeLocation = Game.GetForm(0x0021C259) as ObjectReference
    player.moveto(SafeLocation)
 
    Debug.MessageBox("Your vision goes black as your ship suffers critical damage. Systems shutting down...") ;doesn't work either in space
 
    PlayerShip.RestoreValue(Health, 1000) ; This works.
    PlayerShip.StopCombatAlarm()  ; Stops AI from attacking the ship, works
    PlayerShip.StopCombat()       ; Forces AI out of combat state, works
 
    ; Attempt to move the player to a safelocation 1
   ; ObjectReference SafeLocation = Game.GetForm(0x0021C259) as ObjectReference  ; In this case the Cydonia spaceport
  ;  If SafeLocation
       ; Game.GetPlayer().MoveTo(SafeLocation)  ; Move the player out of the ship first. Isn't working.
      ;  Utility.Wait(1.5)
   ; Else
       ; Debug.MessageBox("Safe location not found.") ; not working
   ; EndIf
    PlayerShip.StopCombatAlarm()  ; Stops AI from attacking the ship, works
    PlayerShip.StopCombat()       ; Forces AI out of combat state, works
     ; Attempt to move the ship to a temporary safe location
    ObjectReference TempLandingZone = Game.GetForm(0x0021C259) as ObjectReference  ; In this case the Cydonia spaceport
    if TempLandingZone
        PlayerShip.MoveTo(TempLandingZone) ; isn't working
        Utility.Wait(1.5)
    else
        Debug.MessageBox("PreventDestruction: Temp landing zone not found!") ;doesn't show up
    endif
    ; Move the ship to a safe location and land
    LandPlayerShipAt(NeonPlayerShipLandingMarkerRef) ; This function works when called when the player is outside of the spaceship, but not in space.
    ; Wait for a moment before re-enabling
    Utility.Wait(2.0)
    ; Reset ship AI to clear hostile states
    PlayerShip.Enable(False)
 
EndFunction
Posted
On 2/5/2025 at 1:55 AM, Reigor said:

For myself, I am working on a Mod called Plot Armor: A Death Alternative. The player and their ship are made essential and when either gets to 0 health it will trigger a scenario. So far I have gotten the preventdeath function I made to move the player to the Neon Reliant surgical bed, equip them in patient clothes, and their spaceship show up at the spaceport.

 

The problem I am running into now is the spaceship combat. I cannot get it to move the player or the ship to a different location by a script. player.moveto works in console while in space, in space combat, and after the hull is 0 health, but not in the script. Debug message boxes and fade to black isn't working either. I know the function is activating because I have a command to restore the spaceship's health which does fire off. So I'm missing something.

Here is the code, some stuff has been commented out as I have been experimenting in trying to get this to work. 

 

Scriptname PlotArmorScript extends Quest
 
ActorValue Property Health Auto Const
ObjectReference Property NeonSurgicalBed Auto Const
ObjectReference Property NASurgicalBed Auto Const
ObjectReference Property AkilaSurgicalBed Auto Const
ObjectReference Property CydoniaSurgicalBed Auto Const
ObjectReference Property KeyBed Auto Const
 
Armor Property HospitalClothes Const Auto
ObjectReference Property NeonPlayerShipLandingMarkerRef Auto Const
 
Int GameStart = 0
 
Event OnInit()
RegisterForRemoteEvent(Game.GetPlayer(), "OnPlayerLoadGame")
If (GameStart == 0)
Game.GetPlayer().SetEssential(True)
Game.GetPlayerHomeSpaceShip().SetEssential(True)
EndIf
EndEvent
 
Event Actor.OnPlayerLoadGame(Actor akSender)
;if making spaceship essential needed.
EndEvent
 
Event OnActorValueChanged(ObjectReference akObjRef, ActorValue akActorValue)
If akObjRef == Game.GetPlayer() && akActorValue == Health
        If Game.GetPlayer().GetValue(Health) <= 1.0
            PreventDeath()
        EndIf
    EndIf
    If akObjRef == Game.GetPlayerHomeSpaceShip() && akActorValue == Health
        If Game.GetPlayerHomeSpaceship().GetValue(Health) <= 1.0
            debug.MessageBox("Preventing Destruction!")
            PreventDestruction()
        EndIf
    EndIf    
EndEvent
 
Function PreventDeath()
    Game.FadeOutGame(True, True, 2.0, 2.0)
    Game.GetPlayer().RestoreValue(Health, 1000)
    ;Game.getplayer().addperk (damagereduction)
    Utility.Wait(1.0)
    TriggerRandomScenario()
EndFunction
 
Function PreventDestruction()
    ;Game.FadeOutGame(True, True, 2.0, 2.0) ; Doesn't seem to work in space
    SpaceshipReference PlayerShip = Game.GetPlayerHomeSpaceShip() as SpaceshipReference
    Actor Player = Game.GetPlayer()
    ObjectReference SafeLocation = Game.GetForm(0x0021C259) as ObjectReference
    player.moveto(SafeLocation)
 
    Debug.MessageBox("Your vision goes black as your ship suffers critical damage. Systems shutting down...") ;doesn't work either in space
 
    PlayerShip.RestoreValue(Health, 1000) ; This works.
    PlayerShip.StopCombatAlarm()  ; Stops AI from attacking the ship, works
    PlayerShip.StopCombat()       ; Forces AI out of combat state, works
 
    ; Attempt to move the player to a safelocation 1
   ; ObjectReference SafeLocation = Game.GetForm(0x0021C259) as ObjectReference  ; In this case the Cydonia spaceport
  ;  If SafeLocation
       ; Game.GetPlayer().MoveTo(SafeLocation)  ; Move the player out of the ship first. Isn't working.
      ;  Utility.Wait(1.5)
   ; Else
       ; Debug.MessageBox("Safe location not found.") ; not working
   ; EndIf
    PlayerShip.StopCombatAlarm()  ; Stops AI from attacking the ship, works
    PlayerShip.StopCombat()       ; Forces AI out of combat state, works
     ; Attempt to move the ship to a temporary safe location
    ObjectReference TempLandingZone = Game.GetForm(0x0021C259) as ObjectReference  ; In this case the Cydonia spaceport
    if TempLandingZone
        PlayerShip.MoveTo(TempLandingZone) ; isn't working
        Utility.Wait(1.5)
    else
        Debug.MessageBox("PreventDestruction: Temp landing zone not found!") ;doesn't show up
    endif
    ; Move the ship to a safe location and land
    LandPlayerShipAt(NeonPlayerShipLandingMarkerRef) ; This function works when called when the player is outside of the spaceship, but not in space.
    ; Wait for a moment before re-enabling
    Utility.Wait(2.0)
    ; Reset ship AI to clear hostile states
    PlayerShip.Enable(False)
 
EndFunction

hmm i want to say larann could help ya

Posted

I finally got it working. I'm sure why, but after looking through the game's scripts I notices that any sort of "playership" property was always done as a reference alias, not a spaceshipreference. 

 

ObjectReference Property NeonPlayerShipLandingMarkerRef Auto Const
ReferenceAlias Property PlayerShipRef Const Auto  <<-- needs to be a referencealias not a spaceshipreference
RegisterForRemoteEvent(PlayerShipRef, "OnEnterBleedout") 

Event ReferenceAlias.OnEnterBleedout(ReferenceAlias akSource) <<-- needs to be referacealias as well
    If PlayerShipRef
    Debug.MessageBox("Plot Armor Activate!")  <<-- When I finally saw this I was cheering!
    PreventDestruction()
    EndIf
EndEvent

Function PreventDestruction()
   Game.GetPlayerHomeSpaceShip().MoveTo(NeonPlayerShipLandingMarkerRef)  <<-- I could likely use PlayerRefShip instead
EndFunction

 

I'm hoping that once I polish this up I can tie in mods like NAF: Defeat and the Auction House once those have matured a bit more.

  • 2 weeks later...
  • 2 weeks later...
Posted (edited)

Working on mod (captive NPCs that you find and can recruit as crew), Have a question that seems easy but cannot figure out:

 

Can I re use sound and lip sync infos from vanilla game? I have generic dialogues for rescued crew that matches generic civilian dialogues because I thought it would be easy to link to sound and lip datas that already exist (in picture). But I am not able to work out how to change voice filename and animation files to match vanilla version of dialogue. 

 

 

image.jpeg.8931d504b23614fc004d730db53f35c9.jpeg

 

This is vanilla example. Trying to copy Voice Filename (00460BA1) and dialogue animation file ($(subgraph)\Relaxed_Lib_Greeting_S01.af) to new file. 

 

Only thing I can get to happen is I can make Creation Kit CTD by trying to browse animation files to find 'Relaxed_Lib_Greeting_S01.af' 😞

 

Do anyone know if this is possible, or if this is bullshit thing where I have to make new sound files from vanilla wem and include soundbank with mod? 

 

 

Edited by Gray User
Posted
20 hours ago, Gray User said:

Working on mod (captive NPCs that you find and can recruit as crew), Have a question that seems easy but cannot figure out:

 

Can I re use sound and lip sync infos from vanilla game? I have generic dialogues for rescued crew that matches generic civilian dialogues because I thought it would be easy to link to sound and lip datas that already exist (in picture). But I am not able to work out how to change voice filename and animation files to match vanilla version of dialogue. 

 

 

image.jpeg.8931d504b23614fc004d730db53f35c9.jpeg

 

This is vanilla example. Trying to copy Voice Filename (00460BA1) and dialogue animation file ($(subgraph)\Relaxed_Lib_Greeting_S01.af) to new file. 

 

Only thing I can get to happen is I can make Creation Kit CTD by trying to browse animation files to find 'Relaxed_Lib_Greeting_S01.af' 😞

 

Do anyone know if this is possible, or if this is bullshit thing where I have to make new sound files from vanilla wem and include soundbank with mod? 

 

 

use this
https://www.nexusmods.com/starfield/mods/12778

Posted
11 hours ago, Gray User said:

 

I see. Thank you for that.

 

That is not quite so bad as doing everything in Wwise, but (If I understand right that it is needed to export the voice files, then convert them to wem, then link them as new voice files with new lipsyncs in CK), it is annoying enough to be low priority. 

btw you don't need to use WWISE for voicelines at all, all of that you can do in Creation Kit.
WWISE is mainly for the workproject bethesda gave for audio not voiceline

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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