Fishing System

Level 6
Joined
Apr 1, 2009
Messages
202
I'm trying to develop my own fishing system where you cast the fishing ability and it creates a bobber at the targeted point and the hero has an animation where he faces it and holds out his fishing pole. I can probably figure it out but what I need help with is the catching part. I need to create conditions and events where:

1. The line is cast (A bobber is created and stays till the fishing is over or canceled)

2. The weight (Item carried by hero to set fishing depth) sinks to random depth between two integers based on the weight they are using (Determined by 4 different possible weights each with set depths).

3. Wait for a max of 25 seconds (Based on regions and type of bait)

4. Either a fish bites or nothing does (If a fish bites a random fish/shark/swordfish/ray is picked from whatever the depth was and that determines if you catch it or not based on your your line, fishing pole, possibly hero attritbutes)

5. The fish is hooked, more waiting and a chance for the fish to get away (Break the line, determined by weight of fish and the strength of your line).

6. You catch the fish if your line doesn't break after more waiting.

I can figure out 1,2,3,4 by myself but I need help with 5 and 6. The problem is I have 100 different types of fish, sharks, rays, and swordfish total. I was wondering how I should go about storing for each fish the weight, size (For selling purposes), and depth it is at. All are between two random real numbers or integers. Should I store them using variable arrays or can I use hashtables or something else?


Example:
1 - Line is cast in shallow water region
2 - Check if water is shallow or deep
3 - Fish bites
4 - Pick a random fish from the shallow fish category (Based on depth of 1)
5 - Set weight of fish
6 - Heroes line is strong enough and attributes are high enough
7 - Give the fish to the hero
8 - When selling the fish give money according to weight it was caught at determined by a preset value (Also an option to cast an ability telling you the weight and it never changes for that specific item)
 
Top