Dear Game Creators! This is Shiguren again and I am bringing you more interesting information about RPG Maker Unite in our 10th Dev Log! This time I would like to go deeper on Addons. But first a disclaimer - since RMU is still a work-in-progress product, the information and methods that I discover are only based on the current internal developmental version of RMU and may change without notice in the final version. [img]https://clan.cloudflare.steamstatic.com/images//41957561/f97fc7a11fd8e458119497e435ff2e528be9ed42.jpg[/img] Addons are programs written in C# that enhance or expand upon RPG Maker Unite’s basic functionalities. Those familiar with past RPG Makers would remember making and using “Plugins” to go beyond the limits of the engine - Addons are similar to that. Like we covered before, merely using Addons in Unite is easy. Simply click on the circled button on RMU’s top function bar, which will open the Addon Manager. Addons can be toggled On or Off using the Addon Manager. [img]https://clan.cloudflare.steamstatic.com/images//41957561/e2bd3d1a0160550eb2c66c3425a0c71bbfdc8547.png[/img] The plugin parameters from past titles like RPG Maker MV/MZ have now become the “addon parameters”, but the functionalities are largely similar. [img]https://clan.cloudflare.steamstatic.com/images//41957561/e6d5e8861e0ab03e8efe38d80dd9c59540394bd9.jpg[/img] [img]https://clan.cloudflare.steamstatic.com/images//41957561/e69238d8f934feb71989d86308898d893375f400.png[/img] A new addition this time is a two-dimensional array - which is basically the array of an array. In RMU it is possible to export this as a CSV format file and use external spreadsheet apps to open it. Do note that only two-dimensional arrays can be exported into CSV. From here on, the information we will cover are mainly targeted at veterans and programmers who help creators to go beyond the limits of the engine. Please bear with us if you could not understand everything fully! The most important takeaway we wish to emphasize here, is that as long as using the correct methodology, you should be able to develop Addons in a similar fashion to the past. Some of this info may be extremely basic to Unity users, but we will cover it nonetheless so please bear with us on this too. First, let us switch from RPG Maker Unite into the Unity Editor. From Unite’s menu bar, there is a function to switch to (or run side by side) the Unity Editor at any time. [img]https://clan.cloudflare.steamstatic.com/images//41957561/af46c5d693a10ad7fd9f3efcb5700b827c56e95f.png[/img] Here we use the external editor Visual Studio. This would have to be installed beforehand, as well as downloading and installing the Visual Studio Tools for Unity. While Visual Studio Code found in past RPG Makers like MV/MZ are also supported, we will not cover it in this Dev Log. From Unity Editor, go to Preferences to perform setup to use the External Editor. Once done Unity can then be linked with Visual Studio. [img]https://clan.cloudflare.steamstatic.com/images//41957561/16948333e9feac619293582d8e2674ad05ce2b9f.png[/img] Next, we can open the .sln file found in the Project folder via Visual Studio. This is a file made to Unity’s standards. When a project is opened via this file, the C# code contained within RMU will also be loaded and can serve like an auto-complete feature. [img]https://clan.cloudflare.steamstatic.com/images//41957561/3a54f075ff8ff557058195c01745ef08cbe02022.png[/img] Once ready, we then add a file with following properties. Note that the file and class names need to be identical so that it can be referenced via reflection. We will set namespace to [i]RPGMaker.Codebase.Addon[/i], which is dedicated to everything related to Addons. [img]https://clan.cloudflare.steamstatic.com/images//41957561/d5930e0abd065c9439fd0cba2d89bd765b7afec4.png[/img] Using the auto-complete feature (aka Inellisense) in Visual Studio, let us have a look at what functions are available. Functions related to RPG Maker Unite are stored in the [i]RPGMaker.Codebase[/i] namespace. Addon’s initialization and saving its parameter is done by making and using a class for Addons. This class would need to receive Addon parameters from the Constructor, due to the use of the Reflection mechanism in C#. Writing add-on parameters is similar to making plugins on past titles like MV and MZ. When porting MV, MZ plugins, a Dev can keep many of the comments intact without extra explanation. Addon parameter types and constructor arguments when written in C# corresponds as follows. Do note that item ID numeric values would become UUID in C#! [img]https://clan.cloudflare.steamstatic.com/images//41957561/731d29f460c1950b063a55b96ca96e5a1ec8a60b.png[/img] Array types are not affected by the internal types and are passed as string. In the example table above it says [i]number[][/i] but the same is true for [i]string[][/i] or [i]struct<>[][/i]. Compared to past titles, the newer addition is integer and 2-dimensional arrays mentioned earlier. “Addon commands” serve a similar function to the plugin command seen in other RPG Makers such as MZ, so is the general concept when developing. However, do note that the checks on data types are stricter. Addon commands are implemented as Addon class methods. When distributing Addons, users can use Unity’s packaging features. This would make it easier to distribute elements that are not part of the code, such as images and audios! [h2][b]Closing Comments[/b][/h2] Admittedly, this Dev Log is perhaps the most complicated to date - but we really hope it provides you with enough information to have a preliminary understanding on Addon development in RMU! In our future Dev Log, we plan to continue on this Dev Log and show some actual examples where applicable! [h3][b]10th RPG Maker Unite Q&A [/b][/h3] [b]Q: Will RPG Maker Unite provide source code references?[/b] A: Currently there is no plan to provide source code references. All non-library codes can be viewed freely. Advanced developers or veterans should be able to understand them like in previous RPG Makers fairly quickly. The source code would serve as the most accurate reference! [b]Q: Is it possible to have RMU call a process that I added myself? [/b]A: Some of these can be done using Addon commands. However, some may require users to rewrite a part of the codes that govern RMU’s processes. [b]Q: Is it possible to add custom parameters to Actors and Items via Addons? [/b]A: Since the data structure defined by Classes need to be match in format to the data content, it is not possible to add parameters while maintaining compatibility. [h3][b]■ Related Links[/b][/h3] [b]・RPG Maker Portal Site『RPG Maker Official』:[/b] https://rpgmakerofficial.com/ [b]・『RPG Maker Unite』Official Site:[/b] https://rpgmakerunite.com/ [b]・RPG Maker Unite Official Twitter[/b] https://twitter.com/RPGMakerUniteJP (JPN) https://twitter.com/RPGMakerUnite(ENG) [b]・RPG Maker Series Twitter[/b] https://twitter.com/tkool_dev (JPN) https://twitter.com/RPGMakerSeries  (ENG)