Jump to content

monsto

Premium Member
  • Posts

    150
  • Joined

  • Last visited

Everything posted by monsto

  1. Compiler for papyrus https://github.com/Orvid/Caprica It appears that it was used here, so I expect that it works well... enough. https://www.nexusmods.com/starfield/mods/4540
  2. Thanks for the quick reply! To directly address the things you've said... I've "left" the cell many times, unless it's only triggered on an in-game cell change, such as using a door. Occassionally I will `COC` to another cell, use console `PCB` (purge cell buffers) which resets a number of things in cells you're not in, and then `COC` back to the origin cell. Does that not count for what you're tlaking about? The pseudo-code blocks you wrote is basically what I was asking if it would work, so I'm guessing it will. Will that only work on "leaving the cell" also, or would it work to immediately unload/delete the refs/forms? Thanks for your advice.
  3. I have a mod that adds forms/references (mannequins) that have a few scripts attached to them. When deleting these via script, they are removed from play, but remain in memory and over time will seriously bloat the save file. The main question is: How do I unload these forms/refs from memory? Here's how I'm removing currently: elseif configChoice == 5 ; Pick Up self.removeAllItems(game.getPlayer() as objectReference, true, true) BUMPed.delete() // pedestal form notify("Mannequin inventory moved to you.") self.delete() // self = mannequin form. return endif Yet looking at the savefile (using the program Savetool) it looks like the form references and I think the scripts are not removed at all because they stay in the save. The save file has 15000 forms on the cell that I'm using, while skyrim.esm shows 8000. https://i.imgur.com/ZgApc8o.png https://i.imgur.com/Yb2GpR9.png According to https://www.creationkit.com/index.php?title=Delete_-_ObjectReference So the questions: how do I go about using a more efficient way to delete things than simply using the `delete` method?If I need to set some variable to `None`, which should I set?According to the above snippet, would it be valid to set `self = None`?`BUMPed` variable refers to a property. would it be valid to set THAT to `None`? Is there a better save editor that can show which items have been `marked for delete` but are still present? I'm asking these questions here instead of just doing it because it takes effin forever to start CK and try these things.
  4. I tested it with 2 saves. Used savetool to delete all forms. Dropped a mannequin, saved First. Deleted the mannequin, saved Second. Savetool showed 33 forms on the 2nd save. I haven't work on it in a while, so the quit/load thing didn't affect all this. Also, you can load a save to get fresh script when the mod isn't part of the save. I had a small box cell that I was testing in. So quickload the save that hasn't had the mod, I get my notification that the script has loaded, and I can see the effects without having to completely cycle the game. Tremendous time saver that also wouldn't pile up the scripts/forms. I've had this happen several times over a couple years, but only after a cell has a bunch of mannequins in it, after months of toodling. If there's a method to purging scripts and forms and etc from memory when the entity it's attached to is removed from the visibility of the game (I can't really call it 'deleting' anymore) that's what I need to do.
  5. I made a mod (unpublished) that updates Portable OnDemand Disposable Unlimited Mannequins. Basically, it's a mannequin mod where you put down actual NPCs, they wear the equipment you give them, and then since they're NPC you can pose and animate them. I rewrote it from scratch, using a decompiled version of the original as reference. I added a list menu (like Add Item Menu) and a kinda plugin system where you can drop in an ESP with new mannequins and it will add them to the list. The problem is that I didn't realize that there's A TON of forms/scripts attached to each, and I have no idea where they came from. Based on my tests, it seems to be > 30 forms/scripts per mannequin. And then deleting the mannequin, it doesn't clean up the scripts. A recent save game viewed in Savetool shows that there's > 15k forms/scripts attached to the cell that I use, and there are no orphans. Skyrim.esm only has ~8800 . . . so obviously this is a problem. I believe this is at the core of the in-game problem I'm having which is that the game hangs when loading the most recent save as the first load from starting the game. I can first-load a previous save to start the game, then load the save that hangs, and the game works just fine. Anyway, I now know that disabling and removing the mannequin doesn't detach and kill/clean up the scripts. So I need to do that. The game doesn't really do a whole lot of spawn/destroy of entities with scripts attached to them. Even if it did, it wouldn't do it hundreds of times in a single cell. so I realize that this kinda cleanup may not even be a thing. I also realize that the better practice would be to not attach the scripts in the first place, but I have no idea where they came from. I purposefully only attached I think like 5 (it's been a while), so filtering out unknowns will be "hard". It seems easier to clean up properly on deletion, which would be a good thing to do regardless of reduced attachments. So I realize that any specific help would be based on seeing the source, but right now I really just need to know if this kind of clean up is possible, and how it might be done.
  6. I've a small handful of personal mods I've created . . . I have a mod that is a helper script with added console commands for moving s#*! around the cell. Another is a modernized version of Portable OnDemand Disposable Unlimited Mannequins (I call it Better Unlimited Mannequins... BUMs) And then I have a pretty good handful of armor/outfit mashups, basically a bunch of handmade ESPs built from various other armors/outfits using Nifskope, Bodyslide Outfit Studio and TES5Edit. I know I'd have my work cut out for me . . . but I'm just getting started on the mental process of conversion. But my question is, conceptually speaking, i'm trying to get a handle on how "difficult" it's going to be, per mod, to up-vert to SSE? Also, while I'm at it, is SSE the same as SE, just a different term? Thanks for any reply. ---- Also also . . . it's my favorite thing ever when people can't admit a mistake. Double, triple, quadrupling down on their own accomplishments, moving the goal posts, appeals to credibility, etc etc. When all they have to say is "Huh. I didn't know that." I had a very similar conversaion with a Cities: Skylines modder about documentation of all things, and the belief that documentation at any level is extra work. "You wouldn't last for a day" he says. Well, so, I had to link him to the docs I wrote on the Slab of Lovers (ahem I dunno if there's still drama but just in case) for HDT Physics Extension . . . posts with couple million total views and only a few hundred posts. Professionalism isn't a skill that comes easily. For those that need it most, it's usually learned the hard way.
  7. I've made some stuff in a non-worldspace cell. it's a "castle courtyard" kinda thing, where it doesn't need to be worldspace, but it needs to be outside and lit by the sun. How do I set this up so that it shows with sunlight?
  8. Actually, what you say makes a lot of sense as far as papyrus is concerned. 2ndly, I was also trying to figure out a way to make the menu one time, and then refer to that whenever I use the menu. As it stands, the menu is rebuilt from the formlist everytime it's accessed. There's ~1 sec delay per ~25 menu items. So I was thinking to put the aggregate formlist, along with the menu variables, on a quest based player refalias. That seems to be as about as persistent as you can get. The built menu array would remain as well as taking care of your suggestion. Thanks.
  9. I checked... I've 2 addons, and they're both 'start enabled' and 'run once' . . . i figure 'run once' is correct, because I only want it to run the one time that it's installed and then not again.
  10. There's a script that's part of the base mod, "packscript". The addon esps have a quest > refalias > "packscript", with the properties and all that adds a formlist from the addon to the formlist in the basemod. And now you've made me want to check if it's "enabled on start" and also not "run once" just to dbl check.
  11. It's a mannequin mod. The base mod has 5 types. In a separate esp, I have a bunch more types, and may make more types down the road. I want to be able to add new types to the process willy-nilly. The mannequin types are put in a formlist, and the choose/drop menu populates a UIExtensions Listmenu. It's clear that the formlist isn't being updated, and that the disablemod-savethegame-enablemod-reloadthegame procedure basically purges then makes a new formlist, but it's obviously unwieldy. How should I go about updating the formlist that drives the listmenu?
  12. The only problem with the above code is that the object might be disabled, its cell might be unloaded, etc (and thus the loop will keep on looping until the object's 3D is actually loaded). What would fix / mitigate this issue would be to have code like this: float futuretime = Utility.GetCurrentRealTime() + 5.0 While (Self.Is3DLoaded() == false && Utility.GetCurrentRealTime() < futuretime) ; do nothing here, just loop endWhile if (Utility.GetCurrentRealTime() > futuretime && Self.Is3DLoaded() == false) ; bad, time to abort / retry. endif Alright so basically you're saying that it's risky, which I get. Good thoughts. Thank you.
  13. This is the main thing I hate about papyrus: ineffective documentation. They tossed that wiki out there, and left it to the wild, never to be thought of again. I mean if this is in there, and people had to discover it by trial and error, what else is out there that nobody knows about? Now go back and read the rest of his post AFTER the link to the function.
  14. Excellent notes and info. It's annoying that standards that you mention (points 1, 2, 3) are only found by the handing down from one generation to the next. I've been piddling with papyrus for I dunno 3-4 years, and have never seen anything like this. It truly belongs on a ckwiki page, something like "Papyrus conventions for cleaner scripting". For point 2 on your list, what's an alternative to that? I'm also a fan of some of the 'programming habits' you've displayed. Comment lines for breaking up the menu elseifs (Elesif? Holy s***...), the comment "skse required", things like that. I left the boilerplate decompiler heading as a credit to the original author and idea In the script. I think the only thing remaining from the original is a handful of lines, like maybe 20. I see exactly what and why about overwhelming init(). I'm assuming that by using an update, it allows the task to be threaded and therefore reducing hitches and framerate drops. I may take that piece of advice when it's time to streamline, but it's working right now and I'm reluctant to mess with it. I have no idea of what is the significance of, or when or how to use, fragment scripts. Is there a primer somewhere? All in all I appreciate your very good papyrus response.
  15. I've been working on an updated SPODUM and it's almost done. What I want to do tho is allow add-on mannequins. In my version, there's 5 human mannequins that can be chosen from an ingame list (formlist). At some future point, I may make an esp that has X new mannequins in it, and then ingame menu should now show the full list of 5 + X... and potentially + Y + Z The original mod is unaware as to whether or not there are any add-ons out there. Therefore, i can't have the original go adding things to a formlist. I want a way to "aggregate" a bunch of lists that don't know about each other. (Right now, the original 5 are in a formlist, but I have no problem changing that if there's a better idea.)
  16. Here's the papyrus log. It had previously been spammed by unrelated, unused scripts. I cleared them out just now and whittled the log from 50k lines to it's now svelte 2k lines, and I'm wondering if the entry at #1849 is relevant. It's 2 sec before the end of the file, and probably right on time as to when the stop at "change 7" occurs. [edit] oh wait, no it's irrelevant. There's a bare delete in setpedestal(). onInit of a new mannequin, that delete runs before putting down a new pedestal. So that error occurs after the lockup.
  17. At the end, there's absolutely nothing relevant. Lemme generate a new one and make a gist. BUMPed always works at the point of generation. It's property is an ingame miscitem (I should prob make it a static) and it 100% shows.
  18. Here's the entire script source. I posted this thing yesterday, thinking I could workaround this problem by just deleting the pedestal in a different manner... but since this script completely stops, it seems there's a larger problem that truly needs to be addressed. This script is attached to a working in-game mannequin replacement.Activate it to get a UIExtensions ListmenuMenu choices are: Show inventory, Change mannequin (body type presets), toggle statue/moving, toggle pedestal tall/short, KILL (remove entirely).Selecting "Change mannequin"gives a UIExtensions Listmenu of preset namesdisables originalplaces the newtransfers the inventory from orig to newdeletes original.All mannequins have a pedestal. Above, "delete original" means I delete the pedestal, then delete self, then return. The offending moment comes on line 209, deleting the pedestal before deleting self. I did the registerforupdate to see if the update would run after the lockup. While "change 8" is never output to the console, "5sec update" never comes either... it seems that the script has completely just stopped running for whatever reason. "Sometimes", the output stops at "change 7" but I can continue to activate/use the new mannequin. When I do this, "5sec update" plays, and the old pedestal stays there, dead. "Sometimes", after the stop, I can spawn in new mannequins as if nothing is different, "Sometimes", I can't activeate anything. Other mannequins, and a chest is all i have in the test cell, but neither of them are usable. Secondarily, I have a completely separate script that I made that has a bunch of helper functions... things like press a key to toggle fly/clip mode, move selected references by a relative distance with a simple console command, etc... "sometimes" that helper script is completely gone after this mannequin script stops. As if it never ran in the first place. notify and conmsg are defined #262. Tehy're basically just typesaver functions for output to console or debug. This is pretty f*#@ing frustrating as the entire thing works like a charm and is about half the size of the original SPODUM. This one error makes it problematic, leaving dead pedestals everywhere, not to mention the script just outright dying. I'm also open to some kind of workaround that avoids deleting the pedestal, or even doing some other method for mannequin change.
  19. I'm spawning mannequins with a pedestal. Under normal operation, the mann & pedestal are processed together. But sometimes, the mann becomes unresponsive, even to a normal activation. Thus, i'm building a spell that will outright delete the mann. The instance for the mann has the reference info to the pedestal, and deleting the mann does not delete the pedestal. What's a way to make the 2 entities live on each other, so that if the mann is deleted the pedestal goes as well? Could I have a function on the mannequin that would respond to a spell cast on it, giving info back to the spell so that the script could delete the correct entities? Further, I realize that this is an XYProblem... as it's a question about a solution (forcibly deleting entities) rather than a question about the problem itself (why/how the actor becomes unresponsive). There's nothing to suggest why this happens to the actor, as it's usually in 3rd to 5th time the mannequin has been changed.
  20. If you're still a Nexus regular, thought I'd tell you that your post here was clear and helpful even 6 years later. A bit of piddling and I was working straight away. Thanks!
  21. I have a menu that activates on an npc (mannequin). I want to use the menu to choose an animation that is then forced on the npc. I'd like to use both idles and animations, but I've seen that they use different facilities and rules. Currently I have... elseif configChoice == 7 self.playIdle(idleRitualSkull1) elseif configChoice == 8 Debug.SendAnimationEvent(self, actionSprintStart)Both idleRitualSkull1 and actionSprintStart are set up as property, and linked in CK > Actor screen > Properties. Neither of these lines work. At one point, the sprint line put a hitch in their walk, but that's all it did. OH btw... I'm not trying to make them sprint, I just want them to show the animation. What am I missing here?
  22. Thank you very much I'm having the same problem here. would you mind sharing the solution extracted from a 45:00 video?
  23. I have a created actors, right now theres like 10, but it will grow over time. So how can i get a list of these actors? Ultimately, I want to put the list into an array and eventually into a UI Extensions List Menu. Would Keywords fit the bill? If I add a unique Keyword to my actors, is there a way to gather the IDs of entities/actors thru Keywords? Using a Formlist might work. Creating the Formlist as part of the mod, scanning (somehow?) for the actor I want, then doing Formlist.Addform for each one. This could get stupid tho if the list gets long enough. Is there another mod that does something like this? If so I don't have a problem looking at other source for examples.
×
×
  • Create New...