Loot Tables! (Fishing System like Fishtopia) | TUTORIAL | Difficulty : 🟧(Old Forum Repost)

TLDR: In block code, you want to build something like

image

This is the loot table for Fishtopia, and the number can be changed to whatever you want. Make sure you have item granters that detect each broadcast to grant the item to the player.
or How to Make a Fishing System like Fishtopia | Gimkit Tutorial 4 - YouTube (26m warning)
Seeing as this was a FAQ in the Discord and looks to be on track to become one here. I’ve made a guide! Although this probably won’t help much, at least I tried ¯_(ツ)_/¯.

Bold = Keywords
Italics = Optional

So First you want to get a device that has the "wire pulse " in blocks. My favorite is the item granter but it’s your pick. Also, it can be " When Receiving on Channel " . The reason I like the item granter is that in the “for this device section, " there is a Grant item with a custom amount block. You can make the item granter be selected to “Bait” and in the Visual Code have: " Grant Player Selected Item (Custom Amount) " in the " amount *” bit have -1. The * integer block can be found in the " Math section ". First, make a variable. This variable can be called whatever you want but I like “Num” or “Number”. Then place a “Set (Variable ) to”: “random integer from (1) to (1000)”. If you didn’t read the optional part. The integers are in the math tab. Then get an "if " Block with 3 "else ifs ". If blocks need a certain condition to be true for it to run. else if blocks run if the “if” or “else if” above them is false. else blocks run if all conditions are false. we are making the “first zone” loot table. On the first “if” have “If (Variable =< 700)”
Broadcast: “Gray fish”
Else If (Variable =< 850)
Broadcast: “Green fish”
Else If (Variable =< 950)
Broadcast: “Red fish”
Else If (Variable =< 1000)
Broadcast: “Blue fish”.
Then make a property named something like Bait #. in the item granter that grants bait. go to the “when item granted” block . and build this:

54trhar1fk0yd6kqqkltb8uz9594

Set “1” to # of bait granted for every question.

use the “bait” property to turn the code above into the code below (Bold is new if block in this case)
“if (Get Property: Bait > 0)
Set Property Value to: Property:
Value: Get Property: Bait - 1
If (Variable =< 700)”
Broadcast: “Gray fish”
Else If (Variable =< 850)
Broadcast: “Green fish”
Else If (Variable =< 950)
Broadcast: “Red fish”
Else If (Variable =< 1000)
Broadcast: “Blue fish”
Else:
Broadcast Message on Channel: (Out of Bait Channel)

if you did everything correctly it should look something like this:

After this point Everything is optional
if you make a system to upgrade a property for a “FishingRodLevel”
Property
you can make this:

hehehe

This will not allow you to get the gray fish or least valuable fish when you have upgraded your fishing rod!
If you add that to the system you can do this!

You can also use that to make a system where you need to unlock each fish! If you use and blocks you can build this.

It’s a Bit Different (different maps).
Anyways. That’s it! I hope it helped!
ALSO, MAKE SURE ALL VARIABLES HERE ARE SET TO NUMBER
ALSO READ OTHER REPLIES BEFORE POSTING ONE, YOUR QUESTION MIGHT ALREADY BE ANSWERED

32 Likes

That’s really cool! I’ve been trying to figure out the fishing system and that really helped! Thanks! :grinning:

2 Likes

Ive used this exact method without using your tutorial for my own fishing system lol

Another thing you can do to “unlock” fish is by give that fish more requirements (as in max with no upgrades is 1000 for number, but fish requires 1050).

Also, some variables arent needed like the bait one. Variables shouldnt be used unless you are going to use them multiple times.

Great tutorial though!

2 Likes

At last, a fishing tutorial I understand and I can edit! :face_holding_back_tears:

3 Likes

The bait-checking system isn’t needed anymore due to the checker being released. you could use a checker to do the check that the block code did. This will allow you to add more items

1 Like

Bumping this bc this post is awsome and is REALLY helpful

3 Likes

yes Loot Tables! (Fishing System like Fishtopia) | TUTORIAL | Difficulty : 🟧(Old Forum Repost) is really helpful

2 Likes
3 Likes

bumpitiydo i do bump

1 Like

I watched your youtube video but my mechanism didn’t work. It just runs the NoBait message even when I have bait.

5 Likes

Are you sure you have the “Bait#” Variable set to number? The fishing rod upgrade system wont work for the same reason

1 Like

The Bait property was set to number

1 Like

1 Like

Do you have an item inventory manager setting the “Bait” variable? The name for properties are CaSe-sEnSiTiVe (sorry I’ve really been wanting to type like that XD)

No, I didn’t. Thanks!

1 Like

What channel do I set the Item Inventory Manager to? Nvm I figured it out. I changed the property in the Item Inventory Manager.

1 Like

bumpitiydo i do bump

How would you make a system for multiple loot tables?
Like different areas?

1 Like

you could have different item granters or whatever you used for the blocks (one for each zone), or you could make a zone property and have a zone device change the property to the Zone#. then have

if zone = 1
~insert loottable here~
else if zone = 2 
~insert loottable here~
else if...

you probably get the point of what to do to implement more zones, just more else ifs. at the end use “else”. but if you do the if block approach use it for smaller loottable as the loottables take up lots of blocks. so i’d use the different item granters for each zone.

for each zone (only need to do this after zone 1) add another broadcast block and copy the text over (or just edit the existing broadcast) and add the zone number to the broadcast and if doing the extra broadcast just make new popups but if you do just change it use new item granter & popups. if doing the one item granter i’d change the existing one. but for individual item granter i’d use exta broadcast

1 Like

Welcome to the community!

2 Likes