MV Need Help with MOG ChronoEngine Plugin

Hey all.

Hopefully I explain this properly...

I am using, at least parts, of the ChronoEngine in my game so that I can utilize items for my puzzles (bow and arrow, boomerang, bombs, etc.)

i developed further needs for the bombs including having remote bombs with no time limit that could be activated at the player's discretion with a remote detonator, as well as the ability to pick up and throw both version of the bombs.

So, this plugin was an add-on plugin they sent me to be able to pick up and throw the bombs.

It has always worked well for the most part, other than for the issue that I am using a pre-made asset pack which didn't come with the sprite for the player holding his arms above his head when the player lifts the bomb.

So, since this plugin required SOME graphic to link to, to work, I just put a random sprite of a ninja there for now and held it off until I could get the proper graphic created for it.

So, here is where the problem comes in: My main character walking sprites is on sheet that has 8 characters' 3x4 walking poses. Whereas the new PNG I have been sent with the character holding his arms above his head for the bomb is on a singular character 3x4.

So the main graphic file does not have a $ but the new, arms up graphic needs the $.

The way this Plugin works is since the main PNG is called TFFutureChar1, the file it creates for the holdup graphic is TFFutureChar1_Pick, but I need the $ inserted in there properly for the pickup file but not the main one.

Below you will find the JS code for this plugin, where you will find this section:

//==============================
// * initMembers
//==============================
var _mog_pick_gcharbase_initMembers = Game_CharacterBase.prototype.initMembers;
Game_CharacterBase.prototype.initMembers = function() {
_mog_pick_gcharbase_initMembers.call(this);
this._pickup = {};
this._pickup.enabled = false;
this._pickup.originalName = "$" + this._characterName;
this._pickup.pose = String(Moghunter.pickPose) === "true" ? true : false;
this._pickup.wait = 0;
this._pickup.check = false;
this._throw = {};
this._throw.enabled = false;
this._throw.through = this._through;
this._throw.directionFixA = String(Moghunter.pickDirectionFix);
this._throw.directionFix = this._directionFix;
this._throw.range = 0;
this._throw.wait = 0;
};

--------

and THIS line-

this._pickup.originalName = "$" + this._characterName;

Is the one they had me edit, adding the

"$" +

part into it but it still hasn't fixed the problem.

Hopefully I explained this properly, if not I will be happy to answer any questions as best I can to hopefully help me solve this.

TLDR: I simply need the function that calls the new PNG with the character holding the bomb above his head to know to go to the same exact file name it's going to but with an added $ in front.

The code:
------------

//=============================================================================
// MOG_PickupThrow.js
//=============================================================================

/*:
* @plugindesc (v1.4) Sistema de arremessar os eventos.
* @Author Moghunter
*
* @param Character Height
* @desc Definição da altura do personagem.
* @Default 22
*
* @param Character Pose
* @desc Ativar pose de carregar objeto.
* @Default true
*
* @param Hold Direction
* @desc Ativar botão de segurar a direção.
* @Default true
*
* @param Hold Direction Button
* @desc Definição do botão que segura a direção.
* @Default pagedown
*
* @param Sound File
* @desc Definição do arquivo de som.
* @Default Jump1
*
* @Help
* =============================================================================
* +++ MOG - Pick Up and Throw (v1.4) +++
* By Moghunter
* https://atelierrgss.wordpress.com/
* =============================================================================
* O sistema permite arremessar o objetos (Eventos) do mapa
*
* =============================================================================
* EVENT COMMENTS
* =============================================================================
* Para definir o objecto a ser arremessado coloque este comentário no evento.
*
* throw : X
*
* X - Distância a ser arremessado.
*
* =============================================================================
* CHARACTER POSES
* =============================================================================
* Para definir o nome da imagem da pose do personagem, nomeie a imagem da
* seguinte forma.
*
* ORIGINAL_FILE_NAME + _pick.png
*
*
*
* Actor1_pick.png
*
* =============================================================================
* PLUGIN COMMAND
* =============================================================================
* Para ativar ou desativar o sistema use o plugin abaixo.
*
* pickup_enable
*
* pickup_disable
*
* =============================================================================
* HISTÓRICO
* =============================================================================
* v1.4 - Melhoria na codificação.
* v1.3 - Compatibilidade com Char Poses plugin.
* v1.2 - Mudança da noteTag para padronizar a forma de comandos.
* v1.1 - Adição do plugin command de ativar e desativar o sistema.
*/

//=============================================================================
// ** PLUGIN PARAMETERS
//=============================================================================
  var Imported = Imported || {};
  Imported.MOG_PickupThrow = true;
  var Moghunter = Moghunter || {};

 Moghunter.parameters = PluginManager.parameters('MOG_PickupThrow');
Moghunter.pickTargetHeight = Number(Moghunter.parameters['Character Height'] || 22);
Moghunter.pickDirectionFix = String(Moghunter.parameters['Character Direction Fix'] || 'true');
Moghunter.pickPose = String(Moghunter.parameters['Character Pose'] || 'true');
Moghunter.pickDirectionButton = String(Moghunter.parameters['Hold Direction'] || 'true');
Moghunter.pickDirectionButtonKey = String(Moghunter.parameters['Hold Direction Button'] || 'pagedown');
Moghunter.pickSoundFile = String(Moghunter.parameters['Sound File'] || 'Jump1');

//=============================================================================
// ** Game_Interpreter
//=============================================================================

//==============================
// * PluginCommand
//==============================
var _mog_pickup_pluginCommand = Game_Interpreter.prototype.pluginCommand
Game_Interpreter.prototype.pluginCommand = function(command, args) {
_mog_pickup_pluginCommand.call(this,command, args);
if (command === "pickup_enable") {
$gameSystem._pickupData[0] = true;
} else if (command === "pickup_disable") {
$gameSystem._pickupData[0] = false;
};
return true;
};

//=============================================================================
// ** Game System
//=============================================================================

//==============================
// * Initialize
//==============================
var _mog_pickup_Gsys_initialize = Game_System.prototype.initialize;
Game_System.prototype.initialize = function() {
_mog_pickup_Gsys_initialize.call(this);
this._pickupData = [true,false];
};

//=============================================================================
// ** Game Character
//=============================================================================

//==============================
// * initMembers
//==============================
var _mog_pick_gcharbase_initMembers = Game_CharacterBase.prototype.initMembers;
Game_CharacterBase.prototype.initMembers = function() {
_mog_pick_gcharbase_initMembers.call(this);
this._pickup = {};
this._pickup.enabled = false;
this._pickup.originalName = "$" + this._characterName;
this._pickup.pose = String(Moghunter.pickPose) === "true" ? true : false;
this._pickup.wait = 0;
this._pickup.check = false;
this._throw = {};
this._throw.enabled = false;
this._throw.through = this._through;
this._throw.directionFixA = String(Moghunter.pickDirectionFix);
this._throw.directionFix = this._directionFix;
this._throw.range = 0;
this._throw.wait = 0;
};

//==============================
// * Update
//==============================
var _mog_pick_gchabase_update = Game_CharacterBase.prototype.update;
Game_CharacterBase.prototype.update = function() {
if (this._throw.wait > 0) {this._throw.wait--;
if (this.isJumping()) {this.updateJump()};
if (!this.isJumping()) {this._throw.wait = 0};
return;
};
if (this._pickup.wait > 0) {this._pickup.wait--;return};
if (this._throw.enabled) {this.updatePickUp();
if (this.needUpdateThrowAnimeStep()) {this.updateAnimation()};
return;
};
_mog_pick_gchabase_update.call(this);
};

//==============================
// * Need Update Throw Anime
//==============================
Game_CharacterBase.prototype.needUpdateThrowAnimeStep = function() {
if (this._tool && this._tool.enabled) {return true};
return false;
};

//==============================
// * Update Pick Up
//==============================
Game_CharacterBase.prototype.updatePickUp = function() {
this._x = $gamePlayer._x;
this._y = $gamePlayer._y;
this._realX = $gamePlayer._realX;
this._realY = $gamePlayer._realY;
};

//==============================
// * can Pass Throw
//==============================
Game_CharacterBase.prototype.canPassThrow = function(x, y, d) {
var x2 = $gameMap.roundXWithDirection(x, d);
var y2 = $gameMap.roundYWithDirection(y, d);
if (d === 2) {x3 = x; y3 = y + 1;
} else if (d === 4) {x3 = x - 1;y3 = y;
} else if (d === 6) {x3 = x + 1;y3 = y;
} else {x3 = x;y3 = y - 1;
};
if (!$gameMap.isValid(x2, y2)) {
return false;
};
if (this.isThrough() || this.isDebugThrough()) {
return true;
};
if (!$gameMap.isPassable(x3, y3)) {
return false;
};
if (this.isCollidedWithCharacters(x2, y2)) {
return false;
};
return true;
};

//==============================
// * clear Throw
//==============================
Game_CharacterBase.prototype.clearThrow = function(wait) {
this._throw.enabled = false;
this._throw.wait = wait ? wait : 30;
this._through = this._throw.through;
this._directionFix = this._throw._directionFix;
};

//==============================
// * throw Event
//==============================
Game_CharacterBase.prototype.throwEvent = function(event) {
var r = event._throw.range; var xr = 0; var yr = 0;
if (this._direction === 2) {
x = this._x; y = this._y + r - 1; x2 = 0; y2 = +r;
for (var i = 0; i < r; i++) {
if (this.canPassThrow(x,y,this._direction)) {xr = x2; yr = y2;break};
y--;y2--;
};
} else if (this._direction === 4) {
x = this._x - r + 1; y = this._y; x2 = -r; y2 = 0;
for (var i = 0; i < r; i++) {
if (this.canPassThrow(x,y,this._direction)) {xr = x2; yr = y2;break};
x++;x2++;
};
} else if (this._direction === 6) {
x = this._x + r - 1; y = this._y; x2 = +r; y2 = 0;
for (var i = 0; i < r; i++) {
if (this.canPassThrow(x,y,this._direction)) {xr = x2; yr = y2;break};
x--;x2--;
};
} else if (this._direction === 8) {
x = this._x; y = this._y - r + 1; x2 = 0; y2 = -r;
for (var i = 0; i < r; i++) {
if (this.canPassThrow(x,y,this._direction)) {xr = x2; yr = y2;break};
y++;y2++;
};
};
if (xr === 0 && yr ===0) {return};
event.jump(xr,yr);
event.clearThrow();
this._pickup.check = true;
};

//=============================================================================
// ** Game Event
//=============================================================================

//==============================
// * start
//==============================
var _mog_pick_gevent_start = Game_Event.prototype.start;
Game_Event.prototype.start = function() {
if (this.canPickUp()) {this.pickUp();return};
_mog_pick_gevent_start.call(this);
};

//==============================
// * check Pick Comment
//==============================
Game_Event.prototype.checkPickComment = function() {
var enable = false
if (!this._erased && this.page()) {this.list().forEach(function(l) {
if (l.code === 108) {var comment = l.parameters[0].split(' : ')
if (comment[0].toLowerCase() == "throw"){
this._throw.range = Number(comment[1]);
enable = true;
};};
}, this);};
return enable;
};

//==============================
// * can Pick UP
//==============================
Game_Event.prototype.canPickUp = function() {
if (!$gameSystem._pickupData[0]) {return false};
if ($gamePlayer._pickup.enabled) {return false};
if (this._trigger > 1) {return false};
if (this._throw.enabled) {return false};
if (this._throw.wait > 0) {return false};
if (this._pickup.wait > 0) {return false};
if ($gamePlayer._pickup.wait > 0) {return false};
if (this._tool && this._tool.wait === 0) {return false};
return this.checkPickComment();
};

//==============================
// * Pick UP
//==============================
Game_Event.prototype.pickUp = function() {
var wait = 15;
this._throw.enabled = true
this._throw.wait = wait;
this._throw.directionFix = this._directionFix;
this._throw.through = this._through;
this._directionFix = this._throw.directionFixA ? true : this._directionFix;
this._through = true;
$gamePlayer._pickup.enabled = true;
$gamePlayer._pickup.wait = wait;
$gamePlayer._pickup.originalName = $gamePlayer._characterName;
if ($gamePlayer._pickup.pose) {$gamePlayer._characterName = $gamePlayer._pickup.originalName + "_Pick"};
if (Imported.MOG_CharPoses) {
$gamePlayer._pickup.originalName = $gamePlayer._originalName.name;
if ($gamePlayer._pickup.pose) {$gamePlayer._characterName = $gamePlayer._originalName.name + "_Pick"};
};
var x = $gamePlayer._x - this._x;
var y = $gamePlayer._y - this._y;
this.jump(x,y,this._direction)
};

//=============================================================================
// ** Game Player
//=============================================================================

//==============================
// * Initialize
//==============================
var _mog_pick_gplayer_initialize = Game_Player.prototype.initialize;
Game_Player.prototype.initialize = function() {
_mog_pick_gplayer_initialize .call(this);
this._dirButton = String(Moghunter.pickDirectionButton) === "true" ? true : false;
this._dirButtonK = String(Moghunter.pickDirectionButtonKey)
};

//==============================
// * move By Input
//==============================
var _mog_gplayer_moveByInput = Game_Player.prototype.moveByInput;
Game_Player.prototype.moveByInput = function() {
if (this._pickup.wait > 0) {return};
if (this._pickup.enabled && this.canMove()) {
if (Input.isTriggered('ok')) {this.throwTarget();return};
if (Input.isPressed(this._dirButtonK)) {this.holdDirectionT();return};
};
_mog_gplayer_moveByInput.call(this);
};

//==============================
// * hold Direction D T
//==============================
Game_Player.prototype.holdDirectionT = function() {
if (Input.isPressed('down')) {this.setDirection(2);
} else if (Input.isPressed('left')) {this.setDirection(4);
} else if (Input.isPressed('right')) {this.setDirection(6);
} else if (Input.isPressed('up')) {this.setDirection(8);
};
};

//==============================
// * trigger Action
//==============================
var _mog_gplayer_pick_triggerAction = Game_Player.prototype.triggerAction;
Game_Player.prototype.triggerAction = function() {
if (this._throw.wait > 0) {return false};
if (this._pickup.wait > 0) {return false};
if (this._pickup.enabled) {return false};
_mog_gplayer_pick_triggerAction.call(this);
return false;
};

//==============================
// * throw Target
//==============================
Game_Player.prototype.throwTarget = function() {
this._pickup.check = false;
$gameMap.events().forEach(function(event) {
if (event._throw.enabled) {this.throwEvent(event)};
}, this);
if (!this._pickup.check) {return};
this._pickup.enabled = false;
this._pickup.wait = 15;
SoundManager.playThrowSE(String(Moghunter.pickSoundFile));
if (this._pickup.pose) {this._characterName = this._pickup.originalName};
};

//==============================
// * clear Transfer Info
//==============================
var _mog_pick_gplayer_clearTransferInfo = Game_Player.prototype.clearTransferInfo;
Game_Player.prototype.clearTransferInfo = function() {
_mog_pick_gplayer_clearTransferInfo.call(this);
this.clearPick();
};

//==============================
// * clearPick
//==============================
Game_Player.prototype.clearPick = function() {
this._pickup.enabled = false;
this._pickup.wait = 0;
};

//=============================================================================
// ** Sound Manager
//=============================================================================

//==============================
// * Play ThrowSE
//==============================
SoundManager.playThrowSE = function(fileName){
var se = {};
se.name = fileName;
se.pitch = 100;
se.volume = 100;
AudioManager.playSe(se);
};

//=============================================================================
// ** Sprite Character
//=============================================================================

//==============================
// * update Position
//==============================
var _mog_pick_sprChar_updatePosition = Sprite_Character.prototype.updatePosition;
Sprite_Character.prototype.updatePosition = function() {
if (this.needUpdatePick()) {this.updateSprtPick();return};
_mog_pick_sprChar_updatePosition.call(this);
if (this._character._throw.wait > 0) {this.z = $gamePlayer.screenZ() + 1};
};

//==============================
// * Need Update Pick
//==============================
Sprite_Character.prototype.needUpdatePick = function() {
if (this._character._throw.enabled && this._character._throw.wait > 0) {return false};
return this._character._throw.enabled;
};

//==============================
// * update Sprt Pick
//==============================
Sprite_Character.prototype.updateSprtPick = function() {
this.x = $gamePlayer.screenX();
this.y = $gamePlayer.screenY() - Moghunter.pickTargetHeight;
this.z = $gamePlayer.screenZ() + 1;
};

//==============================
// * update Call Menu
//==============================
var _mog_pickUp_ScnMap_updateCallMenu = Scene_Map.prototype.updateCallMenu;
Scene_Map.prototype.updateCallMenu = function() {
if ($gamePlayer._pickup.enabled) {return};
_mog_pickUp_ScnMap_updateCallMenu.call(this);
This isn't an issue with Chrono Engine. It's how MOG_CharPoses works. It takes the character sheet name then looks for the sheet with the same name but _pick appendix
Hi Aqua. Thank you for the response. Is your response instructing me to move where I post my question, or is it just clarifying what I said for anyone who may try to help?
Sorry, my bad, it's MOG_PickupThrow defining _pick not CharPoses
Code:
=============================================================================
CHARACTER POSES
=============================================================================
Para definir o nome da imagem da pose do personagem, nomeie a imagem da
seguinte forma.

ORIGINAL_FILE_NAME + _pick.png



Actor1_pick.png

You're trying to mismatch a filename without $ to one with $ which would require editing the code in MOG_PickupThrow or y'know, just making your player character sheet also a one cell 3x4 one with $ or make the _pick spritesheet 8 cells without the $
Sorry, my bad, it's MOG_PickupThrow defining _pick not CharPoses
Code:
=============================================================================
CHARACTER POSES
=============================================================================
Para definir o nome da imagem da pose do personagem, nomeie a imagem da
seguinte forma.

ORIGINAL_FILE_NAME + _pick.png



Actor1_pick.png

You're trying to mismatch a filename without $ to one with $ which would require editing the code in MOG_PickupThrow or y'know, just making your player character sheet also a one cell 3x4 one with $ or make the _pick spritesheet 8 cells without the $
"or make the _pick spritesheet 8 cells without the $"

But the _pick spritesheet can't be without the $ because then it just zooms in on the shoulder and doesn't recognize the whole sprite correctly.

How is this typically done? Is it typically put on an 8 char sprite sheet with 7 other poses?

Do I just hire someone to clone it 7 times and make an make an 8 char sprite sheet with 8 exactly identical poses?

I don't really care how it is fixed, I am open to whatever works.
It's either edit the plugin file or edit the spritesheet. I don't know why you would hire someone for the spritesheet edit. You either go for one cell 3x4 spritesheet and use $ for both or 8 cell spritesheet for both. It's literally just copying and pasting then saving the file.

But the _pick spritesheet can't be without the $ because then it just zooms in on the shoulder and doesn't recognize the whole sprite correctly.
Yes because you kept the spritesheet as one cell and just removed the $. The $ tells the engine to read it as a single cell spritesheet. If you remove the $ it will read it as an 8 cell spritesheet and splice the image accordingly.

Again, this is not a Chrono Engine issue, at best it's a MOG_PickupThrow "issue" (not really, it's designed that way) but more a "How do I format spritesheets" issue
I understand.

I would hire someone because I don't know how to do what seems to be the simplest option: formatting the sprite sheet.

What I -think- you mean by that is turn the singular 3x4 sprite sheet into an 8 character sprite sheet identical to the TFFutureChar1 spritesheet. Which, I am assuming, consists of just duplicating it to 8 of the same 3x4 sprite sheets.

Either way I do not know how to do it, though. And anytime I've tried to edit spritesheets in the past it does not go well as I artistically illiterate lol
Anyone who has read this conversation and knows how to edit the spritesheet properly to get it working I'll PayPal you 20 dollars.

It's been a week I haven't been able to get this done and I just want to move past this problem!

Thanks!
This took me less than five minutes.

Image > Canvas Size
1740941543660.png

1740941566758.png


File > Save For Web
1740941698293.png


Or use the selection tool to select which cell you want. Then Image > Crop
1740942334630.png

1740942506934.png
Thank you for taking the 5 mins, but here is why I have issues with doing it in a way that depends on me (since I suck)

#1 ) Image > Canvas Size

The image is greater than the canvas size is what this says to me. What does that mean and how do I translate it into useful information? I know in aseprite you can edit image size or canvas size. My assumption was the image is a singular image and the canvas encompasses all the images on the canvas. So, i don't see how the image can be bigger than the canvas size.

I do understand that you anchored the top left image and I get that, you are anchoring that so you can copy it 7 times and put it in the other 7 places. Thats fine. Is it always width 25 percent? is it always height 50 percent?

#2 ) File > Save For Web

K, so now that I see this, it tells me you are probably not using the > as its typical 'greater than' and you actually mean it just as like a dash? Like Image - Canvas Size ... File - Save for web... etc.?

If so, I dont have Adobe (It costs money). I do have aseprite.

The last few images on this, I see you are cropping, but im already kind of lost and it doesn't really wrap anything up for me so I have no idea what the process is here or what I'm being told to do.

That's the thing about someone who really knows their stuff talking to someone who is clueless. I totally understand that to you it seems like the most obvious few steps ever. But as you can see above, I'm almost lost before I even begin, so it is far from a 5 minute issue for me.

Ive attached the PNG. If you can just turn it into the correct file in the 5 min window like you were explaining above that would help me out huge and I can send the comp tomorrow. That would be great. Once I can bang this out I have a huge dungeon Im preparing to begin so I want this out of my mind since its the end of my checklist before I begin the dungeon
Oh, if you have Aseprite I can give you the steps for that. Give me a sec


Go to Sprite> Canvas Size
1740980207457.png

Open up a calculator and divide the width by 4 to get the width of one cell and the height by two to get the height. So 312/4 and 288/2 . Or 78 by 144

Adjust the borders by multiples of the cell width and height. I want the bottom 2nd cell so I subtract -78 (one cell) from the left and two from the right (-156), and one from the top (-144).
1740980135197.png


1740980172839.png


Save as a new .png and put a $ in front because it's a one cell spritesheet
1740980495230.png


‐---------
If you're going the other way (One cell to 8 cells)
1740981954892.png

Multiply the width by four and the height by two

1740981871867.png


You can see if MOG_PickupThrow defaults to the first cell in which case the rest of the sheet can be blank (I'm not sure if it will or not)
1740982077697.png

Original thread: https://forums.rpgmakerweb.com/threads/need-help-with-mog-chronoengine-plugin.175929/