News:

SMFNew Installed

+-+-

User+-

Welcome, Guest.
Please login or register.
 
 
 

Login with your social network

Forgot your password?

Site Stats+-

Members
Total Members: 728
Latest: Cho
New This Month: 0
New This Week: 0
New Today: 0
Stats
Total Posts: 10932
Total Topics: 795
Most Online Today: 389
Most Online Ever: 854
(September 18, 2024, 07:49:37 am)
Users Online
Members: 0
Guests: 47
Total: 47

Author Topic: Fishing Holes Help  (Read 1821 times)

0 Members and 42 Guests are viewing this topic.

Fishing Holes Help
« on: »
My brain is muddled so I've lost my trail of thought, wondering if anyone can help :)

I want to utilise the players' Fishing Luck stat better. What I want to do is increase the number of attempts the player has on each fishing hole based on the value of their fishing luck stat so it has more usefulness.

In the vanilla game each fishing hole has a stat assigned to it that indicates how many attempts the player has (for example, on Promising Fishing Hole this stat is 9 indicating 9 attempts). The rest is hardwired, so that after each attempt the stat is decreased and the fishing hole unit trigger is set to be disabled when this stat reaches 0.

What I want to do is that when the fishing hole is created, have this initial stat increase by 1 for every 10% the player has on their fishing luck stat. In other words, a fishing luck stat of 10% would give the player 1 extra attempt, i.e. 10 attempts instead of 9.

I created a layout that shows/hides fishing holes each with a different initial stat value based on the players fishing luck stat and this worked - but it comes with the drawback that it allows easy cheating, if the player changes gear etc, which means they could effectively fish forever which would be game-breaking.

So I'm wondering if a stat watcher or triggerable action could be assigned to the fishing hole to take care of this. Could this make the fishing hole itself increase that initial attempts stat on itself if the players fishing luck is above a specified value?

I'm limited with knowledge and experience in stat watchers etc and hoping somebody could talk me through it or let me know if this is even possible?

Thanks!
« Last Edit: May 16, 2015, 03:18:26 pm by DeeZire »

Share on Bluesky Share on Facebook


Re: Fishing Holes Help
« Reply #1 on: »
Hi Deezire!  From the way you described how you'd like it to work, I'm pretty sure it is doable. Unfortunately I can't help you much beyond this encouragement, since I'm not learned in that area either  :-[ But if gyt comes by, he'll set you right quick I'm sure!


Re: Fishing Holes Help
« Reply #2 on: »
Hey DeeZire,

Is the layout you're using part of a 'feature' in the level or is it somehow attached to the player, like as a passive skill?  Basically, how is it implemented?  This'll help me help you.

But just in case you're doing what I'm guessing, I'll give a hypothetical.  I'm guessing you're using a passive ability attached to the player.  In this case, yes, a statwatcher is all you need.  We'll set a new, custom stat to 1 on the fishing hole and prevent the skill from casting more than once on it.

1)Create a new stat, something like FISHINGLUCKAPPLIED.
2)Set up the stat requirement on the skill:

##a)You'll need to make sure that both of the stats you're applying are applied on an ONHIT event, or through another skill via EXECUTE SKILL (might require #2).

##b)Set the ONHIT (or executed skill) event to set the FISHINGLUCKAPPLIED stat to 1 on the fishing hole.

##c)Add a STAT_REQUIREMENT to the event (or executed skill) with:
SECONDARY_TARGET: value
PRIMARY_TARGET: enemy
WATCH_TYPE: equal to or less than
SECONDARY_VALUE: 0

Voila, the skill prevents itself from casting on the same target twice.

Re: Fishing Holes Help
« Reply #3 on: »
That's great, you seem to know what I'm getting at!

Right now it's all in a layout which is a feature in most levels - it's actually a modified FISHINGHOLE.LAYOUT that's in the vanilla game. All this layout contains is the fishing hole object itself with some logic that disables it if the stat reaches 0.

The stat is already on all of the fishing hole objects in the game - it's the FISHINGHOLECOUNT stat that the game uses as a counter for how many attempts the player has at fishing it (the fishing holes in towns are separate objects that don't have this stat as they have endless attempts anyway).

Basically, when a player sees a fishing hole, I want that fishing hole's FISHINGHOLECOUNT stat to update dynamically based on the players fishing luck stat. This would need to be dynamic, so if the player removed their fishing luck gear after seeing the fishing hole then the attempts would decrease correspondingly to prevent cheating.

So here's a scenario - level is generated, it has a promising fishing hole (9 attempts). Player enters level, he has a fishing luck of 10%. Fishing hole increases its FISHINGHOLECOUNT stat to 10 accordingly (+1 attempt for every 10%). The player fishes a few times and FISHINGHOLECOUNT drops correspondingly, say it's now 6. Player takes off fishing luck gear, so bonus goes and FISHINGHOLECOUNT should now drop to 5.

As I said I'm confused on this and probably making it a lot more complicated that it needs to be  :(

Re: Fishing Holes Help
« Reply #4 on: »
That seems incredibly complicated, DeeZ.  But, here goes...


TASK 1: Create a passive that triggers the layout attached to the fishing hole.  This passive skill needs to be attached to the player character.  EVENT_START should target fishing holes and set a new stat, FISHINGLUCKINITIATE or something, on the fishing hole to 1.  Give it a huge range.  It'll only fire when the player changes gear or enters the level.  You don't even necessarily need it to do its thing on zoning, just when they switch gear.

TASK 2: Create a proper logic loop to modify FISHINGHOLECOUNT appropriately.

-You should have, regularly triggered by a timer, a STAT EVALUATOR that checks for the FISHINGLUCKINITIATE stat to be 1 or greater.

-When the STAT EVALUATOR gets a TRUE, it should do a few things:
--Reset FISHINGLUCKINITIATE to 0.
--Run a STAT OPERATOR that modifies FISHINGHOLECOUNT by the difference between current FISHINGLUCK and another new stat called FISHINGHOLEMODIFIED
--Run a STAT OPERATOR that modifies the new FISHINGHOLEMODIFIED stat to be EQUAL to the correct, current FISHINGLUCK value (like you said, ~10%).


So, this is what it should do.


You see a fishing hole and pop on your fishing gear to give yourself +10 fishing luck, or +1 to FISHINGHOLECOUNT.
The passive skill sets FISHINGLUCKINITIATE to 1, triggering the logic loop.
The loop resets its FISHINGLUCKINITIATE to 0 so it only runs once.
The loop modifies FISHINGHOLECOUNT by adding the difference between FISHING LUCK and FISHINGHOLEMODIFIED.  That's 1-0=1, so it adds +1 to FISHINGHOLECOUNT.  Say it had 9 before.
It now has 10.

Then, your player fishes five times.  10-5=5.
And your player decides to take off their fishing gear.  This initiates the modifying logic loop again.
It adds the difference between FISHING LUCK and FISHINGHOLEMODIFIED.  This time, FISHINGHOLEMODIFIED is equal to the last luck modifier it got, so 1.  Luck is now 0 because the player took off their gear.  Luck minus modified: 0-1=-1.  The loop subtracts one from FISHINGHOLECOUNT.

The fishing hole now only has 4 more uses.




This is a general template... and I'm assuming you can subtract one stat from another to modify something else by the sum.  I've seen the option in the logic, just never used it.  If you haven't either, I'd test that first.


Re: Fishing Holes Help
« Reply #5 on: »
Wow! Yes very complicated but I actually understood all that' and Im cool with stat logic, so I think I can do this now, many many thanks!!

What I may do to simplify things is make it a one-shot deal, so that 'on create' the fishing hole simply increases its max attempts if your fishing luck is higher and not worry about changing it if the player changes gear - the only thing that really matters is to increase the initial maximum number of attempts the player has.

Thanks again, hope your finals went well BTW!

 

Recent Topics+-