Jump to content

jstwinkles

Members
  • Posts

    4
  • Joined

  • Last visited

Everything posted by jstwinkles

  1. Sorry, not sure what caused the weird highlighting. I think it's fixed now. Yes, that's what I'm referring to. Does the Obsidian bug also cause the duplicate boxes like I described above? And do you know of a bugfix mod I could try to rule that out, or is it something baked into the engine that a mod can't fix?
  2. Hey folks, beginner scripter/modder in need of some help. I've got this mod that uses an OnDeath event handler to move a merchant's inventory from their vendor container to their corpse when they die. Everything works great except when it comes to ammo boxes. Basically, duplicates of the boxes are getting created during the transfer, and if I loot said boxes they won't get converted to ammo in my inventory, like the OnAdd block isn't getting executed. Is there anything about the RemoveAllItems function that could be doing this? I even tried changing it to iterate over each item individually and moving it using foreach and RemoveMeIR, but the results were the same. Any help is very much appreciated! Full sequence to reproduce the issue and script source below. Find a merchant with ammo boxes in their buy menu. Let's say there are 5 .223 boxes. Kill the merchant -> OnDeath event handler gets called Some checks are done and RemoveAllItems is called to move the inventory to their corpse Their corpse will mysteriously have 9 .223 boxes rather than the original 5 (note that a debug print in the transfer script correctly reported 5, not 9) Taking the first 3 boxes does nothing. No ammo gets added to the player inventory. Taking the 4th box suddenly triggers all 4 boxes to be converted to ammo. Taking the remaining 5 boxes after that works correctly, converting them to ammo.Quest Script: scriptName KMGLQuestScript begin gameMode if getGameRestarted ; TODO: See if there's a way to filter on merchants here setEventHandler "OnDeath" KMGLOnDeathFunction endif end OnDeath Event Handler: scriptName KMGLOnDeathFunction ref containerRef ref killed ref killer begin function { killed, killer } ; Make sure we're not operating on the player if (killed.GetIsReference player == 0) ; Try to get the merchant container reference let containerRef := killed.GetMerchantContainer ; Only proceed if we actually got something if (isFormValid containerRef) if (isReference containerRef) ; Move all items from the vendor's container to the vendor containerRef.removeAllItems killed 1 1 ; Print some debug ; messageEx "%n killed %n" killer killed ; messageEx "Transferred from %n to %n" containerRef killed endif endif endif end
  3. I don't know what's causing it, but almost every time I start a new game, something like a deathclaw or giant radscorpian spawns right in the middle of Goodsprings, usually slaughtering everyone while I'm still at Lvl 1. Even if I kill them using the console, next time I walk into town there's a good chance they'll respawn. I'd like to make a mod that fixes this, but I can't figure out how they're spawning in. I opened up Goodsprings in GECK and I don't see any NPC spawn points on the map. Is there some other way they could be spawning in? It's happened on modded and unmodded playthroughs. Thanks
×
×
  • Create New...