Здравствуйте, я новичок в РПГ мейкерстве — всего несолько дней и мне нужна помощь: |
|
Take my hand<br />Lead me to some peaceful land<br />That i cannot find<br />Inside my head Администратор запретил публиковать записи гостям. |
nick84,привет!Добро пожаловать на наш портал! |
|
Администратор запретил публиковать записи гостям. |
При импорте картинки укажи цвет, который должен быть прозрачным. |
|
Ищу скринсейвер для своих снов… Администратор запретил публиковать записи гостям. |
Ralador,я ему это уже обьяснял.. |
|
Администратор запретил публиковать записи гостям. |
1) Все надписи в меню редактируются в редакторе скриптов |
|
Администратор запретил публиковать записи гостям. |
Тэйлс |
|
Ищу скринсейвер для своих снов… Администратор запретил публиковать записи гостям. |
Спасибо! Всё сделал — всё получилось. |
|
Take my hand<br />Lead me to some peaceful land<br />That i cannot find<br />Inside my head Администратор запретил публиковать записи гостям. |
|
а как добавить новую кнопку? не только Новая , Загрузить и Выход а, например, Титры . |
Администратор запретил публиковать записи гостям. |
BulletSD, заходишь во все тот же Редактор Скиптов и находишь срипт Scene_Title, далее находишь Эти три строчки |
|
Администратор запретил публиковать записи гостям. |
|
Окей! все получилось спасибо )) осталось только прописать строчку которая будет отсылать на определенную карту |
Администратор запретил публиковать записи гостям. |
|
Чёт немогу найти |
Администратор запретил публиковать записи гостям. |
RaideR, А мейкер какой?? |
|
Администратор запретил публиковать записи гостям. |
-
#1
Hey fellow developers,
I’ve been pooring over forums and Rpg Maker MV Javascript Code for hours trying to figure out how to simply tweak the pre-existing in-game menus.
For instance, I am attempting to remove the HP/MP bars that show up next to my actor’s when I open the main menu (I’ve turned off the Status Menu Item button through the Database, so that’s not a problem). I thought I found out where this code was in the core files, and I commented it out to see if it would have any effect on the game. It had none. So, I tried, a bit blindly, to create a plugin that overwrote the section of the code that I thought dealt with drawing the extra information, besides class and name. This also failed.
I was under the impression that the following code is what I would want to tweak to achieve my goal:
Window_Status.prototype.refresh = function() { this.contents.clear(); if (this._actor) { var lineHeight = this.lineHeight(); this.drawBlock1(lineHeight * 0); this.drawHorzLine(lineHeight * 1); this.drawBlock2(lineHeight * 2); this.drawHorzLine(lineHeight * 6); this.drawBlock3(lineHeight * 7); this.drawHorzLine(lineHeight * 13); this.drawBlock4(lineHeight * 14); }};Window_Status.prototype.drawBlock1 = function(y) { this.drawActorName(this._actor, 6, y); this.drawActorClass(this._actor, 192, y); this.drawActorNickname(this._actor, 432, y);};Window_Status.prototype.drawBlock2 = function(y) { this.drawActorFace(this._actor, 12, y); this.drawBasicInfo(204, y); this.drawExpInfo(456, y);};Window_Status.prototype.drawBlock3 = function(y) { this.drawParameters(48, y); this.drawEquipments(432, y);};Window_Status.prototype.drawBlock4 = function(y) { this.drawProfile(6, y);};Window_Status.prototype.drawHorzLine = function(y) { var lineY = y + this.lineHeight() / 2 — 1; this.contents.paintOpacity = 48; this.contents.fillRect(0, lineY, this.contentsWidth(), 2, this.lineColor()); this.contents.paintOpacity = 255;};I felt that commenting out:
this.drawBlock2(lineHeight * 2);this.drawHorzLine(lineHeight * 6);this.drawBlock3(lineHeight * 7);this.drawHorzLine(lineHeight * 13);this.drawBlock4(lineHeight * 14);would at least get me somewhere, but it didn’t seem to do anything at all. And I have only been working on one project, so I haven’t mixed up the file for one in another project.
I really want to become well aquanted with modifying windows and menus in the new system, given how important it is for game design, but thus far it has been like pulling teeth. I would appreciate any helpful feedback on my issue.
Thanks!
Last edited by a moderator: Dec 16, 2015
Shaz
Global Moderators
-
#2
I think you’ll find it’s in Window_Base.prototype.drawBasicInfo — there will be a call there to draw a gauge with some parameters. Be aware though, changing this will change it in several menu screens.
If you ONLY want it to happen in one screen, you’re going to have to duplicate the drawBasicInfo function (or whichever one has that call to draw the bars) into the current window class and just disable those couple of lines that draw the gauges.
-
#3
You’re looking in wrong place, mate.
Window_Status is window on scene status, which I believe has been safely disabled by you.
Look into Window_MenuStatus, find drawBasicInfo, and try to comment it.
-
#4
Hey Shaz and Heartbreak61, thanks for the speedy reply! (No, seriously, that was FAST! )
So, I’m pooring over the Window_MenuStatus code right now, and I can’t seem to find where the drawBasicInfo method is. It really doesn’t look like Window_MenuStatus is the status menu, but possibly the menu button for the status screen? Or the status screen that results from pressing the button? It does inherit from Window_Selectable.
So, I suspect I’ll need to duplicate the methods/classes like Shaz explained. Trouble is, I’m not entirely sure how to do that.I had just started to get used to Ruby’s way of doing things, and RPG Maker VX Ace’s Developers way of using Ruby… I’m really thrown off by how Javascript inherits things, and what prototyping is, why it’s necessary, and the like. So, is it possible to get an example of what I might do to accomplish such a modification?
I do get the feeling it’s more or less a matter of overwriting the function (in a plugin) and having that new one be the one that is refered to, but I still feel like I’m not doing it properly.
Thanks again everyone!
-
#5
Hey everyone! I figured out the solution and I’d like to share it for anyone who runs across the thread! (I’ll also change the title to [solved] if I have permissions to do so.)
So, Shaz, you were right, except the item in particular I needed to modify (in my case), is the Window_Base.prototype.drawActorSimpleStatus function.
All I had to do was this:
//=============================================================================// MeekoMenus.js//=============================================================================/*: * @plugindesc Modify the main menu, focusing on status menus. * @author MeekoSoup * * @help This plugin does not provide plugin commands. */Window_Base.prototype.drawActorSimpleStatus = function(actor, x, y, width) { var lineHeight = this.lineHeight(); var x2 = x + 180; var width2 = Math.min(200, width — 180 — this.textPadding()); this.drawActorName(actor, x, y); // this.drawActorLevel(actor, x, y + lineHeight * 1); this.drawActorIcons(actor, x, y + lineHeight * 2); this.drawActorClass(actor, x2, y); // this.drawActorHp(actor, x2, y + lineHeight * 1, width2); // this.drawActorMp(actor, x2, y + lineHeight * 2, width2);};I decided to post my whole plugin file so that those who read this in the future will know just how easy it is to make such a change. Of course, changing the very layout of the status window is another full gambit of challenges, but for now, I’m very happy with this.
Thanks again for such speedy responses! I can feel my sanity returning to me!
RPGMaker VX ACE tutorial
Hi there! So earlier I posted looking for help on how to build a custom Menu, after looking around and with a bit of trial and error, I was able to figure something out.
And because I find it really irritating to be stuck in simple things like these while making a game, I’m going to try and teach you the method I used!
No custom scripts used. Although You can use some, as I will show you further down.
This is the result we are expected to create.
1. Disabling the default Menu and creating a custom Choice Menu
First what we have to do is to disable the normal Menu from the Script editor by turning:
@menu_disabled = true
You can find this under Game_System, on line 24.
Now, the Menu is disabled throughout the game.
Now, create an event somewhere on your map. This Event will have to be pasted on every map so that the Menu can be accessible, if you don’t want the Menu to be accessible, just don’t paste the event on the specific map.
As for the code:
@>Change Menu Access: Disable
@>conditional branch: The B button is being pressed
@>Wait: 10 frames
@>Show Choices: : Resume, Items, Save, Exit
: When [Resume]
@> Exit Event Processing
: When [Items]
@>Script: SceneManager.call(Scene_Item)
: When [Save]
@>Script: SceneManager.call(Scene_Save)
: When [Exit]
@>Script: SceneManager.call(Scene_End)
: Branch End
@>
:Branch End
Easy right? Let me break down the code for you:
@>Change Menu Access: Disable
This is a safety measure to ensure that the default Menu is disabled, also in case I forget to disable it in the Script Editor, like we did a few minutes ago.
@>conditional branch: The B button is being pressed
This is a conditional branch checking if you are pressing the B button (the same button you press to access the default Menu, ESC or 0).
@>Wait: 10 frames
This allows the menu to smoothly appear after an interval of time, instead of instantly, so that if the player continuously presses the Esc or 0 key, the Menu doesn’t flicker on and off.
@>Show Choices: : Resume, Items, Save, Exit
: When [Resume]
@> Exit Event Processing
: When [Items]
@>Script: SceneManager.call(Scene_Item)
: When [Save]
@>Script: SceneManager.call(Scene_Save)
: When [Exit]
@>Script: SceneManager.call(Scene_End)
: Branch End
This right here is what enables the little Menu window and gives it options. The scripts (@>script: SceneManager.call (Scene_…) are the scripts that call the sane Menu command options that the default Menu uses.
So basically what you are doing here replacing the default Menu window with your own (using a Show Choices command, because this way you can control which options are presented and when, like I will show you a few steps further).
2. Extra Choice Menu options
(As RpgMaker only allows you to place 4 choices)
Now if you want to add more Menu Options, then I recommend getting this script, that combines Choice Menus, created by Hime, here’s a tutorial on how to use it.
Soon you’ll be able to extend your menu as long as you want, and you can even create events that add new options to the menu after certain switches or variables are activated.
For example, using the above script, you can aggregate Choice Menus by placing them one under another, kinda like the ‘show text’ works, so like this:
@>Change Menu Access: Disable
@>conditional branch: The B button is being pressed
@>Wait: 10 frames
@>Show Choices: : Resume, Quest Log, Items, Save,
: When [Resume]
@> Exit Event Processing
: When [Quest Log]
@>Script: call_quest_journal
: When [Items]
@>Script: SceneManager.call(Scene_Item)
: When [Save]
@>Script: SceneManager.call(Scene_Save)
: Branch End
@>Show Choices: Exit
: When [Exit]
@>Script: SceneManager.call(Scene_End)
: Branch End
@>
:Branch End
And so on, so on. In the above case I had a custom script enabling me to call a quest log from the Script Manager, but since rpg maker only allows for 4 choices at once I ran out of space.
So what I did was to just add a new ‘Add Choices’ bellow the first one above, the script I provided earlier allows that choices will now be extended.
Will look like this.
And of course you can create Conditional Menus, imagine this;
Your character gains the ability to save, and you want to add a save menu in that same mape after a Switch is turned on.
This is what you’d do:
@>Change Menu Access: Disable
@Conditional Branch: Switch [0024: Unlock Save Option] == ON
@>Conditional branch: The B button is being pressed
@>Wait: 10 frames
@>Show Choices: : Resume, Items, Save, Exit
: When [Resume]
@> Exit Event Processing
: When [Items]
@>Script: SceneManager.call(Scene_Item)
: When [Save]
@>Script: SceneManager.call(Scene_Save)
: When [Exit]
@>Script: SceneManager.call(Scene_End)
: Branch End
: Else
@>Conditional branch: The B button is being pressed
@>Wait: 10 frames
@>Show Choices: : Resume, Items, Exit
: When [Resume]
@> Exit Event Processing
: When [Items]
@>Script: SceneManager.call(Scene_Item)
: When [Exit]
@>Script: SceneManager.call(Scene_End)
: Branch End
@>
:Branch End
What’s happening here is that after the Switch [0024: Unlock Save Option] is turned ON, the Menu will receive a new option, the ‘Save’ Option. And if that same switch is OFF, it will only present the ‘Resume’, ‘Items’ and ‘Exit’ options.
Now all you have to do is bind that [0024: Unlock Save Option] switch to an event so that you can activate the ‘Save’ option in your custom Menu.
So this is it!
TL;DR:
-
You need to place the Menu Event containing the Code on every Map! (as a better alternative you can place them as Common Events and trigger them with a switch.)
-
Run it as a Parallel Process!
-
If you want more choice options, install this script!
-
Get familiarized with the Script Editor, even if you don’t create scripts, there’s a lot of useful vanilla stuff you can do with call commands.
If you have any doubts I’ll be happy to clarify, within my knowledge.
Keep making games