Jump to content

dagobaking

Premium Member
  • Posts

    235
  • Joined

  • Last visited

Posts posted by dagobaking

  1. Thank you for this clarification.

     

    I have used some of those other mechanics a bit. But, I found them to be pretty unreliable. I think they work as they are supposed to. But, the problem is that the vanilla game has so many things going, so many layers of keywords and prioritized tasks that there is always something that interferes with your packages.

     

    Scenes were the first mechanic I used that could reliably really take over an NPC actor and stop them from doing random things.

  2. For reference, this is what the code currently looks like:

     

    Function OnWalkTo(Int actorFormID, Int sceneKey, Float x, Float y, Float z, Float a)
    
    
    Actor targetActor = Game.GetForm(actorFormID) as Actor
    ObjectReference targetActorObject = targetActor as ObjectReference
    
    
    ObjectReference walkMarker = targetActorObject.PlaceAtMe(AAF_MarkerFurniture)
    walkMarker.waitfor3dload()
    
    
    walkMarker.SetPosition(x, y, z)
    walkMarker.SetAngle(0.0, 0.0, a)
    
    
    walkMarker.MoveToNearestNavmeshLocation()
    
    
    If targetActor.IsInPowerArmor()
    exitPowerArmor(targetActor)
    EndIf
    
    
    AAF_WalkToAndWaitQuest[sceneKey].Stop()
    AAF_WalkToAndWaitQuest[sceneKey].Start()
    (AAF_WalkToAndWaitQuest[sceneKey].GetAlias(0) as ReferenceAlias).ForceREFTo(targetActor)
    (AAF_WalkToAndWaitQuest[sceneKey].GetAlias(1) as ReferenceAlias).ForceREFTo(walkMarker)
    AAF_WalkToAndWaitScene2[sceneKey].ForceStart()
    
    
    
    
    if(targetActor == PlayerRef)
    ;Game.SetPlayerAIDriven()
    
    
    inputLayer = InputEnableLayer.Create()
    inputLayer.DisablePlayerControls(\
    abMovement = false,  \
    abFighting = true,  \
    abCamSwitch = true,  \
    abLooking = false,  \
    abSneaking = false,  \
    abMenu = false,  \
    abActivate = false,  \
    abJournalTabs = false,  \
    abVATS = false,  \
    abFavorites = false,  \
    abRunning = false  \
    )
    
    
    EndIf
    
    
    ;/
    While (targetActor.GetCurrentPackage() != AAF_StillPackage)
    Utility.Wait(2)
    Endwhile
    /;
    
    
    If(targetActor == PlayerRef)
    ;Game.SetPlayerAIDriven(False)
    EndIf
    
    
    Var[] sendData = new Var[1]
    sendData[0] = actorFormID
    sendEvent("WALK_COMPLETE", sendData)
    EndFunction

    In the above form, it works. But, it skips running the travel scenes. If you uncomment the commented out code, it will use the travel scenes properly. But, then destroy NPC AI somehow.

  3. So I restructured the whole thing to use separate Quests instead of the multiple Scenes in one Quest that I had.

     

    That made no difference. The behavior is exactly the same.

     

    I did adjust some things so that I could do a better test. I can now test my entire process with or without SetPlayerAIDriven on. And sure enough, if it is on, NPCs go brain dead. If it is off, the exact same lines of code run and the NPCs retain their AI.

     

    So, the question is a little more specific now, how does SetPlayerAIDriven need to be run or ordered in order for it to work with a simple travel scene without breaking the AI of the entire game?

  4. You would have better luck using an activator or item placed into the actor's inventory and setting object properties via your quest. I don't believe it is possible to dynamically create quests. If you'd like, you can post your source and I can try to help more.

     

    Thank you. Unfortunately, I don't think there is any way around it. I'll just have to make a big list of duplicate Quests, serialize them and dole them out as needed.

     

    That part I can set up. It just hurts my brain (and pride) having to do things that way. It's always fun to make 20 copies of some thing in CK then realize that they all need some small adjustment.

     

    I could use help with a related bug that has me on the ropes. I posted about it here: https://forums.nexusmods.com/index.php?/topic/6572066-setplayeraidriven-causing-all-npcs-to-go-brain-dead/

     

    Since the last post in that thread, I have converted the scenes over to their own individual quests. But, that did not fix the issue. Upon stopping the quests, the NPCs all seem to have lost their AI.

     

     

    Isn't this something you'd solve with specific packages? E.g. apply a package to an actor (e.g. walk to point X with keyword Y).

    In script you can apply a package to an actor, wait for it to complete, then run another package and so forth in sequence.

     

    I don't believe that there is a way to apply a package to an actor in script. It would be HUGE if there was. That functionality was added through SKSE for Skyrim and was very helpful. But, I don't believe that the equivalent exists in Fallout 4. Please correct if I am wrong!

     

    Instead of that, in Fallout 4, to apply packages you have to use the various CK mechanics (factions, spells, scenes, etc.). In my situation, I am using scenes. And they are proving to be extremely fickle. I am plugging actors into refaliases dynamically. Then starting the scene. That works. But, after I stop the scene, the NPCs have lost their AI. I have spent many hours adjusting order of commands, turning off parts of the code in between, etc. It looks like it has something to do with using SetPlayerAIDriven. But, little is conclusive and I pretty much need that to make the Player walk to a location...

  5. I have a Quest that is like a building block. It has a simple walking scene that can be configured to send actors to script-defined locations.

     

    I would like to be able to make "copies" or instances of this Quest dynamically via script and assign different actors to each, going to different places at the same time.

     

    Is that possible with Papyrus and the CK?

     

    If so, how do you instantiate a new copy of a Quest?

  6. You should probably start by reading the CreationKit wiki pages for Fallout 4. There aren't really that many pages to go through there. It covers setting up the compiler and a text editor, basic CK work and all the scripts and form types. It helps a lot to know a bit about the purpose of all the major game scripts (Actor, Furniture, Quest, etc.).

     

    Can probably all be read/understood in a day or two.

  7. I see. In that case it may have worked. But, stopping the quest did not resolve the problem symptom.

     

    On top of that, the symptoms don't really match what the packages in the scene do. Those are just a simple travel phase and a wait phase. The symptom is that every NPC in the game will no longer fight back if you attack them, even creatures, etc. It looks like the whole package system, game-wide gets broken somehow by perhaps misuse of SetPlayerAIDriven...

     

    I can run IsRunning on the scenes and confirm that the game thinks they have stopped.

  8. I am using a scene to make the PC walk to a certain location. This only works to move the PC if you set Game.SetPlayerAIDriven()

     

    I later stop the scene and run Game.SetPlayerAIDriven(False).

     

    That returns the PC controls and I can trace the Scene.IsRunning() and it shows as false.

     

    The problem though, is upon regaining controls, now the entire population of Fallout 4 is brain dead! They do kind of walk around and talk. But, you can attack enemies and they will not fight back.

     

    It's like some aspect of the packages/scene that was running does not fully clean off.

     

    Has anyone seen this before and know if there is a fix?

  9. I saw this in the SKSE section, maybe F4SE has a similar function.

     

    https://www.creationkit.com/index.php?title=GetFactions_-_Actor

     

    That would do it. I think I'll explore some options first. But, might be able to request it...

     

    Off the top of my head, the only thing I can think of is to create a formlist of all of the usual factions and then run a While/Endwhile loop on it with a check in the middle that says... actually easier this way.

     

    FactionsFormList = a formlist in the CK with all of the factions you want to check against.

    PlayerFactions = a script level array of factions the player is in

     

    Int j = 0

    While (j < FactionsFormList.length)

    If PlayerREF.IsInFaction(FactionsFormList[j])

    PlayerFactions.Add(FactionsFormList[j])

    Endif

    J +=1

    EndWhile

     

    Of course, you'd need to define these in the script and also initialize the arrays, but thats easy enough...

     

     

    Thank you. The trouble is that it's an operation that will likely have to be run quite a bit. So, I don't want to do a loop on 20 items to pull 2 items. It could add up to a performance issue.

  10. To my knowledge, an F4SE plugin that does that has not been made. Many coders are reluctant to make that plug-in because of the security risks introduced by allowing writes to the users file system.

     

    There is a plug-in that allows reading/writing strings to a game-controlled ini file. I believe those can be quite large. Would that accomplish what you need?

  11.  

    Unfortunately, a lot of the files that I update regularly (swf and xml) do not get detected and included in that process. So, I have to manually add them for every build.

    Â

    It is faster to just use windows explorer and copy/paste.

    The Creation Kit also lets you create archive list files (I think they have an archlist extension) and those can be any files you want. You simply need to export your file list once and import it when you create a new version and all the files will be automatically included.

     

     

    Indeed it does! Now I feel pretty dumb having overlooked those buttons. :D

     

    Thank you.

     

    A related question: CK auto includes in the file list (along with files I expect) "Form.pex" and "ScriptObject.pex". But, I didn't touch those files. Should I include them with the build? Should I be alarmed?

  12.  

    I'm looking for a solution that makes creating a new build a one or two click process. So, it would need to save folder/file paths to be copied over to package a new build.

    The original suggestion of using the Creation Kit to pack the archive process is a few clicks. On rare occasion it will try to pack other loose files that you have in your data directory so you still need to skim through the list of files it grabs for verification, but it should grab and pack all your files for you. Click on File>Create Archive

     

     

    Unfortunately, a lot of the files that I update regularly (swf and xml) do not get detected and included in that process. So, I have to manually add them for every build.

     

    It is faster to just use windows explorer and copy/paste.

  13.  

    What's the problem you got stuck with?

     

    Getting the Player character to play an animation dynamically through a furniture. In other words, lining the player character up to be placed at and facing the exact location of a furniture. Then playing an idle. Plus, doing this while in FlyCam mode.

     

    I have a process that does this well for NPC characters. But, the same commands don't work on the player character and the alternatives either cause the character to jitter around badly or slide out of the object.

     

     

     

    Hah! Right now it looks bad as I don't have the proper animation.

    And I need to figure out a way to stop Ivy from pushing the player back when she comes close, but it works, technically...

     

    I did a shout out for an animator, but I'm afraid I'll get stuck on that part, there are no animators interested in making a hugging anim, it's all porn anims and whatnot.. (Leito and Crazy).. I am (extremely) proficient in 3dStudio Max 2010, I even have certificates for it and what not, but I'm just not willing to learn the whole rigging, animation, biped and that jazz again for a new version (plus I don't have any working version of 3dsMax any more and I can't afford it). It was a pain then and it's a pain now... getting the anim good myself will take tedious weeks without progress on my mod and without a guarantee for success... :sad:

     

    Plus I don't have a 3d package or any of the needed tools, and I'm not learning a different 3d package from scratch, such as Blender, then I'm looking at months of a learning curve for just this one feature among the tens of features she already offers.

     

    So if you know any animator that could help me out!!! :smile:

     

     

     

    You don't really need to learn much to make animations and the rigging, guide, process and tools are all already done here: https://www.nexusmods.com/fallout4/mods/16694

     

    Are you a student? If so, you can get a student copy of the 3DSMax that you would need for free here: https://www.autodesk.com/education/free-software/3ds-max

  14. Aha. Thank you. Didn't realize that you have to add files to the list and ctrl-click them.

     

    This is good to know for if/when I need to make a BA2. But, it's basically the same amount of work (maybe more) and just as mistake-prone as copying the files over to a build location and zipping up.

     

    I'm looking for a solution that makes creating a new build a one or two click process. So, it would need to save folder/file paths to be copied over to package a new build.

  15.  

    And I saw “playerREF" "AKactor" ....everywhere ,I guess these all mean the "PLAYER" , What is the different? Why we use various name?

     

    If you use the property name "playerRef" CreationKit will auto-populate that property with the correct form. That's why most people use it.

     

    You can use any other property name you like. But, then you will need to populate it manually.

     

    Or, as others have pointed out, you can not use a property at all and replace with "Game.GetPlayer()" to get a reference to the same form.

     

    I'm not quite sure what "akActor" stands for. I would be curious to know. But, that is usually just a Function parameter and could be renamed throughout a function without consequence.

  16. So I know there are probably mods like this all over, but I cant find them. Fores New Idles in Skyrim allowed me to tell my character to do idle animations and I have no idea what mods there are to let me do the same thing in FO4. I need it for a Let's Play Cinematic Series I want to do.

     

    FNIS was an external tool to allow adding idles into Skyrim.

     

    Fallout 4 doesn't need a tool like that because idles can be added through its CreationKit.

     

    There are many Fallout 4 mods making use of added idles in various contexts.

     

    Are looking to learn how to run idles from your own mods? Or, looking for mods that will run new idles?

  17. Ok. By total coincidence, or just hard determination.. but mostly the help from you guys... I suddenly have exactly what I needed (!)

     

    I created a custom 'standnearplayer' package, added an observation target and applied that to her dialogue topics. Then I added the ivyHugging animation to the idle anims list in the package. And voila... she was making the hugging motion as she was talking to me.

     

    That means the solution was to make a simple package, instructing Ivy to play an idle. The idle tab there allows sequencing and whatnot, so you can smoothly transition the lot. Positioning and angles must still be done by script for the player to reciprocate, and a 1st person anim must be made for the player, but for now my task is done until I can either create the proper anims myself, or have someone create them for me.

     

    Thanks for all the tips and tricks, couldn't have done it without all this help!

     

    attachicon.gifpackage.jpg

     

    Well done! I'd like to see how that looks.

     

    Thast's great to know! And thank you both for useful tips.

    I have also figured something out. Made it work with the furniture marker using the Slot Machine Quest as a reference for my quest. The reason it only worked for 1 actor was that they both wanted to use the same interaction point. There was an additional keyword for the zero furniture interaction point that was lost after duplicating. It also had to be added to one of aliases who take part in the scene , it makes the alias use the zero interaction slot that can't be used without this keyword. And I have finally learnt to ceate animated scenes :smile:

     

    Yes. Those interaction points are really finicky. Another thing that it will do is if you change the furniture nif to a different marker or something it will completely clear all of the interaction points that you had put in. So, now I edit those with FO4Edit.

     

     

     

    With all of this success, I'm now jealous that I'm over here stuck on a stubborn, maybe unfixable, problem. :(

×
×
  • Create New...