How to do "unwanted side effects" of skills?

agsteiner

Villager
Member
Joined
Jul 21, 2020
Messages
8
Reaction score
12
First Language
German
Primarily Uses
RMMZ
Hi everybody,
okay, after hours of struggling with limited success I guess I need help.

What I'm trying to achieve is a skill system where you don't get stronger and stronger spells as you progress, but you get more precise at using the spells, ie with less side effects. So you cast a fireball at level 1 and you're likely to hit yourself or your team mates as an unwanted side effect (or get confused or ...), while casting the same spell at level 20 you hit your enemy and only your enemy.

- I tried to go with a separate side-effect skill but I'm unable to activate it; I assign two skills to a weapon and the player can decide to go for the spell or for the side effect, not what I want :) . Haven't found a "hide skill and always execute it".

- I tried to go with a common action as part of skill execution, which works but not as beautiful as actual skills (eg. animation).

(if it helps, I've licensed all of Visustella's plugins, but couldn't find anything in their battle core as well)

Can this be done?

(preferrably without scripting, I do know JS, but haven't used RPGMaker scripting ever).

Thanks!
 

GodCiunas

The Idea Guy
Veteran
Joined
Sep 2, 2021
Messages
31
Reaction score
30
First Language
English
Primarily Uses
RMMZ
Hi everybody,
okay, after hours of struggling with limited success I guess I need help.

What I'm trying to achieve is a skill system where you don't get stronger and stronger spells as you progress, but you get more precise at using the spells, ie with less side effects. So you cast a fireball at level 1 and you're likely to hit yourself or your team mates as an unwanted side effect (or get confused or ...), while casting the same spell at level 20 you hit your enemy and only your enemy.

- I tried to go with a separate side-effect skill but I'm unable to activate it; I assign two skills to a weapon and the player can decide to go for the spell or for the side effect, not what I want :) . Haven't found a "hide skill and always execute it".

- I tried to go with a common action as part of skill execution, which works but not as beautiful as actual skills (eg. animation).

(if it helps, I've licensed all of Visustella's plugins, but couldn't find anything in their battle core as well)

Can this be done?

(preferrably without scripting, I do know JS, but haven't used RPGMaker scripting ever).

Thanks!
One way i can think of is to create a common event with variables that checks the characters level, and if the character has each spell. Then use conditional branches to replace the skill at each level interval while forgetting the orignal less accurrate one. This way means you would instead create multiple versions of your spell with the same name but different targeting, accuracy, damage formula, states.
There is probably an easier script but my scripting is horrible. One way to avoid using the common event in the skill itself in this case anyway. is set it as an event on the starting map that turns the common event on. Make sure both the events are set to parallel. I do believe as long as nothing turns the common event switch off it should remain on constantly checking the variables ect. I havent tested this but in theory i believe it would work. Unfortunately this does mean lengthy event sheets. I will play with it some when i get home.
 

agsteiner

Villager
Member
Joined
Jul 21, 2020
Messages
8
Reaction score
12
First Language
German
Primarily Uses
RMMZ
One way i can think of is to create a common event with variables that checks the characters level, and if the character has each spell. Then use conditional branches to replace the skill at each level interval while forgetting the orignal less accurrate one. This way means you would instead create multiple versions of your spell with the same name but different targeting, accuracy, damage formula, states.
Thanks (and sorry for the typo in my post, that was what I meant with "common action" part).

Haven't seen that I obviously can trigger skills from common events :cool: . Need to try this out (damn, 5 hours more to spend on that job before I can :headshake: ).

What I tried was use the "common event" option in the properties of the skill. Then in the common event I was using a random number based on level to trigger unwanted effects. This worked, but I couldn't get e.g. a skill-like animation to work in the common event; all of a sudden my character was confused and lacking HP, so I was not continuing this path (but I've got very little experience with common events during battles).
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
35,942
Reaction score
9,536
First Language
German
Primarily Uses
RMMV
all of a sudden my character was confused and lacking HP, so I was not continuing this path
that basically means that you did something wrong in the logic of the common event.
we can help you with that if you give us screenshots of the event commands to check where you might have gone wrong.
 

NaosoX

Veteran
Veteran
Joined
Feb 28, 2013
Messages
490
Reaction score
263
First Language
English
Primarily Uses
RMMZ
You can setup Common Events.
Link the skill to a Common Event
Set variable to specific actor's Level.
Then conditional branch based on level(variable).
Conditional Branch would be (number or under); if set just to a specific level, only that level would have access.
A problem i see here is: lets say is level 5 or under, it has a chance to give you a debuff.
Then what happens when you want the next tier of spell?
Conditional branch actor level 10 and under?
You still have to account for 5 and below condition.
Unless you create conditions for every level or nesting condition/else.

Since you have Visustella plugins, have you looked at:
http://www.yanfly.moe/wiki/Skills_and_States_Core_VisuStella_MZ#Skill_Accessibility_Notetags

Example: At level 5 you learn Fireball(Skill ID 5) with notetag:
Code:
<Hide if learned Skill: 6>
At level 10, you learn Fireball(Skill ID 6).
Skill 5 is now hidden, basically replaced by skill ID 6 with its own variation.
Linking a conditional branch: Control variable to Last Used Skill ID.
Conditional Branch if the variable = 5 (do this)
Conditional Branch if the variable = 6 (do that)
Use Action sequences to execute the skill and perform animations.
If multiple actors can use the same skills, it will show and hide based on when they learned the upgraded version(learn at level x).

Create Skills
Skill5.png
The notetag will hide this skill if you learned Skill 6.
Skill6.png
Skill 6 is the same(but can be changed for variety with option here if you like). Both skills link to the same Common Event.


Create Common Event
Variable.png
This will check which version of the skill you just used.


Branch.png
One Branch for each skill.


CommonEvent1.png
You should have something like this.


Now fill each condition with action sequences to however you like.
Code:
◆Control Variables:#0041 Fireball = Last Used Skill ID
◆If:Fireball = 5
  ◆Comment:Fireball I
  ◆Plugin Command:VisuMZ_1_BattleCore, ACSET: Setup Action Set
  :              :Display Action = true
  :              :Immortal: On = true
  :              :Battle Step = true
  :              :Wait For Movement = true
  :              :Cast Animation = true
  :              :Wait For Animation = true
  ◆Control Variables:#0042 RNG = Random 0..1
  ◆If:RNG = 0
    ◆Plugin Command:VisuMZ_1_BattleCore, MECH: Add Buff/Debuff
    :              :Targets = ["user"]
    :              :Buff Parameters = []
    :              :Debuff Parameters = ["DEF"]
    :              :Turns = 5
    ◆
  :Else
    ◆
  :End
  ◆Plugin Command:VisuMZ_1_BattleCore, ANIM: Show Animation
  :              :Targets = ["current target"]
  :              :Animation ID = 3
  :              :Mirror Animation = false
  :              :Wait For Animation? = true
  ◆Plugin Command:VisuMZ_1_BattleCore, MECH: Action Effect
  :              :Targets = ["all targets"]
  ◆Plugin Command:VisuMZ_1_BattleCore, ACSET: Finish Action
  :              :Immortal: Off = true
  :              :Wait For New Line = true
  :              :Wait For Effects = true
  :              :Clear Battle Log = true
  :              :Home Reset = true
  :              :Wait For Movement = true
  ◆
:End
◆If:Fireball = 6
  ◆Comment:Fireball II
  ◆Plugin Command:VisuMZ_1_BattleCore, ACSET: Setup Action Set
  :              :Display Action = true
  :              :Immortal: On = true
  :              :Battle Step = true
  :              :Wait For Movement = true
  :              :Cast Animation = true
  :              :Wait For Animation = true
  ◆Control Variables:#0042 RNG = Random 0..1
  ◆If:RNG = 0
    ◆Plugin Command:VisuMZ_1_BattleCore, MECH: Add State
    :              :Targets = ["user"]
    :              :States = ["12"]
    ◆
  :Else
    ◆
  :End
  ◆Plugin Command:VisuMZ_1_BattleCore, ANIM: Show Animation
  :              :Targets = ["current target"]
  :              :Animation ID = 3
  :              :Mirror Animation = false
  :              :Wait For Animation? = true
  ◆Plugin Command:VisuMZ_1_BattleCore, MECH: Action Effect
  :              :Targets = ["all targets"]
  ◆Plugin Command:VisuMZ_1_BattleCore, ACSET: Finish Action
  :              :Immortal: Off = true
  :              :Wait For New Line = true
  :              :Wait For Effects = true
  :              :Clear Battle Log = true
  :              :Home Reset = true
  :              :Wait For Movement = true
  ◆
:End

Enjoy!
 
Last edited:

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
4,169
Reaction score
2,548
First Language
English
Primarily Uses
RMMV
(if it helps, I've licensed all of Visustella's plugins, but couldn't find anything in their battle core as well)
Action sequences. You can make anything you want happen during a skill via action sequences.

You can do all of this through common events, too - the downside is that common events happen after your skill is complete. So if you want an untrained fireball to damage the party also, you'll have the fireball hit the enemies, then afterwards a second explosion that hurts the party, which may look weird.

But if you reprogram the skill with action sequences, you can do your check during the skill's resolution to also target party members.
 

agsteiner

Villager
Member
Joined
Jul 21, 2020
Messages
8
Reaction score
12
First Language
German
Primarily Uses
RMMZ
Wow, thanks everybody for taking so much time to help me. I'll try out what works best for me and post an update on how it worked out (or more stupid questions :) ). I like the combination of having several spells of the same kind where all but one are hidden at any time and the action sequences (that I've never heard of before) to let these spells do exactly what I want them to do.
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
44,722
Reaction score
15,849
First Language
English
Primarily Uses
RMMV

I've moved this thread to MZ Support. Thank you.



Moving to MZ Support because several people have indicated you don't need a plugin for this and you seem happy to go that way. If you instead decide to use plugins, please report this post so we can move it to Plugin Support instead.
 

agsteiner

Villager
Member
Joined
Jul 21, 2020
Messages
8
Reaction score
12
First Language
German
Primarily Uses
RMMZ
Thanks, well, I'm going with the plugin because the recommendation of @ATT_Turan just did it for me; action sequences in Visustella are insanely powerful, seem to be the easiest way to achieve what I want.
 

agsteiner

Villager
Member
Joined
Jul 21, 2020
Messages
8
Reaction score
12
First Language
German
Primarily Uses
RMMZ
In case somebody else wants to achieve the same: here's how I've done it with Visustella action sequences:
(my RPGMaker is is German so I won't paste the actual event with all German text from RPGMaker)

1. created a new skill "Fireball", added Common Event "Fireball" as Effect to this skill, put <Custom Action Sequence> in the note text area of the skill
2. in the common event Fireball,
a) first used these plugin commands
- Setup Action Set
- Camera / animation plugin commands - focusing on target, zooming in, fire anim
- BTLOG display action
- MECH action effect on current target
b) added code for the unwanted effect
- zoom in to user
- if random(0..4) == 0 call a separate common action for generic negative side effects (getting confused / blind / mute)
- else
calculate side effect damage via ( random(0..10) / player level ) * 30
if this damage is zero (will happen for levels > 10) do nothing
else show animation and subtract the damage from the current HP

Thanks again for your help, dear RPGMaker pros :)

For completeness here's the code of the common event (from the German RPGMaker)

◆Kommentar:Determine self damage
◆Kommentar:Can't figure out how to assign the level of the current
: :actor to a variable. Just using the main character, should
: :be close enough.
◆Kommentar:Self damage = rand(10) / player level * 30
◆Variablen steuern:#0007 actor_level = Level des Burwulf
◆Variablen steuern:#0001 damage_ratio = Zufällig 0..10
◆Variablen steuern:#0001 damage_ratio /= actor_level
◆Variablen steuern:#0002 temp2 = damage_ratio
◆Variablen steuern:#0002 temp2 *= 30
◆Plug-in-Befehl:VisuMZ_1_BattleCore, ACSET: Setup Action Set
: :Display Action = true
: :Immortal: On = true
: :Battle Step = true
: :Wait For Movement = true
: :Cast Animation = true
: :Wait For Animation = true
◆Plug-in-Befehl:VisuMZ_1_BattleCore, CAMERA: Focus Target(s)
: :Targets = ["current target"]
: :Duration = 60
: :Camera Easing = InOutSine
: :Wait For Camera? = true
◆Plug-in-Befehl:VisuMZ_1_BattleCore, ZOOM: Change Scale
: :Scale = 1.5
: :Duration = 20
: :Zoom Easing = InOutSine
: :Wait For Zoom? = true
◆Plug-in-Befehl:VisuMZ_1_BattleCore, ANIM: Show Animation
: :Targets = ["current target"]
: :Animation ID = 66
: :Mirror Animation = false
: :Wait For Animation? = true
◆Plug-in-Befehl:VisuMZ_1_BattleCore, BTLOG: Display Action
◆Plug-in-Befehl:VisuMZ_1_BattleCore, MECH: Action Effect
: :Targets = ["current target"]
◆Kommentar:Unwanted side effect
◆If:temp2 > 0
◆Plug-in-Befehl:VisuMZ_1_BattleCore, CAMERA: Focus Target(s)
: :Targets = ["user"]
: :Duration = 60
: :Camera Easing = InOutSine
: :Wait For Camera? = true
◆Kommentar:Determine whether we go for a spell specific
: :side effect or a generic one (generic one rarer)
◆Variablen steuern:#0008 temp = Zufällig 0..4
◆If:temp = 0
◆Gewhn. Ereignis:Generic Side Effect

:Else
◆Plug-in-Befehl:VisuMZ_1_BattleCore, BTLOG: Add Text
: :Text = Something went wrong!
: :Copy to Combat Log? = true
: :Combat Log Icon = 87
◆Plug-in-Befehl:VisuMZ_1_BattleCore, ANIM: Show Animation
: :Targets = ["user"]
: :Animation ID = 55
: :Mirror Animation = false
: :Wait For Animation? = true
◆HP ändern:{active_char_id}, - {temp2} (Tod zulassen)

:Beenden

:Beenden
◆Kommentar:Wind down
◆Plug-in-Befehl:VisuMZ_1_BattleCore, ZOOM: Reset Zoom
: :Duration = 10
: :Zoom Easing = InOutSine
: :Wait For Zoom? = true
◆Plug-in-Befehl:VisuMZ_1_BattleCore, ACSET: Finish Action
: :Immortal: Off = true
: :Wait For New Line = true
: :Wait For Effects = true
: :Clear Battle Log = true
: :Home Reset = true
: :Wait For Movement = true
 

Latest Threads

Latest Posts

Latest Profile Posts

Hellooo, sugarpies and other carbohydrates! Check out my review of MechGears by @BK-tdm! :kaoluv:https://alicegristle.wordpress.com/2022/05/29/game-review-mechgears-demo/
Finally adding subtitles. My demo release is really close! :kaojoy:

1653799949837.png

ngl i feel like im morbin out
I've made a lot of small changes and fixes over the past couple weeks without actually making any progress on my game...now I'm running out of things I want to change, and I'm terrified that I might have to start being productive again...the horror! D:
I made a mini devlog about the sprite animations I've been working on! You can read it by clicking here


applebuds-dreamtrotter.gif

Forum statistics

Threads
122,213
Messages
1,147,306
Members
160,482
Latest member
stewpie
Top