-
Posts
40 -
Joined
-
Last visited
Everything posted by cenarius451
-
I already know that but thanks for the reply. Ah, so all i need to do is to link each button using the same keyword and for the last one i add it from the red ball marker on the elevator. Will try later on and report as i'm not on my FO4 pc now, thanks.
- 5 replies
-
- creation_kit
- script
-
(and 5 more)
Tagged with:
-
Hello. I'm trying to add several linked references at once to add a keyword for them. My idea is to use an elevator packin but it comes with three buttons (lower, upper, and middle) and i want to add two more so they can be activated in opposite sides on top and bottom to call for the elevator as shown in the pic below: When i check the properties window in the comment it says for the LinkCustom02 keyword "Link (chain) to the buttons that can move the elevator" But i don't know how to "Link Chain" references. Please help!
- 5 replies
-
- creation_kit
- script
-
(and 5 more)
Tagged with:
-
Script help - detect when a player uses a workbench
cenarius451 replied to cenarius451's topic in Fallout 4's Discussion
Thank you for your reply. Unfortunately none of the methods worked. I guess that's it uh? it wouldn't be the first time a function seems bugged in the CK, same happened with another script i made where i was spossed to detect if the player is moving and the function only detects when the player moves forward, not backwards or strafing left/right, or another when detecting if the player is in first person or third person, the function just doesnt work, period. A shame. Stop and start your quest the script is / scripts are attached to (see OnQuestInit). Make sure the "Run once" flag is unchecked (Quest Data tab). I got this error message when compiling: new event onquestinit cannot be defined because the script is not flagged as native I add the native flag on the sctipt and get tons of errors. I give up. Again, thank you for your reply. -
Script help - detect when a player uses a workbench
cenarius451 replied to cenarius451's topic in Fallout 4's Discussion
T Thank you for your reply. Unfortunately none of the methods worked. I guess that's it uh? it wouldn't be the first time a function seems bugged in the CK, same happened with another script i made where i was spossed to detect if the player is moving and the function only detects when the player moves forward, not backwards or strafing left/right, or another when detecting if the player is in first person or third person, the function just doesnt work, period. A shame. -
Script help - detect when a player uses a workbench
cenarius451 replied to cenarius451's topic in Fallout 4's Discussion
Where should i post this then? -
I'm trying to detect whenever a player uses a workbench, the armor one in particular. I've been trying the following script: Event OnInit() RegisterForTutorialEvent("ArmorWorkbenchEntered") RegisterForTutorialEvent("ArmorWorkbenchExited") EndEvent Event OnTutorialEvent(String asEventName, Message aMessage) If asEventName == "ArmorWorkbenchEntered" rep_IsInMenu.SetValueInt(1) debug.Notification("I'm in an armor workbench!") ElseIf asEventName == "ArmorWorkbenchExited" rep_IsInMenu.SetValueInt(0) debug.Notification("I'm out of an armor workbench!") EndIf RegisterForTutorialEvent("ArmorWorkbenchEntered") RegisterForTutorialEvent("ArmorWorkbenchExited") EndEvent This compiles but it doesn't trigger ingame. My idea is to set a global variable to check when the player is in a workbench mode (or menu as i imagined it at first). Couldn't find a better way of doing this but to try the tutorial thing, don't know if it's the correct approach. Please help me to solve this, i refuse to believe there is no way through a script to detect a player when he uses a workbench. Any ideas will be appreciated.
-
SSE Importing OBJ files into Nifskope Help
cenarius451 replied to Cithramir1987's topic in Skyrim's Creation Kit and Modders
Awful. I'm stuck, can't import obj into nifskope nor i can remove the dismember data on a nif file to keep just the new model. -
Help with NPC Looting Bodies Script
cenarius451 replied to cenarius451's topic in Fallout 4's Creation Kit and Modders
Well i'm back to modding. I tested your updated version, and it's cute and all but i don't like it because the furniture animation is nice but makes things too slow, that and looters seem happy to loot only ammo because they ignore armor and weapons, weirdly enough. I took a look at your script and they should take the rest. I don't know why they don't. Also they still loot in turns but even slower. I even have the time to follow them, and loot the bodies they find while they do the crouching and search animation, which is sad, and on top of it they aren't selected until 2 ingame hours according to your description above? that makes it so i see the three looters at drumlin dinner do nothing after they loot their bodies, while there are several bodies remaining to be looted. That's why i prefer to keep working on the older mod, with some tweaks it can be improved. I'll give the fight with the script and see if i can make the timer shorter and quicker without interrupting a looting process, so i don't have to wait much for a looter to be chosen because for me that's the main problem, i can accept them being chosen in turns at random but looters are chosen too slowly. -
Help with NPC Looting Bodies Script
cenarius451 replied to cenarius451's topic in Fallout 4's Creation Kit and Modders
I will take a look into this in the future. Right now i'm playing and enjoying my game :p -
Help with NPC Looting Bodies Script
cenarius451 replied to cenarius451's topic in Fallout 4's Creation Kit and Modders
Well i'm not planning to learn coding. When i said i wanted to learn i meant about the CK and its capabilities, and your coding is just beyond me. Also you sure you sent the right file? this seems to add containers and looters. I also didn't want to mess with containers in your first mod, Quest items are a concern and it's already risky to make npcs loot bodies that might have quest items on them, even when i know they are not deleted just moved onto other npcs but what if let's say Carla loots a quest item? the marker will probably show on her but you would never retrieve it unless it's for sale (would be hilarious and hope it could happend sometimes)? or what about any other npcs you can't kill and loot? risky already. And seriously, steal my idea and make an immersive mod with it. I have a request though,it would be nice if you make a change to your script to allow more looters and bodies, because i tried but i won't be able to make it as the script you made was made with only one looting in mind, or if there is a way to reduce the timer to lets say 5 seconds unless there is a looting happening? in which case the timer would stop?, so if the process "take turns" when looting at least this would allow it to be faster. Right now for example a looter finds a body but there are also two other bodies nearby, the looter loots the first one and then runs away to its original possition, then goes back and loots the second one, and so on, sometimes it even picks a different npc so the looting looks like it's made by turns even when the first looter is closer to the bodies, it doesn't look cute (though still a minor complain, i'm really happy how it works as it is anyway). A way to improve this would be to once a looter is chosen after a body is located, make the looter loot the first body, and then the 5 second timer would give the looter enough time to process a second looting, and a third and a fourth if there are bodies around the looter. Then if there is no bodies left, restart the alias quest so it could pick other looters as well, though idk how to make it because the alias quest now at least in my edit also contains the looter which is what makes possible to pick different looters as your original mod kept the looter even when he died as shown in the third testing video i made. I really hope you do more stuff and release this mod in the future. In the meantime here is my edit and the mod i'm playing with: https://drive.google.com/file/d/1Gq0O21iYt54his332aRcJqhFQrs-_OqM/view?usp=sharing It works 100%, npcs loot around players (exceptions would be insects, as there are too many to process, like radroaches). -
Help with NPC Looting Bodies Script
cenarius451 replied to cenarius451's topic in Fallout 4's Creation Kit and Modders
@LarannKiar - You should do this mod, you are clearly better than me, i just know how to cut and paste code and try to make it work, besides i just gave the idea for this, i bet this mod would be far better if someone with more knowledge about what can and can't be done with the CK handles it, i mean the trick with the alias quest? seriously i would have never solved that issue. Still i'm happy with your mod as is and will tweak it the best i can. The only concern i have is about the number of bodies and how the game will handle them but worst case i will destroy the bodies the moment the npcs loot them, will look ugly but hey better than a bloated save. -
Help with NPC Looting Bodies Script
cenarius451 replied to cenarius451's topic in Fallout 4's Creation Kit and Modders
Forgot to mention, the reason why gunners don't attack me is because i have a mod that turns them neutral, i can even take jobs from a couple gunners added. The mod is called "Gunners Overhaul". In case soeone reads and learns from this. -
Help with NPC Looting Bodies Script
cenarius451 replied to cenarius451's topic in Fallout 4's Creation Kit and Modders
Well, it didn't work. Mmm, i'm clueless now, will wait for some help while i keep testing. EDIT: Well crap, i'm dumb. Forgot to untick the "allow dead" and "allow destroyed" . @LarannKiar my dude, thank you so much again for all the help. I have a mentor now. Will have some fun tweaking and getting fancy with this, first will be adding 2 maybe 3 additional looters and bodies to rush things a bit and make several actors interact with bodies at the same time (sound bad but you get me), i plan to add special behaviors on animals and even add a misc item that you can put on favorites so you can order dogmeat to search for bodies without looting them. -
Help with NPC Looting Bodies Script
cenarius451 replied to cenarius451's topic in Fallout 4's Creation Kit and Modders
Well, bad news. I was wrong about the packages working the first time and stopping working, they work as usual, i just thought the npc near the bodies were looting them from the distance, but the problem is even more weird, it's the first looter who never changes. Remains the same and "loots" the bodies from whenever distance the body is, even when dead :/ As shown in this video: My question would be if there is a way to re-fill the Looter using the quest system? maybe declaring the looter in the same quest alias as the body? because that part works flawlessly, the new bodies are recognized and filled, old ones and new ones created. Also @LarannKiar where should i put that code? sorry i'm still lost and trying to catch up with your method. -
Help with NPC Looting Bodies Script
cenarius451 replied to cenarius451's topic in Fallout 4's Creation Kit and Modders
Maybe the looter gets stuck and only the bodies cycle? Here it is the update script. Would this make sense? was kinda tricky to put the cleared aliases. Scriptname TEMP_S extends Quest Group Looters ReferenceAlias Property Alias_Looter Auto Const endGroup Group Corpses ReferenceAlias Property Alias_Body01 Auto Const endGroup Group Quests Quest Property TEMP_Q_for_Aliases Auto Const Quest Property TEMP_Q Auto Const endGroup Group Globals GlobalVariable Property TEMP_G_01 Auto Const GlobalVariable Property TEMP_G_PackageFinished Auto Const endGroup Group Keywords Keyword Property TEMP_K_Looted Auto Const endGroup Event OnQuestInit() StartAliasQuest() ;START the quest TEMP_Q_for_Aliases. Corpse alias fill conditions are there. The Alias_Body01 ref alias on this quest is linked to that ref alias. EndEvent Function StartAliasQuest() if TEMP_Q_for_Aliases.IsRunning() == 1 ;failsafe TEMP_Q_for_Aliases.Stop() endif Utility.Wait(0.5) ;wait for stopping... if TEMP_Q_for_Aliases.IsRunning() == 0 ;Start the alias quest TEMP_Q_for_Aliases.Start() endif Utility.Wait(0.5) ;wait for the aliases to get filled... If Alias_Body01.GetReference() == none ;Alias has not been filled (fill conditions are not met) StartTimer(20, 255) ;try to start the alias quest again. (LOOP timer) Else StartLoot() EndIf EndFunction Event OnTimer(int aiTimerID) if aiTimerID == 255 ;LOOP timer StartAliasQuest() EndIf If aiTimerID == 555 ;FALSE TIMER: if the actor can't loot the body in 60 seconds, abort the package End_Loot() Endif EndEvent Function StartLoot() TEMP_G_01.SetValueInt(1) ;for the packages (Alias_Looter.GetReference() as Actor).EvaluatePackage() StartTimer(60, 555) ;failsafe: if the looter can't path to the body, abort the package ;WAIT FOR PACKAGE STOP EndFunction Function End_loot() ;called from package "on end" fragment / falsafe timer (ID: 555) If TEMP_G_PackageFinished.GetValueInt() == 0 ;function was called from the falsafe timer if TEMP_Q_for_Aliases.IsRunning() == 1 TEMP_Q_for_Aliases.Stop() endif TEMP_G_01.SetValueInt(0) TEMP_G_PackageFinished.SetValueInt(0) StartTimer(2, 255) ;start again LOOP timer. For the failsafe timer, no need for 20 seconds. ElseIf TEMP_G_PackageFinished.GetValueInt() == 1 ; ;function was called from the package "on end" fragment LootProcedure() MarkBodyAsLooted() if TEMP_Q_for_Aliases.IsRunning() == 1 TEMP_Q_for_Aliases.Stop() endif TEMP_G_01.SetValueInt(0) StartTimer(10, 255) ;start again LOOP timer EndIf EndFunction Function MarkBodyAsLooted() ;AliasColl_LootedBodies.AddRef((Alias_Looter.GetReference() as Actor)) ;add looted bodies to a ref coll alias. Ref coll actors have a keyword that prevents the looter from looting them again. Remove the looted bodies one by one with a Game Timer. LootedBody_01_Actor = (Alias_Body01.GetReference() as Actor) LootedBody_01_Actor.AddKeyword(TEMP_K_Looted) Alias_Body01.Clear() <----------------------- Alias_Looter.Clear()<------------------------ StartTimerGameTime(0.5, 355) ;looted body has to have this keyword for at least two hours. (so looter won't loot this body in this period). EndFunction Actor LootedBody_01_Actor Event OnTimerGameTime(int aiTimerID) If aiTimerID == 355 RemoveLootedBody() EndIf EndEvent Function RemoveLootedBody() LootedBody_01_Actor.RemoveKeyword(TEMP_K_Looted) LootedBody_01_Actor = none <-------------------- EndFunction Function LootProcedure() ;called rom package "on end" fragment. This is the actual "loot function". If (Alias_Body01.GetReference()) != none && (Alias_Looter.GetReference()) != none (Alias_Body01.GetReference() as Actor).RemoveAllItems((Alias_Looter.GetReference() as actor)) EndIf EndFunction -
Help with NPC Looting Bodies Script
cenarius451 replied to cenarius451's topic in Fallout 4's Creation Kit and Modders
Mmm i thought the aliases would overwite themselves ontimer? i could add an "Alias_Looter = none" and same for body but i thought they would re-fill every time the quest restarted. Also what did you mean then with the "GetDistance" option? seems fine to me as if there is a body it will calculate the closer looter around if there is any, if there is no body there will be no looter... unless an earlier looter got stuck in the alias? In the meantime, another video showing my observation, the "looter running" occurs only at the beginning. This time it grabbed the chems vendor from the house. Don't know why it ignores the gunners. At the beginning of the video i was expecting the raider i mentioned earlier but never appeared, and all of a sudden the chems vendor appeared. -
Help with NPC Looting Bodies Script
cenarius451 replied to cenarius451's topic in Fallout 4's Creation Kit and Modders
Interesting indeed, as i noticed the npc "running" towars the body only works for the first one, it never happends again, but the bodies are looted, one by one, as shown in the video. Something related with the package i guess. I followed your idea and have the looter set as the following: As expected it also works. Hope adding more bodies and looters doesn't impact the performance overall. Will continue playing and testing. -
Help with NPC Looting Bodies Script
cenarius451 replied to cenarius451's topic in Fallout 4's Creation Kit and Modders
Already did that, alongside with "weapon drawn". I limited the quest to filter only actors with the "ActorTypeNPC" keyword and things got a bit faster, got to see a raider running and looting the exact same body the cat looted in that video, god knows where he was. A shame because i liked the idea of animals looting preys as well. We'll see, in the meantime i will play with the mod as it is and see how things go. Maybe adding more looters and bodies at the same time, we'll see. Thank you very much. This was a nice discovery for me. -
Help with NPC Looting Bodies Script
cenarius451 replied to cenarius451's topic in Fallout 4's Creation Kit and Modders
@LarannKiar After some tweaking and testing to for example excluding companions and turrets of being looters, i come to the conclusion that your little mod works... but the only think is that it takes its bloody damn time to npcs to loot. I wonder if would be possible to hurry up npcs a bit? -
Help with NPC Looting Bodies Script
cenarius451 replied to cenarius451's topic in Fallout 4's Creation Kit and Modders
"Alias_Looter.ForceRefTo(an actor's reference)" I tried that but my script didn't compile, said "incompatible" values or something. Oh well, another day squeezing my brain. Seriously thanks for the help ;) -
Help with NPC Looting Bodies Script
cenarius451 replied to cenarius451's topic in Fallout 4's Creation Kit and Modders
Mm, your method doesn't work on my game, i don't even get the notifications. -
Help with NPC Looting Bodies Script
cenarius451 replied to cenarius451's topic in Fallout 4's Creation Kit and Modders
Ah, thanks for this, but what i'm trying to do is to detect alive npcs near a body and select them as looters. Your method uses a forced vault dweler as the looter which the game already does with quest "REActorAttach02" (raiders stripping bodies). So my guess is that this would work as a new random event then? not what i wanted tho. Will keep looking for this sure, but i guess you can't fill aliases through script? if so then this method is useless, will need to find some other way :/ EDIT: Wait, spoke too soon? maybe if i do this? And i had to uncheck "allow disabled" because some mods put disabled actors and enable them though script. Not cute but it works, i've used the method so disabled npcs shouldn't count towards looters. -
Help with NPC Looting Bodies Script
cenarius451 replied to cenarius451's topic in Fallout 4's Creation Kit and Modders
Thanks, and please post everything, i want to learn. -
Help with NPC Looting Bodies Script
cenarius451 replied to cenarius451's topic in Fallout 4's Creation Kit and Modders
I made some discoveries. What was preventing to my script to keep going was the damn PathToReference. And it never worked, so instead i discovered a different method: AI Packages. So i made 3 AI Packages, one for each body to loot: I pointed them to my quest so i could get the corpse aliases as the travel destiny. Then i set a global variable so the package doesn't apply until i change it in my script, making (or forcing most likely) the NPC to move onto the destination (the body): The idea is to make 3 globals and change their values to 1 each if, in theory, finds up to 3 bodies. The cute thing about this method is that once the package finishes i can attach a fragment on the "End" state to do the looting (basically removing all items and passing them to the looter aias, and then give the keyword to it that says it's already looted). I can even put an idle animation there. Could be more bodies and cute stuff but i can get fancy later once this works, if it works (which it doesn't). Then in my quest i add several aliases: And set them as the following: Looks cute and all but thi would work only once. Ingame this doesn't work as it is, so maybe there is a way to make it so this repeats? here is the updated script: Scriptname NPCLootingScript extends ReferenceAlias Actor Property PlayerRef Auto Const int Property TimerDuration Auto Const Keyword Property ActorTypeNPC Auto Keyword Property RELootedCorpse Auto Const Alias Property ACorpse1 Auto Alias Property ACorpse2 Auto Alias Property ACorpse3 Auto Alias Property ALooter1 Auto Alias Property ALooter2 Auto Alias Property ALooter3 Auto GlobalVariable Property NPCLootingGlobal Auto Const GlobalVariable Property NPCLootingGlobal2 Auto Const GlobalVariable Property NPCLootingGlobal3 Auto Const Event OnInit() Self.StartTimer(TimerDuration, 5) EndEvent Event OnTimer(int aiTimerID) Debug.Notification("Script running") If !PlayerRef.IsInCombat() If ALooter1 && ACorpse1 NPCLootingGlobal.SetValueInt(1) EndIf If ALooter2 && ACorpse2 NPCLootingGlobal2.SetValueInt(1) EndIf If ALooter3 && ACorpse3 NPCLootingGlobal3.SetValueInt(1) EndIf EndIf Self.StartTimer(TimerDuration, 5) EndEvent Like i mentioned before, this doesn't work, however i think i'm moving into the right direction. The idea for this quest was to let the engine do the searching work, searching for bodies and looters and filling things for me, but i doubt this will work. The other method would be doing the search through script as i did before but when trying to fill the aliases i had some problems that made me doubt. So my question would be if there is a way to make the quest reset their aliases so it searches constantly for npcs to fill them? if no, is there a way to fill the aliases through script? -
Help with NPC Looting Bodies Script
cenarius451 replied to cenarius451's topic in Fallout 4's Creation Kit and Modders
Thanks, i will look into it, but i'm not done yet. Here is a modification to my script that i attached to EncGunner01Template Here is the code: Scriptname IndNPCLootScript extends Actor Const int Property TimerDuration Auto Const Keyword Property ActorTypeNPC Auto Const Keyword Property RELootedCorpse Auto Const int Property distance Auto Const Event OnInit() Self.StartTimer(TimerDuration, 5) EndEvent Event OnTimer(int aiTimerID) Actor Looter = Self as Actor Actor Corpse1 = none Actor Corpse2 = none Actor Corpse3 = none If !Looter.IsInCombat() Debug.Notification("Script running") ObjectReference[] NPCs = Looter.FindAllReferencesWithKeyword(ActorTypeNPC, distance) int i = 0 int Size = NPCs.Length as int If size > 10 size = 10 EndIf While i <= Size Actor MyActor = NPCs[i] as Actor String name = MyActor.GetActorBase().GetName() if MyActor == Looter NPCs.Remove(i) ElseIf MyActor.IsDead() && !MyActor.HasKeyword(RELootedCorpse) If !Corpse1 Corpse1 = MyActor as Actor Debug.Notification("Corpse1 found") ElseIf !Corpse2 Corpse2 = MyActor as Actor Debug.Notification("Corpse2 found") ElseIf Corpse3 Corpse3 = MyActor as Actor Debug.Notification("Corpse3 found") EndIf EndIf i+=1 EndWHile If Looter && Corpse1 Debug.Notification("Processing looting1") Looter.PathToReference(Corpse1 as ObjectReference, 1.0) Corpse1.RemoveAllItems(Looter) Corpse1.AddKeyword(RELootedCorpse) Utility.Wait(5) EndIf If Looter && Corpse2 Debug.Notification("Processing looting2") Looter.PathToReference(Corpse2 as ObjectReference, 1.0) Corpse2.RemoveAllItems(Looter) Corpse2.AddKeyword(RELootedCorpse) Utility.Wait(5) EndIf If Looter && Corpse1 Debug.Notification("Processing looting3") Looter.PathToReference(Corpse3 as ObjectReference, 1.0) Corpse3.RemoveAllItems(Looter) Corpse3.AddKeyword(RELootedCorpse) Utility.Wait(5) EndIf EndIf Self.StartTimer(TimerDuration, 5) EndEvent Attached to the npc: But of course, it doesn't work: I spawned EncGunner01Template but did nothing. Also it doesn't show any notifications. Any ideas? i wonder if it's even possible to go this way.