-
Posts
103 -
Joined
-
Last visited
Everything posted by corrado33
-
[LE] Ideas for a truly useless follower?
corrado33 replied to nerdofprey's topic in Skyrim's Creation Kit and Modders
You always ragdoll on death, it's not unique to falling. Death isn't something like a spell where I can just copy the script, unfortunately. Why not just apply the paralyze effect until he is hit with something, then he runs away (fear) then when he gets hit again paralyze, etc. -
I ended up doing something similar to that. I made Mod A a master (simply by changing the extension to esm, then opening/saving it in creation kit), then opened mod B while have mod A (master) open. Then I did stuff and saved Mod B. That worked fine. I did not, however, attempt to "espify" mod A again. I will try that now. EDIT: Thanks :)
-
If I have two mods, say mod A and mod B. Mod A adds a player house to the game. Mod B adds a chest to that house. If I load mod A then Mod B and try to coc to the location, everything in the house is gone. (Except for the chest.) Do I literally have to replicate the house in mod B if I want it work?
-
I figured it out (last night actually.) And it came with a major revelation. The solution is essentially what is above. Quests.... are NOT quests. Quests are global objects used to store variables and other things that should be accessible to other scripts/quests within skyrim. Once I figured THAT out, I simply added an empty quest alias to my quest that runs at startup (called myChest) and used referencealias property myChest auto myChest.getref().whatever I want to do And it works great. That's really weird the way that works. I wish someone had told me a long time ago that quests weren't quests, but rather ways of storing data. I was wondering about that ever since I started. Kept saying to myself "Why does everyone want to create a damn quest to do this thing that has nothing to do with quests?"
-
Script A, attached to a misc item, to be placed in a chest. Scriptname kCraftingChestItemScript extends ObjectReference objectReference Property linkedChest auto Event OnContainerChanged(ObjectReference akNewContainer, ObjectReference akOldContainer) if (akNewContainer != Game.getplayer()) linkedChest = akNewContainer endif endevent Script B, attached to a quest that's launched via spell blah blah (This script works fine if I manually assign the property "linkedChest" to any chest in the game) EDIT: The scripts compile... but I don't receive the objects from the chest. Scriptname kCraftingAutoRetrieveScript1 extends ReferenceAlias kCraftingChestItemScript Property remoteObject Auto Event OnActivate(ObjectReference akActionRef) remoteObject.linkedChest.RemoveAllItems(PlayerRef) endevent
-
I have a quest that I trigger with a spell. This quest runs another quest that has a dozen or so aliases that are picked based on being nearby and matching a formlist. This all works great! What I want to do is make those specific objects glow when they are picked as the quest alias. I figured I could use the "Play" function, but I can't seem to find a matching event? Would it be "OnInit"? Since the quest is being triggered by the spell, would it run "onInit" every time? Or just the first time it's run? My testing shows that it runs when the game is loaded, and everytime the spell is cast, however I don't think it'll run on every alias. For testing I added the following event to the script that runs on the quest aliases. event OnInit() debug.notification("In Init") endevent When I cast the spell (near the items I care about) it only displays "In Init" once, meaning it only ran once, even if I'm surrounded by multiple of the items I care about. If I'm trying to make ALL of the objects glow, I doubt this'll work. So which... event do I need? EDIT: Also, how do I reference the object that's... being referenced by the alias? If I use "self" it just returns the reference alias, not the object that's currently filling that alias.
-
I've spent the last couple of hours trying to figure out why the following tutorial didn't... work. After reading through a solution on the skyrim mods subreddit, I've distilled it down to the actual solution (and removed all the things that didn't matter.) I don't have an account over there (and I figured someone here does.) On this page.... https://www.creationkit.com/index.php?title=Dynamically_Attaching_Scripts in the "Attaching Scripts to Objects" section. Please make the following changes. Under "Create the First Quest" After the "Click OK to close the alias window," please add the following line: "Go to the Quest Data tab, then uncheck the "Run Once" box and give the quest an ID in the "ID" box. In this tutorial, we will use the ID "DASQuest". That should fix the tutorial and make it work. I only ask because there are 2-3 unanswered threads on here asking the same questions about the same tutorial.
-
I don't understand.... Scriptname chestActivatorScript extends ObjectReference FormList Property kTestFormList Auto Event OnItemAdded(Form akBaseItem, int aiItemCount, ObjectReference akItemReference, ObjectReference akSourceContainer) kTestFormList.AddForm(akBaseItem) debug.notification("FormListLength: " + kTestFormList.GetSize()) endevent The addform page says that addform accepts a form, and akBaseItem is a form... However, even IF I populate the form list in CK and just run the 2nd line (displaying the length of the form list) it still doesn't work. Even IF I use a form list that exists in the game (say, "rubies") the "GetSize()" still doesn't work. I have to be doing something wrong. EDIT: Turns out you actually have to... you know... pick the property in the... properties dialog...I'm an idiot.
-
Are there ways to have a list of a LOT of objects? Arrays can only be 128 long (right?) My favorite player house has a script for the workbench and stuff to transfer items from a chest to the player so that you can use items out of the chest instead of carrying them. BUT, it doesn't do it... adequately. It has a bunch of named chests for every type of weapon/smithing resource, etc, but the workbenchs don't pull from those named chests, therefore it essentially makes those chests... useless. So I wanted to write a better script, but the problem I've run into is... well... what if a chest has more than 128 items in it? I could make some fancy scripting that uses multiple arrays, but that seems... annoying. I'm sure someone has figured this out by now. Does the skse function CreateFormArray allow for more than 128 elements? It says it's possible to create arrays longer than 128 elements, but it doesn't say if you should do that or not...
-
If you haven't already you might check out https://www.creationkit.com/index.php?title=Category:Papyrus As boring as it's going to be it's worth at least browsing through the list of all the different functions to know what's out there. You don't necessarily need to understand what they all do immediately. But later having seen the names, it may prove useful to remember that something might exist to do what you want. Ah! I had been to that specific site but was unaware that it listed all available commands. I thought you had to go into each individual... part (like object reference) It's perfect! Thanks.
-
I've programmed a mannequin outfit switcher script and have added pullbars behind all of the mannequins in the vanilla houses. However, in proudspire manor, using the pullbars and then leaving the cell and returning causes the armor duplication glitch. It does NOT happen in riften (haven't checked elsewhere yet.) Anyone know how to fix this? The script is essentially ;equippedItems is a form list of all of the items equipped by the mannequin while (counter > numItemsEquipped) mannequinForm.removeitem(equippedItems(counter),1,TRUE,game.getplayer()) game.getplayer().equipitem(equippedItems(counter),FALSE,TRUE) counter += 1 endwhile and does the same in the opposite direction for the stuff the player has equipped to the mannequin. The script works great, but if it causes this glitch it's... very annoying. EDIT: I have literally nothing else installed other than the DLC and legendary edition patch and my mod.
-
I'm making a mod with a lot of pull bars (GenPullBar01) but I like to make them smaller than they are originally. However this makes activating them a bit annoying because you almost have to be pixel perfect. Can I make the activator size bigger while making the model smaller? EDIT: I tried creating an invisible activator "a multibound cube" and making it completely encompass the pull bar but it seems I know nothing of creating activators because I couldn't activate it.
-
[LE] Ideas for a truly useless follower?
corrado33 replied to nerdofprey's topic in Skyrim's Creation Kit and Modders
Make him cast fireball.... at his feet. Then beg to be healed. (But is essential of course.) Make him aggro enemies.... then run around scared making it difficult to catch the damn enemies. -
[LE] Ideas for a truly useless follower?
corrado33 replied to nerdofprey's topic in Skyrim's Creation Kit and Modders
Randomly leaves your side to walk off in some other direction only to come running back a few seconds later followed by a dozen or so enemies. (Of course having lost his weapon and some of his armor.) Or basically anytime he gets too far away from you. Constantly pisses off guards (Some followers do this already by accident.) -
Say I'm making a mod that adds something to some of the vanilla houses. How... can I test those in game without actually... playing through the game? If I coc to their cell, the house is just empty with no decorations. How can I force the decorations to show up via the console? I tried completing the required quest for Hjerim then speaking to the steward, but that doesn't work.
-
Say I put the following script on a chest. event onActivate(objectReference akActivator) int mannItems = self.GetNumItems() int counter = 0 debug.notification("TotalItems: " + mannItems) while (counter < mannItems) self.removeitem(self.GetNthForm(counter),1,TRUE,game.getplayer()) counter += 1 endwhile endEvent It will transfer everything in a chest to the player. It works great. But... it won't let me then transfer the items BACK to the chest. It's like it continues to run forever. If I try to put something that's been transferred to me BACK into the chest, it'll just give it right back to me. How cant I make it... not do this? EDIT: Geeze programmer's curse strikes again. As soon as I ask for help I figure it out. change counter += 1 to mannItems -= 1
-
I must be doing something wrong. I have two computers running skyrim. (I know... stupid, but it's for a good reason... mainly that I don't want to screw up my main install.) I develop the mods on my main computer using my main install as the base, but then I transfer my .esp file and any scripts I use to the other computer for testing (completely vanilla install.) So I duplicated an object in the creation kit, and the creation kit says it has a form ID of 02XXXXXXXX whatever. But if I enable another file before my esp file, that form ID gets changed to 03XXXXXXX, and on the other computer it's 0AXXXXXXXX. I realize this is because for DLC the order of install changes the 2nd number, but why can't I just create a completely unique (and static) form ID? How on earth can I script an item with a changing ID? Is there a command to find the first two characters of the form ID? (The rest were the same.) EDIT: Turns out "getformfromfile" is what I wanted.
-
How to change script reference in game?
corrado33 replied to corrado33's topic in Skyrim's Skyrim LE
Thanks for advice, however I don't think I was clear enough in the OP. I want a way to dynamically set the "target container" of a script. I'm well aware of how to sort things via script into different containers. I think I could use your second bit of code except it's missing the main part that I want. Namely how to get an object reference from in game to the script. So let's say this. I have a button in a test cell next to 15 chests. I want to be able to cast a spell at or crouch activate ONE of the chests to mark it as "target." Then I press the button and my script runs and it adds items to that specific chest. However, I don't just want this to work in my test cell. I want it to work ANYWHERE (meaning I don't already know the formIDs of the chests, they're not contained in my .esp file) So if there were a "storeFormInFile" function I could use that. I could also use a special "object" placed in the special "chest". The object would be part of my mod. But then how on earth would I search through every container of a cell to find which form contained my special object. Optimally, I'd like to have a way to create object pairs and store them some way, so that I can "link" say a mannequin and a chest. (But again, ANY mannequin and ANY container, not just ones in my specific test cell.) Then, I could press a button and that mannequin would pull items from that container to "auto dress." Sorry, I know I must be confusing, I'm very new to skyrim modding. ;( -
Say I have a script that moves items into a chest. But I want to be able to change which chest it moves things into in game. How... would I do that? The way I would do it in CK is simply to change the reference in the script properties. I've seen mods do this via a custom spell, and I've seen mods do this via crouch activating. Unfortunately none of those mods have script source codes :(
-
I've seen a few mods that used a spell to set the "target" of the script. Mainly the "dynamic auto sort" mod. Basically you cast a spell at a forge or something then that forge can access all of the items in all of the mod's chests. I want to know how that worked. How can I use a spell to mark a chest as "special" and then refer to that "special" chest in a script? Or better yet, how can I do that in GAME in ANYWAY. Whether by putting something in the chest, or by crouch activating it, etc.