CommonLibSSE
CommonLibSSE copied to clipboard
How to call papyrus methods/functions inside c++ plugin?
I have really limited knowledge about the papyrus VM. My problem is that I don't know how to properly call any papyrus functions or methods (like placeatme).
I tried to execute the DispatchMethodCall, but it just doesn't work in the game. (all arguments are fully filled in)
return vm.DispatchMethodCall2((*self)->handle, className, functionName, args, functor);
Can you give an example of how to use any of the papyrus methods through a virtual machine? For example, PlaceAtMe. (I am using latest CommonLibSSE version)
Invoking papyrus methods is very tedious and error prone due to the asynchronous nature of the VM. If you want to invoke a method exposed in a native game script, then I would recommend you disassemble the function in IDA and re-implement the logic by hand. It will be much faster and easier this way.
Any tutorials you would recommend on disassembly and re-implementation? I'm new to SKSE dev but have experience with Papyrus. Seeing how the papyrus functions work would help me learn a lot
@JHansen13 I can only recommend you to watch source code of SKYMP. (skyrim multiplayer)