Jump to content

Photo

How do i get a Quest Scripted NPC Courier to ride Horse properly?


  • Please log in to reply
9 replies to this topic

#1
KeenSoldier4212

KeenSoldier4212

    Newbie

  • Members
  • Pip
  • 19 posts

This question is more for the more experienced creation kit modders and thinkers alike: So I took a look at https://tcrf.net/The...kyrim/Civil_War, The cutting room floor site that provides alot of information about alot of cut-out stuff and never used features  from Skyrim civil war questline.

In one of these details addressed by the page, CWMission03 Also Known as A False Front was suppose to have the Courier travel by Horse, Despite a developer note stating that the horse is disabled due to some issues, I decide to take a jab at recreating that small scene regardless as something so little shouldn't effect the entire CW questline anyways.


So first thing i did was check search CWMission03 in all section, checked CWmission03's quest data in alias section, The horse was initially disabled, I reactivated the horse, I launched the skyrim game and tested the mission out on Stormcloak's side, After talking to the inn-keeper at Dragonbridge, I decided to head over to the courier's location, As i walked on the road, I noticed the courier still But it seems the courier prefers to travel by foot as he runs, I went to check the horse, The restored horse is in place but isn't doing anything aside from eating grass and looking around. I checked CWMission03CourierPackage, And that Ride horse is set to true.

My second option is recreating it, As i believe it's easier said than done. I loaded a new file where i didn't check off initially disabled on the CourierHorse, I instead decide to look at how The horse named Frost was spawned, I imitated Frost's spawning path by checking the reference alias based on the related quest MS03 also known as Promises to keep.


I then successfully created a reference CWCourierHorse, But to test it out seeing as how i'm doing the stormcloak questline, I placed him in the cell exterior robbersgorgeexterior02 right where the CWMission03CourierSpawnMarkerSons is set for Imperial-soldier to spawn carrying the document, How i got there was clicking on CWMission03CourierSpawnMarker to see where couriers would spawn at. I also duplicated the horse reference alias on CWMission03 and made the reference alias spawn style just the same as Frost.

I clicked on the reference horse where it's placed right next to that very spawn point, Set the ownership to CWCourierImperial to make sure the NPC notices the horse and rides on it to make his way, And launched Skyrim again to reload the exact save where i started the quest by talking to Galmar in Hjaalmarch camp. I did the same by coc'ing to dragonbridge, talked to innkeeper, then went to find the courier, He still walks on foot, And the horse did spawn my way but still standing around, Is this because of the wait package the horse has or what?


How do i solve this and have the courier ride on horse for good? Of course I do know another alternative way, I could disabled the courier-spawn point, create a npc based off of the CW Couriers and place their references right next to horse for easy configuring and call it a day. But that means i will have to rearrange whatever parts of CWMission03 Quest stages and alias to ensure it happens.


IMPORTANT EDIT: I noticed the horse is already enabled by default in vanilla unmodded, But it sees no use, Instead it just stands there by robbers gorge still eating grass and looking around.


 


Edited by KeenSoldier4212, 08 April 2021 - 02:07 AM.


#2
dylbill

dylbill

    Faithful poster

  • Premium Member
  • 2,261 posts

You can use a script somewhere to make the courier ride the horse. If you don't want to edit vanilla records, you can put the courier in a reference alias on a quest. Put a script on the reference alias with the OnPackageStart event and check that it's the CW package and use HorseRef.Activate(Courier). I would still make sure the AI package has Rides Horses as true. Another thing, if the quest was already running in the save you tested, you might want to go back to a save before the quest starts as data can get baked in. In this case you might not have to use the script. 

 

https://www.creation...geStart_-_Actor

https://www.creation...ObjectReference



#3
KeenSoldier4212

KeenSoldier4212

    Newbie

  • Members
  • Pip
  • 19 posts

I write in a new script, However whenever i change the newscript name or leave it as it is even with it's already established documentation string i wrote out to, I kept getting New Script error that says "the extends script does not work, please pick one that does." message, Even though its left at ReferenceAlias.

I attempt to replace Courier's CWMission03CourierScript with the newscript as test to see if the error still functions, It happens again, Seems the error doesn't want me to add in new scripts.

EDIT: Nevermind, I extracted the original Script in Skyrim Data folder, Reinstalled SKSE, Copied Source from extracted Script into script, And then when i add in a new script on creation kit it finally works

Ok, Going to test it out from what you've said.


Edited by KeenSoldier4212, 08 April 2021 - 07:15 AM.


#4
dylbill

dylbill

    Faithful poster

  • Premium Member
  • 2,261 posts

Cool, glad you can make new scripts. FYI for scripting I use SSEScript: https://www.nexusmod...tion/mods/43691



#5
KeenSoldier4212

KeenSoldier4212

    Newbie

  • Members
  • Pip
  • 19 posts

Ok, So here's an Update, I made this script, (I'm using Papyrus Notepad + + https://www.nexusmod...m/mods/64895/):


Scriptname CWMission03CourierRidesHorseScript extends ReferenceAlias  
 
Event OnPackageStart(CWMission03CourierPackage akNewPackage)
 
HorseRef.Activate(Courier))


I also then forced Courier's alias when filed into just the same name. 

Now when i boot the game up, I Keep seeing the courier travel by foot, But since the marker on the compass is only disabled instead, Atleast i know i'm getting somewhere.​ Scratch that, That was IHUD i had on enabled by accident, Are there anything i should tweak on the script or what? The horse is initially disabled and set to optionial in the quest alias edit of CWMission03.

Edited by KeenSoldier4212, 09 April 2021 - 04:02 AM.


#6
dylbill

dylbill

    Faithful poster

  • Premium Member
  • 2,261 posts

I would maybe enable the horse in the script, and check that the right package is running. You can also put a debug.notification to make sure the script is running: 

 

Actor Property HorseRef Auto 
Package Property CWMission03CourierPackage Auto 

Event OnPackageStart(Package akNewPackage) 
    If akNewPackage == CWMission03CourierPackage 
        Debug.Notification("Courier started CWMission03CourierPackage")
        HorseRef.Enable() 
        Actor Courier = Self.GetActorRef() ;get actor Reference that this alias is filled with. Should be the courier. 
        
        If Courier != None 
            HorseRef.Activate(Courier) ;Courier mounts horse. 
            Courier.EvaluatePackage()
        Endif 
    Endif 
EndEvent

Make sure you fill your properties after compiling and attaching the script to the reference alias. Click on properties, auto fill all should fill the package property, but you'll have to do the Horseref manually. Click on that property then click edit value. Choose the cell the horse is in and then the specific horse actor in that cell.



#7
dylbill

dylbill

    Faithful poster

  • Premium Member
  • 2,261 posts

One more thing, make sure you're testing on a save before that package is running, otherwise that event won't fire.



#8
KeenSoldier4212

KeenSoldier4212

    Newbie

  • Members
  • Pip
  • 19 posts
I got the script compiled successfully, Loaded Courier's package onto property, and added the CourierHorse ref in robber's gorge exterior 02 as a test, the same place where the LCRT CWMission03CourierSpawnMarker has set the imperial-spawnmarker for the legion courier to appear.

I experimented for a while to see how it goes and i found some results: Good news is that The script notifies me that "Courier started CWMission03 Package) If i were to go into the quest's respective location inns like in Dragonbridge or Roriksteasd. A so-and-so news is that After i talked with the local innkeeper, ià traveled from the bridge itself to see if the courier is riding horse, Only notable difference isà that the courier spawned quickly And by quicklyà i mean that he spawned at the end of the other bridge on the direct pathway road to Dragonbridgeà where behind him is a nearby dead horse carriage. I went past him to check on the horse i spawned at, There were two horses, One that was already disabled by default, And the other which is my REF NPC horse standing.

I decide to go for the second option: That is travel to Rorikstead and then head to robbers gorge and to dragonbridge from there, I did that, Horse still standing and Courier still on foot. I think it's the relative XMarker spawns that has something to do with this, Because they're the ones responsibie for making such over-the top npc spawn style instead of just simplistic and straight-to-the point.

The ownership for the ref horse's is set to Courier Imperial, Cause I'm experimenting with Stormcloaks a false front first.

Edited by KeenSoldier4212, 10 April 2021 - 01:03 AM.


#9
dylbill

dylbill

    Faithful poster

  • Premium Member
  • 2,261 posts

Try putting an OnLoad event in the script as well. I think maybe the problem is the travel package on the courier is cause him to teleport. I've noticed this happens sometimes with travel packages. Also, you can try setting the actor owner in the script: 

 

Actor Property HorseRef Auto 
Package Property CWMission03CourierPackage Auto 

Event OnPackageStart(Package akNewPackage) 
    If akNewPackage == CWMission03CourierPackage 
        Debug.Notification("Courier started CWMission03CourierPackage")
        HorseRef.Enable() 
        Actor Courier = Self.GetActorRef() ;get actor Reference that this alias is filled with. Should be the courier. 
        
        If Courier != None 
            HorseRef.SetActorOwner(Courier.GetActorBase())
            HorseRef.Activate(Courier) ;Courier mounts horse. 
            Courier.EvaluatePackage()
        Endif 
    Endif 
EndEvent

Event OnLoad() 
    Actor Courier = Self.GetActorRef() ;get actor Reference that this alias is filled with. Should be the courier. 
    If Courier != None 
        If Courier.IsOnMount() == False && Courier.GetCurrentPackage() == CWMission03CourierPackage 
            HorseRef.MoveTo(Courier) 
            If HorseRef.IsEnabled() == False 
                HorseRef.Enable() 
            Endif 
            HorseRef.SetActorOwner(Courier.GetActorBase())
            HorseRef.Activate(Courier) ;Courier mounts horse. 
            Courier.EvaluatePackage()
        Endif 
    Endif 
EndEvent


#10
KeenSoldier4212

KeenSoldier4212

    Newbie

  • Members
  • Pip
  • 19 posts

I'm getting close to being finished now.

The courier spawns alongside the horse the next time i walked out of the dragonbridge inn, However the horse tries to run away, And the courier is still too stubborn to get on it.

So I opened up CK, got rid of the original alias data package attached to the horse in quest alias that makes him wait around,(This is the horse from the already-created-for-the-quest-itself doing all of this, Not the Ref ID horse though) Created a new package, Attached owner quest to Mission03, then i set the horse follow to the courier, Reloaded the game, And the horse walks along with the courier as it accompanies him, I also set the courier's package to walk only so he won't go speeding ahead.


Edited by KeenSoldier4212, 12 April 2021 - 01:14 AM.





IPB skins by Skinbox
Page loaded in: 0.865 seconds