NexusVirus Posted January 26, 2021 Posted January 26, 2021 Well i start working with the ZaZ Mod and i really love it. Im impressed by the furniture, which are there. And first i saw that mod, ive got a tons of Ideas into my mind. So im sitting here since a week and try anthing out to make my ideas come to reality. BUT then saw that any of wander oder SitTarget oder activateSpecialFurniture at the AI Package doenst work. So i want an NPC use some of the Furniture at the ZaZ. I thought id would be easy as letting ppl sit on chairs.... but it isnt. I try anything out, read anything i could here at LL but... i cant figure out why the Ai-Package doesnt work. Well first i have to say that the NPC is teleportet directly to the Furniture. But nothing happen. It simple stays there and do nothing. Well then I thought "Just take a look on the Horrefied Female Prison Mod to see how they do it" and i start to copy it. Without any success... I try to load my mod with that mod and copie the character and put the new Furniture into the Mod-Only AI Package... and still dont work. IM desperated as f**k because its now 2 weeks ago where i try to fix it, but i run out of my ideas and my private social contact run out of patient, that im sitting 8 hours everyday after work on my computer and just trieng out. I would be so thankfull if anybody could warm his heart and help me. Because i cant think of something else, wich give me dreamless nights, because i want it to function that hard.... Thanks for you time.
MTB Posted January 26, 2021 Posted January 26, 2021 3 hours ago, NexusVirus said: Well i start working with the ZaZ Mod and i really love it. Im impressed by the furniture, which are there. And first i saw that mod, ive got a tons of Ideas into my mind. So im sitting here since a week and try anthing out to make my ideas come to reality. BUT then saw that any of wander oder SitTarget oder activateSpecialFurniture at the AI Package doenst work. So i want an NPC use some of the Furniture at the ZaZ. I thought id would be easy as letting ppl sit on chairs.... but it isnt. I try anything out, read anything i could here at LL but... i cant figure out why the Ai-Package doesnt work. Well first i have to say that the NPC is teleportet directly to the Furniture. But nothing happen. It simple stays there and do nothing. Well then I thought "Just take a look on the Horrefied Female Prison Mod to see how they do it" and i start to copy it. Without any success... I try to load my mod with that mod and copie the character and put the new Furniture into the Mod-Only AI Package... and still dont work. IM desperated as f**k because its now 2 weeks ago where i try to fix it, but i run out of my ideas and my private social contact run out of patient, that im sitting 8 hours everyday after work on my computer and just trieng out. I would be so thankfull if anybody could warm his heart and help me. Because i cant think of something else, wich give me dreamless nights, because i want it to function that hard.... Thanks for you time. In SkyrimChainBeasts, I place NPCs in Zaz furniture and yes I remember getting them there was tricky...let me see if I remember correctly what I did: (First I move the NPC to nearby the device using a travel package then : ) Using a quest alias I give the NPC an activate package (see SCB_UseDeviceMultiplePackage001 (*)) where the target is the device they should enter. This works most of the time; they will walk to the device and enter it. However, it does not always work (sometimes they do not reach the device or decide to just stand next to it) so I also assign a fall-back script to that same alias: see SCB_UseDeviceVictimScript (**) and register the alias for a single update on timeout-interval (in the same script when I fill the alias) and if NPCs sit state on update is not >= 3 forcefully move the NPC to the furniture using the sequence: Scriptname MyFurnitureUserScript extends ReferenceAlias Event OnUpdate() Actor npc = getRef() as Actor ObjectReference device = (getOwningQuest().getAliasByName( "device" ) as ReferenceAlias).getRef() if ! (npc.getSitState() >= 3) npc.disableNoWait() npc.moveto( device ) npc.enable() npc.evaluatepackage() endif EndEvent However, NPCs will often be placed in the furniture at the wrong angle. To solve that, I also place the furniture in an alias (device) and have the following script on it (see scb_devicescript (***)): Scriptname MyDeviceScript extends ReferenceAlias EVENT onActivate (objectReference triggerRef) Utility.wait(0.2) ObjectReference device = getRef() triggerRef.translateTo(device.X, device.Y, device.Z, device.getAngleX(), device.getAngleY(), device.getAngleZ(), 20.0, 0.0) endEvent Hope this helps, happy modding. (*) (I have in parallel with a wait package for time out but I think that is just legacy and it does nothing anymore; the fall back is in the script, see below.) (**) This scripts also does some bookkeeping and uses a countdown but I think doing the force move above on a single timeout will work just as well. (***) I do more in this script, like setting up an automatic release after some time, but this code should be it for correcting the alignment.
NexusVirus Posted January 26, 2021 Author Posted January 26, 2021 Thank you very much. I must conf3ss im moving around ck witjout scripting and it worked for a lot of stuff so i think it would be such a case. I think i read that we cant do animation for furniture and can just make these things seperate and add them by script if im not wrong. ? But i think i will check it tomorrow and hope it worked. I have a lot to learn about scripting but i think i will learn it some... errr.... day ? But if i learned to script my modding will reach a new level... and perhaps my idea ive got in mind will be completely com reality and perhaps i will upload it... Thank you.
NexusVirus Posted January 26, 2021 Author Posted January 26, 2021 45 minutes ago, MTB said: using a quest alias I give the NPC an activate package what does that mean btw ? ?
MTB Posted January 26, 2021 Posted January 26, 2021 1 hour ago, NexusVirus said: what does that mean btw ? ? What the active package or the quest alias part? activate is a procedure (and package template) just like use activatespecialfurniture, sittarget etc. ( https://www.creationkit.com/index.php?title=Activate_(Procedure) ) to assign packages you use a quest aliases (see eg quest tutorial) So in detail: Create a new quest (eg GoToDevice). Add two (reference) aliases device (Find Matching Reference In loaded area, closets) Match Conditions: S HasKeyword Keyword: zbfFurniture == 1.0 npc (Specific reference : None - Be sure to tick optional). Under AI packages Choose New. (Give a name eg MyDeviceUseAI ) In AI: Set owning quest to GoToDevice, choose template Activate, fill the property target with: Alias -> device I've updated the text above a bit to be more complete, hopefully more non-scripter friendly - to create/assign the script: Choose add in the script section of the reference alias. Then choose new script and change the name eg to MyFurnitureUserScript. Right click and choose edit source and past the code above (the first line should already be there). When you save the file it will compile it as well. Similar for npc. Now to send an NPC to closest furniture: start the quest, put the npc in the alias and send the update command (eg for after 10sec). For example if you have another quest which has a dialog line "Go to furniture!" then in papyrus fragment End: you could have: GoToDevice.start() GoToDevice.ForceRefTo( akSpeaker ) GoToDevice.getAliasByName( "npc" ).registerForSingleUpdate( 10.0 ) (You would need to add GoToDevice as a property to the script...first create the script eg by just adding a comment ; and pressing compile then you can right click on the script, edit properties, add property Quest GoToDevice ) (Assume most of that you already knew but just trying to be complete...)
NexusVirus Posted January 26, 2021 Author Posted January 26, 2021 2 hours ago, MTB said: 24 minutes ago, MTB said: What the active package or the quest alias part? activate is a procedure (and package template) just like use activatespecialfurniture, sittarget etc. ( https://www.creationkit.com/index.php?title=Activate_(Procedure) ) to assign packages you use a quest aliases (see eg quest tutorial) well i know the activate... as i wrote i used it instead of sitTarget but it doesnt work either... but i dont know the quest aliases... can you probably make som3 screenshot of your AI Package and what you mean ? would help me a lot... Thx for your help...
NexusVirus Posted January 26, 2021 Author Posted January 26, 2021 Phh well now i see your whole answer... sry im in with android xD well thanx a lot... i will try it out tomorrow after work...
MTB Posted January 26, 2021 Posted January 26, 2021 12 hours ago, NexusVirus said: well i know the activate... as i wrote i used it instead of sitTarget but it doesnt work either... but i dont know the quest aliases... can you probably make som3 screenshot of your AI Package and what you mean ? would help me a lot... Thx for your help... UTD.7z Instead made a tiny mod so you can use study that/use it as a starting point; everything starts with UTD_ (use that device) so you can find the relevant scripts and quests easily. Not working quite as expected so I must not be remembering everything I did in SCB correctly but it works mostly anyway. Tell an NPC to go to device and, if there is one around, they will go to the closest one and stay in it till you tell someone else to go to device. Edit: And of course you will need the esp as well... added,.,, UTD.esp
NexusVirus Posted January 27, 2021 Author Posted January 27, 2021 wow... thx a lot for your help. I will. its perfekt for study... thx...
NexusVirus Posted January 27, 2021 Author Posted January 27, 2021 Hi again... ive took an look and... well its a great start... but i didnt figured out what to put where... And well, i dont know if we talk past each other... well how do i activate the script from start ? i just want that the npc is using the furniture by start the game ...and ive try to use the GoTO quest at the AI template Activate... but it doesnt work either... EDIT: and i still dont understand why horrofied femal prison, work without any scripts. Just the AI Package activateSpecialFurniture and then the furnitured is selected in the AI-Package...
MTB Posted January 28, 2021 Posted January 28, 2021 On 1/27/2021 at 6:25 PM, NexusVirus said: Hi again... ive took an look and... well its a great start... but i didnt figured out what to put where... And well, i dont know if we talk past each other... well how do i activate the script from start ? i just want that the npc is using the furniture by start the game ...and ive try to use the GoTO quest at the AI template Activate... but it doesnt work either... EDIT: and i still dont understand why horrofied femal prison, work without any scripts. Just the AI Package activateSpecialFurniture and then the furnitured is selected in the AI-Package... Thought you wanted to send them there dynamically. If you just want them to be there period, you can assign a package (like activate, similar to UTD_AI) or maybe the one in horrified female prison (have not looked at its code) with as target a fixed object reference (the device) in the NPC ai tab itself. Edit: Ran some tests and think I encountered the issue you were likely having. It seems the actor does not run its packages when the cell is loaded, and even if it does, it may not actually enter a device if that is its first action it is supposed to do. (Why o why I have no idea). It does, however, (mostley?) seem to work if the actor is disabled and then enabled, so that leads me to the following work around: Create actor and give them them them an activate package (can just use the template one, no changes needed). Place the actor in the target cell. For the created object set a linked ref to the device they are supposed to be in. Add the attached script to the object. The update UTD attached has an example actor in a wooden horse in the zbftestzone. Use: coc zbftestzone in the console to try it out. UTD_enterOnLoad.psc UTD.esp UTD_enterOnLoad.pex
NexusVirus Posted January 29, 2021 Author Posted January 29, 2021 oh man thank you... well im sp frustrated and when i write im and im calm down im so sorry for bothering you... and well thank you that much for taking the time and the patience with me and your kindness... some other wouldnt be so kind and patiend with me... i will try it out... ive got now a new version i didnt tested yet... yeah that give me hope...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.