TheGentlemanLoser

"And when we fall, we will fall together..."
Veteran
Joined
Dec 30, 2020
Messages
221
Reaction score
264
First Language
English
Primarily Uses
RMMV
MOG_ChronoEngine Item Core Compatibilty
Chrono Engine is not compatible with yanfly's item core by default. This fixes that.
Code:
var _mog_toolSys_gmap_setup = Game_Map.prototype.setup;
Game_Map.prototype.setup = function(mapId) {
   //console.log("Game_Map.prototype.setup");
   _mog_toolSys_gmap_setup.call(this,mapId);
   this._treasureEvents = [];
   this._battlersOnScreen = [];
   this._enemiesOnScreen = [];
   this._actorsOnScreen = [];
   $gameSystem._toolsOnMap = [];
   $gameTemp.clearToolCursor();
   //console.log($gameSystem._toolsData);// with itemcore, this always returns an empty array []
   //without itemcore, it returns 'null', then an the proper item  list, so clearly _toolsdata isn't getting set right
   //I assume the 'null' gets overridden by one of yanfly's blanket definitions, and since I can't find that
   // I'm just testing to see if the list is empty.  If it is, grab the tools again
   // it seems to work!
   //if (!$gameSystem._toolsData) {this.dataMapToolClear()};
   if (!$gameSystem._toolsData) {this.dataMapToolClear()
       }else{ if ($gameSystem._toolsData.length == 0) {this.dataMapToolClear()};
       }
   for (var i = 0; i < $gameParty.members().length; i++) {
       var actor = $gameParty.members()[i];
       actor.clearActing();
       $gameSystem._toolHookshotSprite = [null,null,0];
   };
};

Did I ever tell you you're my hero?
You're everything I wish that I could be
 

KillerPixEEL

Killer Pixeel Games
Veteran
Joined
Sep 4, 2019
Messages
148
Reaction score
40
First Language
English
Primarily Uses
RMMV
Does anyone know how to set up a tool to change depending on direction of tool user to target? I need animations and movements to change depending on directions so they look cracks.
 

TheGentlemanLoser

"And when we fall, we will fall together..."
Veteran
Joined
Dec 30, 2020
Messages
221
Reaction score
264
First Language
English
Primarily Uses
RMMV
Hey Restart: this thread was closed because solved but with respect to it I just wanted to say: YOU ARE A GOLDEN GOD. (Also you were really insanely patient with that newb much moreso than I ever could have been.)

I am so happy I can have automatic weapons. I mean the resource management in the game is going to be tight so you would almost never spray on full auto unless you're really dumb but it's just a wonderful to have the option on the table. I was pleasantly surprised, nay, pleasantly shocked, to find someone had already addressed the incredibly specific issue of machineguns in the Chrono Engine. (im sending you a free copy of my game when it launches I don't even care if you want it or not lol)
 

Restart

Veteran
Veteran
Joined
Mar 15, 2019
Messages
595
Reaction score
501
First Language
English
Primarily Uses
RMMV
Hey Restart: this thread was closed because solved but with respect to it I just wanted to say: YOU ARE A GOLDEN GOD. (Also you were really insanely patient with that newb much moreso than I ever could have been.)

I am so happy I can have automatic weapons. I mean the resource management in the game is going to be tight so you would almost never spray on full auto unless you're really dumb but it's just a wonderful to have the option on the table. I was pleasantly surprised, nay, pleasantly shocked, to find someone had already addressed the incredibly specific issue of machineguns in the Chrono Engine. (im sending you a free copy of my game when it launches I don't even care if you want it or not lol)
Glad I could be helpful

I have a more robust implementation of a machinegun effect in my personal project using cross engine, but I can't guarantee that it'll be easy to back-port to baseline chrono, since I also ended up doing a full split between whether a character was casting and whether they were acting, and that got tied in.


This isn't all the functions needed (you still need to pass stuff into the actual firing etc, and I do weird stuff with that that's too much to get into), but it might be helpful if you want a timed reload or something
Code:
oldToolNotes = ToolEvent.prototype.checkToolNotes 
ToolEvent.prototype.checkToolNotes = function() {
	oldToolNotes.call(this)

	this.fireCount=0;//number of times it was fired.
	this.fireMax=9999;//set a high maximum so it isn't NaN
}


Game_CharacterBase.prototype.updateCooldownDuration = function() {
     this.battler()._ras.cooldownDuration--;
	 //play reload sound when player can fire again
	 if ( (this == $gamePlayer ) && (this.battler()._ras.cooldownDuration==0))
		 {
			 AudioManager.playSe({name: 'reload', pan: 0, pitch: 100, volume: 40});
			 
			 SceneManager._scene._toolHud[0].refreshHud();
			 SceneManager._scene._toolHud[1].refreshHud();
			 SceneManager._scene._toolHud[2].refreshHud();
			 SceneManager._scene._toolHud[3].refreshHud();
		 }
	 };

// You'll need the whole cooldown system with isInCooldown() and updateCooldownDuration() wrapped into the battler update, etc, that's all in cross engine

//handler for multihit weapons
Game_CharacterBase.prototype.autoWeaponFire = function()
{
	var weaponPrimary=this.user().battler().equips()[0]//$gameParty.members()[0].equips()[0]
	var fireRate=weaponPrimary.fireRate;
	var fireMax=weaponPrimary.fireMax;
	var actfire=weaponPrimary.actfire;
	var bulletType=weaponPrimary.customBullet || 161;
	var wiggle=weaponPrimary.wiggle  || false; //for automatic weapons, instead of random fire, wiggle back and forth
	var scalingInaccuracy=weaponPrimary.scalingInaccuracy || false; //if 'true', starts accurate and scales up to 2x inaccuracy level 
	var shotCost=weaponPrimary.shotCost || 0; //default to free
	var extraCooldown=weaponPrimary.cooldown;
	
	this.chargeup=weaponPrimary.chargeup;
	this.actCharge=weaponPrimary.chargeup||false;
	if (this.chargeup){this.fireMax+=1}
	
	if (wiggle)
	{
		//full wiggle once (so left->right=>left)
		// or 1 -> -1 -> 1
		$gamePlayer.wiggleStep = 2*Math.abs(1-2*(this.fireCount/(fireMax)))-1;
	}else{
		$gamePlayer.wiggleStep=undefined
	}
	
	if ((this.fireCount==0) &&(this.chargeup))
	{
		if (this.chargeup<35)
		{
			AudioManager.playSe({name: 'sn_windup005', pan: 0, pitch: 100, volume: 90});
			//half a second
		}else{
			AudioManager.playSe({name: 'sn_windup01', pan: 0, pitch: 100, volume: 90});
			//full second
		}
		this._waitCount+=this.chargeup;
		$gamePlayer.battler()._ras.cooldownDuration+=this.chargeup;
		$gamePlayer.battler()._ras.poseDuration+=this.chargeup;
		if (this.actCharge)
		{
			$gamePlayer.battler()._ras.actDuration+=this.chargeup;
		}
	}else{
		if(Input.isPressed(Moghunter.ras_buttonWeapon) && (this.fireCount<fireMax) &&($gamePlayer.battler().mp>shotCost))
		{
			$gamePlayer.battler()._mp -= shotCost;
			$gamePlayer.act(bulletType)//our generic multibullet
		}else{
			$gamePlayer.battler()._ras.cooldownDuration+=extraCooldown
			this.erase();
		}
		
		if(actfire)
		{
			$gamePlayer.battler()._ras.actDuration+=fireRate;
		}
		this._waitCount+=fireRate;
	}
	this.fireCount++;
	
	if($gamePlayer.battler()._ras.poseDuration>0)
	{
		$gamePlayer.battler()._ras.poseDuration+=fireRate+1;
	}
	
	if($gamePlayer.battler()._ras.cooldownDuration>0)
	{
		$gamePlayer.battler()._ras.cooldownDuration+=fireRate+1;
	}

}

and then had something in the weapon notes like this to set custom params
Code:
Tool Id : 162

  <On Creation Eval>
   item.fireMax= 10; //maximum bullets fired
   item.inaccuracy=25; //amount of inaccuracy
   item.fireRate=4;//frames between shots
  </On Creation Eval>

anyway dunno if that'll be helpful or not, but figured I might as well dump some code in my code dump thread
 
Last edited:

thesupernova

Villager
Member
Joined
Sep 14, 2020
Messages
17
Reaction score
3
First Language
English
Primarily Uses
RMMV
@Restart I was wondering if you had any plans to work in a multiplayer component. One thing I’ve been wanting to do with my Chrono engine game is multiplayer a la Legend Of Zelda: Four Swords, but I’m still learning JS and am a long way off from doing this myself. If not, that’s cool, but you seem to be the guy for Chrono engine stuff.
 

Restart

Veteran
Veteran
Joined
Mar 15, 2019
Messages
595
Reaction score
501
First Language
English
Primarily Uses
RMMV
@Restart I was wondering if you had any plans to work in a multiplayer component. One thing I’ve been wanting to do with my Chrono engine game is multiplayer a la Legend Of Zelda: Four Swords, but I’m still learning JS and am a long way off from doing this myself. If not, that’s cool, but you seem to be the guy for Chrono engine stuff.
Nah, that's a pretty big project and it's outside the scope of what I'm doing. There are a few people who have done multiplayer plugins, you might awant to try those.

That said I'm not super optimistic about it, there's a lot of under-the-hood changes that need to be made to accomplish that.
 

thesupernova

Villager
Member
Joined
Sep 14, 2020
Messages
17
Reaction score
3
First Language
English
Primarily Uses
RMMV
Nah, that's a pretty big project and it's outside the scope of what I'm doing. There are a few people who have done multiplayer plugins, you might awant to try those.

That said I'm not super optimistic about it, there's a lot of under-the-hood changes that need to be made to accomplish that.
Yeah, I’ve been messing with a few different ones. They work great on most engines but they tend to conflict with moghunter’s engines. It’s all good. It will force me to get better at JS anyways. I appreciate the reply.
 

Restart

Veteran
Veteran
Joined
Mar 15, 2019
Messages
595
Reaction score
501
First Language
English
Primarily Uses
RMMV
The post is currently in review, but I just put together a plugin called FOSSIL, which lets MV plugins work in MZ.

Most importantly, it works with Chrono Engine!

 

Latest Threads

Latest Posts

Latest Profile Posts

Doing RPG Maker News #18 | Moghunter is Back, Encrypt MV/MZ Plugins, Isometric Geometric Tiles
Unironically, no joke, after consideration and self-reflection, I have decided that the best thing for my creative/workflow/commitment problems is to spend EVEN MOAR hours a day playing videogames than I normally do. (Micro-thread)
FINALLY got my weather system implemented. Who needs a black mage when you have a weathermancer! :p
Oh boy! COVID19 lockdown again! Good thing I already never go outside! :D
This one is less showing off and more 'I really don't know how I feel about this one.' The 'child' sprite template I made either works great or doesn't at times. (She is a fairy, so I made her small).
Morgan.png

Forum statistics

Threads
110,640
Messages
1,054,896
Members
143,768
Latest member
MS278
Top