Overworld skill call on event

Skurge

" (GASP) What's going on!? "
Veteran
Joined
Jul 12, 2015
Messages
1,197
Reaction score
274
First Language
English
Primarily Uses
N/A
Ok so what I am experimenting on now is over world skill tests, what I am currently trying to determine is a lock pick skill.

I have made a skill called Lockpick that has a success chance at a default 5%, at later levels I would like to know how to increase it's success chance.

As for it's primary use, I want to see if I can make this skill's success chance determine the outcome of an event. I have looked into the conditional branch and all other commands but none seem to link to this, I have considered using variables but I want to see if I can do this by the skill's built in success rating.

Any help or further information would be most appreciated.
 

Niten Ichi Ryu

Grey Lords Emissary
Veteran
Joined
Jul 27, 2012
Messages
1,321
Reaction score
1,239
First Language
French
Primarily Uses
RMMV
That is indeed an interesting question, but I think the success rate of a skill enter in condition when the skill is suppose to apply a state to a battler. Not sure it has also field applications.(I may be wrong though)
 

MeowFace

Meow
Veteran
Joined
Feb 22, 2015
Messages
1,034
Reaction score
184
First Language
Meowish
Primarily Uses
Set up your skill in game variables.

eg 

Game Variable 1 = Lock pick = 5 (You can change/add to this as your characters level up)

Set up a success rate using random numbers from 1 - 100 and put it in another game variable, say, Game Variable 2

In your Conditional Branches

compare if Game Variable 2 (success rate) <= Game Variable 1 (Lock pick skill)

if Game Variable 2 is smaller than Game Variable 1 (success)

then run whatever you want to do with unlocking 

if Game Variable 2  is bigger than Game Variable 1  (Failed)

then in the 2nd branch run a fail message or whatever you planned(a lock sound maybe?)
 

Skurge

" (GASP) What's going on!? "
Veteran
Joined
Jul 12, 2015
Messages
1,197
Reaction score
274
First Language
English
Primarily Uses
N/A
OK I believe I got it working so far, so pretty much a lock remains 100, but your chances determine on the pick lock skill variable.

So in other words it's always going to be difficult to unlock a door, but you still have that slight chance, leveling up the lockpick skill say from 5-10 will give you better chances.

So far I have made the failed handout result in a jammed door page, I am thinking of having the locks only jam depending on your skill again. So the less experienced you are, and IF you fail the more likely it'll jam meaning you will have to try again another time- which I will try to figure out how to have the locks reset after a day in game.

Also do you think I should have it that failing to unlock means a loss of pick locks? or should they never break? Or do you think they should break by chance again like the other variables?

EDIT: I'm using this day night cycle script, http://steamcommunity.com/sharedfiles/filedetails/?id=233076542 I'm not sure how to configure a door to be reset after 24 hours.
 
Last edited by a moderator:

MeowFace

Meow
Veteran
Joined
Feb 22, 2015
Messages
1,034
Reaction score
184
First Language
Meowish
Primarily Uses
What i did for mine is a picklock will be consumed everytime my rogue tries to unlock anything no matter it's success or fail. Limit the max lockpick to like 5 or 10 and this way we can prevent low level rogue from spamming high level lock in a dungeon ;)

Edit: Didn't make my self clear enough on that example :p By limit the max lockpick i mean lockpick you can carry in the inventory, you will need an item limit script to do that.

For time script, you will need to either add a script call to turn off the self switch in the event (if you use self switch for new page), or turn off a game switch (if you use a game switch for new page). Depending on your script, some allow you to set up common events to run when certain condition is met. eg 12 midnight/12 noon. I am using an edited copy of Hikimoki's script for that, because i need a max stamina reduce twice a day to force the player to eat or they won't be able to dash. :p
 
Last edited by a moderator:

Skurge

" (GASP) What's going on!? "
Veteran
Joined
Jul 12, 2015
Messages
1,197
Reaction score
274
First Language
English
Primarily Uses
N/A
Hm I like the idea of having a limit on how many times to use it, but I don't want to force the player to go back and forth to the provider of the picklocks. I'd like to have as many as you want, but restricted on how often to use them in an event.
 

MeowFace

Meow
Veteran
Joined
Feb 22, 2015
Messages
1,034
Reaction score
184
First Language
Meowish
Primarily Uses
lol, i am being a little evil meaney on that part in my games ;)

i am not forcing the player to buy but to craft the lockpicks :p

well, not only lockpicks, ropes and such tools for dungeon clearing as well.

NPC shops only selling the basics, forcing them to craft to get the good stuffs. :D

And crafting is based on skill too, so it's not 100% success rate depending on the party members. :p

But if lockpick(or other tools) = 0, they can find 1 for free at either homebase/tent (where i let my players change their party members)
 

Skurge

" (GASP) What's going on!? "
Veteran
Joined
Jul 12, 2015
Messages
1,197
Reaction score
274
First Language
English
Primarily Uses
N/A
Using the chance skill set, i have experimented on the use of trap spotting and disarming.

Basically you walk to a event that triggers whether you spotted the trap or not, if you spot the trap you find a hidden event, walking on it hurts you. Failing to spot the trap means you don't see and therefore walking on it hurts you.

I've got it working nicely except for one little problem, when spotting a trap I want the player to have the ability to disarm the trap for extra rewards, however I want this to trigger by activating the event like normal from a square off.

The page itself is set on below, and I can't seem to get it to activate what I want by a button press. Any way around this?
 

MeowFace

Meow
Veteran
Joined
Feb 22, 2015
Messages
1,034
Reaction score
184
First Language
Meowish
Primarily Uses
The way i did with my traps and hidden path is, they are all visible when a rogue is in the party. Stepping on the trap events trigger them whether they are visible or not. This is just to make the rogue class a bit more useful in dungeons. Haven't thought of going as deep as spotting traps. :p

For your question:

If you let the rogue spot the event automatically (event page condition, if actor X is in party), then the traps should be always visible as long as the rogue is present. And from that event page, set up a disarm check same as you do unlock.

If the check is both locked and armed(eg. Treasure Chests), force the rogue to unlock it before able to disarm it should work.

Unlock flips a self switch > New event page that tells the rogue it's armed > Disarm (condition check, success = more reward, fail = small reward)

Edit:

Or you can do it with a variable if you want disarm to come 1st before unlock.

[1] Disarm

  Success > Variable X = 1

  Fail > Variable X = 0

  flip self switch for new page with unlock

[2] Unlock

 Success > flip self switch for opening chest

[3] Open chest

 Condition check on Variable X

  If Variable X = 1 > More rewards

  If Variable X = 0 > Less rewards
 
Last edited by a moderator:

Skurge

" (GASP) What's going on!? "
Veteran
Joined
Jul 12, 2015
Messages
1,197
Reaction score
274
First Language
English
Primarily Uses
N/A
Hmm but I need the event hand out activated by a button, it's not working no matter what button I use. Even if the event is below or same level as the player.
 

MeowFace

Meow
Veteran
Joined
Feb 22, 2015
Messages
1,034
Reaction score
184
First Language
Meowish
Primarily Uses
Event triggered by button works this way:

Below Player = Player need to stand on it and press the button to trigger

Same Level as Player = Player need to stand next to it and press the button to trigger

Above Player = Player need to be below it and press the button to trigger

Event triggered by player's touch works this way:

Below Player = Player need to stand on it to trigger

Same Level as Player = Player need to bump into it to trigger (Can also be triggered by using a button when standing next to it)

Above Player = Player need to be below it to trigger
 

Skurge

" (GASP) What's going on!? "
Veteran
Joined
Jul 12, 2015
Messages
1,197
Reaction score
274
First Language
English
Primarily Uses
N/A
Hmmm, do you think a script call could manipulate the event to act as a below event but pressed next to it as if it was on the same level?
 

MeowFace

Meow
Veteran
Joined
Feb 22, 2015
Messages
1,034
Reaction score
184
First Language
Meowish
Primarily Uses
Hmm, i remember toying with a script call that changes the event's level,

back when i was setting up the random follower system. Will need to dig that demo up somewhere if it still exist.

But what you need might be easier with a small script modification to the default way how event trigger is handled.

Try put this snippet below material and above main:

Code:
class Game_Player < Game_Character  def start_map_event(x, y, triggers, normal)    $game_map.events_xy(x, y).each do |event|      if event.trigger_in?(triggers)        event.start      end    end  endend
 

Skurge

" (GASP) What's going on!? "
Veteran
Joined
Jul 12, 2015
Messages
1,197
Reaction score
274
First Language
English
Primarily Uses
N/A
That script does not seem to work, despite the tests I have done it doesn't seem to make any difference unfortunately.
 
Last edited by a moderator:

MeowFace

Meow
Veteran
Joined
Feb 22, 2015
Messages
1,034
Reaction score
184
First Language
Meowish
Primarily Uses
Put it below all other custom scripts you have. That snippet disable the level check of the event when a player trying to trigger it from the side. So now you can trigger an event on top of it or beside it both.
 

Skurge

" (GASP) What's going on!? "
Veteran
Joined
Jul 12, 2015
Messages
1,197
Reaction score
274
First Language
English
Primarily Uses
N/A
Seems to work very well now, I'm not sure what was causing it not to work before but it does so now.

My only concern is that other events that are set below player may cause some unwanted commands to activate, is there a way I can make it that this event priority is set via a script call so it isn't a global thing?
 

MeowFace

Meow
Veteran
Joined
Feb 22, 2015
Messages
1,034
Reaction score
184
First Language
Meowish
Primarily Uses
hmm.. i might be able to make the script works on event name tag.

but what should i name the tag?

well.. naming it <trap> for now, change that in the script to whatever tags you wish to use.

Script:

class Game_Event < Game_Character  attr_reader   :meow  alias meow_name initialize  def initialize(map_id, event)    meow_name(map_id, event)    @meow = event.name  endendclass Game_Player < Game_Character  alias meow_map start_map_event  def start_map_event(x, y, triggers, normal)      $game_map.events_xy(x, y).each do |event|        if event.trigger_in?(triggers)          return event.start if $game_map.events[event.id].meow.include?('<trap>') && event.normal_priority? != normal        end      end    meow_map(x, y, triggers, normal)  endend

 

To use, put <trap> in the event's name.

 

Btw.. i've changed the overwrite to alias method. So lets hope it won't conflict with your other scripts this time.

 

Edit: modified the script to add a safety so it won't be running twice.

 

Edit Again:

Forgot to tell you the formula for conditional check.

 

In your event conditional branch's script box, put in this

Code:
$game_map.events[@event_id].x == $game_player.x && $game_map.events[@event_id].y == $game_player.y
This will check if the player is on the event or not.

So if true, let the trap trigger damage

If false, means the player is triggering by the side of the event, so you can run your disarm part there.

This way you have 2 types of trigger: On event Do this, Not on event to Other.
 
Last edited by a moderator:

Skurge

" (GASP) What's going on!? "
Veteran
Joined
Jul 12, 2015
Messages
1,197
Reaction score
274
First Language
English
Primarily Uses
N/A
Did some wide tests, and it works very nicely. Thank you so much for that!

This Skill forumular works nicely with alot of things, Lockpicking is basically done and so are the trap spotting and disarming! Now moving onto gambling.
 
Last edited by a moderator:

Skurge

" (GASP) What's going on!? "
Veteran
Joined
Jul 12, 2015
Messages
1,197
Reaction score
274
First Language
English
Primarily Uses
N/A
Thinking of maybe doing a game like backgammon or something like that, basing the game off a 2 die chance, of course upgrading the gamble skill gives you a higher chance to roll better. Or perhaps being a master of deception you could cheat by placing in your own loaded dice..
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

I should realize that error was produced by a outdated version of MZ so that's why it pop up like that
Ami
i can't wait to drink some ice after struggling with my illness in 9 days. 9 days is really bad for me,i can't focus with my shop and even can't do something with my project
How many hours have you got in mz so far?

A bit of a "sparkle" update to the lower portion of the world map. :LZSexcite:
attack on titan final season is airing tomorrow, I'm excited and scared at the same time!

Forum statistics

Threads
105,882
Messages
1,017,230
Members
137,607
Latest member
Maddo
Top