About SRPG Studio Plugins
Everything you need to know about enhancing your SRPG Studio experience with plugins
What are SRPG Studio Plugins?
SRPG Studio plugins are JavaScript-based extensions that add new functionality, features, and improvements to your SRPG Studio projects. They allow developers to customize and enhance their games beyond the built-in capabilities of the engine.
Plugins can modify battle systems, add new UI elements, implement custom mechanics, enhance visual effects, and much more. They're designed to be easy to install and use, even for developers with limited programming experience.
How to use plugins?
Each folder in this project correspond to one of the plugins. Each plugin has at least one .js (JavaScript) file, and another file called $readme.txt. The readme file has specific instructions on how to make the plugin work. To use the plugin, drag the folder to the Plugin folder of your project and follow the instructions of the readme file. Note that all readme files start with the '$' character. That is because every file that doesn't start with that character will be considered as part of the code, and that can crash the game.
General instructions for most plugins
There are some aspects that are common to most plugins, so instead of explaining them in each indivdual file, they will be covered here
1. Custom parameters
This are custom information that you can write in an object on your project's database. Those parameters are used for some plugins. For example, the Weapon Rank plugin has a parameter to set the rank of an unit. Generally, in the place where you can modify something, there is a button called Custom Parameters where you can write them. How each parameter works depends on the plugin, but in general, all parameter must be separated by a ',' and must be under a pair of brackets {}. Even if the parameter are from different plugins, all must be insisde the same brackets. For example: {paramA: "Hello", paramB: 15, paramC: true}. Here we wrote three parameters with different types of values. The first is a string of characters, the second a number and the third a boolean value (true or false).
2. Global Parameters
This works exactly the same as the custom parameters, but instead of being something applied to an object, they apply to the entire game. The global parameters are located in Database->Config-Script->Global Parameters.
3. ID
Almost every element in the engine has an ID. Units, classes, weapons, items, weapon types, etc. The ID is a number that identifies that object in its own category. This means that if an weapon has a number assigned, no other weapon has the same number assigend. But a different object, like a class, could have the same ID as that weapon, as long as that number has not been used already for some other class. This is used in some plugins as a value for some custom parameters. For example, a plugin could need the ID of a skill in the custom parameter of an unit. If the skill has ID 15, the something like {skill:15} could be used in some plugin. Note that by default, the engine doesn't show the ID's of the objects in the database. To make them visible, you need to go to Tools->Options->Data and check the option "Display id next to data name".
4. Execute Script
In some cases, a plugin may ask you to make an Execute Script event to make it work. To do this, you need to create an event, inside that event make a event command and choose the Execute Script event. In that event, you need to check the option "Execute Code" and write in the text box the code that the plugin asks you to write.
Best Practices for Plugin Usage
- •Read plugin documentation before using it
- •If a plugin contains more that one file, keep those files in their own subfolder