I don’t have one in my module (even checking temp0 with the toolset open), but yes that would be my guess too. Is there a way to retrieve the default, er, default.nss?
There is no default.nss in the base game scripts. “default” is a placeholder the game uses for some creature scripts when a new creature object is created and some modules take advantage of that foible. There is a possibility that the default script being run is not associated with the loss of gold. Have you done a codebase search for the TakeGoldFromCreature command, something in your OnAcquireItem scripting, or (longshot) maybe an tag-based-script for the gold item (NW_IT_GOLD001)?
you can use PrintString("A default.ncs lives in: " + ResManGetAliasFor("default", RESTYPE_NCS)); to see if there’s a default.ncs somewhere that the game can see
This found it! Apparently in … a hakpak I don’t think (emphasis on think) I am using, but it is one I had set aside for the module so @Shadooow was right - it was in custom content also included.
I’ll have to see why it’s doing this but at least this puts me on the right track! Thanks!
[edit]: For clarity, I don’t think I’m using anything in the hakpak at present, so I mean to say that I can safely remove it.
For those curious it’s the “RavenloftCore Scripts” - which I had grabbed to have some premade Ravenloft creatures. For now it seems safe to just lop the default.nss / .ncs out of it. I cannot tell why it is removing gold like that from the script logic, but it’s not a desired behaviour on my part regardless. It looks to be trying to change the gold into an actual object, but thats not desired either, and it doesn’t work as programmed.