Loading custom dll into RM MV

Hello, sorry if this is like 1 billion-th post about loading custom dlls into Maker MV, but googling for a few hours didn't take me anywhere.
So as topic says i'm trying to load a custom-written DLL into RM MV. For now I've managed to write custom .js plugin with some function, which can do some unrelated things (like displaying message).
I tried using Win32API function, but game tells me that it is not 'not defined'.
Also bump into example with FFI module, but same result (except for the message - 'cannot find module').
So, can anyone tell me if this is possible for MV version, and if yes - give me some basic example of how to do this (or mb some previous setup which i should make so the abovementioned functions work)

It also should be mentioned almost had no exp with JavaScript and Node.js, so any detailed explanation is welcomed.
Thanks!
I think you have the completely wrong idea about some things. There's no such thing as a custom DLL for RPG Maker MV. MV doesn't use any DLLs at all.

I don't know what Win32API or an FFI module has to do with anything, or where you got any of these ideas/information from.

MV plugins are written in JavaScript, saved with the regular JavaScript file extension (*.js).

There are lots of threads and YouTube tutorials you can find with a Google about how to do that - you can also look it up in MV's instructions. Click Help -> Contents -> Plugin Specifications.

What are you trying to accomplish? Have you done tutorials and learned how to just use MV before you try to jump into coding things? Have you looked at existing plugins and the default engine in the js folder first?
First of all, thanks for the answer.
What am I trying to do is to do some image processing through the library written in c++ and then get this data into the MV engine.
Have I finished tutorials? - no, currently i'm investigating is anything like this is possible at all, so to not spend hours of learning just to know that this is impossible to do
Have I looked into plugins - yes, i know that you can write plugins with JavaScript and as a result you can do a lot of things JavaScript can do
Where I've found info about dlls? Googled through the forums, as an example - here:
  1. https://forums.rpgmakerweb.com/index.php?threads/building-a-dll-file-to-use-in-scripts.63238/
  2. https://forums.rpgmakerweb.com/inde...ting-your-own-dll-and-calling-it-in-rm.17708/
  3. https://forums.rpgmakerweb.com/index.php?threads/solved-includingcustom-dll-loadlibrary-error.79927/
I found these topics for the older version of RpgMaker, so maybe for MV it's not real to do things like this, that's why i've asked
Have I finished tutorials? - no, currently i'm investigating is anything like this is possible at all, so to not spend hours of learning just to know that this is impossible to do
Okay...that's fair, but it's really not clear from your post exactly what you're trying to do. So it's hard to say.

All of those threads you linked to are for much older versions of RPG Maker that used an entirely different add-on interface (Ruby scripts instead of the entire engine being written in JavaScript and supporting plugins).

Because this version of RPG Maker has the entire engine's code in the project folder, anything is possible to do if you spend enough time and work on it.

Linking the output of a C++ library into your project somehow is doable, but seems very inefficient. Between the image manipulation possible within the editor itself and finding or rewriting the C++ code in JavaScript, I think you'll find better ways to implement it.

That's why I was trying to ask you what you were doing, because if you haven't done tutorials and you're finding deprecated information from old makers...maybe what you want to do can be done right inside RPG Maker MV. Maybe there's already a plugin someone else wrote to do it.

We don't know.
Okay...that's fair, but it's really not clear from your post exactly what you're trying to do. So it's hard to say.
No problem)

In general i'm thinking of some, lets say, image combination tool for layered standing image of a character. I'm familiar with c/c#, so it's easier for me to make interface in c#, put 'core' code into the c library (because c is working on lot of platforms) and 'feed' special configs to this 'core' to obtain final merged image of a character.
In my imagination it should ease the managing of visualization of equipment on the character while maintaining sufficient execution speed and memory. And it also can be extended later with some nice stuff.
In the end, this should give me some very interesting experience 🙂
To my understanding, there is a Node.js module called ffi-napi that allows you to load DLLs. It should be possible to bundle that with your game and use it, as long as you don't mind limiting your game to only working on Windows. Though I can't walk you through the steps, as I don't use Node.js.

However, I doubt it works with C# DLLs, as C# typically doesn't produce proper native binary DLLs--it produces managed DLLs that are meant to be used by other .NET managed code. You'd probably have to create a wrapper for it.

But all that being said, if all you're trying to do is layer images together, that's already very doable with JavaScript, so it's probably best to avoid complicating things and unnecessarily introducing platform restrictions and runtime requirements to your game.
it should ease the managing of visualization of equipment on the character
And, as I mentioned might be the case, there are already plugins to do that. SRD's Character Creator is a popular one, but I know there are several more you should be able to find with a Google.

That's absolutely not to say that you can't choose to write your own code if you have a reason to, but solutions for what you're describing already exist.
Thanks for replies!
I think it's worth checking some existing plugins in case they do what I want. Or maybe rethink to use JavaScript for that 🙂
I don't know what Win32API or an FFI module has to do with anything, or where you got any of these ideas/information from.
I've not seen any MV game using such Windows API or other programming interfaces so far. I know some games made with XP or VX or VX ACE usually include that to be able to change the window size or add mouse support and the like.

Keep in mind that MV and MZ seem to work on web browsers or as stand alone applications, especially on Windows but there are ways to make MV games work in Linux as well. Don't ask me about supporting other platforms. :S

So adding support for custom DLL's was not one of their goals from the very beginning.
Just to share my experience with anyone interested...
I've kinda find a way to load dlls, but it's related to the beforementioned 'ffi' nodejs module:
https ://github. com/node-ffi/node-ffi (broke the link to not occasionally violate any rules, btw this lib is opensource)
The main problems with it are:
1) ffi havily is outdated. Newer version is called ffi-napi (or Koffi) but here we bump into the second problem:
2) RM MV uses node 9, which is also very outdated...

I've finally managed to compile the ffi module but it appears to not run properly on my machine. More to this: it seems like there is a big chance that this library won't be able to launch on other machines (because of different architecture (x32/x64) and/or any other system-related stuff). So for now i've given up this idea, and will think about either forget the idea at all or think about the way to implement it in JS.

That's all, folks.
Thx for listening 🙂

Original thread: https://forums.rpgmakerweb.com/threads/loading-custom-dll-into-rm-mv.157318/