- RPG Maker MV Scripting First Impressions
- JavaScript all the way down
- … which is a double-edged sword
- Built for real development tools
- Plugin architecture
- What’s next?
- ТЕМА: Какой язык нужно учить? [MV]
- Какой язык нужно учить? [MV] 4 года 9 мес. назад #106572
- Вопрос по скриптам. 4 года 9 мес. назад #106573
- Какие языки программирования использует RPG Maker?
- Языки программирования, которые я могу использовать в RPG Maker
- RMMV Jump into Javascript, a breakdown and explanation of the default js files in MV.
RPG Maker MV Scripting First Impressions
I started looking into RPG Maker MV to update some of my VX Ace scripting panels and posts, and… it’s different. If you’ve read some of those posts, here’s a few things that might help with the transition.
JavaScript all the way down
Where RPG Maker VX Ace uses Ruby, MV uses JavaScript, and it’s more than just swapping out a scripting engine.
For example, if you build your project for web, the index.html file is literally just a list of the code files in your project:
RPG Maker MV web build index.html file
This seems like a smart move, because it makes it easier to support multiple platforms. There’s at least one way to run HTML5 on every platform.
It also means you have access to all of the code in your project. For someone who’s comfortable digging into the inner workings of the engine, that’s huge. It allows for a lot of flexibility, but it means you also have to be careful. (Regular backups or source control are, again, crucial.)
… which is a double-edged sword
VX Ace’s Ruby code seemed to use fairly standard object-oriented programming practices. This made it easier to explain–classes are templates for things that can exist, methods are actions those things can take, properties define the details of those things, etc.
JavaScript is not exactly a traditional object-oriented language. It’s not that it doesn’t have those concepts, but they’re not exactly first-class concepts.
In JavaScript, classes are functions. Class methods are defined by assigning properties to the “prototype” property of the class. It’s all sort of backwards if you’re just learning. Rather than writing code, you’re often writing code that (more or less) writes the code you’re going to use later.
(To make things more confusing, MV tends to throw multiple classes into the same file, whereas VX Ace’s script editor had a well-organized list of classes.)
But it’s not actually bad. You can do some powerful things if you know what you’re doing. It’s probably not where you want to start programming, though.
This plugin included in the default MV project changes where the Title Screen menu is shown by replacing the methods on the Window_TitleCommand class responsible for positioning.
I’m not sure you can just wing it as easily as you can in VX Ace. If you’re interested in programming MV, I would suggest some good JavaScript tutorials first–specifically, ones that focus on the language, not simply its use on the web. JavaScript: The Good Parts by Douglas Crockford is a good resource and a fairly quick read.
Built for real development tools
One of the most frustrating things about working with VX Ace as a developer is everything is stuck in a binary file. Code was only editable through the RPG Maker application. Collaborating through source control was a pain, because there was simply no way to merge changes.
In MV, it’s all text. All of the code is JavaScript and all of the data is JSON (JavaScript Object Notation). That means it’s possible to merge changes from multiple users (although it’s still possible to create conflicts that require manual resolution).
A map file in RPG Maker MV
(Interestingly enough, it’s really the same pattern. VX Ace uses built-in Ruby serialization to store this data, where MV uses built-in JavaScript serialization. It’s just that built-in JavaScript serialization is text.)
One side effect is that you can bring your own editor rather than using an in-application scripting editor. I use Visual Studio Code, but there are lots of IDEs that support JavaScript out there. The benefit is, you get syntax highlighting and, in some cases, code completion and navigation. (Since JavaScript is a dynamic language, the information needed to make these features work isn’t guaranteed to be there, unlike strongly typed languages like C#.)
Since you can build for the browser, you can also debug your code using your browser’s built-in developer tools. This is good, because the playtesting mode error display doesn’t seem to be as robust as it is in VX Ace. You’ll get the exception type and error message, but not the filename and line number.
Plugin architecture
While you can find a number of “plugins” for VX Ace out there on the internet, they often just involve dropping code into a blank page of the script editor. That is, you structured them the same way you would any other additional code.
MV has a plugin system not unlike WordPress’s. Each plugin is stored in a separate JavaScript file, which contains various metadata (name, description, author, etc.) in the comments. You can add them to your project, enable/disable them, and set configurable parameters.
RPG Maker MV Plugin Manager
Plugins execute as soon as they’re loaded, so they can create, add to, and replace functionality. (Remember what I said about JavaScript code that writes code you use later?) You can enable and disable plugins through the RPG Maker application.
Plus, the plugin system seems fairly well documented in RPG Maker help, along with the default JavaScript library.
Plugins seem like a good way to structure your code.
What’s next?
I’ve already worked through my previous “gold window” example in MV, and I found it a little trickier. (Again, playtesting mode doesn’t give you as much information about unhandled errors.)
The good news is, I could build the same thing in the plugin system in only a few lines of code, simply by replacing a method. To me, that’s a win, but I’m not sure what the newbie-friendly blog post for MV scripting looks like.
I still plan on updating my panels (post-AWA) for RPG Maker MV, but I’ll have to think about what that looks like.
ТЕМА: Какой язык нужно учить? [MV]
Какой язык нужно учить? [MV] 4 года 9 мес. назад #106572
Здравия форумчане. Во время разработки проекта понял, что без знания языка программирования (с целью писать свои скрипты, так как многие вещей, которые я хотел бы видеть в своём проекте, без программирования просто не реализовать.) Искал информацию, но не могу до конца понять какой язык мне нужен. Java Script, Java, JScript(если это не то же, что и Java Script), На википедии написано, что движок использует вообще какой то RGSS2, как я понял — это семейство языка Ruby.
К сути:
1) Подскажите, старожилы программисты, какой язык(ки) надо учить.
2) От пары советов «от бати своего дела» не откажусь
3) Если для RPGMAKER MV нужны какие либо «специфические» знания, то не подскажите где взять материалы для этого дела.
Использую RPGmaker MV. Версия: 1.6.1
Вопрос по скриптам. 4 года 9 мес. назад #106573
Java Script, Java, JScript(если это не то же, что и Java Script), На википедии написано, что движок использует вообще какой то RGSS2, как я понял — это семейство языка Ruby.
JavaScript используется в RPG Maker MV. Java вообще совершенно другой язык. JScript это вообще язык сценариев microsoft. RGSS это Ruby, использовался в предыдущих версиях RPG Maker, например VX Ace.
Если для RPGMAKER MV нужны какие либо «специфические» знания, то не подскажите где взять материалы для этого дела.
«Специфические» знания могут понадобится только по оформлению плагинов. На форуме есть пара моих статей по поводу оформления. С обновлением MV структура немного поменялась, поэтому была перенедописана версия 2.0
Ну ещё материалы можно найти на моём сайте в разделе RPG Maker.
Какие языки программирования использует RPG Maker?
На данный момент существует несколько движков, которые значительно облегчают создание собственных видеоигр. Наглядный пример всего этого можно найти в RPG Maker, программное решение, доступное для большинства и позволяющее нам углубиться в этот интересный сектор разработки программного обеспечения.
Как и в случае практически со всеми платформами этого типа, одним из основных преимуществ, которые предлагает нам RPG Maker, является простота использования. При этом мы действительно хотим вам сказать, что у нас будет возможность начать работать в такой среде. не будучи экспертом в программировании . Это означает, что мы можем начать с нашего нового проекты в виде игр для всех видов платформ, не имея в этом опыта. Очевидно, что в большинстве случаев нам поможет факт наличия определенных знаний в каком-либо языке программирования.
И дело в том, что в это время многие пользователи постепенно запускают себя в мир. разработки программного обеспечения . В то время как некоторые предпочитают создавать приложения определенного типа, другие являются частью крупных проектов или запускают мир видеоигр. Каким бы ни был выбор, правда в том, что сегодня мы можем получить гораздо более удовлетворительные и поразительные результаты, чем несколько лет назад, с меньшими усилиями. В случае, если мы выбрали вышеупомянутый сектор развлечений, мы можем использовать такие движки, как Unity, Uneal Engine или RPG Maker .
Они предлагают нам ряд функции и характеристики, с которыми мы можем получить действительно впечатляющие результаты . Но во многом все это будет зависеть от нашего терпения, знаний и творчества.
Языки программирования, которые я могу использовать в RPG Maker
Но, как мы упоминали ранее, наличие предварительные знания о некоторых языках программирования всегда поможет нам в этом отношении. Все будет зависеть от уровней, которых мы хотим достичь в развитии этого содержания, или от типа среды, в которой мы их создаем. Вход в этот сектор для личных развлечений — это не то же самое, что по профессиональным причинам в составе компании.
Большая часть работы, которую мы можем выполнять в этом движке разработки, который мы комментируем, делается для создания ролевых игр. Здесь у нас есть возможность создавать все виды карт и персонажей простым или более персонализированным способом. Для начала скажем вам, что у нас есть возможность создания различные сценарии RGSS которые основаны на популярных Язык программирования Ruby . Впервые это было использовано в RPG Maker XP, мы ссылаемся на Система сценариев игры Ruby , тем самым предоставляя платформе возможности программирования.
Стоит упомянуть, что чуть позже и для того, чтобы расширить секторы создаваемых здесь игр, поддержка языка С++ был включен. После появления RPG Maker MV в прошлом 2015 году программирование сценариев в RPG Maker перешло от вышеупомянутого Ruby к Javascript. Поэтому, чтобы получить максимальную отдачу от разработки собственных игр на этом движке, весьма вероятно, что, имея предварительные знания о Руби, С++ и Javascript нам очень поможет.
RMMV Jump into Javascript, a breakdown and explanation of the default js files in MV.
This is a companion series to Slip into Ruby (my teardown of the RPG Maker VX Ace default scripts) and aims to teach a bit of Javascript while explaining exactly how everything works under the hood of MV’s .js files.
Part 1: https://rpgmaker.net/tutorials/1230/ (main.js, rpg_scenes.js (Scene_Base))
Part 2: https://rpgmaker.net/tutorials/1357/ (rpg_scenes.js (Scene_Boot, Scene_Title))
Part 3: https://rpgmaker.net/tutorials/1358/ (rpg_scenes.js (Scene_Map))
Part 4: https://rpgmaker.net/articles/1359/ (rpg_scenes.js (Scene_MenuBase, Scene_Menu, Scene_ItemBase, Scene_Item, Scene_Skill))
Part 5: https://rpgmaker.net/articles/1362/ (rpg_scenes.js (Scene_Equip, Scene_Options, Scene_File, Scene_Save, Scene_Load, Scene_GameEnd, Scene_Shop))
Part 6: https://rpgmaker.net/articles/1378/ (rpg_scenes.js (Scene_Name, Scene_Debug, Scene_Battle))
Part 7: https://rpgmaker.net/articles/1384/ (rpg_objects.js (Game_Temp, Game_System, Game_Timer, Game_Message))
Part 8: https://rpgmaker.net/articles/1393/ (rpg_objects.js (Game_Switches, Game_Variables, Game_SelfSwitches, Game_Screen, Game_Picture, Game_Item))
Part 9: https://rpgmaker.net/articles/2615/ (rpg_objects.js (Game_Action, Game_ActionResult))
Part 10: https://rpgmaker.net/articles/2694/ (rpg_objects.js (Game_BattlerBase))
Part 11: https://rpgmaker.net/articles/2770/ (rpg_objects.js (Game_Battler))
Part 12: https://rpgmaker.net/articles/2774/ (rpg_objects.js (Game_Actor))
Part 13: https://rpgmaker.net/articles/2778/ (rpg_objects.js (Game_Enemy, Game_Actors, Game_Unit))
Part 14: https://rpgmaker.net/articles/2870/ (rpg_objects.js (Game_Party, Game_Troop))
Hopefully this will be helpful to people just starting out or who want to understand a bit more about how MV does what it does! Eventually I’ll even be tearing down the basest of the base classes like the content of pixi.js and the core classes like Window and Bitmap.