MV How Reloading bullets in Cross Engine

Good day.

I'm using Cross Engine plugin for RPG Maker MV (ABS system) and I want to change how projectiles (bullets in my case) work.

Could someone help me modify this plugin?

I'm using bullets (for firearms in my game) instead of arrows. I need bullets to be reloadable after a certain number of bullets (10 for a pistol, 15 for a shotgun, etc.). The game displays all the bullets in the inventory in the interface, and I don't want that.

I want to only show the bullets, when they reach zero, I can reload them by pressing a key (R, for example).

Thanks in advance.
Are the bullets consumable items in your inventory or are they infinite but you can only shoot x number at a time?
Are the bullets consumable items in your inventory or are they infinite but you can only shoot x number at a time?
the bullets are consumable items, The interface only shows the number of bullets in the weapon, but not the total number of bullets in the inventory.
It's probably going to require you to edit the Chrono Engine or MOG_ToolHUD file as the built-in behavior is to display your entire inventory stock. It might be easier to make a custom HUD for bullets using SRD HUDMaker or another HUD plugin.

Have SRD HUDMaker display the remainder of a formula dividing the total number of bullets in your inventory by the magazine size.
It's probably going to require you to edit the Chrono Engine or MOG_ToolHUD file as the built-in behavior is to display your entire inventory stock. It might be easier to make a custom HUD for bullets using SRD HUDMaker or another HUD plugin.

Have SRD HUDMaker display the remainder of a formula dividing the total number of bullets in your inventory by the magazine size.

I think I managed to implement it with common events, but now please help me find a very strange error I'm experiencing.

We know that in these real-time battle engine plugins for Chrono Engine Cross, there is a map that we must define as a Toolmap where the events, items, and projectiles (bullets) that the game will have will be located. Each one is a different event. For example, my bullet is event 1.

My tool map is map 150.

What happens is that when the player shoots a bullet or arrow, the bullet event is instantiated (from that toolmap) to the map where the player is located so that the bullet travels the distance in the direction where the player is looking (forward) several tiles. This is included in the movement paths on the first page of the bullet event, but sometimes it happens that that bullet (that event) isn't instantiated correctly. That is, the bullet isn't instantiated right in front of the player to complete its corresponding path. Instead, that bullet is instantiated (and I've already checked this) right above event #1 of the player's current map, which is just a random event where I only play a BGM (it doesn't matter).

And from there, the bullet is instantiated, and since it's in a ceiling area (black tiles with an X), it doesn't go beyond that. This shouldn't happen because the bullet must be instantiated right in front of the player to complete its respective path. I managed to partially fix this by switching to another weapon, or by shooting more times, or by switching to another map. But that can't be the case.

The bullet should always be instantiated in front of the player, regardless of which map they're on.

It's as if sometimes the bullet is instantiated in the first event created on the player's current map. If there's event #1, it's sometimes instantiated on top of it, which is very strange. I don't know if the plugin thinks event 1 is the player, because I understand that to refer to the player in rpg maker mv the event -1 is used and not 1.
Without seeing your tool event page for the bullet I can't tell you where you went wrong. You can put this.locate($gamePlayer.x,$gamePlayer.y) at the beginning of the tool's autonomous move route if for some reason it's not starting at the player's position.
Without seeing your tool event page for the bullet I can't tell you where you went wrong. You can put this.locate($gamePlayer.x,$gamePlayer.y) at the beginning of the tool's autonomous move route if for some reason it's not starting at the player's position.
1751920729941.png


I already put what you mentioned at the beginning of the movement route, and sometimes (not always), say 10% of the time, the bullet doesn't show up.

Then I go to the location where event 1 is, and it's triggered a few times. I have to shoot in other directions or change maps to fix it. It's very weird.
This is something you're going to have to extensively test with the console log to see what the game state is when the issue happens.

Original thread: https://forums.rpgmakerweb.com/threads/how-reloading-bullets-in-cross-engine.178770/