RMMV Yet Another ModLoader (YAML) Alpha 0.8

edho08

Villager
Member
Joined
Sep 11, 2020
Messages
5
Reaction score
5
First Language
Indonesian
Primarily Uses
RMMV
TLDR
Name : Yet Another ModLoader (YAML) Alpha 0.8.
Load mods into the game. mods including Plugins, Data (except map. working in progress), Image, Audio. Works on encrypted games but mods cannot be encrypted. works on deployed windows game. Works on game that use enigma protector (please do not virtualize your mod directory). Need ALOT of TESTING.

Yet Another ModLoader (YAML) Alpha 0.8
Introduction.
Hello there, i've just got back on RMMW a few days ago and i decided to learn .JS for sure and made some awesome plugins. Well, i decided that to learn making plugins, i have to understand how PluginManager static class works. So, i made a plugin that loads another plugin to the game and thus YAML was born. The name derives from many similar attempt to dynamically load asset instead of slapping base asset with modded one. This one though, honestly not that much different from some i already found on the forum. But i hope this one does have a good use. Some use case of this one maybe something like this:

"So you dev just made this amazing game and the community loves it. Whats this? some silly people wanted to slightly alter your game! Well2, you good dev just would want to allow this. just slap this boy into your plugin and set some param, your are good to go."

Or this:
"Whats this? some random guy just found out there are some bugs in your custom plugins. What? you are to lazy to fix it? Well2, if that guy can fix it, why not let him fix it for you? thats right todd... we can fix it for you."


Features.
1. Mod Manager (no GUI).
This one allows you to have collection of mods and activate/deactivate mods all you want and change their load order. Lowest order mod is loaded first until highest order mod. Sadly, i'm not good at UI so there is no GUI yet. Feel free if anyone wanted to implement this. The credit of the GUI will be yours and please mention me as the ModLoader author.

2. Plugin Mod.
Install plugin mod just the way you would install plugins in the engine directly. There will be 2 files. one is plugins.json which is just .json form of plugins.js from your usual /js/plugins.js and the .js files itself. Then ModLoader will load your plugins inside a mod just like how PluginManager loads plugin into the engine (in fact, we copy-pasted it alot).

3. Asset Mod (Image and Audio).
Install asset mod by providing image or audio with the same name and directory as the base files. E.g if you wanted to change img/faces/Actor1.png, you can provide a file on [mod folder]/[your mod dir]/img/faces/Actor1.png. Using our cache system, we ensure that asset searching inside mod folder are done only once when the asset first requested thus saving on performance. If there are conflict between mods regarding an asset, the asset of the mod with the highest load order is the one to be loaded for said asset.

4. Data Mod.
Data mod is not like Asset Mod where the asset are just slapped and the asset from highest load order mod will be used. Using DFS Tree Traversal algorithm, we can manage to load only the difference between your modded data and the base data meaning, several modded data can be loaded at once. This include the .meta property which is used by practically almost every plugins. If there are conflict between mod regarding a data, the data of the mod with the highest load order will override previous data from lower load order mod. (e.g. if 2 or more mod make a change to $dataActors.1.name)

5. Script Mod.
Script mod is like plugin mod with the exception of having no param and their load order inside a mod is arbitrary. While the plugin mod is implemented to mimic how the engine handles plugin, script mod is implemented so modder that wanted to change a very small thing or if their mod require no param to have a convenient of not needing to setup a plugins.json file.

6. Encryption Bypass (is this even legal?).
Using our Encryption Bypass, your encrypted asset is save (as save as RMMV encryption which is sucks) while your player can still play with their (silly) mods. Your mods are not and will not be encrypted. RMMV encryption is far from safe (in our opinion) and we do not want to implement any kind of encryption. See our (not) planned feature section for more details.

7. ModLoader API.
Have you found this design pattern while developing plugins?
JavaScript:
Your_Plugin.that_property = Engine_part.some_property;

Engine_Part.some_property = function(args){
    do something;
    Your_Plugin.that_property.call(this, args);

}
Well, why not do it our way instead (I do not recommend using this on heavy duty function!!!!)
Code:
ModLoader.API.get(Engine_part, 'some_property').before((args)=>{
    do something;
});
8. Deep Freeze.
Our deep freeze technology allowed you to freeze parts of the engines or your custom class that you do not want people to change in the future. E.g. Game_Battler, Game_Actor, etc. Warning : Do not freeze var with prefix '$'. (Work in Progress) Warning!!! may cause unintended consequences.

Planned Features.
1. Dynamic ID.
This might be our most ambitious feature yet. We already prepared a design but we have some setbacks. We need a kind of reference chart on what id is referenced where; where in the game engine parts that it tries to access its database sequentially using numerical index, something like for(i=0; i<$dataActors; i++) if any; and how property of a data inside of database that is not the .meta property can access our dynamic id (e.g. Classes skills) and whether the database can handle sparse array.

Our proposed method is as follows. We would like to assume that the base game and each mod will use on max 10000 item on each data table. thus the formula of dynamically generated id is as follows "(load_order + 1) * 10000 + id_counter". This will not add (load_order + 1) * 10000 item of data into data table but rather insert data at that index. Our argument of using this system is that the database of RMMV is just an array with each item as json object thus, arbitrary array index using sparse array (if possible at all) can be used as base for our dynamic id which we will implement as (load_order + 1) * 10000.

2. Map Mod
I'm busy RL so this feature will be implemented later.

3. Param
We will add more param like disabling some of our stuff.


(Not) Planned Features.
1. GUI ModManager.
We dont have plan to implement any kind of GUI for this ModLoader and as stated before, any implementation of GUI for this ModLoader is credited to the GUI author and can be used where ever this ModLoader is used.

2. Encrypted Mod.
If you really wanted this feature, consider what you just asked. If your mod is encrypted, than it will be encrypted using some kind of key and you will be the only one to know said key otherwise the encryption is pointless. Now, how do you make the game know about your key if you didn't include it and if you include it people can just decrypt your mod. It's pointless really. Except, we use Asymmetrical Cryptography using public-private key. But the problem now the private key will be stored inside the game and even if it is protected, it will still be loaded into a .js and might be able to be accessed by everyone. So no, we dont intend to implement encryption even if its public-private encryption.

3. Web/Non-Local Mode
This is more of a design decision. So no. (Why do you want to mod a web based game anyway?). On technical detail, we use alot of fs lib from nw so no, there will be no web mode.

4. Port on MZ.
I don't have MZ and i do not plan on owning it. so no port.

5. Android/Linux.
Not only i dont have an android phone, android dev environment just hog a lot of RAM which my little cute lappy cannot handle. So, i might not be able to test stuff on android. Can someone point me out how to boot linux lightly without the needing to dual-boot or using VM? Like maybe, free virtual env online with graphic instead of console only? i used to do this using AWS but i no longer have the budget to do such thing anymore.


M.A.Q (Maybe Asked Question)
Q : Can i use this mod on [your game]?
A : Yes you can, credit me please.

Q : I found a bug, how can i report it!
A : Please report it in this forum or wait for it, make a mod to fix that if possible.

Q : This plugin suck ****!
A : That is not a question. But anyway, sucking **** is our best technique so far.

Q : Is this compatible with [some plugins]?
A : I don't know, this is built with vanilla engine in mind. If that plugin in mind is not paid plugin, then i may check if i can make a compatibility patch.

Q : Can i ...?
A : You can't, ask first.


Demo.
Demo on how to use our plugins is provided here. just mess with it (it is really only the default game with added mods).

Known Bugs.
- When adding a new mod. The new mod load order is wrong.


Code:
Changelog;

v.0.8
-Initial forum realese.
-The need to test this ModLoader.
 

Attachments

palatkorn

Veteran
Veteran
Joined
Nov 1, 2019
Messages
267
Reaction score
192
First Language
thai
Primarily Uses
RMMV
I am going to test
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

Day 9 of giveaways! 8 prizes today :D
He mad, but he cute :kaopride:

Our latest feature is an interview with... me?!

People4_2 (Capelet off and on) added!

Just beat the last of us 2 last night and starting jedi: fallen order right now, both use unreal engine & when I say i knew 80% of jedi's buttons right away because they were the same buttons as TLOU2 its ridiculous, even the same narrow hallway crawl and barely-made-it jump they do. Unreal Engine is just big budget RPG Maker the way they make games nearly identical at its core lol.

Forum statistics

Threads
106,040
Messages
1,018,479
Members
137,824
Latest member
dobratemporal
Top