RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
Psychokinesis: how to make event Psionics

0 Members and 1 Guest are viewing this topic.

***
Rep:
Level 82
We learn by living...
Objective
This is a tutorial designed to demonstrate a method of creating three new skills: Telekinesis, Pyrokinesis, and Cryokinesis. Right now, Cryokinesis aside from graphics, isn't much different from Pyrokinesis, but in the future, there may be a way to add unique flavor to these events.

Targeting System
In addition to providing three new skills, it also demonstrates a method of targeting event objects without touching them. Rocks are used in this example, and a targeting mechanism for 8 separate targets per map. Expanding the total number of targets is fairly straight forward. While this version always keeps track of 8 targets, even if there's only 2 left (meaning it can take a while to cycle through phantom targets to get to real ones). I have yet to solve the phantom targeting issue.

Telekinesis
Moving event objects, such as non player characters, tree stumps, stone walls, boulders, and so on is now possible. The objects are moved around by WASD (up,down,left,right) controls, and can hover over other objects in the game, such as trees or walls. During this time, the objects 'pass' through just about anything. When "set down", the objects regain the pass-ability settings they had before. For example, a heavy boulder blocking a pathway could be moved out of the way, or the path of enemy soldiers in a chase scene could be blocked off; or a giant chess game could be played against the computer. "shift" is used to lock the target, while escape or "x" is used to unlock the target, allowing another target to be selected.

Previous and Next targets are switched by pressing "A" and "D", respectively. Currently objects stay wherever you put them until you leave the map. When you come back, they return to their starting positions. I'm still working on this.

Pyrokinesis and Destructible Events
Objects can be targeted and damage can be inflicted to the object, using a new concept called "Community Health" or "Community Hit Points". Communities include Wood, Stone, Flesh, Metal, and Water. This tutorial uses the "Stone" Community. When a target's Community health damage exceeds their assigned hit points, they are destroyed. How they are destroyed is up to you, and how you set up your animations and sound effects. In my version, pyrokinesis causes targets to explode, transforming impassible boulders into passable rubble. Note: These targets stay destroyed even after leaving the map and returning..

Step 1: Creating the skills
click spoilers to reveal images. Let me know if you need the available code in text form. Step one involves creating three new skills, Telekinesis, Pyrokinesis, and Cryokinesis. You will have to come back to these skills to add the common events they invoke (parts 2-4).
Spoiler for:


Step 2: Skill triggered Common Events
Immediately after making your skills, you want to make the common events they call to. You'll note that Step 3 is the same as this step, for pyrokinesis and cryokinesis, and all three call the common event from step 3: Target On. The variable you are setting up ranges from 0 to 3. That's which psychokinetic power you are activating. Obviously, if you had more powers, this number range would be greater, and is easy enough to expand. "0" is reserved for "every power inactive". Clearly, you would want to rewrite this switch mechanism if you want more than one power to be functional at one time, like the ability to fly and use forcefield at the same time.

Spoiler for:



Step 3: Target On
Indicates which power is currently active and deactivates the others. This is the code you would likely edit if you wanted multiple powers on.

Spoiler for:



Step 4: how to Activate Pyrokinesis and Cryokinesis
The event codes for turning on Pyrokinesis and Cryokinesis. Note this is virtually identical to the telekinesis code. All three use switches such as TK on, PyroK on, and cryoK on. You could just as easily have "Forcefield on" or "Flight on".

Spoiler for:



Step 5: Telekinesis Effects
These are the codes for moving the events. You basically insert the 'call common event' into the objects that can be moved, and this is the code they call. Since the events are tricked into calling them out personally, they are personally effected. The basic logic is "I move north" without specifying who "I" is, in this case, "this event" is substituted for "I" and "Move Up" for "north". While turning on the skill has a base cost, there's also a maintenance cost associated with moving or changing direction. When I first tried this out, I had a cost of 10 SP per move, but that burned through the character's SP almost immediately. So I set it to 1 SP, and this gives character a few moments of Telekinesis.

Personally I'm using "Sanity" instead of "Spell Points" because the use of mind powers strains the mind driving the characters insane. I haven't set up a side effect of low/0 Sanity other than shutting down the powers, but this is a great opportunity for a Sanity related common event.

Spoiler for:


Step 6: Pyrokinesis Effects
Very similar to the Telekinesis, except four directions have turned into two directions. The "W" or "UP" button represents increasing temperature, which essentially sets off the animation. The animation has a frame duration that has to be matched up to your 'wait' duration, otherwise it won't overlap right, and all you will experience is sound effects and the first frame. I set the maintenance cost to 10, rather than 1, because the wait time is large enough to slow it down, and the power is destructive. Instead of doing damage as a negative, it ADDS to Variable determining community Hit Points, representing Total damage. When total damage exceeds the target's listed Community HP, it triggers the destruction sequence.

At this point it is important to understand that just as the Telekinesis code could be adapted to "fly', the pyrokinesis code could be adapted to setting things on fire, transmuting elements, or boiling water. I'm also contemplating causing the damage of pyrokinesis and cryokinesis to combine in weird ways, sometimes canceling, and sometimes causing objects to explode.

The damage listed is for the type of community damage (like stone) that it does. Below this number you can also have things like damage vs. wood, damage vs. flesh, and so on. By making these figures different, you create an elemental type of damage. The "S" or "Down" button is supposed to lower the temperature to a max of room temperature. I haven't figured out how to do this yet, but in theory, if you didn't destroy the object, it might be healed. Alternatively, you can use this to put out fires or damage fire elementals by "negatively" controlling their fire aspect. You might even be able to make a heat shield that absorbs fire damage or something. I just put the button option there to play with. In the mean time, you can use it as a "cancel" button if desired.

Spoiler for:


Step 7: Cryokinesis Effects
Similar to pyrokinesis in most conceivable ways, with different damage ranges. This is the first of the three where I'll be trying a new special effect, and introducing the 'water' element, to see if I can make ice. I'll probably have to import parts of the ice tilemap into the event image list so I can have something switch to them. Next I'll work on "paralyze" and "sheathed in ice" effects, which may be possible by setting a semi permanent 1 frame animation. Thoughts of a campy ice bridge also come to mind.

Spoiler for:


Step 8: Targeting Code
This is the code for targeting 8 different objects on the screen. You can expand it or contract it to fit your needs. I figured since, outside the doorways, I don't generally use more than 4 or 5 events, 8 per map should be plenty. The size of this common event increases with the square of its number. In other words, if you want 16 targets, it will be about 4 times longer than the thing listed below. Basically it just turns off other targets while turning on one. This is the type of code you want to modify if you want to target multiple objects at once. Many times during testing, I accidentally had multiple objects moving at one time.
I added the wait so you could focus on one target. Without the wait, it flashes through the targets so quickly it becomes irritating. I also have an animation called 'Select' which is a ~200/255 opacity flash of blue. You can use whatever single frame animation you like, such as highlighted brackets, white overlay, or whatever.

Spoiler for:



Step 9: Making Rocks
Make eight events, virtually identical. I recommend making one all the way through (steps 10-14) and then copying it, changing the target number to equal 2, 3, 4, etc. Until you have 8 targets. The differences should be listed in event pages 2 and 3.

Spoiler for:


Step 10-14: Setting up the Events

Step 10:
Spoiler for:



Step 11: This is the step that calls the common events this object is subject to. You can set up objects to be completely unaffected by certain things by omitting an effect like pyrokinesis or telekinesis.

Spoiler for:



Step 12: The third event page checks to see if damage has exceeded its community hp, if so, the target checks to see if it is currently targeted. If both are true, the target moves on to steps 13 and 14, being 'destroyed'. during the process of being destroyed, it resets the damage to community hit points to zero. The requirement for "currently targeted" is what prevents the other events from also being destroyed.
Spoiler for:





Step 13: first destruction stage. The entire purpose of this page is to transfer from the "am i dead?" page to "i am dead" page without the 'reset hp' interfering and making a loop.
Spoiler for:


Step 14: Dead-dead. The object is destroyed. Ironically, this stage could have built in switches for "restore/rebuild" allowing you to make engineers or healers who rebuild something destroyed as part of the plot.
Spoiler for:



I hope if you guys had the patience to review this tutorial, you found something you liked. There are a lot of different issues addressed, and a lot of room for improvement. I'm not sure if I like the 'destructible events' or 'telekinesis' part more. You definitely don't have to use all parts of this tutorial, and I encourage you to add, modify, or ignore parts as befits the situation.

-Shin
« Last Edit: May 05, 2010, 03:40:30 AM by shintashi »

*****
Rep:
Level 84
This text is way too personal.
Bronze - GIAW 11 (Hard)Silver - GIAW Halloween
Wow, this seems kind of... long-winded...

Whatever, you seem to have pulled off what you wanted, and though I haven't had the time to test it out, I'm sure it works great. I hope many people will benifit from it.

I deem this tutorial... worthy...

***
Rep:
Level 82
We learn by living...
Thank you ^^

I apologize if it seemed long. I just want others to have the chance to experience Chibi's of doom. This code could easily be modified to make Jedi, Anime psionics and so on. With the Telekinesis, you can move a rock around while simultaneously moving your player in different directions, or even make them dance.

*****
Rep:
Level 84
This text is way too personal.
Bronze - GIAW 11 (Hard)Silver - GIAW Halloween
Oh yeah, I was going to suggest that some objects should take more "Sanity Points" to manuever than others. For example, a small pebble should take less points to move around then a large rock. Dunno how hard this would be, but you'd probably have to change your event system and tutorial around a bit. Just a thought.

***
Rep:
Level 82
We learn by living...
not a bad idea:

I could set up five weights or something and do a quick comparison with INT, Level, or 'inertial' cost for breaking the static friction coefficient (i.e. why stuff sticks when you push it), but base it on mass rather than friction. I.e., gravity = friction and SP spent = net force. Why do I sound like one of those physics people? My room mate is getting to me with all her physics this and analytical that.  :lol:

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Best Member2012 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2011 Best Veteran2010 Most Mature Member2010 Favourite Staff Member
Looks neat :)

****
Rep:
Level 83
To be honest when i saw this topic, i thought it would be talking about a script i saw, but still this is a neat system great work.
Spoiler for:
METALFRESH is a paint contractor that specializes in refinishing metal and vinyl siding. We paint metal buildings as well as siding on homes.

We also

    Refinish decks
    Do custom interior painting
    Strip wallpaper
    Refinish cedar siding
    Metal front doors and sidelights
    Metal garage and service doors
    Grained fiberglass doors

    If your structure is *RUSTED *FADED *CHALKING *IN NEED OF COLOR CHANGE, we can fix it with a guarentee!

northern Illinois and southern Wisconsin.

http://metalfreshcoatings.com


*
Rep: +0/-0Level 79
RMRK Junior
maybe you addressed this and I just missed it, but what happens when someone tries to drop an object where they shouldn't be able to? like putting one of those boulders up that tree or stacking rocks on top of each other?

also, just an idea, but you could probably drastically simplify this by making whatever happens to be in the tile in front of the character the default target, thereby eliminating the need for the targeting list.

and you might consider combining pyrokenisis and cryokenisis with the rising temp button activating pyrokenisis above a certain temp and other button activating cryokenisis below a certain temp with higher/lower temps creating more extreme responses at higher sp costs. though this would require you to track the current temperature of the object as well as its hp/damage and I'm not really sure what you'd call the new ability. microkenisis maybe? since its the molecules that you're moving

on a side note, 0 sanity might result in the last ability used going out of control and damaging the character/landscape/characters' allies/etc. further draining sp till some predetermined negative number is hit and the character is knocked unconscious. though this may be too extreme of a downside depending on the tone of your game.

***
Rep:
Level 82
We learn by living...
Spoiler for sanity test:


Here's something I tossed together about a week ago, you insert this common event in any events that cost Sanity Points. Obviously you can modify it to suite your taste. I've also modified some of the script with what I learned from cozziekuns:

in the 'target on' section, you want to wrap your "selecting targets: Targets will illuminate..." inside a conditional branch that checks for the following script:
Code: [Select]
$game_temp.in_battle

that prevents the annoying instruction manual from popping up if you use Psychokinesis in battle.

You'll want to repeat this step for each power prompt, including:

"Text: Telekinesis Active"

"Text: Pyrokinesis Active"

"Text: Cryokinesis Active"

Right now if you drop an object where it shouldn't be it stays wherever you left it. This allows you to place a rock on top of a roof. I have plans in the future for more terrain interaction, for example, Cryokinesis freezing water, or pyrokinesis setting wood objects like trees on fire. I'm still working on completing the Akira set, which includes teleport (complete), levitation (complete), and forcefield (semi-complete). The forcefield is almost done, but I'm not good enough with the map oriented battle systems yet to fully implement Tetsuo's abilities.

I think it's kind of funny actually since none of these effects will be in my game, but help me better understand the program and act as 'wizard/admin' tools for the developer - similar to the slay/goto functions in MUDs.

Electrokinesis will eventually follow