Skill that is executed during all fights?

Good day!

Eyy, I want to do the following.

My team will have a spaceship, and I want it to help them in combat, allowing them to upgrade it, and so on, In combat, I want it to be able to attack an enemy with a laser or throw a first-aid kit to an ally. All of this is done randomly. It might happen once every three turns, or not at all, for example. Is this possible to do through common events or something like that?
You'd actually use troop events for this. However, you may want to find a plugin that lets you assign a base troop event that runs in every battle to avoid having to copy your event to every troop event all game.

If you don't want to do the plugin then most would copy the event into the troop events. For every troop event in the game.
You'd actually use troop events for this. However, you may want to find a plugin that lets you assign a base troop event that runs in every battle to avoid having to copy your event to every troop event all game.
To accomplish something similar without a plugin, you can turn it into a common event and have every troop call that common event at end of battle. This lets you modify only one event (the common event) to affect every troop the event is called in. It's still a bit tedious but less so.
That can work too, though I think there are a few event commands that don't work 100% due to how the interpreter reads the common events while in battle (IIRC it runs it as a new scene and not part of the battle scene). But it should work for most cases yes.

Man thing I remember is if you use it as part of a skill which calls a common event it forces the menu closed due to that. May not be relevant within a troop event though, depending on your setup.
But how could I do it? I mean, okay, I create a common event, and then I apply it to the troops. I could perhaps make it so that it only occurs if I have a certain object, for example, a communicator with the ship, but...

Who casts the spell? What's its power? Does it have to be attached to a character?
Who casts the spell? What's its power? Does it have to be attached to a character?
The first two questions only matter if it is attached to someone. Otherwise, you just input all the effects you want (such as HP changes, animations, text, etc) into the common event. You can 'fake' a skill use that way. Having an actual actor use it is harder but again you can fake it by having the spaceship set up as an Actor in the database that can get upgrades and then the common event modifies a variable for determining effects.

Original thread: https://forums.rpgmakerweb.com/threads/skill-that-is-executed-during-all-fights.180681/