-
Posts
52 -
Joined
-
Last visited
Nexus Mods Profile
About ItsAlways710
Profile Fields
-
Country
United States
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
ItsAlways710's Achievements
Contributor (5/14)
0
Reputation
-
IsharaMeradin, is there any way to avoid firing the OnItemAdded event in other mods playeralias scripts, it seems you mention something above but I'm not following you on it... Or maybe you were just referencing your OWN alias scripts OnItemAdded events? I need to totally avoid the OnItemAdded event in EVERY alias script (my alias script uses states to avoid firing it while it's busy) and I'm guessing the only way would be to create an SKSE plugin? I really don't want to have to learn C LOL. -IA710
-
[LE] Script work around for making Potions
ItsAlways710 replied to jeyoon's topic in Skyrim's Creation Kit and Modders
@ReDragon2013 Just saw this thread looking for something else and was reminded how much you helped me when I was just beginning with Papyrus, thank you again. -
Has anyone found a better solution to this issue? Constructible Object Custom Keyword System replaces the smithing menu and opens faster than SkyUI's menu, I need a UI.Invoke that will refresh it and if I use the solution above it works, however you end up with the SkyUI Crafting Menu instead of the C.O.C.K.S. menu....
-
I've had a bit more time to work on it and have tried implementing some things I have learned, please let me know if I'm not doing something correctly or I am doing something that is pointless, some changes from the last version: - Refresh State and bool - RegisterForSingleUpdate - Reorganized, removed some pointless lines, more comments The OnInit takes 20 seconds in a smaller load order, about 40 seconds in a very large one, the OnPlayerLoadGame depends on the number of player spells, but even with about two hundred spells it's under 6 seconds, which seems acceptable. Please let me know of any way I can improve it. -IA710
-
I had time to play with this some more, and have landed on something like this, in very early stages but it is doing what I want it to do. I actually had the OnInit going much faster, but found this to be a bad thing, I think the OnPlayerLoadGame will be the only one that the speed will matter that much, and even in it's current form it's not horrible, but I'm sure could be improved.
-
I can see storing everything in one string with two separators, (Like this - string theory = FlamesXXX0x9DFABZZZHealingXXX0x9DFACZZZ etc,) then split on ZZZ sort the resultant list, then loop through that array splitting the form off of the spell names.... I can see why you are directing me to look further at StringUtil, VERY powerful indeed...
-
Ahhh, point taken for certain, StringUtil has some very powerful uses, and I can see how I can use some of these features like StringUtil.Split in the future! The thought had never occurred to me to use a single string to store multple values of ANYTHING let alone hex hehehe....and I will remember the method of using a state with it... Thank you!
-
And I'm a SQL guy, so that is making this all that much more difficult for me, because in SQL I would just create a table that has a String column and a FormID column, fill each, sort the whole thing on the string and return just the sorted string list when I need it, then lookup the FormID using String when I need it... Maybe I'm just stuck in 35 years of SQL thinking and can't get past the methods I've used for so long LOL, but it seems like this should be something easy and it shouldn't be something that I'm the first person to come up against... I was, at one point, creating a form array manually in the script with all the vanilla spells using GetFormFromFile(). I could, as ReDragon2013 suggested, just make a form list for that and run through it to add the vanilla spells/lesser powers, but then what if the end user is using a mod that changes those? My goal was to do it all via script and to account for everything that I could, but maybe I only deal with "Vanilla" race spells, and if they use a mod that changes that stuff they won't have access to those spells at all....
-
Thank you Sphered, I'll take a longer look at StingUtil.psc, although I see you storing the FormIDs AS strings, I'm not sure how they are associated with THE string. In your example above, I see you creating an array of formIDs with "ZZ" as a delimiter in one string (Theory), then , then returning the formIDs as strings in a string list, splitting them on the delimiter "ZZ", but I'm not sure why I would want to do that for my use case? I'm trying to create a string array of player spell names, and then be able to grab the FormID of that spell later (knowing that I will sort the string array, so having two arrays, one string one form, doesn't work unless I can keep their indexes in sync as I sort the string list, which I have no idea how to do THAT other than something like StorageUtil or possibly JMap or JDB from JContainers which all allow you to map a form value to a string) and I'm trying to apply that to the example above and am quite confused.... And you are correct, I am VERY committed to this as I am learning A LOT from you all, even if it never ends up outside of my load order, every mod I ever make is going to benefit from what you folks are teaching me and I appreciate the time you all spend explaining things to me more than I can express... Thank you!
-
I think Sphered mentioned earlier that everyone would be able to assist better if I clearly defined what I am trying to do with this, so I thought I would take a moment on lunch to refresh the goals for anyone trying to help: 1) I have a mod that requires the player to select a spell that they can cast in the MCM menu, I am using AddMenuOptionST in the MCM to do this, and therefore need a string array that I can pass to it. 2) The string array should include all spells that the player can cast, and I would like it to be sorted alphabetically as in the late game you may have 200-300 spells that you can cast, them being sorted allows you to find the spell you want quicker. 3) I need to be able to, once a spell name has been selected from the MCM Menu we populated earlier, get the FormID of the spell associated with the string I just selected so my mod can use it. 4) I have another mod that I am working on that would benefit from this as well, it would be NICE but not NECESSARY if I could share the same list with the other mod (I would have it all set to run the maintenance from one mod or the other, not both). StorageUtil allows for this. If there is a better way than what I have been trying I am certainly open to it. My current method is: 1) I need the stringlist for AddMenuOptionST so I HAVE to build it. 2) I'm going to sort the stringlist, so there is no reason to build a form list that matches the string list because the stringlist indexes are going to change when I sort it, 3) so INSTEAD I am mapping the String that I am adding to the stringlist to a formID using StorageUtil.SetFormValue(None, s, akSpell as Form) 4) then I can sort the stringlist and retrieve the formID with the string in the MCM once a selection has been made using StorageUtil.GetFormValue(None, s). I hope this clarifies what I am trying to do. If there is a better way I am definitely open to it.... GetNthSpell doesn't get all the spells, so I widened what I was getting to include ALL spells and then check if the player has the spell, but this is very slow (if numbers help, after we filter for GetCastType the list becomes about 1,285 spells in the load order I am doing most of the testing on). So that's why I'm looking at somehow coming up with the spells that GetNthSpell will never find and then use it, because it will only ever be, at most, all the spells that have been added to the player. I hope this helps!
-
ReDragon2013, Your comment #1 - this is what is used to retrieve the FormID of the Spell for the MCM, it can not be removed, it is what makes this whole thing work, it maps the String to the FormID, this way we can sort the spell names and still get the FormID associated with that name.... We can't remove this unless we have another way to get the FormID of the spell from the string we are storing in the stringlist in the MCM..... Your comment #2 - You are correct, we most likely don't need the FALSE anymore as the creation process ensures no duplicates and we are clearing it first. This will speed it up some I am sure, good catch - thnak you! I think I added the FALSE in there when I was working on just updating the stringlist. We will need #1 in there, or some other way to get to the formID from the stringlist for this to be usable in the MCM....
-
I was finally able to get v8 working, but it takes 21 seconds. Thinking about version 9 and doing something to capture those odd spells in OnInit and then just insert them right after we clear the stringlist in OnPlayerLoadGame. It would be another stringlist, but I would only be capturing it once....
-
Yeah, that's why I was saying I would have to play with it, version 9 won't return race based spells or lesser powers (because GetNthSpell doesn't return them, it returns spells added to the player, race based spells are never added and unfortunately don't show up with this function - I compiled it and tested just to be sure, my modification is below, it just makes sure that you don't have things like spells you can't cast in the list). For a Dark Elf, in vanilla game, that means that the spell selection list would not list Ancestor's Wrath, Flames, Healing or Sparks when using just GetNthSpell(). Not such a big deal in the late game but a big deal in the early game. I was thinking maybe running the current big check in OnInit AND the GetNthSpell, compare them to find the "race based spells" that GetNthSpell will never return, store them, then in OnPlayerGameLoad we could just clear the stringlist add the "race based spells" that we saved earlier and then do the GetNthSpell like I modified it maybe? I'll have to play with it, I have a couple ideas on how to maybe do it, but need more time than I have at the moment LOL. There has to be a better way than this! I compiled v9 and in a game with under 20 spells it is instant, in a larger game with about 170 player spells it takes 6-7 seconds. Below is a snip of the function I changed in version 9: I have some things I need to do and if I have time I'll play with version 8 later tonight and let you know how that goes,,,