MZ Fishing Tension Event

This is what I have so far I have not put the images in yet for the tension bar. Can someone let me know if it looks to be correct please.
Screenshot (185).png
Screenshot (186).png
Screenshot (187).png

I've moved this thread to MZ Support. Thank you.

if tension base is 50 and gets + 1-5 more,
how can it be above 100? as it can be below 1 as pressing Z is -15?

if you use console log (console.log($gameVariables.value(n)) you can
keep track whats going on, as I dont see how you increase it or what the
exact purpose is what you try to do.
if tension base is 50 and gets + 1-5 more,
how can it be above 100? as it can be below 1 as pressing Z is -15?

if you use console log (console.log($gameVariables.value(n)) you can
keep track whats going on, as I dont see how you increase it or what the
exact purpose is what you try to do.
Have you ever played New World MMO? For the reeling in the fish part of the mechanics you have to keep your reel in the green or low end orange. The fish will add tension to the line and let it off as well and you mash a button or let off to release and add tension type of idea. It is what I am looking to have happen.
I dont know that game, but I think there is a plugin to do what you want
so you want to replicate [this] issue?

this is from MV, but there is a similair from KageDesu Simple Fishing.
it's not really mashing, but you need to hit bar and fill it.

there is also another that replicate the eventing part you like to do.
you also have this one (you can tweak this one and make a smashing part)

but I did play different games with fishing, but not like those though.
I dont know that game, but I think there is a plugin to do what you want
so you want to replicate [this] issue?

this is from MV, but there is a similair from KageDesu Simple Fishing.
it's not really mashing, but you need to hit bar and fill it.

there is also another that replicate the eventing part you like to do.
you also have this one (you can tweak this one and make a smashing part)

but I did play different games with fishing, but not like those though.

Fishing Mini Game RPG Maker MZ​


Let's start creating the UI common event for your fishing mini-game in RPG Maker MZ by taking inspiration from the UI common event you've provided.

Common Event: Fishing UI​

Name: Fishing UI
Trigger: None
Starting Switch: Fishing_UI

Event Commands:​


Comment: "This event controls the display of the fishing UI elements."
Control Variables: [0043: Fishing_UI_Selection] = 0 (This will hold the player's current selection in the UI)
Label: Start
Show Text: "What would you like to do?"
Show Choices: [Cast Line], [Equip Lure], [Stop Fishing]
When [Cast Line]:
Control Variables: [0043: Fishing_UI_Selection] = 1
Jump to Label: Update_UI
When [Equip Lure]:
Control Variables: [0043: Fishing_UI_Selection] = 2
Jump to Label: Update_UI
When [Stop Fishing]:
Control Variables: [0043: Fishing_UI_Selection] = 3
Jump to Label: Update_UI
Label: Update_UI
Switch (Controlled by the variable [0043: Fishing_UI_Selection])
Case 1:
Show Picture: [Picture_ID], "Cast_Line", Upper Left (x, y), (100%,100%), 255, Normal
Case 2:
Show Picture: [Picture_ID], "Equip_Lure", Upper Left (x, y), (100%,100%), 255, Normal
Case 3:
Show Text: "You stop fishing."
Control Self Switch: A = OFF (Ends the UI)
Exit Event Processing
If: Variable [0043: Fishing_UI_Selection] = 1
Call Common Event: Cast_Line (This will begin the cast line phase of your mini-game)
If: Variable [0043: Fishing_UI_Selection] = 2
Call Common Event: Equip_Lure (This will open the lure equipment selection)
If: Variable [0043: Fishing_UI_Selection] = 3
Comment: "Here you can add any additional cleanup needed when stopping fishing."
Erase Picture: [Picture_ID] (Cleans up the UI picture for the next usage)
Label: End

Explanation:​


This common event acts as the UI controller for your fishing mini-game. When activated, it prompts the player with choices and updates the UI based on their selection. Depending on the player's choice, the event will call other common events related to each fishing activity or close the UI if the player chooses to stop fishing.

The Control Variables command is crucial as it will be used to determine which UI picture to show and which part of the mini-game to proceed with. Make sure to replace [Picture_ID] and the placeholder text like "Cast_Line" and "Equip_Lure" with your actual picture file names and IDs.

When the player makes a selection, this event will update the UI accordingly and then transition to the relevant part of the mini-game, whether that’s casting the line, choosing the lure, or exiting the fishing mini-game.

Before running this event in your game, ensure that all the pictures are correctly named and placed in your project's designated folder for images, and that the corresponding common events for each action are set up and ready to be called.

—---------------------------------------------------------------------------------------------------------------------------

We'll start with the first common event for the fishing mini-game in RPG Maker MZ, which is the setup phase where players choose to start fishing, equip their bait, and choose their fishing rod. This is an essential part of the mini-game, as it sets the stage for the actual fishing mechanics.

Common Event: Start Fishing​

Name: Fishing Setup
Trigger: None
Starting Switch: Fishing_Start (This is a made-up switch name; you'll need to create it in your game)

Event Commands:​


Show Text: "Would you like to start fishing?"
Show Choices: [Yes], [No]
When Yes
Control Variables: Set Fishing_Rod_Level = 1 (This variable holds the player's current fishing rod level)
Control Variables: Set Bait_Type = 1 (This variable holds the type of bait equipped)
Show Menu: Display custom menu for selecting the fishing rod and bait (You will need to create this custom menu)
Comment: "The choices made in the custom menu will set the Fishing_Rod_Level and Bait_Type variables."
Call Common Event: Fishing Cast (This will call the next phase of the mini-game, which handles casting the line)
When No
Exit Event Processing: (This ends the event without doing anything further)

Explanation:​


This event starts with asking the player if they want to engage in the fishing mini-game. If the player chooses "Yes," the game will proceed to let them select their fishing rod and bait. The choices could be made through a custom menu or a series of show choices commands. Each choice will set variables corresponding to the selected equipment which will affect the fishing mechanics, such as the type of fish they can catch or the difficulty of the mini-game.

Once the player has selected their equipment, we call another common event named "Fishing Cast," which we will create next. This event would manage the casting of the line into the water. If the player selects "No," the event ends, and the player is returned to the game without entering the fishing mini-game.

—---------------------------------------------------------------------------------------------------------------------------

Great, let's move on to the "Fishing Cast" common event. This phase involves the player casting the line with the attempt to place it near fish in the water.

Common Event: Fishing Cast​

Name: Fishing Cast
Trigger: None
Starting Switch: Fishing_Cast (Again, this is a placeholder name; create the switch in your game)

Event Commands:​


Comment: "Set up the casting power gauge"
Control Variables: Set Casting_Power = 0 (This will track the power of the cast)
Show Picture: Gauge Background, centered on screen (Display the power gauge background)
Show Picture: Gauge Indicator, centered on gauge (Display the moving part of the power gauge)
Loop:
Wait: 5 Frames (Wait a short period before each power increase)
Control Variables: Add 1 to Casting_Power (Increase the casting power)
Move Picture: Update Gauge Indicator position based on Casting_Power
Break Loop If: Button [OK] is pressed (When player confirms the cast)
Comment: "Calculate cast distance and accuracy based on Casting_Power"
If: Casting_Power within optimal range
Comment: "Perfect cast! Greater chance to attract fish"
Control Variables: Set Cast_Distance = Optimal Distance (Set the cast distance to a value that represents a good cast)
Else:
Comment: "Sub-optimal cast. Adjust distance accordingly"
Control Variables: Set Cast_Distance based on Casting_Power (Less power equals a shorter cast)
Erase Picture: Gauge Background
Erase Picture: Gauge Indicator
Comment: "Transition to the waiting for a bite phase"
Call Common Event: Waiting for Bite

Explanation:​


In this common event, we simulate the casting of the fishing line by showing a power gauge with a moving indicator. The player increases the casting power by holding down a button and releases it to cast the line. The closer the casting power is to an optimal range, the better the cast. This will determine the cast distance and affects the chances of attracting fish. After the cast, the pictures for the gauge are erased, and we transition to the next phase, "Waiting for Bite."

—---------------------------------------------------------------------------------------------------------------------------

Now that we've set up the casting phase, let's move onto the "Waiting for Bite" common event. This part of the mini-game will involve the player waiting for a fish to bite after casting the line.

Common Event: Waiting for Bite​

Name: Waiting for Bite
Trigger: None
Starting Switch: Fishing_Waiting (This is a placeholder name; you should create this switch in your game)

Event Commands:​


Comment: "Start the waiting period"
Show Text: "Waiting for a fish..."
Control Variables: Set Wait_Time = Random number representing wait time
Wait: Wait_Time frames (The player waits for a random period for a bite)
Comment: "Check for bite"
Control Variables: Set Bite_Chance = Random number for chance of bite
If: Bite_Chance < Threshold (Based on bait and rod level, this condition checks if a fish bites)
Show Text: "A fish is biting! Press 'OK' to hook it!"
Control Self Switch: A = ON (This will trigger the hooking mechanic)
Else:
Show Text: "No bites yet... Keep waiting?"
Show Choices: [Yes], [No]
When [Yes]:
Comment: "Return to waiting"
Jump to Label: Start the waiting period
When [No]:
Exit Event Processing
Label: End
Comment: "This is the end of the waiting period. If the fish bit, the event to hook the fish will take over."

Explanation:​


This event is a waiting game where the player hopes for a fish to bite. A random timer will decide how long the player waits, simulating the unpredictability of fishing. If a fish bites, indicated by the "Bite_Chance" being below a certain threshold, the player is prompted to hook the fish. If not, the player can choose to continue waiting or stop. If they choose to keep waiting, the event loops back to the start; if they stop, the event ends, and they exit the mini-game.

—---------------------------------------------------------------------------------------------------------------------------

Next, we would need to create the event that handles the action of hooking the fish when the player gets a bite.

All right, let's proceed with the "Hooking the Fish" common event. This stage activates when a fish bites and the player must respond quickly to successfully hook the fish.

Common Event: Hooking the Fish​

Name: Hooking the Fish
Trigger: None
Starting Switch: Fishing_Hooking (Create this switch in your game)

Event Commands:​


Show Text: "Press 'OK' quickly to hook the fish!"
Wait for Button Press: [OK], with a timeout limit
If: Button [OK] was pressed in time
Comment: "Fish hooked successfully"
Show Animation: On player character, animation for successful hook
Play SE: Sound effect for successful hook
Control Self Switch: B = ON (This will transition to the "Reeling in the Fish" event)
Else:
Comment: "Missed the opportunity to hook the fish"
Show Animation: On player character, animation for failed hook
Play SE: Sound effect for failed hook
Show Text: "Too slow! The fish got away."
Control Self Switch: C = ON (This ends the mini-game or returns to the "Waiting for Bite" event)

Explanation:​


In the "Hooking the Fish" event, the player must press the 'OK' button promptly after being notified that a fish is biting. If the player succeeds, a congratulatory animation and sound play, and the mini-game transitions to the reeling phase. If the player is too slow, the event shows a failed animation and sound, and the player is notified that the fish got away. The mini-game could then end, or the player could be given the option to cast the line again.

This event relies on quick player reaction and adds a sense of urgency and skill to the mini-game.

—---------------------------------------------------------------------------------------------------------------------------

Now, we’ll set up the "Reeling in the Fish" common event, which is one of the most interactive parts of the fishing mini-game. This phase involves the player trying to reel in the fish they've hooked by maintaining the tension within a safe range.

Common Event: Reeling in the Fish​

Name: Reeling in the Fish
Trigger: None
Starting Switch: Fishing_Reeling (You'll create this in your game)

Event Commands:​


Control Variables: Set Tension = 50 (Starts the tension in the middle)
Show Picture: Tension Gauge (A gauge that visually represents the tension)
Show Picture: Tension Indicator (An indicator that moves according to the current tension)
Loop:
Control Variables: Set Fish_Strength = Random number (Represents the fish's resistance)
Control Variables: Set Tension += Fish_Strength (Increases tension based on the fish's resistance)
If: Tension > Max_Tension (Checks if the tension is too high)
Show Text: "The line is about to break! Let go!"
Play SE: Warning sound effect
Else If: Tension < Min_Tension (Checks if the tension is too low)
Show Text: "The line is too slack! Reel it in!"
Play SE: Warning sound effect
Else:
Show Text: "Keep the tension in the green zone!"
Wait: 10 Frames (Small pause before the next tension adjustment)
If: Button [OK] is being pressed (Player is reeling in)
Control Variables: Tension -= Player_Reel_Strength (Decreases tension as the player reels in)
If: Tension <= 0 OR Tension >= 100 (Checks if the tension has left the safe range)
Comment: "Fish got away or line broke"
Play SE: Sound effect for failure
Show Text: "Oh no! The fish got away!"
Break Loop
End Loop
Comment: "Fish successfully reeled in"
Play SE: Sound effect for success
Show Text: "You've caught a fish!"
Control Variables: Set Caught_Fish_ID = Random number (Determines the type of fish caught)
Erase Picture: Tension Gauge
Erase Picture: Tension Indicator
Comment: "Proceed to process the caught fish or return to the game"

Explanation:​


During the "Reeling in the Fish" event, the player's goal is to manage the tension by pressing and releasing the 'OK' button. If the tension gets too high or too low, they risk losing the fish. This phase tests the player's ability to respond to changing conditions and maintain control.

Once the loop ends, either by the player successfully keeping the tension within bounds or failing, the event concludes by displaying the outcome. If successful, the player is rewarded with a fish catch, and if not, the game provides feedback about the loss.

The final step is to erase the pictures used for the tension gauge and process the results of the fishing attempt, whether that’s adding a fish to the player's inventory or simply ending the mini-game.

—---------------------------------------------------------------------------------------------------------------------------

Now, let's create a common event for handling the caught fish and concluding the mini-game with some rewarding mechanics.

Common Event: Process Caught Fish​

Name: Process Caught Fish
Trigger: None
Starting Switch: Fishing_Catch_Success (This switch gets activated after a successful reel-in)

Event Commands:​


Comment: "Determine the type and size of the caught fish based on the Caught_Fish_ID variable"
Control Variables: Set Fish_Type = Caught_Fish_ID (This variable will decide which fish is caught based on the ID)
Switch: Fish_Type (Use a switch or conditional branches to determine the type of fish caught)
Case 1: Common Fish
Show Text: "You caught a Common Fish! It's small but looks fresh."
Control Variables: Set Fish_Size = Small
Case 2: Uncommon Fish
Show Text: "You caught an Uncommon Fish! It's a decent size."
Control Variables: Set Fish_Size = Medium
Case 3: Rare Fish
Show Text: "You caught a Rare Fish! It's quite big and rare!"
Control Variables: Set Fish_Size = Large
Default:
Show Text: "Looks like it got away..."
Comment: "Add the fish to the player's inventory"
Change Items: Add 'Fish' of the caught type and size to inventory (Adjust this command to match your items database)
Comment: "Calculate experience points or rewards based on fish type and size"
Control Variables: Set EXP_Gained = Fish_Base_EXP * Fish_Size_Multiplier
Change EXP: Add EXP_Gained to the player
Comment: "Give player the option to keep fishing or quit"
Show Choices: [Keep Fishing], [Quit]
When [Keep Fishing]:
Call Common Event: Fishing Setup (Calls back to the setup event to start over)
When [Quit]:
Show Text: "You decide to take a break from fishing."
Control Self Switch: A = OFF (Resets the fishing mini-game)
Exit Event Processing

Explanation:​


In this event, the type of fish caught is processed based on a randomly assigned ID, which represents the fish's rarity and size. The player receives different messages and rewards depending on the fish. The fish is then added to the player's inventory, experience points are calculated, and the player is given the choice to continue fishing or quit the mini-game. Each step is designed to provide feedback and a sense of achievement, encouraging continued play or providing a satisfying conclusion if they decide to stop.

This common event should be linked to the successful completion of the "Reeling in the Fish" phase. When the player decides to quit, make sure to reset all necessary switches and variables to ensure the mini-game can be started fresh next time.

This is what I have put together so far 😀
[whatever this is]
I'm sorry, did you AI generate an event tutorial?

Your post is incomprehensible. What is it you are trying to accomplish, what is going wrong, what do you need?
If: Tension <= 0 OR Tension >= 100
you do know this does NOT work at all dont you?

whatever you try, there are more mistakes, why not use a fishing plugin
or a smash button plugin to increase it variable?

you probably only need 1 or 2 common events to run it all.

Original thread: https://forums.rpgmakerweb.com/threads/mz-fishing-tension-event.167659/