Field Abilities

Vlue

Talent Extraordinaire
Member
Joined
Mar 13, 2012
Messages
589
Reaction score
378
First Language
English
Primarily Uses
Field Abilities v1.0
By Vlue
Introduction
Someone asked for this, so I made it! I can't remember who though, might have been me. I also couldn't think of a better name for it other than field abilities, but without much further ado: This script, Field Abilities, gives you options for throwing, grabbing, pushing, pulling objects, and jumping! Now you can leap gorges, toss pots, and drag heavy statues around, all in the name of justice! Or whatever you heroes are calling it now-a-days.

Features
- Pick up and toss certain events, including self-switch on throw for after thrown actions
- Drag events around
- Jump! Includes options to disable jump via switch, and to set regions where you can't jump to.

How to Use
Plug and play, set up events and regions as necessary. All instructions are available in the script itself.

Script
Pastbinz: http://pastebin.com/UuswnbHE

FAQ
N/A

Credit and Thanks
- By Vlue
- Free to use in any project, commercial or otherwise, with credit given (though I would like to know!)

Author's Notes
I haven't had a Banana Cream Pie in forever...
 

Dream3r

90% Dreamer, 100% Dedicated
Veteran
Joined
Jun 13, 2013
Messages
530
Reaction score
376
First Language
English
Primarily Uses
Can I pay you in banana cream pie?

Also will more than likely be useful.

Is pick up an option?  Like when you click on a lamp would you pick it up and walk with it?  I'm assuming even if it does work you'd need the artist to draw a verson of the sprite with a lamp in hand.
 

Vlue

Talent Extraordinaire
Member
Joined
Mar 13, 2012
Messages
589
Reaction score
378
First Language
English
Primarily Uses
Hehe :p


Yup, pick up is an option! You can't throw something if you can't pick it up! And events that have been picked up are displayed over the actor.
 

Probotector 200X

Probotect and Serve
Veteran
Joined
Mar 14, 2012
Messages
913
Reaction score
168
Primarily Uses
This is AWESOME. So simple to use, and enables lots of cool things...So many puzzle options made so much easier with this, thanks a bunch for making such a cool, simple to use script!

Oh, but I ran into an error. I got stuck in my first attempt. I picked up an item, jumped over a hole, and threw the item back. The platform past the hole is only one panel, so, I got stuck. This was entirely my fault! But I worry others will run into this problem, and it effects how maps can be designed. I don't see a logical way for the script to solve this, so it's entirely up to the designer to avoid this kind of problem. I have a screenshot of where I got stuck.

(the big white snowball is pickup-able)

VXA DCB ss001 stuck with field ability script lol.png
 

Dream3r

90% Dreamer, 100% Dedicated
Veteran
Joined
Jun 13, 2013
Messages
530
Reaction score
376
First Language
English
Primarily Uses
^Not really a true fix but the script could make it where you jump into something the item will slide out of the way. Weird fix but only thing I can think of.
 

Dream3r

90% Dreamer, 100% Dedicated
Veteran
Joined
Jun 13, 2013
Messages
530
Reaction score
376
First Language
English
Primarily Uses
Ran into an issue as well. Sometimes when I throw an item it turns invisible.  It still exist as when I go to walk where it landed I stop but it is no longer visible.

edit: Issue #2.  When picking up an item that acts as a light such as a lantern or torch, the object is picked up but the light is left behind.  Might be specific to the scripts in my game so I'll have to work with you sometime on it
 
Last edited by a moderator:

Rello

GERGtheNERD
Veteran
Joined
May 15, 2012
Messages
207
Reaction score
13
First Language
Profanity
Primarily Uses
RMVXA
Maybe I'm misreading or just missed something, but is there a way to have triggers after being thrown "stack events" atop each other for certain triggers? In LoZ terms, think about tossing a pot and it breaks, or dragging a statue atop a pressure-sensitive switch.

P.S.:

This is really fun to just play around with. I've been tossing NPCs around for like 10 minutes.
 
Last edited by a moderator:

Vlue

Talent Extraordinaire
Member
Joined
Mar 13, 2012
Messages
589
Reaction score
378
First Language
English
Primarily Uses
Ran into an issue as well. Sometimes when I throw an item it turns invisible.  It still exist as when I go to walk where it landed I stop but it is no longer visible.


edit: Issue #2.  When picking up an item that acts as a light such as a lantern or torch, the object is picked up but the light is left behind.  Might be specific to the scripts in my game so I'll have to work with you sometime on it
What's going on on the event that just disappears?

Maybe I'm misreading or just missed something, but is there a way to have triggers after being thrown "stack events" atop each other for certain triggers? In LoZ terms, think about tossing a pot and it breaks, or dragging a statue atop a pressure-sensitive switch.


P.S.:


This is really fun to just play around with. I've been tossing NPCs around for like 10 minutes.
Haha, those NPC's! (They can pick you up to if you do it right!)


If you plan it right you can do that yes. Events that are thrown turn on their D self switch, so if that event had a second page set to run when that self switch is turned on.. you can have a pot that breaks (which, aside from being a barrel, is the way it's demoed in the Steam Script Compilation.)
 

Dream3r

90% Dreamer, 100% Dedicated
Veteran
Joined
Jun 13, 2013
Messages
530
Reaction score
376
First Language
English
Primarily Uses
What's going on on the event that just disappears?
Custom item might be the issue but it's just a lantern that I've tested it on so far.  You pick it up just fine but when you throw it it becomes invisible.  I'll take some screen shots tonight to show it
 

SquallStorm

Resident Persona 5 Hyper
Veteran
Joined
Feb 4, 2014
Messages
217
Reaction score
140
First Language
English
Primarily Uses
So this script is actually something I was going to request either a tutorial for or commission as a script for my project.  Vlue, thank you thank you thank you so much!  Incidentally, I had a question for you.  Say I was going to have a puzzle where there are four switches just outside the players jump range and you're to throw objects at these switches to trigger them.  Would I use a method similar to a pressure plate where an events X and Y values are used to detect on/off conditions to check if the switch has been triggered?

Edit:  Sorry to add more but I've noticed that it works oddly with followers.  I've tried to see about adding to the script to make followers jump as a single unit but I can't for the life of me fix the issue
 
Last edited by a moderator:

Vlue

Talent Extraordinaire
Member
Joined
Mar 13, 2012
Messages
589
Reaction score
378
First Language
English
Primarily Uses
You would use the same method as the pressure plates x, y, blah blah, yes yes. That would be easiest.


And yah, it doesn't play nice with followers, mainly because followers don't jump when you do. I couldn't think of a fix for it in the time I gave it, so I left it out... (I don't like followers btw :p )
 

SquallStorm

Resident Persona 5 Hyper
Veteran
Joined
Feb 4, 2014
Messages
217
Reaction score
140
First Language
English
Primarily Uses
I realized now that followers were just a cosmetic thing and entirely preferential from the developer's standpoint, which is very rarely a good thing.  This script is absolutely fantastic though, Vlue and I really do have to thank you for this one in particular because it opened the door for a couple of dungeons I wouldn't be able to make otherwise.
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
Wow... This will really make life easier for a lot of people... :)
 
Joined
Jan 23, 2014
Messages
161
Reaction score
19
First Language
English
Hi Vlue,

It's me again. :)

I was wondering if you can tie jumping to stamina (the stamina script is here: http://forums.rpgmakerweb.com/index.php?/topic/6299-dash-stamina/)

I was able to get the stamina to decrease from pressing the jump button which I moved to :L (Q on keyboard, but I was wondering how I could make the stamina bar appear whenever you jumped. I don't know how. Haha ^^ ;)

Thanks
 

Sixth

Veteran
Veteran
Joined
Jul 4, 2014
Messages
2,162
Reaction score
822
First Language
Hungarian
Primarily Uses
RMVXA
Forgot how Vlue handles jumps (I guess he uses the built in 'jump' method too), but try to do this:


In the Dash Stamina Script, find this line:

return if $game_player.dash?Replace it with this:
Code:
return if $game_player.dash? || $game_player.jumping?
Then find this line a little below:
Code:
return unless $game_player.dash?
And replace it with this line:
Code:
return unless $game_player.dash? || $game_player.jumping?
This works for me with another jump system.
This will show the stamina bar even if the jumping is a move route command for the player, so disable the stamina system when you want to do some eventing where the player jumps.
 
Joined
Jan 23, 2014
Messages
161
Reaction score
19
First Language
English
Forgot how Vlue handles jumps (I guess he uses the built in 'jump' method too), but try to do this:

In the Dash Stamina Script, find this line:

return if $game_player.dash?Replace it with this:
Code:
return if $game_player.dash? || $game_player.jumping?
Then find this line a little below:
Code:
return unless $game_player.dash?
And replace it with this line:
Code:
return unless $game_player.dash? || $game_player.jumping?
This works for me with another jump system.This will show the stamina bar even if the jumping is a move route command for the player, so disable the stamina system when you want to do some eventing where the player jumps.
Great this works perfectly thanks so much!
 

lol2dubs

Warper
Member
Joined
Jun 6, 2015
Messages
1
Reaction score
0
First Language
English
Primarily Uses
Maybe I'm confused. No one else seems to be having trouble....

I've got my map all set up. I move my event (small person) over the rock event and stop him on the other side. Once he stops, the movement event turns on a switch that tells the little guy event to pick up the rock.

At this point, the rock disappears. It is not over his head. If I hit the action button, nothing happens.

Any idea?

*End of first script*

"Set Move Route Turn Right"

"Set Move Right Char 2 Turn Right"

"Control Switches: {0014:ThrowRock] = ON"

Branch End (end of conditional block)

*Once ThrowRock comes on*
**Rock with Event Graphic trigged as Parallel**

"Conditional Branch: Switch [0014: ThrowRock] == ON

"script: pickup"

"Control Switches: [0014: ThrowRock] = OFF
Branch End

So... after the char moves it triggers the throwrock switch which triggers the pickup script in the parallel event waiting for the switch to turn on. The rock disappears from the map, but does not appear over the characters head, nor does it throw when I hit a key.

What am I missing?

2dubs
 

Zarsla

Veteran
Veteran
Joined
Jan 23, 2015
Messages
710
Reaction score
228
First Language
English
Primarily Uses
Hey Everyone,
I've alter the script a bit, so that a running jump is added, as well as the ability to alter how many tiles you can jump.
I'm not uploading the entire script until Vlue gives a yay or nay on me or him uploading it so for now here's the script parts you need:

replace this part of the script:

  1. #The button to be used for jumping:
  2. JUMP_KEY = :SHIFT
with this

module JE

   JU = -2          # use negative number. This is the ammount you want in tiles

                      # for a regular jump, facing up.

                     

   JD = 2           # use postive number. This is the ammount you want in tiles

                      # for a regular jump, facing down.

                     

   JR = 2           # use postive number. This is the ammount you want in tiles

                     # for a regular jump, facing right.

                     

   JL = -2          # use negative number. This is the ammount you want in tiles

                     # for a regular jump, facing left.

   

   SJU = -4          # use negative number. This is the ammount you want in tiles

                           # for a running jump, facing up.

                     

   SJD = 4           # use postive number. This is the ammount you want in tiles

                          # for a running jump, facing down.

                     

   SJR = 4           # use postive number. This is the ammount you want in tiles

                           # for a running jump, facing right.

                     

   SJL = -4        # use negative number. This is the ammount you want in tiles

                         # for a running jump, facing left.

  

   RJB = :SHIFT      # this is the button you press for a running jump. the deafult

                                # is shift

  

end

 

#The button to be used for jumping:

JUMP_KEY = :X
As well as replace this:

  1.  def jump_forward_field
  2.     return jump_straight(0,2)  if @direction == 2
  3.     return jump_straight(-2,0) if @direction == 4
  4.     return jump_straight(2,0)  if @direction == 6
  5.     return jump_straight(0,-2) if @direction == 8
  6.   end
with this

def jump_forward_field

   if !Input.press?(JE::RJB) then return jump_straight(0,JE::JD)  if @direction == 2 else return jump_straight(0,JE::SJD)  if @direction == 2 end

   if !Input.press?(JE::RJB) then return jump_straight(JE::JL,0)  if @direction == 4 else return jump_straight(JE::SJL,0)  if @direction == 4 end 

   if !Input.press?(JE::RJB) then return jump_straight(JE::JR,0)  if @direction == 6 else return jump_straight(JE::SJR,0)  if @direction == 6 end

   if !Input.press?(JE::RJB) then return jump_straight(0,JE::JU)  if @direction == 8 else return jump_straight(JE::SJU,-4)  if @direction == 8 end

  end
Also I'm really in love with this script
 

Diretooth

Lv. 25 Werewolf
Veteran
Joined
Mar 10, 2013
Messages
1,231
Reaction score
444
First Language
English
Primarily Uses
RMMV
I just had a brilliant idea that can add on to this script. Accessories that allow jumping, even when the switch is off. This way, without the item, you can't jump.

As a side note, I've noticed that I can jump on top of walls, which while hilarious, means a more liberal use of the no jumping region.
 

plasmatorture

Warper
Member
Joined
Aug 28, 2015
Messages
4
Reaction score
0
First Language
English
Primarily Uses
If I wanted the throw command to go three spaces instead of two, how would I accomplish that? I've been staring at the code for a bit and can't figure out what defines the movement speed. Jumping was easy to figure out, on the other hand.
 

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

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,867
Messages
1,017,062
Members
137,575
Latest member
akekaphol101
Top