New account registration is temporarily disabled.

WINTHORP'S PROFILE

Amateur creator with RPG Maker, started with '95 all the way up to MZ

Search

Hi all!

Here I am!
I'm Winthorp from Italy, I met RPG Maker back in 2000 when I was a little 14 years old introverted boy.
I loved this tool from the very beginning and I managed to put some focus in me to create several (horrible, but I love them) games!

I remember having created my first game, Ardensia, with RPG Maker 2000, then Ardensia 2 with, I believe, RM 2003 and when RMXP came out I made a reboot of the first one (Ardensia XP, pretty original :P ) as well as a mini stand alone game connecting Ardensia XP to the (never finished) Ardensia 2 XP.
Oh I wish to find those games again but... they are in some crancky external HDD somewhere

Now, 20 year... 20 YEARS??? OH GOD... ehm... 20 years later I'm here with a renewed fire for RPG Maker (I got MV but never really kicked in, now I bought MZ and I'm starting to write and write)

I'm making an original project for now but later I'm planning to release, yet another, Ardensia rebooth, this time all the trilogy (never ever realized the third) in a single game, and for free. I don't know, I just don't want Rag and the other to remain buried only in my head and the few people that played the old ones

[RMMZ] Plugin to call Common Event on skill use (Combat)

Hi all!

I wanted to use a totally different Combat System compared to MZ's standard BS, to do so while keeping the normal combat HUD I thought about calling a CE during the skill use with two variables, one storing the skill ID and one storing the target. Then the Common Event would handle everything (it's a dice rolling system a la Chronicle Of Darkness)

Problem is that the CE doesn't show up DURING combat but after, having looked to the forum it seem that reserveCommonEvent doesn't allow the CE to start instantly

Anyone knows a workaround?

Here is the code!


//=============================================================================
// Plugin Name: Combat Event Trigger
// Author: Winthorp Darkrites (Winter Dream Games Creator)
// Description: Triggers a Common Event during combat actions and sets variables.
// Use: Feel free to use for private and commercial projects. Feel free to edit. Please give credits.
//=============================================================================

/*:
* @target MZ
* @plugindesc Triggers a Common Event during combat actions and sets variables for Skill ID and Target ID.
* @author Winthorp Darkrites
*
* @help WD_CombatEventTrigger.js
*
* This plugin calls a Common Event on skill use.
*
* It does not provide plugin commands.
*/

(function() {
// Register a new Game_Action prototype method
Game_Action.prototype.executeAction = function(target) {
// Call the original executeAction method
this.executeActionOrig(target);

// Check if the action is performed in battle
if ($gameParty.inBattle()) {
// Trigger a Common Event ID when a combat action is executed
var commonEventId = 1; // Replace 1 with the Common Event ID you want to trigger if different

// Check if the Common Event ID is valid
if (commonEventId > 0) {
$gameTemp.reserveCommonEvent(commonEventId);

// Set a variable equal to the skill ID used
var skillIdVariable = 1; // Replace 1 with the Variable ID to store the skill ID if different
if (skillIdVariable > 0) {
$gameVariables.setValue(skillIdVariable, this.item().id);
}

// Set a variable equal to the target's actor or enemy ID
var targetIdVariable = 2; // Replace 2 with the Variable ID to store the target's ID if different
if (targetIdVariable > 0) {
$gameVariables.setValue(targetIdVariable, target.isActor() ? target.actorId() : target.enemyId());
}
}
}
};
})();


Please be kind, I'm a newbie with coding ^^'
Pages: 1