Jump to content

Can you help get me started on making a mod?


eberkain

Recommended Posts

Add some debugging trace to dump out the content of your two properties, and run it on a new game. On my end, I've never seen that "<<Default>>" setting resulting in anything but None, and headaches, but I rarely use the actual default property names.

 

I enabled debug logging in the .ini and added a debug.trace to the script. ran the game, tried using the script a couple times. closed the game. no log to be found anywhere.

 

UMiUrGG.png

 

I went back to my .ini to make sure i enabled logging and it sure looks enabled.

 

zH1tX36.png

 

I think I'm done messing with this thing, its nothing but frustrating, i don't see how anyone manages to make a mod.

 

I thought that maybe it was because SKSE was enabled on this profile, it might be logging something differently, but I couldn't find anything about that. This is the updated script.

Scriptname DumpOutPotionOpenContainer extends ActiveMagicEffect

ObjectReference Property DumpOutPotionContainer Auto  
Actor Property PlayerRef Auto

Event OnEffectStart(Actor akTarget, Actor akCaster)
	Debug.Notification("opening container")
	Debug.Trace("opening container " + DumpOutPotionContainer + " with " + PlayerRef  )
	DumpOutPotionContainer.Activate(PlayerRef)
endEvent

I used a messagebox instead, and it has the right formid for the container instance, but I has the name of the script which I'm guessing is just a display quirk?

 

xLLDT8K.jpg

 

1fsVrM0.png

Link to comment
Share on other sites

You have a mismatch in the scripts's filename and its header.

 

DumpOutPotionOpenContainer

DumpOutPotionReplaceScript

 

They are different scripts, the open container one is attached to the spell effect, the replace script is attached to the container.

Link to comment
Share on other sites

You get all the right info in your Debug.MessageBox, but the following line still doesn't fire after you click OK? That's a strange one.

 

Try inserting Utility.Wait( 0.1) as the first line of your OnEffectStart. A lot of things are strange in OnEffectStart and sometimes that helps; I have cases where the properties are not filled yet (though that obviously isn't the case here).

 

I have also seen cases where things don't work right in scripts on objects that are in non-attached cells, unless the objectref is made persistent. But I don't think this should be an issue for a pre-placed object instance. But just in case, you may try putting your container in a quest alias just to force persistence.

 

Try container.Activate( PlayerRef, True).

 

Otherwise, I'm at a loss. You might try to manually activate the container (by going to it, or moving it to you) to check that there is not a more fundamental problem with the container itself.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...