the Sim Settlements forums!

Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Old Post Dialog Override script

Steph

Member
Messages
35
Is there a way we can use the dialog override script? My custom faction is pretty dull without any dialog.
 
Sure, here's a basic script to do that:

Code:
Scriptname OverrideVoiceType extends Actor

VoiceType[] Property MaleVoiceTypes Auto Const
VoiceType[] Property FemaleVoiceTypes Auto Const
Faction Property DialogueFaction Auto Const

Event OnInit()  
    AddToFaction(DialogueFaction)
      
    ; Give a random voice type
    VoiceType ChangeVoiceType
    int iSex = GetLeveledActorBase().GetSex()
  
    if(iSex == 1) ; Female
        ChangeVoiceType = FemaleVoiceTypes[Utility.RandomInt(0, FemaleVoiceTypes.Length - 1)]
    else
        ChangeVoiceType = MaleVoiceTypes[Utility.RandomInt(0, MaleVoiceTypes.Length - 1)]
    endif
  
    if(ChangeVoiceType)
        SetOverrideVoiceType(ChangeVoiceType)
    endif
EndEvent

You'd stick this on your actor, and then fill out the properties. Easiest way to do the properties, would be to fill in WorkshopDialogueFaction as the DialogueFaction - which will tell it to use the settlement lines. Then for the VoiceTypes, the ones that start with the words Male and Female, respectively, are the generic voice types that have most of the game dialogue available.
 
Top