SHININGRIVER'S PROFILE

I do freelance photoshop and writing in my free time. I'm also a computer programmer.

Search

[RMMV] Adding a Choice Window

Hi,

This is an extension of my previous script, which works on fusing two party members. At the moment, the calculation processes are done... the only thing left is the windows, which I'm having trouble with. I need help with the following:

• Preventing input from invalid entries (not proceeding to the status screen for invalid entries)
• Displaying a choice for the user to select whether to proceed to fusion or not

Here's my code for reference... thanks!


//=============================================================================
//
// EdoTenseiFusion_Final.js
// [url]https://kinoar.github.io/rmmv-doc-web/index.html[/url]
//=============================================================================



/*:
 * @plugindesc Starts the fusion process, just like in SMT
 * @author Sai Hikawa
 *
 * @param none
 * @desc none
 * @default false
 *
 * @help
 *
 * Plugin Command:
 *
 * fusion - initiates the fusion thinggy
 *
 */


 //=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
 // Global Variables
 // Fusion result array and selected demons
 //=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

 var resultArray = [32];
	// 2 - Avatar
	resultArray[0] = [0,20,29,23,0,25,23,0,16,7,7,23,0,0,20,23,0,6,25,31,23,20,16,6,2,20,33,24,0,6,6,0,7];
	// 3 - Avian
	resultArray[1] = [20,0,13,23,25,29,16,0,0,27,29,5,0,0,23,25,0,25,24,0,23,24,0,6,3,13,25,23,0,0,23,0,27];
	// 4 - Beast
	resultArray[2] = [29,13,9,13,2,20,29,4,20,7,27,15,27,33,2,11,33,0,2,3,34,20,29,0,4,11,33,5,27,15,20,22,12];
	// 5 - Brute
	resultArray[3] = [23,23,13,9,23,34,27,5,16,27,0,4,18,33,0,7,15,0,3,23,0,0,0,0,5,23,16,0,18,18,0,11,13];
	// 6 - Deity
	resultArray[4] = [0,25,2,23,0,25,0,6,25,27,16,24,0,8,0,25,0,10,25,12,5,16,0,0,6,31,30,23,0,0,23,3,25];
	// 7 - Divine
	resultArray[5] = [25,29,20,34,25,9,25,7,25,0,31,4,31,11,0,25,22,25,0,0,27,0,0,0,7,29,15,11,31,12,20,12,29];
	// 8 - Dragon
	resultArray[6] = [23,16,29,27,0,25,0,0,24,29,29,27,0,29,0,20,0,20,30,29,23,16,28,0,8,13,0,24,0,29,24,3,2];
	// 9 - Element
	resultArray[7] = [0,0,4,5,6,7,0,26,0,11,12,13,0,15,16,0,18,0,20,0,22,23,24,25,9,27,0,29,30,31,0,33,34];
	// 10 - Entity
	resultArray[8] = [16,0,20,16,25,25,24,0,0,25,23,24,0,5,24,16,0,6,23,27,16,16,16,6,10,5,31,16,0,0,16,5,25];
	// 11 - Fairy
	resultArray[9] = [7,27,7,27,27,0,29,11,25,9,34,18,27,18,5,0,27,20,25,18,34,5,34,12,11,29,18,34,28,27,0,34,20];
	// 12 - Fallen
	resultArray[10] = [7,29,27,22,16,31,29,12,23,34,9,33,16,31,31,0,27,24,4,31,5,27,16,7,12,18,15,4,16,5,24,27,22];
	// 13 - Femme
	resultArray[11] = [23,5,15,0,24,4,27,13,24,18,33,9,24,33,24,27,15,0,24,0,33,24,23,11,13,22,15,23,24,5,8,12,5];
	// 14 - Fiend
	resultArray[12] = [0,0,27,4,0,31,0,0,0,27,16,24,0,0,6,34,0,10,21,0,33,0,8,0,14,24,0,5,0,0,0,0,27];
	// 15 - Foul
	resultArray[13] = [0,0,33,18,8,11,29,15,5,18,31,33,0,0,0,0,0,12,0,18,13,0,31,0,15,5,31,12,18,18,0,4,29];
	// 16 - Fury
	resultArray[14] = [20,23,2,24,0,6,0,16,24,5,31,24,6,0,0,24,0,31,23,23,13,24,31,6,16,24,30,23,6,30,6,0,20];
	// 17 - Genma
	resultArray[15] = [23,25,11,0,25,25,20,0,16,0,0,27,34,0,24,0,0,25,34,16,24,25,13,7,17,20,24,13,34,34,20,34,0];
	// 18 - Haunt
	resultArray[16] = [0,0,33,7,0,22,0,18,0,27,27,15,0,0,0,0,0,0,0,33,31,0,31,0,18,34,0,0,15,15,0,22,22];
	// 19 - Herald
	resultArray[17] = [6,25,0,15,10,25,20,0,6,20,24,0,10,12,31,25,0,9,7,12,0,7,6,6,19,12,0,8,12,7,23,0,25];
	// 20 - Holy
	resultArray[18] = [25,24,2,3,25,11,30,20,23,25,4,24,21,0,23,34,0,7,9,5,4,24,2,7,20,11,33,23,0,0,23,0,7];
	// 21 - Jaki
	resultArray[19] = [31,0,3,23,12,0,29,0,27,18,31,0,0,18,23,16,33,12,5,0,33,4,13,0,21,15,4,0,12,0,17,0,32];
	// 22 - Jirae
	resultArray[20] = [23,23,34,11,5,27,23,22,16,34,5,33,33,13,13,24,31,0,4,33,9,29,4,24,22,15,15,12,33,18,23,21,4];
	// 23 - Kishin
	resultArray[21] = [20,24,20,29,16,31,16,23,16,5,27,24,0,0,24,25,0,7,24,4,29,0,16,24,23,13,30,13,0,0,16,0,13];
	// 24 - Lady
	resultArray[22] = [16,0,29,16,0,25,28,24,16,34,16,23,8,31,31,13,31,6,2,13,4,16,0,0,24,23,23,13,0,0,23,18,27];
	// 25 - Megami
	resultArray[23] = [6,6,0,13,0,20,0,25,6,12,7,11,0,0,6,7,0,6,7,0,24,24,16,0,25,12,30,11,0,16,6,31,23];
	// 26 - Mitama
	resultArray[24] = [2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,0,27,28,29,30,31,32,33,34];
	// 27 - Night
	resultArray[25] = [20,13,11,0,31,29,13,27,5,29,18,22,24,5,24,20,34,12,11,15,15,13,23,12,27,9,31,0,24,24,0,4,7];
	// 28 - Raptor
	resultArray[26] = [33,25,33,23,30,15,0,0,31,18,15,15,0,31,30,24,0,0,33,4,15,30,23,30,28,31,0,15,16,16,0,31,18];
	// 29 - Snake
	resultArray[27] = [24,23,5,4,23,11,24,29,16,34,4,23,5,12,23,13,0,8,23,0,12,13,13,11,29,0,15,9,5,28,23,0,27];
	// 30 - Tyrant
	resultArray[28] = [0,0,27,0,0,31,0,30,0,28,16,24,0,18,6,34,15,12,0,12,33,0,0,0,30,24,16,5,0,16,0,27,27];
	// 31 - Vile
	resultArray[29] = [6,0,15,18,0,12,29,31,0,27,5,5,0,18,30,34,15,7,0,0,18,0,0,16,31,24,16,28,16,0,23,15,22];
	// 32 - Wargod
	resultArray[30] = [6,23,20,18,23,20,24,0,16,0,24,8,0,0,6,20,0,23,23,17,23,16,23,6,32,0,0,23,0,23,0,0,0];
	// 33 - Wilder
	resultArray[31] = [0,0,22,0,3,12,3,33,5,34,27,12,0,4,0,34,22,0,0,0,21,0,18,31,33,4,31,0,0,15,0,9,4];
	// 34 - Yoma
	resultArray[32] = [7,27,12,13,25,29,2,34,25,20,22,5,27,29,20,0,22,25,7,32,4,13,27,23,34,7,18,27,27,22,0,4,9];

// There should be another array for cursed fusions:


// Another array for elemental fusions:


// Temporary global variables for referencing selected items
var firstDemonClass = 8;
var secondDemonClass = 8;
var selectedDemon = 0;
var actor1Selected;


(function() {
	var _Scene_Map_createallwindows = Scene_Map.prototype.createAllWindows;
	var _Game_Message_isBusy = Game_Message.prototype.isBusy;
	var _Actor_List = Window_Selectable.prototype.start; //addition
	var _Game_Interpreter_pluginCommand = Game_Interpreter.prototype.pluginCommand;

	// adds the 'fusion' plugin command
	Game_Interpreter.prototype.pluginCommand = function(command, args) {
		_Game_Interpreter_pluginCommand.call(this, command, args);
		if (command === 'fusion') {
			// As long as you're not in battle
			if (!$gameParty.inBattle()) {
				SceneManager._scene._myWindow.refresh();
				SceneManager._scene._myWindow.show();
				SceneManager._scene._myWindow.open();
				SceneManager._scene._myWindow.activate();
				SceneManager._scene._myWindow.select(1);
				SceneManager._scene._fusionHelpWindow.refresh();
				SceneManager._scene._fusionHelpWindow.show();
				SceneManager._scene._fusionHelpWindow.open();
			};
		}
	};

	Game_Message.prototype.isBusy = function() {
		if (SceneManager._scene._myWindow && SceneManager._scene._myWindow.isOpen()) {
			return true;
		}
		return _Game_Message_isBusy.call(this);
	};

	// Creates all window for the fusion
	Scene_Map.prototype.createAllWindows = function() {
		_Scene_Map_createallwindows.call(this);
		
		// This is the fusion window, which displays all party members
		// and possible results
		this._myWindow = new Fusion_Window(0, 0);
		this.addWindow(this._myWindow);
		this._myWindow.close();

		// This is the fusion window's help window
		this._fusionHelpWindow = new Fusion_Window_Help();
		this.addWindow(this._fusionHelpWindow);
		this._fusionHelpWindow.close();

		// This is the result window
		this._fusionResultWindow = new Result_Window_Status();
		this.addWindow(this._fusionResultWindow);
		this._fusionResultWindow.close();

		// This is the choice window displayed alongside the result window
		
		this._fusionChoiceWindow = new Fusion_Choice_Window();
		this.addWindow(this._fusionChoiceWindow);
		this._fusionChoiceWindow.close();
		
		// Declaring pseudo-parent-child relationships
		this._myWindow._fusionHelpWindow = this._fusionHelpWindow;
		this._myWindow._fusionResultWindow = this._fusionResultWindow;
		//this._myWindow._fusionChoiceWindow = this._fusionChoiceWindow;
	};

	
 //=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
 // Fusion Window
 // Define the Fusion window class
 //=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

	function Fusion_Window() {
		this.initialize.apply(this, arguments);
	}

	Fusion_Window.prototype = Object.create(Window_Selectable.prototype);
	Fusion_Window.prototype.constructor = Fusion_Window;
	
	Fusion_Window.prototype.windowWidth = function() {
		return 816;
	};

	Fusion_Window.prototype.standardFontSize = function() {
	    return 20;
	};
	
	Fusion_Window.prototype.maxItems = function() {
		return $gameParty.size();

	};

	Fusion_Window.prototype.numVisibleRows = function() {
		return Math.min(10,this.maxItems());
	};

	// This part draws the content
	// Also sets the help window.
	Fusion_Window.prototype.drawItem = function(index) {
		if (index == 0) {
			this.drawHeader();
		return;
		}
		this.setHelpWindow(this._fusionHelpWindow);
		
		var actor = $gameParty.members()[index];
		var rect = this.itemRectForText(index);
		var segmentWidth1 = rect.width/2;
		var segmentWidth2 = segmentWidth1/10;
		var segmentWidth3 = segmentWidth1/10;
		var actorClass = $gameParty.members()[index]._classId;

		// If there's already a selected demon
		if ( actor && actor1Selected ) {
			this.drawText(index, rect.x, rect.y, segmentWidth2);
			this.drawActorClass(actor, rect.x+segmentWidth2, rect.y, segmentWidth2*4);
			this.drawActorName(actor, rect.x+(segmentWidth2*4), rect.y, segmentWidth2*4);
			this.drawActorLevel(actor, rect.x+(segmentWidth2*8), rect.y, segmentWidth2*8);

			//This part shows whether they're fuseable or not
			//refers to the resultsArray above

			//Checks wether they are the same party member.
			if ( actor1Selected._actorId == actor._actorId){
				this.changeTextColor(this.deathColor());
				this.drawText( '----------', rect.x + segmentWidth3*10, rect.y, segmentWidth3*10);
				this.resetTextColor();
			}
			//If element
			else if ( resultArray[actor1Selected._classId - 2][ actor._classId - 2] == 9 ){
				this.changeTextColor(this.hpGaugeColor1());
				this.drawText( 'Element', rect.x + segmentWidth3*10, rect.y, segmentWidth3*10);
				this.resetTextColor();
			}
			//If not same party member, process the results
			else{
				// If the result is valid, after cross-checking the results array
				if( resultArray[actor1Selected._classId - 2][ actor._classId - 2] != 0 ){
					result = this.calculateFusionResult(actor, actor1Selected);
					// If player level is lower than resulting demon, cannot proceed to fusion
					if ($gameParty.members()[0].level <= result.initialLevel){
						this.changeTextColor(this.deathColor());
					}
					// else, it's fine.
					else{
						this.changeTextColor(this.crisisColor());
					}
					this.drawText( $dataClasses[result.classId].name + '   ' + result.name + '   ' + result.initialLevel, rect.x + segmentWidth3*10, rect.y, segmentWidth3*10);
					this.resetTextColor();
				}
				// If the result is invalid, after cross-checking the results array
				else{
					this.changeTextColor(this.deathColor());
					this.drawText( 'X', rect.x + segmentWidth3*10, rect.y, segmentWidth3*10);	
					this.resetTextColor();
				}
			}
		}
		// This should be the default screen, where no demon has been selected yet
		else {
			this.drawText(index, rect.x, rect.y, segmentWidth2);
			this.drawActorClass(actor, rect.x+segmentWidth2, rect.y, segmentWidth2*4);
			this.drawActorName(actor, rect.x+(segmentWidth2*4), rect.y, segmentWidth2*4);
			this.drawActorLevel(actor, rect.x+(segmentWidth2*8), rect.y, segmentWidth2*8);

			//This part shows whether they're fuseable or not
			//refers to the resultsArray above
			for (i = 0; i < this.maxItems()-1; i++){
				//Checks wether they are the same party member.
				if ( $gameParty.members()[i+1]._actorId == $gameParty.members()[index]._actorId){
					this.changeTextColor(this.deathColor());
					this.drawText( '-', rect.x+segmentWidth1+(segmentWidth3*i), rect.y, segmentWidth3);
					this.resetTextColor();
				}
				//If element
				else if ( resultArray[actorClass - 2][ $gameParty.members()[i+1]._classId - 2] == 9 ){
					this.changeTextColor(this.hpGaugeColor1());
					this.drawText( 'E', rect.x+segmentWidth1+(segmentWidth3*i), rect.y, segmentWidth3);
					this.resetTextColor();
				}
				//If not same party member, process the results
				else{
					if( resultArray[actorClass - 2][ $gameParty.members()[i+1]._classId - 2] != 0 ){
						this.changeTextColor(this.crisisColor());
						this.drawText( 'O', rect.x+segmentWidth1+(segmentWidth3*i), rect.y, segmentWidth3);
						this.resetTextColor();
					}
					
					else{
						this.changeTextColor(this.deathColor());
						this.drawText( 'X', rect.x+segmentWidth1+(segmentWidth3*i), rect.y, segmentWidth3);	
						this.resetTextColor();
					}
				}
			}
		}
	};

	// refresh the window, including moving it into position, which is at the very bottom of the page
	Fusion_Window.prototype.refresh = function() {
		this.move(0, Graphics.boxHeight - this.fittingHeight(this.numVisibleRows()),this.windowWidth(),this.fittingHeight(this.numVisibleRows()));
		this.contents.clear();
		this._fusionHelpWindow.contents.clear();
		this.createContents();
		this.drawAllItems();
	};

	//No need to display the term 'lvl'
	Fusion_Window.prototype.drawActorLevel = function(actor, x, y) {
	    this.drawText(actor.level, x, y, 36, 'left');
	};


	// draw the header text for each column
	Fusion_Window.prototype.drawHeader = function() {
		var rect = this.itemRectForText(0);
		//divide between the selection and the result
		var segmentWidth1 = rect.width/2;
		//partition of the selection part
		var segmentWidth2 = segmentWidth1/10;
		var segmentWidth3 = segmentWidth1/10;
		this.changeTextColor(this.systemColor());
		this.drawText('#', rect.x, rect.y, segmentWidth2);
		this.drawText('Class', rect.x+segmentWidth2, rect.y, segmentWidth2*4);
		this.drawText('Name', rect.x+(segmentWidth2*4), rect.y, segmentWidth2*4);
		this.drawText('LV', rect.x+(segmentWidth2*8), rect.y, segmentWidth2*8);

		// This part runs only if there's nothing selected yet.
		if ( actor1Selected ) {
		// This part runs only if there's already a selected demon
			this.drawText('Result', rect.x + segmentWidth1 + segmentWidth3*3, rect.y, segmentWidth3*10);
		}
		else{
			for (i = 0; i < this.maxItems()-1; i++){
				this.drawText( (i+1), rect.x+segmentWidth1+(segmentWidth3*i), rect.y, segmentWidth3);
			}	
		}
		this.resetTextColor();
	};

	// the header text is on line 0, which is selectable but shouldn't be.
	// Modifying the cursor code means the cursor can't stop on it
	Fusion_Window.prototype.cursorDown = function(wrap) {
		Window_Selectable.prototype.cursorDown.call(this,wrap);
		if (this.index() == 0) {
			Window_Selectable.prototype.cursorDown.call(this,wrap);
		}
	};
	Fusion_Window.prototype.cursorUp = function(wrap) {
		Window_Selectable.prototype.cursorUp.call(this,wrap);
		if (this.index() == 0) {
			Window_Selectable.prototype.cursorUp.call(this,wrap);
		}
	};
	Fusion_Window.prototype.isOkEnabled = function() {
		return true;
	};
	Fusion_Window.prototype.isCancelEnabled = function() {
		return true;
	};
	Fusion_Window.prototype.callCancelHandler = function() {
		this.callHandler('cancel');
	};
	Fusion_Window.prototype.processCancel = function() {
		SoundManager.playCancel();
		this.updateInputData();
		this.deactivate();
		this.close();
		SceneManager._scene._fusionHelpWindow.close();
		SceneManager._scene._fusionResultWindow.close();
		console.log('Cancel triggered');
		actor1Selected = null;
		this.callCancelHandler();
	};
	Fusion_Window.prototype.close = function() {
		if (!this.isClosed()) {
			this._closing = true;
		}
		this._opening = false;
	};
	Fusion_Window.prototype.isOkTriggered = function() {
		return Input.isRepeated('ok');
	};
	Fusion_Window.prototype.isCancelTriggered = function() {
		return Input.isRepeated('cancel');
	};

	// This part handles all functions related to pressing the 'ok' button
	Fusion_Window.prototype.processOk = function() {
		if (this.isCurrentItemEnabled()) {
			this.playOkSound();
			
			// If there's already an actor selected, we should go to the status screen
			// of the resulting demon
			if ( actor1Selected ){
				SceneManager._scene._fusionHelpWindow.refresh();
				this.close();
				var actor = $gameParty.members()[this.index()];
				var res = this.calculateFusionResult(actor, actor1Selected);
				
				//temporarily add the actor to the current party list so the game doesn't crash
				$gameParty.addActor(res.id);

				// Display the status of the actor... runs into an error.
				this._fusionResultWindow.setActor( $gameParty.members()[ $gameParty.size() - 1 ]);
				SceneManager._scene._fusionHelpWindow.close();
				SceneManager._scene._myWindow.close();
				SceneManager._scene._fusionResultWindow.refresh();
				SceneManager._scene._fusionResultWindow.open();
				SceneManager._scene._fusionChoiceWindow.refresh();
				SceneManager._scene._fusionChoiceWindow.open();

				//remove the temporary member from the party
				$gameParty.removeActor(res.id);
				this.callOkHandler();
				actor1Selected = null;
			}
			// else, it's the assumption that there's nothing selected yet.
			else{
				SceneManager._scene._fusionHelpWindow.refresh();
				
				// Sets the selected actor
				actor1Selected = $gameParty.members()[this.index()];
				console.log('****----actor selected:' + actor1Selected);
				
				this._fusionHelpWindow.actorSelected = $gameParty.members()[this.index()];
				SceneManager._scene._myWindow.contents.clear();
				SceneManager._scene._myWindow.refresh();
				SceneManager._scene._fusionResultWindow.close();
				this.callOkHandler();
			}
		}
		else {
			this.playBuzzerSound();
			actor1Selected = null;
		};
	};

 //=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
 // Fusion Help Window
 // Defines the help window class
 // Should display the selected demon on screen 2
 //=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

	Fusion_Window.prototype.createHelpWindow = function() {
	    this._fusionHelpWindow = new Fusion_Window_Help();
	    this.addWindow(this._fusionHelpWindow);
	};

	function Fusion_Window_Help() {
	    this.initialize.apply(this, arguments);
	}

	Fusion_Window_Help.prototype = Object.create(Window_Base.prototype);
	Fusion_Window_Help.prototype.constructor = Fusion_Window_Help;

	Fusion_Window_Help.prototype.initialize = function(numLines) {
	    var width = Graphics.boxWidth;
	    var height = this.contentsHeight()*2;
	    Window_Base.prototype.initialize.call(this, 0, 0, width, height);
	};

	Fusion_Window_Help.prototype.contentsHeight = function() {
	    return this.lineHeight();
	};

	Fusion_Window_Help.prototype.setText = function(text) {
	    if (this._text !== text) {
	        this._text = text;
	        this.refresh();
	    }
	};

	Fusion_Window_Help.prototype.clear = function() {
	    this.setText('');
	};

	Fusion_Window_Help.prototype.setItem = function(item) {
	    this.setText(item ? item.name : '');
	};

	Fusion_Window_Help.prototype.refresh = function() {
	    this.contents.clear();
	    var actorSelected;
	    this.setText('Select the 1st demon');
	    
	    if(actorSelected){
	    	this.setText('Select the second Demon \n    Currently Selected: ' + $dataClasses[actorSelected._classId].name + '   ' + actorSelected._name + '   ' + actorSelected.level);
	    	console.log ('From Help window, actor1Selected is : ' + actorSelected._name);
	    }
	    else{
			this.setText('Select the 1st demon');
	    };
	    this.drawTextEx(this._text, this.textPadding(), 0);
	};

	Fusion_Window_Help.prototype.standardFontSize = function() {
	    return 20;
	};
	Fusion_Window_Help.prototype.lineHeight = function() {
	    return 36;
	};
	Fusion_Window_Help.prototype.standardPadding = function() {
	    return 18;
	};
	Fusion_Window_Help.prototype.textPadding = function() {
	    return 3;
	};

 //=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
 // Fusion Result Status Window
 // Defines the result window class
 // Should display the resulting demon's stats and skills
 // this._fusionResultWindow = new Result_Window_Status();
 //=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

	function Result_Window_Status() {
		this.initialize.apply(this, arguments);
	}

	Result_Window_Status.prototype = Object.create(Window_Status.prototype);
	Result_Window_Status.prototype.constructor = Result_Window_Status;

	Result_Window_Status.prototype.initialize = function() {
	    var width = Graphics.boxWidth;
	    var height = Graphics.boxHeight-60;
	    Window_Selectable.prototype.initialize.call(this, 0, 60, width, height);
	    this.refresh();
	    this.activate();
	    this.contents.fontSize = 20;
	};

	Result_Window_Status.prototype.refresh = function() {
	    this.contents.clear();
	    if (this._actor) {
	        //var lineHeight = this.lineHeight();
	        console.log(' Actor to be displayed: ' + this._actor._name);
	        var lineHeight = this.lineHeight()/2;
	        this.drawBlock2(lineHeight * 2);
	        this.drawBlock1(lineHeight * 0);
	        this.drawHorzLine(lineHeight * 1);
	        this.drawHorzLine(lineHeight * 6);
	        this.drawBlock3(lineHeight * 7);
	        this.drawHorzLine(lineHeight * 15);
	        this.drawBlock4(lineHeight * 16);
	    }
	};

	Result_Window_Status.prototype.setActor = function(actor) {
	    if (this._actor !== actor) {
	        this._actor = actor;
	        this.refresh();
	    }
	};

	// Contents
	Result_Window_Status.prototype.drawBlock1 = function(y) {
	    this.drawActorClass(this._actor, 6, y);
	    this.drawActorName(this._actor, 100, y);
	    this.drawText(this._actor.desc, 6, y*2);
	};

	Result_Window_Status.prototype.drawBlock2 = function(y) {
	    this.drawActorFace(this._actor, Graphics.boxWidth - 350, 0, 300, this.contentsHeight());
	    this.drawBasicInfo(6, y);
	    this.drawExpInfo(180, y);
	};

	Result_Window_Status.prototype.drawBlock3 = function(y) {
	    this.drawParameters(6, y);
	};

	Result_Window_Status.prototype.drawBlock4 = function(y) {
	    this.drawSkills(6,y);
	};

	Result_Window_Status.prototype.drawSkills = function(x, y) {
		var args = this._actor.skills();
		var lineHeight = (this.lineHeight()/7)*5;
	    var y2;
		this.changeTextColor(this.systemColor());
		this.drawText('Skills:', x, y);
		this.resetTextColor();
		var segmentWidth1 = (Graphics.boxWidth - 200 )/(args.length/4);
		console.log(args.length);
		console.log(args[0]);
		
		var rect = this.itemRect(y);
	    rect.width = segmentWidth1*4;
	    rect.height = lineHeight*5;
	    rect.x = x;
	    rect.y = lineHeight;
	    rect.lineHeight = lineHeight;
	    
	    // Maximum number of listed skills in a column.
	    var maxCols = 8;
	    
	    var len = args.length;
	    // Determine how many columns are needed by dividing the length by 5 then
	    // round the number up

	    var cols = Math.ceil(len/maxCols);

	    if ( args != null){
		//First case, if skills are less than or equal to 5, requiring one column
		    if (len <= maxCols){
				for (i = 0; i < len-1; i++){
					y2 = y + lineHeight * i;
					console.log(args[i]);
					this.drawText(args[i].name, rect.x, rect.y + y2, segmentWidth1);
				}
			}
		    else{
		    	for (i = 0; i < maxCols; i++){
		    		for( j = 0; j < cols; j++){
		    			y2 = y + lineHeight * i;
		    			//just making sure that it isn't empty for this iteration.
		    			if (args[ i+(j*maxCols) ]){
		    				this.drawText(args[ i+(j*maxCols) ].name, rect.x + (150*j), rect.y + y2, segmentWidth1);		
		    			}
		    		}
		    	}
		    }
	    }
	};

	Result_Window_Status.prototype.maxCols = function() {
	    return 2;
	};

	Result_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;
	};

	Result_Window_Status.prototype.drawBasicInfo = function(x, y) {
	    //var lineHeight = this.lineHeight()/1.5;
	    var lineHeight = this.lineHeight();
	    this.drawActorLevel(this._actor, x, y + lineHeight * 0);
	    this.drawActorHp(this._actor, x, y + lineHeight * 1);
	    this.drawActorMp(this._actor, x+180, y + lineHeight * 1);
	};

	Result_Window_Status.prototype.drawActorLevel = function(actor, x, y) {
	    this.changeTextColor(this.systemColor());
	    this.drawText(TextManager.levelA, x, y, 48);
	    this.resetTextColor();
	    this.drawText(actor.level, x + 50, y, 36, 'right');
	};

	Result_Window_Status.prototype.drawExpInfo = function(x, y) {
	    var lineHeight = this.lineHeight()/1.5;
	    var expTotal = TextManager.expTotal.format(TextManager.exp);
	    var expNext = TextManager.expNext.format(TextManager.level);
	    var value1 = this._actor.currentExp();
	    var value2 = this._actor.nextRequiredExp();
	    if (this._actor.isMaxLevel()) {
	        value1 = '-------';
	        value2 = '-------';
	    }
	    this.changeTextColor(this.systemColor());
	    //this.drawText(expTotal, x, y + lineHeight * 0, 270);
	    //this.drawText(expNext, x, y + lineHeight * 2, 270);
	    this.drawText('Next', x, y + lineHeight*0, 270);
	    this.resetTextColor();
	    //this.drawText(value1, x, y + lineHeight * 1, 270, 'right');
	    //this.drawText(value2, x, y + lineHeight * 3, 270, 'right');
	    this.drawText(value2, x+80, y + lineHeight*0, 100, 'right');
	};

	Result_Window_Status.prototype.drawParameters = function(x, y) {
	    var lineHeight = this.lineHeight()/1.4;
	    for (var i = 0; i < 6; i++) {
	        var paramId = i + 2;
	        var y2 = y + lineHeight * i;
	        this.changeTextColor(this.systemColor());
	        this.drawText(TextManager.param(paramId), x, y2, 160);
	        this.resetTextColor();
	        this.drawText(this._actor.param(paramId), x + 120, y2, 60, 'right');
	    }
	};

	Result_Window_Status.prototype.drawProfile = function(x, y) {
		this.drawTextEx(this._actor.profile(), x, y);
		//this.drawText(this._actor.profile(), x, y);
	};

	Result_Window_Status.prototype.drawTextEx = function(text, x, y) {
	    if (text) {
	        var textState = { index: 0, x: x, y: y, left: x };
	        textState.text = this.convertEscapeCharacters(text);
	        textState.height = this.calcTextHeight(textState, false);
	        textState.width = this.contentsWidth();
	        //this.resetFontSettings();
	        while (textState.index < textState.text.length) {
	            this.processCharacter(textState);
	        }
	        return textState.x - x;
	    }
	    else {
	        return 0;
	    }
	};

	Result_Window_Status.prototype.drawActorFace = function(actor, x, y, width, height) {
		//this.drawFace(actor.faceName(), actor.faceIndex(), x, y, Math.floor((this.width - (this.standardPadding() * 2)) / this.maxCols()), height);
	    var bustName = actor.name();
		//var bitmap = ImageManager.loadPicture(bustName);
	    var bitmap = ImageManager.loadPicture(bustName + '_Status');
	    //this.drawFace(actor.faceName(), actor.faceIndex(), x, y, width, height);
		var ox = 0;
		var oy = 0;
	    var dx = x - 1;
	    var dy = y ;
	    var sx = bitmap.width / 2 - width / 2 - ox;
	    var sy = oy;
	    var sh = height;
	    if (bitmap != null){
	        this.contents.unlimitedBlt(bitmap, sx, sy, width, sh, dx, dy);
	    };
	};

	Bitmap.prototype.unlimitedBlt = function(source, sx, sy, sw, sh, dx, dy, dw, dh) {
	    dw = dw || sw;
	    dh = dh || sh;
	        this._context.globalCompositeOperation = 'source-over';
	        this._context.drawImage(source._canvas, sx, sy, sw, sh, dx, dy, dw, dh);
	        this._setDirty();
	};

	Result_Window_Status.prototype.drawActorCharacter = function(actor, x, y) {
	    this.drawCharacter(actor.characterName(), actor.characterIndex(), x, y);
	};

	Result_Window_Status.prototype.drawActorName = function(actor, x, y, width) {
	    width = width || 168;
	    this.changeTextColor(this.hpColor(actor));
	    this.drawText(actor.name(), x, y, width);
	};

	Result_Window_Status.prototype.drawActorClass = function(actor, x, y, width) {
	    width = width || 168;
	    this.resetTextColor();
	    this.drawText(actor.currentClass().name, x, y, width);
	};

	Result_Window_Status.prototype.drawActorNickname = function(actor, x, y, width) {
	    width = width || 270;
	    this.resetTextColor();
	    this.drawText(actor.nickname(), x, y, width);
	};

	Result_Window_Status.prototype.drawActorLevel = function(actor, x, y) {
	    this.changeTextColor(this.systemColor());
	    this.drawText(TextManager.levelA, x, y, 48);
	    this.resetTextColor();
	    this.drawText(actor.level, x + 84, y, 36, 'right');
	};

	Result_Window_Status.prototype.drawActorIcons = function(actor, x, y, width) {
	    width = width || 144;
	    var icons = actor.allIcons().slice(0, Math.floor(width / Result_Window_Status._iconWidth));
	    for (var i = 0; i < icons.length; i++) {
	        this.drawIcon(icons[i], x + Result_Window_Status._iconWidth * i, y + 2);
	    }
	};

	Result_Window_Status.prototype.drawCurrentAndMax = function(current, max, x, y,
	                                                   width, color1, color2) {
	    var labelWidth = this.textWidth('HP');
	    var valueWidth = this.textWidth('0000');
	    var slashWidth = this.textWidth('/');
	    var x1 = x + width - valueWidth;
	    var x2 = x1 - slashWidth;
	    var x3 = x2 - valueWidth;
	    if (x3 >= x + labelWidth) {
	        this.changeTextColor(color1);
	        this.drawText(current, x3, y, valueWidth, 'right');
	        this.changeTextColor(color2);
	        this.drawText('/', x2, y, slashWidth, 'right');
	        this.drawText(max, x1, y, valueWidth, 'right');
	    } else {
	        this.changeTextColor(color1);
	        this.drawText(current, x1, y, valueWidth, 'right');
	    }
	};

	Result_Window_Status.prototype.drawActorHp = function(actor, x, y, width) {
	    width = width || 186;
	    var color1 = this.hpGaugeColor1();
	    var color2 = this.hpGaugeColor2();
	    this.drawGauge(x, y, width, actor.hpRate(), color1, color2);
	    this.changeTextColor(this.systemColor());
	    this.drawText(TextManager.hpA, x, y, 44);
	    this.drawCurrentAndMax(actor.hp, actor.mhp, x, y, width,
	                           this.hpColor(actor), this.normalColor());
	};

	Result_Window_Status.prototype.drawActorMp = function(actor, x, y, width) {
	    width = width || 186;
	    var color1 = this.mpGaugeColor1();
	    var color2 = this.mpGaugeColor2();
	    this.drawGauge(x, y, width, actor.mpRate(), color1, color2);
	    this.changeTextColor(this.systemColor());
	    this.drawText(TextManager.mpA, x, y, 44);
	    this.drawCurrentAndMax(actor.mp, actor.mmp, x, y, width,
	                           this.mpColor(actor), this.normalColor());
	};

	Result_Window_Status.prototype.drawActorTp = function(actor, x, y, width) {
	    width = width || 96;
	    var color1 = this.tpGaugeColor1();
	    var color2 = this.tpGaugeColor2();
	    this.drawGauge(x, y, width, actor.tpRate(), color1, color2);
	    this.changeTextColor(this.systemColor());
	    this.drawText(TextManager.tpA, x, y, 44);
	    this.changeTextColor(this.tpColor(actor));
	    this.drawText(actor.tp, x + width - 64, y, 64, 'right');
	};

	Result_Window_Status.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);
	};

 //=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
 // Fusion Choice Window
 // Let's the user decide wether to proceed to fusion or not
 //=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

	function Fusion_Choice_Window() {
	    this.initialize.apply(this, arguments);
	};

	Fusion_Choice_Window.prototype = Object.create(Window_Command.prototype);
	Fusion_Choice_Window.prototype.constructor = Fusion_Choice_Window;

	Fusion_Choice_Window.prototype.initialize = function(x, y) {
	    Window_Command.prototype.initialize.call(this, x, y);
	    this.addCommand("Yes", "yes");
	    this.addCommand("No", "no");
	};

	Fusion_Choice_Window.prototype.numVisibleRows = function() {
	    return 1;
	};

	Fusion_Choice_Window.prototype.maxCols = function() {
	    return 2;
	};

	Fusion_Choice_Window.prototype.itemTextAlign = function() {
	    return 'center';
	};


 //=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
 // Fusion Process
 // Defines processes and calculation related to fusion
 // This part calculates the result of the fusion based on the class
 // of the ingredients. Should not allow fusion above main character's
 // level. 
 //=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

	Fusion_Window.prototype.calculateFusionResult = function(item1, item2){
		var fusionResultClass = resultArray[item1._classId - 2][item2._classId - 2];
		var fusionResultArray = [];
		var fusionResultLevel = 0;
		var fusionResult = null;
		
		//create an array for all results
		for ( i = 1; i < $dataActors.length; i++){

			// Adds all actors with the same class to the array
			// For future: Needs to skip those with special tags, like
			// special fusion or evolution only
			// if has boss tag, needs to defeat boss first
			if ( $dataActors[i].classId == fusionResultClass ){
				fusionResultArray.push($dataActors[i]);
				console.log(' Added to the fusionResultArray: ' + $dataActors[i].classId + '  ' + $dataActors[i].name + '  ' + $dataActors[i].initialLevel);
			}
		}
		
		// If Element:
		if ( item2._actorId == item1._actorId){
			// Calculate which element to be the result of
			console.log('calculateFusionResult: Element: item11Selected.name is :' + item2._name);
			console.log('calculateFusionResult: Element: item1.name is :' + item1._name);
		}
		// If not element but valid:
		else if( resultArray[item2._classId - 2][ item1._classId - 2] != 0 ){
			
			var lvlOfDemon1 = $dataActors[item2._actorId].initialLevel;
			var lvlOfDemon2 = $dataActors[item1._actorId].initialLevel;
			fusionResultLevel = Math.floor( ( ( lvlOfDemon2 + lvlOfDemon1 ) / 2 ) + 1);
			
			//find a demon from the result array whose level is less than or equal to
			for ( j = 0; j < fusionResultArray.length; j++){
				if( fusionResultLevel >= fusionResultArray[j].initialLevel ){
					fusionResult = fusionResultArray[j];
				}
			}
		};
		return fusionResult;
	};





})();

[RMMV] How to Pass information to various windows

Hi,
I am at loss as to how to do this. Basically, what I want to accomplish is to have the second window display the item chosen from the first window. Aside from that, enable the user to go back to the first window if he press cancelled on the second window.
What's happening here is that the second help window is not displaying the item selected from the first window.

Here's my code for reference (sorry for the amount of console logs and comments)
I uploaded it as a text file due to the number of lines involved...
Code is here


[RMMV] Custom Equip Menu

Good morning,

I'd like to have some help with this one. I'm trying to replace the equip menu screen with something else (see screenshot below. Don't mind the background, it's something I already worked out beforehand :D). The twist is that only the hero can access this screen (and that this doesn't prompt one to select a party member, just go directly to the screen).
Each equipment would have its own parameters (changing the player's resistance on skills, among others), and provides them skills as they level up. Once all skills for that equipment has been learnt, the equipment would change color.
So my questions are:
1) Would the skill learning as they level up work on equipment, or should I classify them as a class?
2) How do I go about customizing the equipment screen to look and function like the screen below...?

Bunshin screen. Bascially, the bunshins are blank. The player has to collect them as they go around the game world.


Bunsin screen complete. Basically, the ones in full blue are all completely learned. Green is equipped. The purple is the cursor selection. The one in the middle is a secret one that appears only after finishing a quest where all of the rest has been collected.


Let me know if this is doable or too complex to work out. I'm open to a different implementation. Thank you so much!

[SCRIPTING] [RMMV] Selectable windows and databases

Good morning,

It's been a long time since I went back to working on codes. Going with MV was a bit of a shocker (going from RGSS then a long hiatus, then JavaScript), so I'm... in a bit of a slump.

I watched a tutorial about making a basic window (which makes a window, but you can't do any action on it). So my question is...

...How is a selectable window made (and probably accessed through an event)?
...Is it possible to have the contents of the selectable window be from the database (like, showing the list of Actors, their classes, and level)?

I've included a mockup in Excel that I'm trying to accomplish:


Thank you very much~

Turning Tiles?

Hi, is it possible to do the following, and if yes, any general idea on how I would do this?

1. A tile (object or whatnot... I haven't decided yet XD) that turns as the player pushes on one side (see top part of pic). Player can't push if a part of the tile is hitting the wall.

2. A platform is created after pushing a boulder (I've seen some games do this, but I forgot where)

3. Changing the entire map layout after a certain event (Still the same map, but the arrangement of tiles would be different). For example, the entire map looks like one huge square, then after talking to an NPC, the whole room would have divisions.




Thank you so much. :-)

Transfer function

I've been trying to use the rightclick->transfer event on VX Ace to create a transfer when a player steps on a tile... Is it possible to activate this only if the player came from a specific direction? For example, it will only activate if the player came from the left side of the tile, and will not if he came from other sides.

Selecting an item

I'm having trouble with displaying the selected item. What's happening is that the window displays the item selected previously, not the item currently selected. For example:
1st iteration: Selected option 2, displays nil
2nd iteration: Selected option 1, displays option 2
3rd iteration: Selected option 5, displays option 1
4th iteration: Selected option 4, displays option 5
and so forth.
The item being displayed is the selected item from Window_PartyList, and is displayed on Window_Header2.
Please help me... T___T



#==============================================================================
# Class Scene_Fusion < Scene_MenuBase
# This class is for displaying the Fusion screen. All options should
# open the next screen, Scene_Fusion2
#==============================================================================
class Scene_Fusion < Scene_MenuBase
  def start
    super
    # Fusion 1
    @header1 = Window_Header.new(0, 0, Graphics.width, 132)
    @list1   = Window_PartyList.new(0, 132, Graphics.width)
    @list1.set_handler(:ok, method(:continue))
    @list1.set_handler(:cancel, method(:return_scene))
    # Fusion 2
    @header2 = Window_Header2.new(0, 0, Graphics.width, 132)
    @list2   = Window_PartyList2.new(0, 132, Graphics.width)
    @list2.set_handler(:ok, method(:continue))
    @list2.set_handler(:cancel, method(:return_scene))
    
    # Setup Fusion 1 as the start point
    @list1.activate # Activate the first list.
    @list2.deactivate # Deactivate the second list.
    @list2.hide
    @header2.hide   # Hide the second list and header.
  end
  
  def continue
    @list1.deactivate
    @list1.hide
    @header1.hide
    @list2.show
    $selected = @list1.selected
    @header2.show
    @list2.activate
  end
end

#==============================================================================
# Class Window_Header < Window_Base
# This class displays the options at the top.
#==============================================================================
class Window_Header < Window_Base
  def initialize(x, y, width, height)
    super
    self.opacity = 0
    draw_headers
    @opening = @closing = false
  end #def initialize
  def dispose
    contents.dispose unless disposed?
    super
  end #def dispose

  def draw_headers
    line_height = 16
    change_color(system_color)
    draw_text(30, 0, 250, line_height, "Select First Demon")
    draw_text(30, 40, 85, line_height, "Race")
    draw_text(120, 40, 85, line_height, "Name")
    draw_text(265, 40, 85, line_height, "LV")
    for i in 1..10
      eval("draw_text(300+(30*#{i-1}), 0, 30, 10, #{i})")
    end # for
    change_color(normal_color)
  end #def draw_headers
end #class Window_Header

#==============================================================================
# Class Window_Header2 < Window_Base
# This class displays the options at the top.
#==============================================================================
class Window_Header2 < Window_Base
  def initialize(x, y, width, height)
    super
    self.opacity = 0
    #$selected = $list1.selected
    draw_headers
    @opening = @closing = false
  end #def initialize
  
  def dispose
    contents.dispose unless disposed?
    super
  end #def dispose
  
  def draw_headers
    line_height = 16
    change_color(system_color)
    draw_text(30, 0, 250, line_height, "Select Second Demon")
    draw_text(400, 0, 300, line_height, $selected.class.name)
#   draw_text(450, 0, 300, line_height, $selected.level)
    draw_text(30, 40, 85, line_height, "Race")
    draw_text(120, 40, 85, line_height, "Name")
    draw_text(265, 40, 85, line_height, "LV")
    draw_text(420, 40, 85, line_height, "Result")
    change_color(normal_color)
  end #def draw_headers
end #class Window_Header2


#==============================================================================
# Class Window_PartyList < Window_Selectable
# This class displays the list of party members. Should not include the
# main actor. 
#==============================================================================
class Window_PartyList < Window_Selectable
  def initialize(x, y, width)
    super(x, y, width, Graphics.height - y)
    self.opacity = 0
    data = []
    self.index = 0 #Do not include the main actor!
    activate
    refresh
  end #def initialize

  def item_max
    @data ? @data.size : 1
  end #def item_max
    
  def make_item_list
    @data = $game_party.members.compact
    @data.delete_at(0) #Ensures that the first party member isn't bothered.
  end #def make_item_list
  
  def draw_item(index)
    line_height = 16
    item = @data[index]
    if item
      rect = item_rect_for_text(index)
      #draw_text(rect, item.id)
      draw_text_ex(0, rect.y, item.id)
      #draw_text_ex(rect.x + 15, rect.y, item.class.name)
      draw_text_ex(30, rect.y, item.class.name)
      #draw_text_ex(rect.x + 100, rect.y, item.name)
      draw_text_ex(120, rect.y, item.name)
      #draw_text_ex(rect.x + 180, rect.y, item.level)
      draw_text_ex(265, rect.y, item.level)
      for i in 1..10
        if index==i-1
          #If same actor, cannot be fused
          eval("draw_text(300+(30*#{i-1}), rect.y, 30, line_height, '-')")
        elsif item.class == @data[i-1].class
          #else if same class, cannot be fused
          eval("draw_text(300+(30*#{i-1}), rect.y, 30, line_height, 'No')")
        else
          #else, can be fused
          eval("draw_text(300+(30*#{i-1}), rect.y, 30, line_height, 'Yes')")
          #@data[i-1].set_handler(:ok, SceneManager.call(Scene_Fusion2))
        end #end if else

      end #end for
    end #end if
  end #def draw_item
  
  #def selected(value)
  #  @selected = value
  #end
  
  def refresh
    contents.clear
    make_item_list
    create_contents
    draw_all_items
  end #def refresh
  
  def selected
    #return @data[self.index]
    if @data[self.index]
      $selected = @data[1]
    else
      $selected = @data[self.index]
    end
  end #def selected
  
end #class Window_PartyList


#==============================================================================
# Class Window_PartyList2 < Window_Selectable
# This class displays the list of party members. Should not include the
# main actor. 
#==============================================================================
class Window_PartyList2 < Window_Selectable
  def initialize(x, y, width)
    super(x, y, width, Graphics.height - y)
    self.opacity = 0
    data = []
    #$resultClass = Table.new(37,37)
    $resultClass = []
    self.index = 0 #Do not include the main actor!
    initializeTable
    activate
    refresh
  end #def initialize
  
  def initializeTable
$resultClass[0] = [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]
    #	Avatar
$resultClass[1] = [37, 6, 6, 22, 20, 24, 16, 14, 24, 30, 15, 32, 14, 19, 29, 29, 14, 5, 24, 9, 22, 5, 14, 29, 19, 34, 34, 5, 5, 22, 10, 31, 5, 20, 6]
#	Avian
$resultClass[2] = [6, 37, 15, 22, 11, 29, 11, 5, 29, 24, 6, 24, 3, 22, 6, 3, 25, 6, 23, 1, 22, 5, 7, 6, 11, 22, 24, 24, 32, 3, 1, 20, 22, 29, 25]
#	Beast
$resultClass[3] = [6, 15, 37, 11, 2, 1, 20, 19, 11, 11, 9, 29, 34, 1, 20, 34, 34, 29, 1, 30, 35, 2, 29, 15, 9, 1, 34, 14, 1, 9, 7, 7, 19, 16, 10]
#	Brute
$resultClass[4] = [22, 22, 11, 37, 22, 35, 25, 14, 25, 21, 3, 22, 34, 23, 6, 30, 13, 22, 11, 7, 11, 29, 14, 11, 22, 22, 14, 31, 3, 22, 17, 17, 30, 14, 11]
#	Deity
$resultClass[5] = [20, 11, 2, 22, 37, 24, 32, 24, 29, 22, 7, 31, 31, 22, 34, 9, 10, 22, 24, 31, 4, 9, 24, 22, 32, 31, 31, 26, 26, 22, 32, 31, 22, 30, 24]
#	Divine
$resultClass[6] = [24, 29, 1, 35, 24, 37, 10, 24, 1, 31, 24, 32, 14, 5, 7, 2, 29, 24, 9, 22, 22, 11, 24, 1, 29, 5, 13, 24, 24, 3, 5, 2, 19, 1, 29]
#	Dragon
$resultClass[7] = [16, 11, 20, 25, 32, 10, 37, 23, 10, 3, 16, 29, 29, 15, 10, 34, 29, 6, 9, 2, 22, 15, 14, 20, 11, 30, 14, 19, 34, 34, 16, 31, 23, 15, 1]
#	Entity
$resultClass[8] = [14, 5, 19, 14, 24, 24, 23, 37, 24, 22, 23, 5, 4, 23, 14, 5, 4, 31, 22, 31, 14, 14, 14, 5, 4, 1, 32, 5, 14, 26, 26, 31, 14, 4, 24]
#	Fairy
$resultClass[9] = [24, 29, 11, 25, 29, 1, 10, 24, 37, 6, 10, 11, 17, 4, 3, 20, 25, 15, 24, 16, 35, 32, 35, 34, 29, 16, 17, 19, 3, 3, 34, 30, 23, 2, 19]
#	Fallen
$resultClass[10] = [30, 24, 11, 21, 22, 31, 3, 22, 6, 37, 7, 15, 32, 32, 31, 9, 25, 31, 3, 3, 4, 20, 14, 11, 17, 32, 13, 23, 24, 2, 26, 2, 23, 7, 21]
#	Femme
$resultClass[11] = [15, 6, 9, 3, 7, 24, 16, 23, 10, 7, 37, 24, 34, 23, 30, 9, 13, 24, 23, 3, 34, 15, 22, 6, 21, 24, 13, 24, 10, 9, 34, 31, 22, 1, 4]
#	Fiend
$resultClass[12] = [32, 24, 29, 22, 31, 32, 29, 5, 11, 15, 24, 37, 32, 5, 5, 9, 32, 16, 24, 15, 7, 32, 24, 32, 29, 24, 31, 26, 24, 22, 26, 22, 22, 7, 32]
#	Foul
$resultClass[13] = [14, 3, 34, 34, 31, 14, 29, 4, 17, 32, 34, 32, 37, 30, 25, 34, 4, 32, 10, 16, 11, 34, 32, 32, 4, 31, 32, 10, 10, 34, 17, 17, 30, 3, 29]
#	Fury
$resultClass[14] = [19, 22, 1, 23, 22, 5, 15, 23, 4, 32, 23, 5, 30, 37, 23, 15, 30, 15, 22, 34, 11, 23, 32, 5, 23, 5, 22, 32, 22, 15, 5, 31, 5, 30, 19]
#	Genma
$resultClass[15] = [29, 6, 20, 6, 34, 7, 10, 14, 3, 31, 30, 5, 25, 23, 37, 6, 25, 5, 35, 2, 9, 29, 11, 3, 19, 24, 23, 24, 5, 1, 32, 22, 19, 32, 14]
#	Ghost
$resultClass[16] = [29, 3, 34, 30, 9, 2, 34, 5, 20, 9, 9, 9, 34, 15, 6, 37, 3, 11, 6, 10, 30, 32, 11, 32, 10, 30, 10, 5, 7, 15, 11, 5, 5, 30, 2]
#	Haunt
$resultClass[17] = [14, 25, 34, 13, 10, 29, 29, 4, 25, 25, 13, 32, 4, 30, 25, 3, 37, 29, 10, 16, 32, 34, 32, 11, 35, 31, 32, 4, 4, 34, 13, 10, 30, 21, 21]
#	Hero
$resultClass[18] = [5, 6, 29, 22, 22, 24, 6, 31, 15, 31, 24, 16, 32, 15, 5, 11, 29, 37, 5, 15, 22, 26, 24, 31, 31, 24, 31, 26, 5, 22, 29, 26, 6, 1, 29]
#	Holy
$resultClass[19] = [24, 23, 1, 11, 24, 9, 9, 22, 24, 3, 23, 24, 10, 22, 35, 6, 10, 5, 37, 1, 3, 23, 1, 6, 9, 28, 34, 6, 22, 9, 1, 10, 22, 9, 6]
#	Jaki
$resultClass[20] = [9, 1, 30, 7, 31, 22, 2, 31, 16, 3, 3, 15, 16, 34, 2, 10, 16, 15, 1, 37, 15, 15, 11, 11, 34, 22, 31, 31, 6, 34, 11, 15, 22, 7, 15]
#	Jirae
$resultClass[21] = [22, 22, 35, 11, 4, 22, 22, 14, 35, 4, 34, 7, 11, 11, 9, 30, 32, 22, 3, 15, 37, 29, 3, 23, 13, 22, 13, 5, 10, 9, 34, 17, 22, 32, 3]
#	Kishin
$resultClass[22] = [5, 5, 2, 29, 9, 11, 15, 14, 32, 20, 15, 32, 34, 23, 29, 32, 34, 26, 23, 15, 29, 37, 14, 30, 11, 24, 31, 6, 6, 26, 10, 20, 14, 16, 11]
#	Lady
$resultClass[23] = [14, 7, 29, 14, 24, 24, 14, 14, 35, 14, 22, 24, 32, 32, 11, 11, 32, 24, 1, 11, 3, 14, 37, 14, 22, 24, 22, 5, 11, 11, 24, 11, 22, 17, 25]
#	Megami
$resultClass[24] = [29, 6, 15, 11, 22, 1, 20, 5, 34, 11, 6, 32, 32, 5, 3, 32, 11, 31, 6, 11, 23, 30, 14, 37, 10, 32, 31, 5, 9, 2, 0, 26, 5, 9, 22]
#	Night
$resultClass[25] = [19, 11, 9, 22, 32, 29, 11, 4, 29, 17, 21, 29, 4, 23, 19, 10, 35, 31, 9, 34, 13, 11, 22, 10, 37, 32, 32, 10, 10, 34, 25, 23, 14, 35, 6]
#	Omega
$resultClass[26] = [34, 22, 1, 22, 31, 5, 30, 1, 16, 32, 24, 24, 31, 5, 24, 30, 31, 24, 28, 22, 22, 24, 24, 32, 32, 37, 32, 1, 22, 11, 5, 7, 22, 10, 10]
#	Raptor
$resultClass[27] = [34, 24, 34, 14, 31, 13, 14, 32, 17, 13, 13, 31, 32, 22, 23, 10, 32, 31, 34, 31, 13, 31, 22, 31, 32, 32, 37, 31, 13, 29, 14, 14, 5, 32, 17]
#	Seraph
$resultClass[28] = [5, 24, 14, 31, 26, 24, 19, 5, 19, 23, 24, 26, 10, 32, 24, 5, 4, 26, 6, 31, 5, 6, 5, 5, 10, 1, 31, 37, 0, 2, 10, 6, 22, 6, 24]
#	Snake
$resultClass[29] = [5, 32, 1, 3, 26, 24, 34, 14, 3, 24, 10, 24, 10, 22, 5, 7, 4, 5, 22, 6, 10, 6, 11, 9, 10, 22, 13, 0, 37, 22, 7, 5, 22, 30, 25]
#	Touki
$resultClass[30] = [22, 3, 9, 22, 22, 3, 34, 26, 3, 2, 9, 22, 34, 15, 1, 15, 34, 22, 9, 34, 9, 26, 11, 2, 34, 11, 29, 2, 22, 37, 29, 15, 26, 29, 3]
#	Tyrant
$resultClass[31] = [10, 1, 7, 17, 32, 5, 16, 26, 34, 26, 34, 26, 17, 5, 32, 11, 13, 29, 1, 11, 34, 10, 24, 0, 25, 5, 14, 10, 7, 29, 37, 5, 14, 20, 25]
#	Vile
$resultClass[32] = [31, 20, 7, 17, 31, 2, 31, 31, 30, 2, 31, 22, 17, 31, 22, 5, 10, 26, 10, 15, 17, 20, 11, 26, 23, 7, 14, 6, 5, 15, 5, 37, 22, 10, 21]
#	Wargod
$resultClass[33] = [5, 22, 19, 30, 22, 19, 23, 14, 23, 23, 22, 22, 30, 5, 19, 5, 30, 6, 22, 22, 22, 14, 22, 5, 14, 22, 5, 22, 22, 26, 14, 22, 37, 14, 14]
#	Wilder
$resultClass[34] = [20, 29, 16, 14, 30, 1, 15, 4, 2, 7, 1, 7, 3, 30, 32, 30, 21, 1, 9, 7, 32, 16, 17, 9, 35, 10, 32, 6, 30, 29, 20, 10, 14, 37, 3]
#	Yoma
$resultClass[35] = [6, 25, 10, 11, 24, 29, 1, 24, 19, 21, 4, 32, 29, 19, 14, 2, 21, 29, 6, 15, 3, 11, 25, 22, 6, 10, 17, 24, 25, 3, 25, 21, 14, 3, 37]
#	Elements
$resultClass[36] = [6, 25, 10, 11, 24, 29, 1, 24, 19, 21, 4, 32, 29, 19, 14, 2, 21, 29, 6, 15, 3, 11, 25, 22, 6, 10, 17, 24, 25, 3, 25, 21, 14, 3, 37]
  end
  
  def item_max
    @data ? @data.size : 1
  end #def item_max
    
  def make_item_list
    @data = $game_party.members.compact
    @data.delete_at(0) #Ensures that the first party member isn't bothered.
  end #def make_item_list
  
  def draw_item(index)
    item = @data[index]
    if item
      rect = item_rect_for_text(index)
      draw_text(rect, item.id)
      draw_text_ex(rect.x + 15, rect.y, item.class.name)
      draw_text_ex(rect.x + 100, rect.y, item.name)
      draw_text_ex(rect.x + 180, rect.y, item.level)
      #Compute the resulting demon
      #draw_text_ex(rect.x + 350, rect.y, show_result(item.id, index))
#      @classid = $resultClass[$selected.class-1][item.class_id-1]
#      draw_text_ex(rect.x + 350, rect.y, $data_classes[@classid].name)
    end #end if
  end #def draw_item
  
  #should print out the resulting demon.
  #def show_result(item, index)
  #    return $resultClass[item][index]
  #end #show_result
  
  def refresh
    contents.clear
    make_item_list
    create_contents
    draw_all_items
  end #def refresh
  
  #set handler for showing the next screen
end #class Window_PartyList2

Help with ink and recolor

Hi, I need help in inking and coloring this character that I drew. I'm not knowledgeable with coloring and inking, so... :-)
Anyway, here's the picture. Due to the resolution, I'm putting it here as a link:
http://img801.imageshack.us/img801/8536/viw.png
Hair color is dark brown or black. Eye color is red
Scarf is red, and the overshirt is black or dark gray.
Pants is black, if the overshirt is dark gray. Dark gray if it is black.
Shoes are red. :-)
Thank you very much to whoever would take my request! :-)

Custom Menu

I'd like to request a script or whatnot to make my menu look like this:

I'm not sure how to start scripting it, so I'd like to know how to start with it, or if it can be made (I'd rather it be made so I can explore and learn what does what).

I've noticed that RPG Maker VX Ace outlines the text with 1px solid black outline. Is it possible to increase that by 2px? And is it possible to change it to a different color?

Same class, different skills?

I'm new to game making, and I have a question that I'm unsure how to properly word or resolve.

Basically, I have two characters (Let's call them 'A' and 'B') of the same class (For example, Paladin). 'B' is stronger than 'A', and 'B' has a different set of skills from 'A'. My question is how do you do that in RPG Maker VX Ace? From what I can understand, you have "actors" and "classes" on the database. What I wish to accomplish is that 'A' and 'B' are different characters of the same class, but with entirely different skills and whatnot.

Is this possible? If so, how do I do that?
Pages: first 12 next last