Making a skill with random effects

cthulhusquid

Veteran
Veteran
Joined
Aug 19, 2013
Messages
341
Reaction score
294
First Language
English
Primarily Uses
RMVXA
I want to make a skill for one of my characters that has several different effects, but 1 only happens per use. How would I go about doing that? I know I need to make a common event and for it to use variables, I just am not really sure how to go about making it.
 

CWells

Storyteller/Artist
Veteran
Joined
Apr 22, 2013
Messages
731
Reaction score
40
First Language
English
Primarily Uses
This one isn't so tricky. here is what you do:

Set Variable Skill: Random between 1 - however many effects. So if you have 5 effects just put 1-5. This should be your very first line.

Now make the conditional branch:

If Variable Skill is 1 then SOMETHING

If variable Skill is 2 then SOMETHING

up to 5. Since there will only be 1 number for the variable, you can save space and keep everything neat by

unchecking that box that gives you alternatives for if conditions are not met.

Oh and right after or before each and every skill is done, set the variable Skill back to 0. I don't think you have to but I like to do that...

For SOMETHING, you can either change state of actor or enemy or you can use Force Action for any skills you are forcing on the characters.
 
Last edited by a moderator:

cthulhusquid

Veteran
Veteran
Joined
Aug 19, 2013
Messages
341
Reaction score
294
First Language
English
Primarily Uses
RMVXA
One of the variables I would like to deal damage like a skill (using a damage formula) or add states with a percentage of not working. How would I do that in the Common Event?
 

CWells

Storyteller/Artist
Veteran
Joined
Apr 22, 2013
Messages
731
Reaction score
40
First Language
English
Primarily Uses
What is the target scope of the skill? What is the formula of the skill?

You  might have to adjust the target if you are selecting the skill from the Force Action command.

Please give a screenshot? =D
 

cthulhusquid

Veteran
Veteran
Joined
Aug 19, 2013
Messages
341
Reaction score
294
First Language
English
Primarily Uses
RMVXA
I want the skill to target 1 enemy, to deal no damage normally, but have 5 different effects. 1 buffs your character, 2 debuffs the enemy, 3 does damage, 4 does some effect I don't know yet, and 5 has a very small chance to OTK the enemy. Here is the skill event so far.



Uploaded with ImageShack.us
 

CWells

Storyteller/Artist
Veteran
Joined
Apr 22, 2013
Messages
731
Reaction score
40
First Language
English
Primarily Uses
Oh that looks good. Now go back to the Event Command window. See page 1 and 3 for all the stuff you may be messing with for this.

You are going to have to make the skills so they can be called in force action on Page 3 of the Event Commands. Or you can use the Event Command window directly on page 3 and make any adjustments to the characters/enemies parameters if variable is 4 or something.

You're going to be using skills, of course. Make them and just go to force action to pick the skills for each variable.

So 1 does skill damage and 2 does state apply. Like that.
 

cthulhusquid

Veteran
Veteran
Joined
Aug 19, 2013
Messages
341
Reaction score
294
First Language
English
Primarily Uses
RMVXA
Ok, that makes sense. How would I figure out the targeting, for an enemy? What is the "index 1-8" thing?
 

CWells

Storyteller/Artist
Veteran
Joined
Apr 22, 2013
Messages
731
Reaction score
40
First Language
English
Primarily Uses
Oh, 1 - 8 is the enemy slot. You don't see it but can guess what it will be in your troops because it goes by who gets added first. So if you had a boss and 3 spiders. But put the boss last. The boss will be INDEX 4. While the spider will be 1 2 3 based on which spider gets added first.

So if you ever feel confused or uncertain about what character is in what slot in your enemy troop, or even the party troop. It goes by who was there first.

If you want to double check, just empty a troop and reapply the enemies but keep in mind who you are adding first, second etc.
 

cthulhusquid

Veteran
Veteran
Joined
Aug 19, 2013
Messages
341
Reaction score
294
First Language
English
Primarily Uses
RMVXA
Ok, here is a screenshot of the event so far.

For some weird reason, the skill doesn't seem to be affecting any enemies. It works, just none of it's effects work.
 

kerbonklin

Hiatus King
Veteran
Joined
Jan 6, 2013
Messages
1,726
Reaction score
275
First Language
English
Primarily Uses
RMMV
Your original Card of Fate skill, who is Ralir using it on? Himself or an enemy? Last Target means, well whoever you targeted last. Aka if you're using Card of Fate on yourself then the Force Action (Last Target) will target Ralir as well.
 

cthulhusquid

Veteran
Veteran
Joined
Aug 19, 2013
Messages
341
Reaction score
294
First Language
English
Primarily Uses
RMVXA
Ralir would be using the skill on an enemy, originally. I want it so that one of the effects works on him (the buff effect), but the rest target the enemy that the original skill targeted.
 

CWells

Storyteller/Artist
Veteran
Joined
Apr 22, 2013
Messages
731
Reaction score
40
First Language
English
Primarily Uses
Ralir would be using the skill on an enemy, originally. I want it so that one of the effects works on him (the buff effect), but the rest target the enemy that the original skill targeted.
If I'm reading this right, it sounds like you want this particular skill to do two things at once. The first effect on Ralir but the other effects attacking the enemy.

You say the rest target the enemy that the original skill targeted. What would the original skill be? Is it the first one on the list?
 

ct_bolt

Creator
Veteran
Joined
May 3, 2012
Messages
954
Reaction score
520
First Language
Javascript
Primarily Uses
RMMZ
Made a demo for you. :) Check it out & let me know if this suits your needs. ;)

Demo: Click Here to Download :cutesmile:

Edit #1:

I did however just notice a small problem...
If the user has less then the required MP for the randomized skill they still use the skill anyways because it is "forced".
I am currently working on a solution.

Edit #2:
Solved the problem, please re-download. :)
 
Last edited by a moderator:

cthulhusquid

Veteran
Veteran
Joined
Aug 19, 2013
Messages
341
Reaction score
294
First Language
English
Primarily Uses
RMVXA
Made a demo for you. :) Check it out & let me know if this suits your needs. ;)

Demo: Click Here to Download

PS. If this helps you please click the "like this" button. :cutesmile:

Edit:

I did however just notice a small problem...

Iif the user has less then the required MP for the randomized skill they still use the skill anyways because it is "forced".

I am currently working on a solution.
Thank you so much, that is EXACTLY what I wanted the skill to work like.
 

ct_bolt

Creator
Veteran
Joined
May 3, 2012
Messages
954
Reaction score
520
First Language
Javascript
Primarily Uses
RMMZ
Thank you so much, that is EXACTLY what I wanted the skill to work like.
Excellent! Glad I could ya help out. BD

I fixed the problem I mentioned above. Please re-download the demo.

Demo: Click here to Download

Now I made it so that if the user does not have enough MP the attack will fail. ;)

Please let me know how the current demo works out for you. :popcorn:

Edit #1:

>_> :headshake: Woops... I forgot about the TP cost. :guffaw:

Edit #2:

Fixed the problem with TP cost. :)   Re-download demo. ;)

I see a few ways of doing this...

Choose an option:

  • MP & TP cost to only be from "Cards of Fate"
  • MP & TP cost to only be from the randomized skill
  • MP & TP cost to be from both "Cards of Fate" & the randomized skill that is selected
  • Only select a skill that can
Choose an option:

  • Only select a skill that can be used
  • Select any skill, fail if not enough MP/TP
The options in bold are the way it currently is working. ;)
 
Last edited by a moderator:

CWells

Storyteller/Artist
Veteran
Joined
Apr 22, 2013
Messages
731
Reaction score
40
First Language
English
Primarily Uses
Excellent! Glad I could ya help out. BD

I fixed the problem I mentioned above. Please re-download the demo.

Demo: Click here to Download

Now I made it so that if the user does not have enough MP the attack will fail. ;)

Please let me know how the current demo works out for you. :popcorn:

Edit #1:

>_> :headshake: Woops... I forgot about the TP cost. :guffaw:

Edit #2:

Fixed the problem with TP cost. :)   Re-download demo. ;)

I see a few ways of doing this...

Choose an option:

  • MP & TP cost to only be from "Cards of Fate"
  • MP & TP cost to only be from the randomized skill
  • MP & TP cost to be from both "Cards of Fate" & the randomized skill that is selected
  • Only select a skill that can
Choose an option:

  • Only select a skill that can be used
  • Select any skill, fail if not enough MP/TP
The options in bold are the way it currently is working. ;)
Hmm, hey you know how to get the skill to fail if not enough TP? I couldn't find an option for that, only mp. Are you using a script?
 

ct_bolt

Creator
Veteran
Joined
May 3, 2012
Messages
954
Reaction score
520
First Language
Javascript
Primarily Uses
RMMZ
Hmm, hey you know how to get the skill to fail if not enough TP? I couldn't find an option for that, only mp.
Check out the demo. ;)

Are you using a script?
Not a full script. Although, I probably could have done this much simpler if I had wrote a full script. ;)

I just did a few small scripts in the common event:

$game_variables[4] = $game_actors[1].tp.to_iThat assigns the the TP of Actor 1 to Game Variable 4.

Then I just used the Game Variable 4 to check to see if it was greater then or equal to another Variable assigned with the TP of the skill. :)

Image of the Common Event:

I highlighted the parts I mentioned.
 

CWells

Storyteller/Artist
Veteran
Joined
Apr 22, 2013
Messages
731
Reaction score
40
First Language
English
Primarily Uses
Thanks. That's great. It could be of use for the command list for the auto-battle characters in my game. This should prevent characters being forced to use their TP when there isn't enough.
 

cthulhusquid

Veteran
Veteran
Joined
Aug 19, 2013
Messages
341
Reaction score
294
First Language
English
Primarily Uses
RMVXA
Good thing is, the skill works. However, there is one thing I would like to do something about. When I use the skill, it says "There was no effect on (Monster Name goes here)", but the skill then continues normally and does the random effect. In the demo, that didn't seem to happen. I looked at the skill in the demo, and there is a state called Nil. Does that have any significance?
 
Last edited by a moderator:

ct_bolt

Creator
Veteran
Joined
May 3, 2012
Messages
954
Reaction score
520
First Language
Javascript
Primarily Uses
RMMZ
Good thing is, the skill works. However, there is one thing I would like to do something about. When I use the skill, it says "There was no effect on (Monster Name goes here)", but the skill then continues normally and does the random effect. In the demo, that didn't seem to happen. I looked at the skill in the demo, and there is a state called Nil. Does that have any significance?
Ahh, so you noticed my lil' trick.  :p

Yes indeed, in fact that will only add the state 'nil' for 1 turn & remove it also at the end of battle.

In essence sort of tricking the default battle engine into "thinking" the enemy was actually effected.

The reason the message appears is because nothing but the common event is added to the skill.

When you add a state that does nothing the default battle engine would only show the message that goes with the state. ;)

I've changed the state & skill slightly to give a better idea of what is really going on.

B) Demo: Click here to Download B)
 
Last edited by a moderator:

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

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,864
Messages
1,017,056
Members
137,573
Latest member
nikisknight
Top