Jump to content

AI package not starting


kwong96

Recommended Posts

Hello Nexus,

Hopefully someone has experienced something similar to this and will be able to give some insight as to what is causing it. I've tried searching for something like this on here, google, and for both Fallout 4 and Skyrim with no success yet.

 

Some info first. So I have a quest made, it starts fine. I have a quest script attached that registers for a scene OnEnd event so I can start the scene in this quest, that runs fine. I create a new actor based off EncWorkshopNPCFemaleFarmer01 with a workshopnpcscript attached to it and setup for allowCommand, allowMove, allowCaravan, and workshopparent filed in. The npc gets created fine and I ForceRefTo a Referience Alias, then start my scene. In the scene I have an action package templated from Travel. It is set to run on the npc alias and the destination is set to another alias.

 

Now for the issue. The npc spawns and just stands there unless I go into workshop mode and 'command' the npc. I do not have to actually tell them to go anywhere, just select them and start the 'command' state. Then the npc will start traveling.

 

I just can't seem to figure out what would possibly be causing this to happen. I've tried various combinations:

- flag checks on the package

- setting must complete

- changed the settings on the workshpnpcscript

- removed the workshopnpcscript

- edited the flags in the scene

- tried the default npc rather than my custom one.

 

If any more info is necessary let me know.

Link to comment
Share on other sites

I had a similar issue involving dialog, tried to fix it for a week, figured out it was simply a condition I placed so double check those and make sure you understand what they apply to. For me it was is item used, I thought it only applied to the player but it was the player and npc, so the dialog wouldn't work \:

Edited by ajs52698
Link to comment
Share on other sites

Thanks ajs52698.

I'm checking all of my conditions again and seeing what happens when I change ones that can be changed. So far nothing though. I had one on the object used for the destination, removed it since I realized I didn't need it anymore and could just change the reference to a specific reference as I set it in script now. That didn't help. Changed phase 1 from 'end on action 1' to 'end on all actions complete'. That didn't help.

 

Other than those, though, I don't have any condition checks that happen after the scene starts and the ai package would be applied. It's just so weird, it's like there's a condition somewhere asking if 'isCommandedState' else don't run ai package. Gonna keep looking, though.

Link to comment
Share on other sites

Ok, so... I added another npc to the scene, this one is already loaded. Then I moved the action package down onto that npc and it works. Apparently, I didn't try using enough different actors. So I'm guessing it is either something to do with creating the npc or the actor base I'm trying to use. Gonna try going through more of the default actors available and see if they work. I'm hoping it is just the one I chose to copy not having the right factions or something and not that I'm spawning the actor.

Link to comment
Share on other sites

So I almost have it fixed... I think. If someone comes across something similar I'll put what I remember doing that seemed to have an effect and maybe it can help them. I tried a lot of different things that I can't recall all of.

 

I started with trying to make it simpler than what I was using. The first sign of promise was when I just tried simplifying my spawn by putting it in the fragment section of the stage that starts the scene with just:

newRefAliasName.ForceRefTo(objectToSpawnAtRefAliasName.GetRef().PlaceActorAtMe(actorBasePropName))

My previous spawn function was a bit more in depth since I need to add the new npc to a settlement. Then I added the new ref alias to the scene and put a travelThenFace package on it. The destination was set to an XMarkerHeading I spawned in script prior to starting the scene. This worked, so I tried setting the actor base to the one I created. That worked too. Yay, promise. Heh, or so I thought.

 

Bunch of changes and reloading with no progress on the main alias and I finally said forget it, I'm starting from scratch.

 

Now, I wiped the scene, saved, reloaded the data file, and made a new scene. I have no other scenes except this one. I added 3 phases, the ref alias for the npc, checked allow dialogue camera, added an action package to phase 1 of type package template'd from TravelWithWarp and ignore marker or heading and warp in dialogue set true. The destination is an XMarkerHeading (created prior to the scene starting in script). And the flags are set for Aggro radius behavior, load into furniture, and must complete (mainly to ensure the npc stands where I want them to if another actor happens to cross their path and cut them short). For Phase 2 I added an action package template'd from TravelThenSit with basically the same settings. The npc will spawn and travel now, but the phase 2 package is still not working. So I've changed phase 2's package to just Sit. Again, the npc will spawn, travel, and then .... just stand there until I go into workshop mode and select them with 'command'. At that point the npc will finally 'sit'.

 

At least I feel like i'm getting a better idea of what's wrong now. I'm using a custom craft-able barber chair as the destination point. When I use a basic Travel package with an XMarkerHeading it seems to work, so, I'm thinking it has to do something with blockactivation or maybe Ignored by sandbox (though I wouldn't think that would apply to a non-sandbox package). I don't know if anyone else has come across something similar with any other type of furniture, but now it definitely seems like there is some issue with the npc not wanting to run their ai package because of some furniture setting somewhere. I'm just not sure where yet since they will actually use the furniture if I select command while in workshop mode. Especially since I don't have to command them onto the object, just simply ... turning on?... command let's them find and interact with the furniture.

 

 

Link to comment
Share on other sites

As an update to this... Some ai packages aren't working. Apparently if I do an Action with a package templated from Activate I can get the npc to finally interact with the chair. Now the problem is I'm not receiving the "OnSit" events for it. I RegisterForRemoteEvent(refAliasToNPC.GetActorRef(), "OnSit") and have an Event Actor.OnSit(Actor akSender, ObjectReference akFurniture) , but it doesn't seem to be getting the event call. I'm guessing it is being sent silently with the Activate package. I'll mark this solved I guess since I'm probably starting to get away from what the topic title is.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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