Silgrad Tower from the Ashes

Full Version: Custom music?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Is there a way to have custom music play in a specific area? Like, is it possible for me to put music into the game that will only play in Kedalin areas?
Yes, through scripted activators. I can probably develop a script, as long as the music in the area is set to either "Dungeon" or "Public".
Kk thx.
If you like you can check out the music activators beneath Reich Parkeep, which uses a script that makes their music track play continously in that cell. All you need to modify is the filename of the mp3 and the # of seconds. The # of seconds should be one second shorter than the track's length.
kk
Quote:Originally posted by Razorwing
If you like you can check out the music activators beneath Reich Parkeep, which uses a script that makes their music track play continously in that cell. All you need to modify is the filename of the mp3 and the # of seconds. The # of seconds should be one second shorter than the track's length.

It doesn't *quite* work, at least not 100%. There's still that menumode statement that should be put in there.

Furthermore, StreamMusic doesn't work in "Default" music locations, it only restarts the track that's already playing instead of starting a new one. If I had to suggest something, I would convert the MP3 to a WAV (downside is a hefty file size), make it a SOUND in the CS, then tell the game to play the sound (using a timer, NOT a looping sound, as it has caused some problems when I tried it) instead of Streaming new music. You'd also need to stream the music just about every nanosecond just to keep it from being heard. Big Grin

I think that's all the changes that would be needed.

Axen's original script:

Code:
ScriptName StAxScriptStreamMusicST
; Created by Axen http://www.silgrad.com/wbb2/profile.php?userid=1094

Begin GameMode
If (GetInSameCell player == 1)

If STMusicTimer > 0
Set STMusicTimer to STMusicTimer - GetSecondsPassed
Else
Set STMusicPlaying to 0
Set STMusicTimer to -1
EndIf


If STMusicPlaying == 0
Set STMusicTimer to 176
StreamMusic "Data\Music\Silgrad\ST_Ob_Main_Theme.mp3"
Set STMusicPlaying to 1
EndIf
EndIf

End

New script for Public/Dungeon music areas:

Code:
ScriptName StScriptStreamMusicPublicDungeonST

Begin GameMode

If (GetInSameCell player == 1)
  If STMusicTimer > 0
    If player.IsInCombat == 0
      Set STMusicTimer to ( STMusicTimer - GetSecondsPassed )
      Set STMusicPlaying to 1
    Else
      Set STMusicPlaying to 0
      Set STMusicTimer to -1
    Endif
  Else
    Set STMusicPlaying to 0
    Set STMusicTimer to -1
  EndIf
  If STMusicPlaying == 0
    If player.IsInCombat == 0
      Set STMusicTimer to [INSERT MUSIC LENGTH]
      StreamMusic [INSERT MUSIC PATH]
      Set STMusicPlaying to 1
    Endif
  EndIf
EndIf

End

Begin MenuMode

If (GetInSameCell player == 1)
  If STMusicTimer > 0
    If player.IsInCombat == 0
      Set STMusicTimer to ( STMusicTimer - GetSecondsPassed )
      Set STMusicPlaying to 1
    Else
      Set STMusicPlaying to 0
      Set STMusicTimer to -1
    Endif
  Else
    Set STMusicPlaying to 0
    Set STMusicTimer to -1
  EndIf
  If STMusicPlaying == 0
    If player.IsInCombat == 0
      Set STMusicTimer to [INSERT MUSIC LENGTH]
      StreamMusic [INSERT MUSIC PATH]
      Set STMusicPlaying to 1
    Endif
  EndIf
EndIf

End
And for Default music areas:

Code:
ScriptName StScriptStreamMusicDefaultST

Begin GameMode

StreamMusic [INSERT ANY MUSIC PATH]

If (GetInSameCell player == 1)
  If STMusicTimer > 0
    Set STMusicTimer to ( STMusicTimer - GetSecondsPassed )
    Set STMusicPlaying to 1
  Else
    Set STMusicPlaying to 0
    Set STMusicTimer to -1
  EndIf
  If STMusicPlaying == 0
    Set STMusicTimer to [INSERT .WAV LENGTH]
    PlaySound3D [INSERT CS SOUND NAME]
    Set STMusicPlaying to 1
  Endif
EndIf

End

Begin MenuMode

StreamMusic [INSERT ANY MUSIC PATH]

If (GetInSameCell player == 1)
  If STMusicTimer > 0
    Set STMusicTimer to ( STMusicTimer - GetSecondsPassed )
    Set STMusicPlaying to 1
  Else
    Set STMusicPlaying to 0
    Set STMusicTimer to -1
  EndIf
  If STMusicPlaying == 0
    Set STMusicTimer to [INSERT .WAV LENGTH]
    PlaySound3D [INSERT CS SOUND NAME]
    Set STMusicPlaying to 1
  Endif
EndIf

; (\_/)
;(='.'=)
;(")_(") This is Bunny. Copy and paste Bunny into your signature to help him gain world domination

End
Problem with the last one is that it doesn't play combat music while in combat. Confusedhrug: Haven't tested these, mind you.
that reminds me, the ReichParcheepmaintheme song, it is familiar but I cant pin down where I heard it before. X( Where did we get it?
Quote:Originally posted by A_flyboy
that reminds me, the ReichParcheepmaintheme song, it is familiar but I cant pin down where I heard it before. X( Where did we get it?

I believe it was composed for the Silgrad team, perhaps you should do a search? I think I remember a thread somewhere about it...
Hmmm was it in tes3 silgrad?

that would explain the familiarity. Big Grin

I cant remember the command right now (stupid cold) but there is a command that detects weather the player is in combat

i believe it is something like:

if getplayerincombat != 1
the rest of your scriptiong
endif
If player.IsInCombat == 1

would seem to work for me. Confusedhrug: Doesn't really matter, as long as it works.

Get well soon, btw.
Pages: 1 2