Jump to content

DrHappy

Members
  • Posts

    3
  • Joined

  • Last visited

Nexus Mods Profile

About DrHappy

DrHappy's Achievements

Newbie

Newbie (1/14)

  • First Post
  • Week One Done
  • One Month Later
  • One Year In
  • Conversation Starter

Recent Badges

0

Reputation

  1. Simple question about garbage collection in Papyrus. Let's say I have a global variable in my mod which I allocate memory for like so: Int[] oldArray; event onConfigInit() oldArray = new Int[128] ; Do Stuff endEvent Later, I decide I don't like the name of the variable because it is inconsistent with my naming convention or something. I change all instances of the variable and then call the initial init routine using OnVersionUpdate Int[] newArray; event onConfigInit() newArray = new Int[128] ; Do Stuff endEvent event onVersionUpdate() onConfigInit() endEvent My question is, what happens to oldArray? This script is bound to a quest that is persistent (does not end), so the thread never ends. Does Skyrim know to delete it and unallocate the old 128 int array?
  2. Thank you! I will definitely check out all of those links. I think my code could definitely do with some optimization. Some users have reported it has like a second lag or so when pressing buttons... Perhaps this could cause further problems elsewhere. Thanks for your help.
  3. I recently released this mod and am very happy with its reception. However, I can't help but feeling a bit overwhelmed with all of the bug feedback and am finding it difficult to figure out what is my responsibility and what isn't. Since this is my first mod, I've never dealt with this before, and was hoping some veteran modders might be able to offer some advice on how to parse user feedback. Users report many errors that I can't replicate. My initial instinct is to take it all on myself and assume that I messed something up somewhere, but I'm not not sure how to debug that which I can't replicate. How do I know what errors are caused by user error, and what are caused by loose coding? In debugging, I've also noticed some anomalies that make me wonder if Skyrim itself (or something else external) is to blame. For instance, I just released my V1.11 update the other day, and in it I use the OnVersionUpdate(version) event to set some variables. I loaded a past save, it worked, so I packed up the files and was ready to put them on the Nexus. Just to be sure, though, I exited Skyrim and did it again. This second time, though, the OnVersionUpdate even never fired. I loaded the exact same file with the exact same compiled script in place, but for some reason the event did not shoot off. I freaked out and looked at the file again to see where I messed up, then tried one more time, and it worked. I repeated this several times and couldn't get the OnVersionUpdate() to not fire again. I don't know how to explain this behavior and am wondering how I can make my mod stable in the face of this randomness. Another example. In another save which did NOT previously use my mod, I loaded the game and my widget was not visible. I adjusted all of its features and couldn't get it to show up. After fiddling around loading different files, I realized the widget would not show up if I started Skyrim, loaded another save game, then loaded this saved game. But if I just loaded this saved game first after booting up Skyrim, everything worked as it should. Maybe these are very specific errors that can be explained by shoddy coding on my end. I'm just curious if others experience this stuff, and how you might deal with it when debugging. Any help or advice on how to navigate here, or just how to be a more responsible modder, is much appreciated. Thanks!
×
×
  • Create New...