#author("2023-03-08T00:37:05+00:00","default:admin","admin")
[[RPG Developer Bakin Wiki]]

*''What are Plug-ins?'' [#a3a17c8a]
Plug-ins are features that extend the functionality of Bakin's tools and engine programmatically using C#.
There are two main types of plug-ins:
- ''Tool Plug-ins (.dll format)''
- ''Engine Plug-ins (.cs format)'' 

As of March 2023, only engine plug-ins have been released for the creation environment.

**Plug-in Types [#g95890dc]
//ここは記載しない可能性があります。
//- Tool plug-ins are used to extend Bakin's editor.
//Tool plug-ins are further subdivided into the following three types:
//-- ''Data Extension'': Add more optional specifiers to data such as casts and items.
//-- ''Class Extension'': Add new data types separate from casts, items, etc.
//-- ''Tool Extension'': Add new tools to the editor's main menu or edit menu
//(The Sprite Tool included with the main unit uses this mechanism.)
//ここは記載しない可能性があります。

- Engine plug-ins are used to extend the operation of the Bakin engine.
The engine plug-in currently has the following two types of functions:
-- ''Event Scripts'': Assign C# programs to events
-- ''Battle Plug-ins'': Replace Bakin's battle system with a C# program

**How to Use Plug-ins [#f559cc12]

- For engine plug-ins, create the folder specified in the description below directly under the project folder you are editing and store plug-ins in it.
-- ''Event Scripts''
---First create a 'script' folder and add the .cs file to it.
---After launching Bakin, click the arrow in the "C# Program Assignment" field on the lower left of the event sheet.
---Select the script you wish to assign from the list that opens.

-- ''Battle Plug-ins''
---Create a 'battlescript' folder and add a set of .cs files to it.
---It is applied automatically when the project is launched, and no tool operation is required.

//ここは記載しない可能性があります。
//- The tool plugin (currently not yet created environment) adds a DLL file to the 'plugins' folder of the Bakin installed destination.
//Then, new entries will be added to the Database or Main Menu.
//ここは記載しない可能性があります。


*** Delete Plug-ins [#rdb1a566]
//ここは記載しない可能性があります。
//- For tool plug-ins, remove the dll file from the 'plugins' folder.
//ここは記載しない可能性があります。

- ''Event Scripts'': Delete the .cs file you wish to remove from the 'script' folder.
- ''Battle Plug-ins'': Delete the entire 'battlescript' folder.
You can also use "Remove Battle-Related Scripts from Game File" in the Map Editor's top menu > Functions > Expanded Features.

**How to Create Plug-ins [#hf249d00]
(!)Bakin updates may affect the operation of plug-ins created in the past. Please check the differences each time an update occurs.


- ''Event Scripts''
After launching Bakin, click the arrow in the "C# Program Assignment" field on the lower left of the event sheet.
Press the "Create New" button at the top to start the editor (the editor associated with .cs).

--It is recommended that Visual Studio (Community version is acceptable) be installed with C# development ready.
--You can also use other editors to create .cs files and put them in the 'script' folder without going through Bakin.

- ''Battle Plug-Ins''
Execute "Copy Battle-Related Scripts to Game File" in the Map Editor's top menu > Functions > Expanded Features.
When executed, a 'battlescript' folder will be created in the project folder currently being edited, and a battle plug-in template (the same as the default battle process) will be created in that folder.
Edit the created file with your editor.

//ここは記載しません。
//- Tool Plug-ins
//You will find various tool plug-in templates (zip files) in the "SDK" folder of your Bakin installed destination.
//Unzip the Zip file and edit it with your editor.
//Open the .sln file in Visual Studio 2019 (install C# desktop development).
//References to SharpKmyCore, Common, Yukar Editor, Yukar Engine, SBControl, etc. will have their paths broken, so delete them and reconnect the references from the Bakin installed destination folder.
//Now all that is left is to build for x64 and the tool plug-in (.dll) is ready.
//ここは記載しません。 

- ''Metadata Settings''
-- No metadata in event scripts.
-- For battle plug-ins, replace // @@version xx.xx.xx.xx.xx at the beginning of BattlePluginDef.cs with the corresponding Bakin version.

//ここは記載しません。
//-- For tool plug-ins, edit PluginDef.cs to change the plug-in name, icon, description, etc. that appear in the editor's Version information.
//ここは記載しません。


- ''Plug-in Help''
If you distribute plug-ins and need to explain the contents, please create and include a readme.txt file.

- ''Plug-in Settings''
There is currently no ability to specify plug-in preferences.

**Plug-in Distribution [#gb975bfd]
- ''Event Scripts'': Distribute the created cs files in any way you wish.
- ''Battle Plug-ins'': Zip the entire 'battlescript' folder and distribute it in any way you wish.

//ここは記載しません。
//- For tool plug-ins: Distribute the dll file in any way you wish.
//ここは記載しません。

**Plug-in Reference [#df2f4fe2]
References to currently available classes can be found at the following URL.
RPG Developer Bakin Plug-in Reference:https://rpgbakin.com/csreference/

As of March 2023, the classes used in the creation of event scripts and battle plug-ins are available to the public.

Front page   New Page list Search Recent changes   Help   RSS of recent changes