MZ Setting a switch when a specific Tool is selected with Irina's Tool Ring.

Hello,
I'm implementing a farming system into my game. I've purchased Caz's farming system which is found here:


It's been extremely helpful and does exactly what I want it to do. The plugin basically creates a tilled ground event on a separate map and uses VisuStellas event template plugin to call that event when the player uses the hoe tool. The problem being is that the Tool Select menu that the plugin uses cycled through tools and seeds to plant and I wanted to use a Tool Ring to select from tools to use and keep Caz's Tool UI just for seeds to for planting crops. I purchased Irina's Tool Ring which is great. I'm able to use the hoe tool to till ground using the plugin, but I'm having trouble setting up a pickaxe tool to be able to "un-till" the ground in case the player makes a mistake and tills the wrong spot. The only way I've figured out how to do this is to take the Tilled Ground event from my designated events map and give it a conditional when interacted with that says if the player has the pickaxe equipped, then delete this event. The problem is, I'm not sure how I can set it to where when the player equips the pickaxe from the Tool Ring, a switch turns on saying that the player has the pickaxe equipped. Wondering if anyone here knows how to do this. Or if there's a better way to do this (I'm not married to the idea of using a pickaxe to delete the tilled tile if there's a more efficient way).

From your description, it's probably working the same as an event spawner, in which case to untill the tile you would have to unspawn the event on that tile.

If you want to use the tool ring in the other plugin, just have the tools in it point to the common events in the farming plugin.
Yeah, that was one thing I tried. The Tool Ring UI plugin has you enter a notetag in the item description of the tool with the number of the common event to trigger when the action button is pressed after selecting the tool from the UI ring. Here's the event for the Hoe item that tills the ground:

Spoiler: Till Ground Common Event
Code:
◆Comment:CHECK IF THE PLAYER IS PRESSING THE CONFIRM BUTTON.
:       :YOU CAN CHANGE THIS TO CHANGE WHICH BUTTON THE PLAYER
:       :MUST PRESS TO TILL THE GROUND.
◆If:Button [OK] is being triggered
  ◆Comment:CHECK THE PLAYER'S X AND Y COORDINATES AND STORE THEM IN VARIABLES.
  ◆Control Variables:#0237 Player X = Map X of Player
  ◆Control Variables:#0238 Player Y = Map Y of Player
  ◆Comment:DEPENDING ON THE PLAYER'S LOCATION AND DIRECTION, THESE CONDITIONAL
  :       :BRANCHES CHECK THAT THERE'S NOT AN EVENT IN FRONT OF THE PLAYER.
  ◆If:Player is facing Down
    ◆Control Variables:#0238 Player Y += 1
    ◆If:Script:$gameMap.events().some(function(event) { return event.event() && event.x === $gamePlayer.x && event.y === $gamePlayer.y + 1; });
      ◆Jump to Label:end
      ◆
    :End
    ◆
  :End
  ◆If:Player is facing Up
    ◆Control Variables:#0238 Player Y -= 1
    ◆If:Script:$gameMap.events().some(function(event) { return event.event() && event.x === $gamePlayer.x && event.y === $gamePlayer.y - 1; });
      ◆Jump to Label:end
      ◆
    :End
    ◆
  :End
  ◆If:Player is facing Left
    ◆Control Variables:#0237 Player X -= 1
    ◆If:Script:$gameMap.events().some(function(event) { return event.event() && event.x === $gamePlayer.x - 1 && event.y === $gamePlayer.y; });
      ◆Jump to Label:end
      ◆
    :End
    ◆
  :End
  ◆If:Player is facing Right
    ◆Control Variables:#0237 Player X += 1
    ◆If:Script:$gameMap.events().some(function(event) { return event.event() && event.x === $gamePlayer.x + 1 && event.y === $gamePlayer.y; });
      ◆Jump to Label:end
      ◆
    :End
    ◆
  :End
  ◆Comment:GET THE REGION ID OF THE TILE IN FRONT OF THE PLAYER.
  ◆Get Location Info:Region ID, Region ID, ({Player X},{Player Y})
  ◆Comment:CHECK THE REGION ID IS 97.
  ◆If:Region ID = 97
    ◆Comment:CHECK THE PLAYER HAS THE HOE EQUIPPED.
    ◆If:Tool ID = 6
      ◆Comment:YOU CAN CHOOSE TO PLAY AN ANIMATION WHEN THE CHARACTER SWINGS THE HOE.
      :       :THESE ARE CONTROLLED IN COMMON EVENT 118: PLAYER ANIMATIONS.
      :       :THE VARIABLE FOR THE HOE ANIMATION IS SET TO 1.
      ◆Control Variables:#0239 Player Animation = 1
      ◆Common Event:Player Animations
      ◆Comment:USE THE VISUSTELLA EVENTS AND MOVEMENT CORE TO SPAWN THE TILLED GROUND EVENT
      :       :IN FRONT OF THE PLAYER.
      :       :PLEASE CHECK MAP 001: EVENTS TO VIEW THESE EVENT TEMPLATES, AND MAKE SURE THE
      :       :TEMPLATE IS CORRECTLY SET UP IN THE PLUGIN'S PARAMETERS.
      ◆Plugin Command:VisuMZ_1_EventsMoveCore, Spawn Event: Spawn At X, Y
      :              :Step 1: Spawned Event =
      :              :Template Name = GROUND - TILLED
      :              :Map ID = 1
      :              :Event ID = 1
      :              :Step 2: Location =
      :              :X Coordinate = $gamePlayer.frontX()
      :              :Y Coordinate = $gamePlayer.frontY()
      :              :Check Event Collision = true
      :              :Check Passability = true
      :              :Preserve Spawn = true
      :              :Step 3: Success Check =
      :              :Success Switch ID = 0
      ◆
    :End
    ◆
  :End
  ◆
:End
◆Label:end

I tried copying it completely, but changed the "Plugin Command:VisuMZ_1_EventsMoveCore, Spawn Event: Spawn At X, Y" to Plugin Command:VisuMZ_1_EventsMoveCore, Despawn Event: Spawn At X, Y" but that didn't seem to work as nothing happened when attempting to use the pickaxe.

EDIT: Hey, I got it to work. I guess when the Spawn Event plugin command was ran, it removes the region ID? Because when I moved the Despawn Event plugin command to after the Label: end command and deleted the whole If: Region ID = 97 conditional, it works!
Plugin Command:VisuMZ_1_EventsMoveCore, Despawn Event: Spawn At X, Y
Is this an actual command the plugin tells you to use? Despawn Event, in that exact format? Can you show the documentation for this plugin command?
Yeah, that was one thing I tried. The Tool Ring UI plugin has you enter a notetag in the item description of the tool with the number of the common event to trigger when the action button is pressed after selecting the tool from the UI ring. Here's the event for the Hoe item that tills the ground:
Both of your plugins are calling common events. Put in that notetag the common event number that the farm plugin is using for the tool you want to associate with that ring element.
So the plugin tells me to use the Spawn Event command from VisuStella's free Movement and Events plugin to spawn Tilled Ground event. They didn't have a method for un-tilling the ground in their plugin, just for tilling and planting seeds and growing the crops. I was attempting to go off-script (so to speak) and add a way for the player to return the tilled soil to normal. That's where I got stuck, but I seemed to have resolved it with the method mentioned in my edit from my last post! Don't know if that's the ideal way to solve it, but it seems to work for now.
The developer did in fact tell you to unspawn the tile, but they did not say what the plugin command was. If there is a command to unspawn you need to find it in the documentation or ask the dev what it is if you can't find it.

You can't just go off script and make up plugin commands, they're either in the plugin file or not. If you call something that doesn't exist, in this case a function, the engine will throw an error in the console log telling you so and nothing will happen.
Well the plugin itself doesn’t have plugin commands, they use another plugins commands to make their plugin work as mentioned on the plugins itch.io page here:

2B55D870-AC8C-4564-B76E-AC57C9C621A5.jpeg


So my assumption from their response to me about un-tilling ground was that they were referring to the plugin command to Despawn an event in VisuStella’s Events & Movement Core.

Since its not a feature built in to their plugin, there are no instructions for despawning, only spawning. I was just looking for a way to despawn if it was possible.
Well the plugin itself doesn’t have plugin commands, they use another plugins commands to make their plugin work as mentioned on the plugins itch.io page here:


So my assumption from their response to me about un-tilling ground was that they were referring to the plugin command to Despawn an event in VisuStella’s Events & Movement Core.

Since its not a feature built in to their plugin, there are no instructions for despawning, only spawning. I was just looking for a way to despawn if it was possible.

Ok, if it's using Visustella's spawn plugin commands then yes, the despawn commands are
Spawn Event: Despawn Event ID
or
Spawn Event: Despawn At X, Y

so you need to give it either the event id of the tilled tile on the current map or its x and y coordinates (presumably $gamePlayer.frontX() and $gamePlayer.frontY()

Original thread: https://forums.rpgmakerweb.com/threads/setting-a-switch-when-a-specific-tool-is-selected-with-irinas-tool-ring.160147/