Jump to content

DOWNLOAD MODS

Are you looking for something shiny for your load order? We have many exclusive mods and resources you won't find anywhere else. Start your search now...

LEARN MODDING

Ready to try your hand at making your own mod creations? Visit the Enclave, the original ES/FO modding school, and learn the tricks of the trade from veteran modders...

JOIN THE ALLIANCE

Membership is free and registering unlocks image galleries, project hosting, live chat, unlimited downloads, & more...

Automating a bards scenes random help


donAllister
 Share

Recommended Posts

Hi, I'm new here, but have been doing odd modding for a few years. So I'm basically making a new bard script for a new world that's being developed and I'm looking to make the bards sing through a script.

 

Function PlayChosenSong(Int ChosenSong)


    Int Intro = Utility.RandomInt(0,1)
    If ChosenSong < 6
        LastSongPlayed = ChosenSong
    Else
        Bard2LastSongPlayed = ChosenSong
    EndIf


    If ChosenSong == 1
             debug.Trace("MWBardSong Flute 1")
        InstrumentalSong = Utility.RandomInt(1,6)
        MWBardSongsFluteSong1.Start()
    EndIf

    If ChosenSong == 2
             debug.Trace("MWBardSong Flute 2")
        InstrumentalSong = Utility.RandomInt(1,6)
        MWBardSongsFluteSong2.Start()
    EndIf

      If ChosenSong == 3
             debug.Trace("MWBardSong Lute 1")
        InstrumentalSong = Utility.RandomInt(1,6)
        MWBardSongsLuteSong1.Start()
    EndIf    

      If ChosenSong == 4
             debug.Trace("MWBardSong Lute 2")
        InstrumentalSong = Utility.RandomInt(1,6)
        MWBardSongsLuteSong2.Start()
    EndIf

          If ChosenSong == 5
             debug.Trace("MWBardSong Drum 1")
        InstrumentalSong = Utility.RandomInt(1,6)
        MWBardSongsDrumSong1.Start()
    EndIf

          If ChosenSong == 6
             debug.Trace("MWBardSong Drum 2")
        InstrumentalSong = Utility.RandomInt(1,6)
        MWBardSongsDrumSong2.Start()
    EndIf

 
EndFunction

There is the part of the script that call on my scenes, all new songs and scenes.

So what I'm looking for, as in the title is a way to get the bard to chose a song on their own without a verbal request from the player. The BardSongs default quest script seems more than I need, so I'm looking for a simple answer.

Any help would be appreciated.

Edited by donAllister
Link to comment
Share on other sites

I have managed to get a random song to play with a trigger on an object, but it only plays one and if I trigger it again it starts another scene, maybe even the same scene.

Using this:

Scriptname MWBardTriggerScript extends ObjectReference
 
Actor Property PlayerREF Auto ; Least 'costly' way to refer to the player
 
Event OnTriggerEnter(ObjectReference akActionRef)
    If akActionRef == PlayerREF ; This condition ensures that only the player will trigger this code
        (MWBardSongsQuest as MorrowindBardsSongsScript ).PlaySongRequest(MWBard.GetActorRef(),"Any",False,Utility.RandomInt(1,6))
    EndIf
EndEvent

Quest Property MWBardSongsQuest  Auto  
ReferenceAlias Property MWBard  Auto 

I may be moving in the right direction, but the path is still pretty unclear.

Link to comment
Share on other sites

I removed the script trigger when I got it working under the event node, Change Location Event. It triggers when I enter a LocTypeInn cell. So thankfully I won't be needing triggered rugs That Bard Song Starter quest is working now..

I'm pretty sure it's in the main script now, it's just not getting the message to start/stop a song. I can share the whole script, if you think that would help. It's a modified version of the original BardSong Quest and scripts. I've been trying to crack Bards since my first Bard mod, Bards and Guards, on the nexus. After this is finished I will have to make a Bards and Guards 2.0, with all that I've learned.

Edited by donAllister
Link to comment
Share on other sites

  • 2 weeks later...

Scenes are a pain, but I have a decent handle on them I think. Currently banging my head trying to make it transition from a playing scene, to a rest scene, but have no issue once in the rest scene going back to a playing scene. Very frustrating.

If anyone can help, I'm using quest variables to switch packages (from standing at their spot and playing and to sandboxing) and having one scene trigger another scene. The only one I've had trouble with is going from playing to resting.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...