-
Posts
94 -
Joined
-
Last visited
Everything posted by dalsio
-
You might be confusing "multi-threading" with simply having more than one thread, as well as what a thread actually is. A thread is essentially a computer's "train of thought". It's a series of instructions (like lines of code) that are sent to the CPU that MUST be executed in sequence, without skipping. All computers work this way in that a single CPU core can only process one instruction at a time, in the order that it is given to it. You can have more than one thread but unless they are multi-threaded, they have to each wait their turn to be sent to and executed by the CPU core. When you have multiple scripts running in Skyrim at any given moment, they aren't actually running on separate threads. Instead, Skyrim's engine combines the scripts into a single thread that is then sent to the CPU. Simply making two different scripts does not make two different threads that are multi-threaded, as that would require intricate control of skyrim's engine. Multi-threading specifically refers to allowing two or more threads to each execute on their own CPU core simultaneously which means that you need to remove any dependency of one thread on another. Splitting something up between threads means you remove as much inter-dependency between the two parts of code to be threaded as possible; any communication, passing of variables, sharing of lists, etc. must be kept to a minimum if not removed altogether. If the two threads were constantly communicating with each other, that would cause one core to sit idle waiting for the other core to communicate to it and vice-versa, as well as introduce overhead due to cores having to constantly communicate with each other which would negate the performance benefits of multi-threading. Synchronization, on the other hand, requires that each object either "talks" to each other, or talks with a common controller/timer that is constantly regulating movement and timings. This inherently requires that the scripts become interdependent. Multi-threading is for better utilization of multiple cores for the sake of performance, not for synchronization. Any time you see synchronization in games, what you're actually seeing is each subsequent action being performed a fraction of a millisecond after the other (depending on how many lines of code came between the two actions), so fast than a human wouldn't notice.
-
[LE] Adding custom armor to standalone follower
dalsio replied to kayden87's topic in Skyrim's Creation Kit and Modders
If you simply want to add the armor from another mod to the follower, then all you need to do is load the armor mod's plugin, load your follower, and then follow the steps I outlined above. It's that simple. The editor should make your follower plugin dependent on the armor plugin automatically (which means that if the follower plugin is loaded but the armor mod plugin is not installed, the follower plugin will not work). Now, if you're okay with your follower mod being dependent on that mod, then you're done. If, however, you don't want it independent, you would need to incorporate that armor into your follower mod which would require TES5Edit. If you're doing that for personal use, then just use TES5Edit to merge the two mods (or ask again if you need to know how). If you want to then release that follower, you would need to first get permission from the author of the armor mod to use their armor. If, however, you don't want your mod to be strictly dependent on another mod and you can't or don't want to integrate that armor plugin into your follower plugin but rather check to see if a mod is installed before adding that armor to your follower, then you would need to use a bit of complicated scripting as palingard stated. -
[LE] Adding custom armor to standalone follower
dalsio replied to kayden87's topic in Skyrim's Creation Kit and Modders
In the Object Window of the CK, go to the section named "Outfit". Right click, "New". In the box labeled "ID" type in a unique name without spaces. Back in the Object Window, go to the "Armors" section and scroll to the custom armor. Click and drag the armors from the window to the "Editor ID" section in the outfit's Properties window. Then, go to the section in the Object Window named "Actors" and find the npc you're looking for. Double click the entry to open the npc's properties. Go to the inventory tab, if it isn't already there. Under the "Default Outfit" dropdown menu select the outfit you made. Click OK. Save the plugin. Enjoy! -
[LE] Quick Questions, Quick Answers
dalsio replied to Elias555's topic in Skyrim's Creation Kit and Modders
Ah I see what you mean. You have a bunch of plugins each containing separate changes that you were wanting all in one plugin; to merge them all together. You can do this easily with TES5Edit, which is a free tool, but that would require you to learn how to use it. However, eventually if you want to produce mods you'll want to learn it because it's very useful both for mod consumers and mod producers. Basically, it's a tool that presents plugin information in a way that is different to the editor. Instead of showing you the final state of the game after all changes are made (the way the editor does), it separates out each change or addition a plugin makes as a list of entries, or "records"; kind of like the difference between an encyclopedia (editor) and a series of news articles (TES5Edit). In this way, you can load all your plugins and basically copy the records in each of them into one file. Can you not test it? If it's a simple vanilla follower then it shouldn't be too complicated, and so if it works for you it probably works for everyone. Still, if you want someone to test it I can do so. Upload it to a file hosting site (like mediafire or dropbox or something like that) and pm me the link. I'll give you feedback there. -
Is there a reason you don't want to use arrays? The script is larger because it has to run loops that take each object and execute an operation on it one after another. Realize that this code is acting as a controller script for all the objects in the room, replacing code that was once attached to each individual object. If you want them to all be synced, you need to operate on them all with the same script, which means this is the smallest it can be (without using a single array and a coordinate system). It doesn't matter how many types of objects there are, when doing it this way you need to reference every single ObjectReference individually. That means every "piece" of tube, railing, etc. has to be given to and operated on by the script meaning without an array, you would need an extra line of code for every operation on, every property containing, and every reference to, each of the sections of every rail and tube that needs to be moved. Putting them in an array allows you to have one line of code for the property declaration, and only a few lines of code to operate on all of them using a while loop. If there are more than 3 objects or "pieces", regardless of their type, I highly suggest using an array. Less code, less work, less room for error, less execution time, etc. You don't have to split them up into different arrays for different sides if you don't want to, I just had them split for the sake of grouping so that each side can be controlled as a unit.
-
[LE] Quick Questions, Quick Answers
dalsio replied to Elias555's topic in Skyrim's Creation Kit and Modders
You'd need to ask the moderators about that to be sure. I suspect tho that since most TV shows are protected under copyright that you would need to obtain permission to use their audio. That said, you can do anything you want on your computer for your own personal use. Its when you wish to share it with others that you get into the need for permission for assets that you use. You can also always post that on a smaller, more obscure website that doesn't care. With the Nexus however, I think that at the end of the day it's always best to check with the moderators just in case. Because of their size, they are a big target for copyright claims. That being said, I think it would depend on what sound clip you're using and how much of it you use. If you're putting large chunks of a single episode, or if there is copyrighted music in it, then that's probably a bad idea. If you're using small clips and especially because it's TV rather than a movie or music, then it's probably safe to use. Still, ask a moderator. -
[LE] Quick Questions, Quick Answers
dalsio replied to Elias555's topic in Skyrim's Creation Kit and Modders
I understand your confusion. Saving in the CK is a bit different than saving in most other programs due to the unique ability of one plugin to become dependent on another (like most of your plugins being dependent on Skyrim.esm, the actual game). Let me try and explain how it works: When loading Skyrim.esm (and any other mods/dlc you might be using), by default you start without an "Active" plugin set. This means that when you make changes to the game, you're making those changes in a new plugin that is yet to be named or saved, regardless of what plugins you have loaded. When you save, it asks you to name your new plugin containing all those changes. It is as this point that the editor (if it does not crash) then automatically makes that plugin your "Active" plugin, so that any further changes you make will be saved to that plugin the next time. However, if the editor crashes and you have to load it up again, it resets to not having an active plugin, making the plugin you saved before the crash just like any other plugin and any changes made are saved in a new one. Next time, when you start the editor back up and are loading plugins, there is a button you can click to set the highlighted plugin as your "Active" plugin. Doing so will cause all changes you make to then be properly saved in that plugin. This means you cannot save the changes to a new plugin while having set an Active plugin and by extension, you are unable to ever load a plugin and save it with a different name in order to make a copy. In order to back-up previous versions of your plugin, you would have to manually copy the plugin in windows (or other OS) and rename it before making any changes to the original. -
Multi-threading inherently introduces de-synchronization, not fixes it. To synchronize different objects would necessitate staying on one thread. In regards to animations and such, I would say that it would be more elegant, less cpu intensive, and more seamless. However, that would in fact require a lot of knowledge about animations/models and it's not as controllable through scripts (obviously scripts are easier to control with scripts :tongue:). I would teach you how to do that, if I knew how. While I have a fairly firm grasp of Nifskope and textures, and I know how to make models in blender and the basics of exporting them to skyrim, I don't really know much more than that. What I do know is programming, so I'll do my best to help you with what I'm most familiar with: If the walls are all premade (none being spawned in that need to be moved, which is fine but requires a bit more code) the easiest method of handling this is to have a script tied to a marker or off-screen object to act as a sort of "main control". Then, pass into it's script all the other wall objects (or an array depending on how many there are) as a property and move the marker with the walls as if it were one of them. Then, using it's translation events as the trigger for all of them, create a loop to tell each wall in rapid succession to move or reset. I'm making the assumption that when the marker or hidden object has it's 3D loaded, all of the walls will (which they should, if they're in the same cell). If not, that would require some workarounds because if one wall is loaded while another is not, that would cause a desync. Thus with the code below, if the control object does not have it's 3D loaded then the walls will not move. You can of course use one array, but I recommend two in order to keep them from getting mixed up. You'll also need an array of markers each acting as a start and end point to their respective walls; that is, if you continue to control them through placed markers and TranslateToRef. I highly recommend either placing the markers in very specific coordinates (setting their position manually in the editor so that they line up exactly with each other) or use a coordinate-based system and TranslateTo instead. This will help with the look and synchronization since while the code will still work, if the distances each wall moves are not identical or they and their markers aren't perfectly lined up on two axes, it might make them look strange. Further, using a coordinate system where the travel distances are identical can eliminate the need for using the many arrays that you see here, and instead replace them with one variable and a bit of math. I'll give you this code using markers, but let me know if you want help shifting to using coordinates instead. Attach this to your "control" object:
-
LE Creation kit dialogue help please?
dalsio replied to dolphin66th's topic in Skyrim's Creation Kit and Modders
It's hard to understand the exact problem without being able to look at the plugin in it's entirety. If you like, you can package your mod (which would probably only include the plugin and any .psc source scripts that are attached to the quest(s)) and upload it to some file hosting site (dropbox, mediafire, etc.) and PM me a link to it. From there I can figure out what exactly you've done, where you are in the tutorial, and what might be missing or need to be fixed and work with you to iron out any kinks. That is, if you're okay with that. Otherwise, I can try and tackle the problem step-by-step, where I'll ask you to show screenshots of various views of your quest/dialog windows so that I can see what you're seeing. -
If my above method fails, try this: Scriptname ____________ZIU3 extends ObjectReference ObjectReference Property XSTART Auto ;This is an X marker that marks where the object is supposed to start ObjectReference Property XEND Auto ;Another X marker where it winds up bool ResetNextTranslation = false Function Move() ;Translates the object to the destination While !Is3DLoaded() ;causes the script to wait for Is3DLoaded() to be true, checking every .2 seconds Utility.wait(0.2) EndWhile ResetNextTranslation = true TranslateToRef(XEND, 1000) EndFunction Function ResetPosition() ;Resets the position of the object While !Is3DLoaded() ;causes the script to wait for Is3DLoaded() to be true, checking every .2 seconds, then resets Utility.wait(0.2) EndWhile ResetNextTranslation = false TranslateToRef(XSTART, 1000000) Endfunction Event OnCellLoad() ;Starts the loop MoveToMyEditorLocation() ;This is just a reset to keep tunnel pieces from going nuts and gaps from forming in the tunnel wall Move() EndEvent Event OnTranslationComplete() ;Triggers if the translation was uninterrupted if ResetNextTranslation ResetPosition() else Move() endif EndEvent Event OnTranslationFailed() ;triggers if OnTranslationComplete doesnt if ResetNextTranslation ResetPosition() else Move() endif EndEvent
-
Indeed. If Start and end objects are at different positions and it wasn't working as intended, then MoveTo is failing. I looked up the reference of MoveTo and I have some ideas. Without that, I'd have to rewrite my previous code quite a bit to accommodate using TranslateToRef() at high speed in place of MoveTo. But first, try this: First, double check that your wall isn't a type of flora object. For some reason MoveTo() fails specifically when called on Flora (probably not relevant, but I figured I would ask). Otherwise: Place DisableNoWait() before the MoveTo function and EnableNoWait() after it like this: DisableNoWait() MoveTo(XSTART,0,0,0,false) EnableNoWait() It seems MoveTo() has problems functioning on actors at certain times and this is supposed to fix it. Maybe it's failing for non-actors as well. I'll start rewriting the code to use TranslateToRef instead of MoveTo in a minute and post it down below in case the above fails.
-
LE Nifskope & body parts...
dalsio replied to thumbincubation's topic in Skyrim's Creation Kit and Modders
Indeed. Unless you're trying to take pieces of the same armor and combine them into a single mesh, or split a single armor mesh into multiple components, you would need to modify the mesh somehow. However, if I remember right Outfit Studio (which, compared to blender, isn't as powerful but is much easier to learn and use with Skyrim's meshes since it was made specifically for Skyrim) might be able to do some basic armor mesh modification to the extent that you're looking for. Even if you can't exactly delete the vertices in the mesh, you can resize and maneuver them a bit in order to make a body mesh from a similar-but-not-quite-identical armor work with the armor you're trying to use. Before learning Blender, I suggest learning Outfit Studio first. EDIT: If you do want to learn blender, I suggest you start with weapon or static object models (like furniture) as they are simpler to work with and will get you used to importing into blender/creating, modifying, and exporting meshes to Skyrim. Body and by extension Armor meshes are more complicated because they have to morph and stretch in predictable ways in response to character movement. -
Hmm, do two things: 1. in my code, add Utility.wait(0.1) before and after MoveTo() like this: Utility.wait(0.1) MoveTo(XSTART, 0, 0, 0, false) Utility.wait(0.1) TranslateToRef(XEND, 1000.0) and see if that works. I doubt it will but what the hey. If that fails, do me a favor and add at the end of your Move() function a debug.notification() containing the position of XSTART and XEND like this: MoveTo(XSTART,0,0,0,false) TranslateToRef(XEND,1000.0) Debug.notification("Start position: "+XSTART.x+","+XSTART.y+","+XSTART.z+" End position: "+XEND.x+","+XEND.y+","+XEND.z) and tell me what pops up in the upper-left corner (or wherever game notifications appear on your screen). If it only displays one notification and stops, then it isn't looping properly for some reason. If it doesn't display the notification at all, then it isn't getting past the TranslateToRef line in the code. If it keeps repeating the positions in the notification every so often (the time it would take for the wall to translate normally) then the code is looping, but not moving right. If the code is looping and the notification says that the position of XSTART is the same as the position of XEND then something is moving XSTART to the same location as XEND. If, however, XSTART and XEND are in fact different locations, then MoveTo() is in fact being called on a location that is not the same as the end location but for some reason is failing.
-
LE How to make unique weapons uncraftable?
dalsio replied to IcefireenFriends's topic in Skyrim's Creation Kit and Modders
I'm saying Ishara already knew that. He said (in reference to the VendorNoSale flag) that it means the weapon, "should not be purchasable by vendors," meaning vendors won't purchase the item, which is 100% accurate. He didn't say it would stop the object from being purchasable from vendors. Yes, this may not be what the OP asked for, but that's why he explained what each option does in case the OP wanted to add or remove one of them. I'm saying that you are correct, and so is Ishara. Neither of you have said anything that isn't true. -
LE HDT Physics to Object/Clothes
dalsio replied to RoachDovakiin's topic in Skyrim's Creation Kit and Modders
Yes, it is possible, but it will take some work. You can use Blender, which is free, instead of 3DSMax. It will require you to learn Blender and a third party plugin, nifscripts, in order to teach blender to use nif files. I would call that a sash, by the way. A problem might occur with the fact that it won't really work perfectly if you don't have a custom skeleton that has bones that match the sash. You might be able to use existing skeleton's cape or tail bones, but those might have odd effects because they aren't in the right location. Again, it's possible, but it's going to take a lot of learning of different systems and potentially several tutorials (the only ones I am familiar with are in english). It's up to you as to whether or not it's worth it. If you do decide to try it, you can use the HDT Capes mod as an example of how to make it work. PS: Good luck with learning English! :smile: -
LE Having problems with creating an armor mashup
dalsio replied to isra's topic in Skyrim's Creation Kit and Modders
It's absolutely possible to make a full "suit" armor but to understand your exact problem I'll have to step you through a few preliminary "quick fixes" that are common problems. Also, if you can post images of what the seams and weird hands look like that would also be helpful. For the body, check that the body mesh in the armor is the same as the one used by your game. An armor that is designed for a vanilla body (like a vanilla armor) will have strange seams and gaps at the neck, wrists, and ankles if you're using a custom body mod like CBBE or UNP and an armor made for a custom body will show the same if used with a vanilla body. This can also happen if the armor was made for UNP but your game is using CBBE, and vise-versa. Make sure that you're using the right body mesh for your armor or the right armor mesh for your body. For the hands: It's hard to know without seeing what you're seeing, but it sounds like you have two hand meshes overlapping each other, trying to exist in the same space. If your armor does not cover the hands then you don't need to include bare hand meshes in your armor mesh. If, on the other hand (hah), your armor has gauntlets or gloves or something, you need to tell the editor that your armor includes hand meshes so that it removes the base hands when equipping the armor. Look at the ArmorAddon of your armor in the editor and make sure that under the "Biped Object" section, "33 - Hands" is selected. Hit OK and save. This should cause the base hand mesh to disappear when equipping the armor, to be replaced by the hands that come with the armor mesh. Also be aware that the hands may have seams or gaps for the same reason that your neck does. -
LE How to make unique weapons uncraftable?
dalsio replied to IcefireenFriends's topic in Skyrim's Creation Kit and Modders
Yes that's what Ishara was saying, read his post again. -
LE Nifskope & body parts...
dalsio replied to thumbincubation's topic in Skyrim's Creation Kit and Modders
The problem is that the way armors are made is that the modeler removes the parts of the base body mesh that are covered by armor vertex-by-vertex so that it doesn't clip through the armor. Because of this, no two armors contain the exact same body mesh, since different armors require different modifications to the body. Usually, the body parts of an armor mesh only work with that armor or armor of a near identical shape. -
[LE] Quick Questions, Quick Answers
dalsio replied to Elias555's topic in Skyrim's Creation Kit and Modders
I believe there might be a way if you use SkyUI. Some of the scipts it adds can probably be modified to disable the map. Aside from that, you can try and modify the vanilla interface directly the way SkyUI does. These are in the form of SWF (shockwave flash) files so that would require a bit of knowledge of how those work. -
First, you're mixing some things in. With my code you do not need to register for updates or have anything to do with OnUpdate event at all. When you do a translation it WILL trigger either OnTranslationComplete or OnTranslationFailed once after every translation thus restarting the cycle, which is much better than trying to time an update event to move it at the right time. Your code is asking for movement from an update and then asking for it again afterwards, creating conflicting movement commands. Second, you cannot use my recursive code when your move to start position uses a translation. When you call TranslateTo or TranslateToRef while it's already translating it will trigger OnTranslationFailed, which causes it to translate again which causes it to trigger OnTranslationFailed again and so on in a loop. That being said, I do not know if StopTranslation also causes OnTranslationFailed or OnTranslationComplete to activate (which would also cause a loop) and since it is unnecessary (I only had it in there just in case) I suggest you also remove that. If you want to use ObjectReferences as markers with my code, then you will need to use MoveTo rather than SetPosition. MoveTo is to SetPosition, what TranslateToRef is to TranslateTo. Try this code below and this time DO NOT use OnUpdate or RegisterForSingleUpdate at all. Note that I have also added a loop to cause the Move function to wait for the object's 3D to be loaded before doing anything, checking every 0.2 seconds so that if the Move function is called while the 3D is unloaded, it won't end the recursion that relies on translations. Scriptname ____________ZIU3 extends ObjectReference ObjectReference Property XSTART Auto ;This is an X marker that marks where the object is supposed to start ObjectReference Property XEND Auto ;Another X marker where it winds up function Move() ;resets the position of the object and then translates it to its destination While !Is3DLoaded() ;causes the script to wait for Is3DLoaded() to be true, checking every .2 seconds Utility.wait(0.2) EndWhile MoveTo(XSTART,0,0,0,false) TranslateToRef(XEND,1000.0) EndFunction Event OnCellLoad() ;Starts the loop MoveToMyEditorLocation() ;This is just a reset to keep tunnel pieces from going nuts and gaps from forming in the tunnel wall Move() EndEvent Event OnTranslationComplete() ;Triggers if the translation was uninterrupted Move() EndEvent Event OnTranslationFailed() ;Guaranteed to trigger if OnTranslationComplete does not Move() EndEvent EDIT: just a few changes for visibility
-
LE How to mod how skills advance
dalsio replied to the0champion's topic in Skyrim's Creation Kit and Modders
When trying to make a mod I often look for a similar one or one that does something that sounds like it might use the same process I'm looking to use and I open it up and see how they did it. You can see their work and try and build your own using it as a learning tool. Even if it isn't at all the same, it can still give you some ideas on how to implement your own system. There are a few perk and skill overhauls in the game and one that comes to mind is Perkus Maximus. I would try and pick out small bits of their work and follow what it does and where it leads almost like a path, going from one system to another. Just be careful not to use their plugin or scripts wholesale. Using it as an example and derivative work is fine, but beware of copying. -
LE Custom NPC Purple Face Textures
dalsio replied to 343gamers's topic in Skyrim's Creation Kit and Modders
What exactly are you trying to do? What have you done? Did you take an existing NPC, altar the facegen and remap the face textures, or have you made one from scratch? Which textures are new (or altered) and which ones are vanilla or from another mod? Make sure you have not tried to compress the normal maps (the one with _msn). Skyrim's MSNs (Model Space Normals) can't be compressed whatsoever, and must be saved in full RGBA. If that doesn't fix it, try using all un-compressed textures just for the sake of thoroughness. If that fails, double check that your material property is linked to your main one and that all the flags and properties match a vanilla face (should be two fields for flags, and the list is a long one). In the end it's hard to diagnose deeper problems with NIF's without having the nif itself. If the stuff above doesn't work, it would be easier if you packed-up the mod real quick and send it to me via pm link but you don't have to; we can go through the potential problems one-by-one. -
So you're following the hello world tutorial exactly? I assume then you're doing all of this in the CK itself and not in an external text editor? First things first try running the CK as an Administrator if you haven't already (if you don't know how, you can google that) and then remake the script. Even if that doesn't fix the problem, continue running the CK as an administrator if you can. Double check your installation of the CK to make sure that it's in the same Skyrim directory as the data folder you're extracting to. If it isn't, it would cause the CK to not be putting your new script in the same folder as the source script you're trying to extend (which is a requirement). Double check that you can go into the folder *skyrim directory*/data/scripts/source, the files there should be .psc files. See if you can open any of the files there with a text editor (like notepad). If it can and you see recognizable letters (ie. not weird black bars or non-english symbols like É). If any of those fail then something went wrong in extraction (wrong directory, bad extraction, or some other weirdness). If all of that checks out and still it does not work, as Ishara asked when you make the new script and give it a name, what is typed into the field marked "Extends"? If you're following the tutorial exactly it should say "ObjectReference". Whatever it says there, look in the scripts/source folder for a file with the same name (plus the .psc). If you can't find it, then you're either extending a script that doesn't exist or doesn't have a source file or the name of the script was entered incorrectly into the field.
-
[LE] Quick Questions, Quick Answers
dalsio replied to Elias555's topic in Skyrim's Creation Kit and Modders
You must first remove any dependency on any other plugins including Skyrim.esm. Then you can either A. save the plugin as an ESM in the editor or B. change the file extension in windows (or other OS) and use TES5Edit to edit the "File Header"; under "Record Flags" change ESP to ESM.