UmbrotheUmbreon

Legendary Umbreon
Veteran
Joined
Jan 25, 2015
Messages
66
Reaction score
14
First Language
English
Primarily Uses
RMMV
I'm honestly at a loss here....I've tried so much to make this work the way I want and I just don't see where I'm going wrong....

I'm working on a project that buffs elements based on how often a character uses that element (for example, the more fire spells a character casts, the more damage Fire spells will do in the future). I already have damage formulas for that. I tied each of my elements to a variable and when they use a skill, it'll do the damage, and it's supposed to increase the alignment (for lack of a better word atm) of that element after the spell is done. The damage formula I'm using for a basic Fire spell is
Code:
(100 + a.mat + v[3]) * 2 - b.mdf * 2

Currently I have a common event increasing the variable when the skill is used, but is there a way to add that into the damage formula? If not that's fine, this process works fine. The reason I mention this is cause I wanted to use items that also increase the variable, but by more than just 1. Example is a Scroll of Fire that increases the Fire alignment by 5. That means when the player uses this item, it SHOULD increase the variable by 5 points. The first time I tested it, it worked fine. Now....it's not. I don't know if I did something wrong, but I don't wanna make a common event for each different value I want to increase by. If that's the only way then I guess it'll have to do but an easier solution is preferred. I tried simply increasing the Repeat to be 5, it did nothing (wouldn't even use the item at all). I tried putting a code in the note section, still wouldn't use the item. From there I just simply made it a blank, consumable item that does nothing and it STILL didn't let me use it....I'm so lost and confused and could really use some help....(I left the code I tried to use in the screeenshot so people could see what I had tried doing).

1660789065797.png
 

Parlu10

Veteran
Veteran
Joined
Jul 30, 2018
Messages
58
Reaction score
11
First Language
Italian
Primarily Uses
RMMV
If you want to understand how you can change the value of a variable in the damage formula, you can follow this tutorial:

Actually this tutorial was made with MZ, but it should work for MV as well.
 

ShadowDragon

Realist
Veteran
Joined
Oct 8, 2018
Messages
6,289
Reaction score
2,461
First Language
Dutch
Primarily Uses
RMMV
the item notetag doesn't probably work as it might require a plugin.

to read the tag with <something> code </somthing>
normal notetag in the way you wrote it does nothing and is readed as text.

what YEP plugins are you using?
 

eomereolsson

Veteran
Veteran
Joined
Sep 29, 2021
Messages
435
Reaction score
358
First Language
German
Primarily Uses
RMMV
To reiterate @ShadowDragon 's point: The notebox was originally just for that - your own personal notes for that thing. The RPG Maker engine doesn't really do anything with it. It's just that a lot of plugins read the contents of the notebox and do stuff with it. But if you don't have such a plugin your code will do nothing - and almost all plugins require you to mark which parts of the notebox are relevant to them by so called notetags. But as I see none in your screenshot that is defenitely a problem.

Now on to the actual core of the issue:
- can you use other consumables in the same project?
- if not, can you use consumables in a fresh new test project?
- are you trying to use the item during battle? Because you made the occasion menu screen only.
- did you start a new playtest and save your changes?
- have you tried turning all your plugins off?
 

UmbrotheUmbreon

Legendary Umbreon
Veteran
Joined
Jan 25, 2015
Messages
66
Reaction score
14
First Language
English
Primarily Uses
RMMV
the item notetag doesn't probably work as it might require a plugin.

to read the tag with <something> code </somthing>
normal notetag in the way you wrote it does nothing and is readed as text.

what YEP plugins are you using?
None. I guess I didn't fully understand. I was searching for the answer on my own, and I must have lost something in translation and thought a code in the note box would work without a plugin.

To reiterate @ShadowDragon 's point: The notebox was originally just for that - your own personal notes for that thing. The RPG Maker engine doesn't really do anything with it. It's just that a lot of plugins read the contents of the notebox and do stuff with it. But if you don't have such a plugin your code will do nothing - and almost all plugins require you to mark which parts of the notebox are relevant to them by so called notetags. But as I see none in your screenshot that is defenitely a problem.

Now on to the actual core of the issue:
- can you use other consumables in the same project?
- if not, can you use consumables in a fresh new test project?
- are you trying to use the item during battle? Because you made the occasion menu screen only.
- did you start a new playtest and save your changes?
- have you tried turning all your plugins off?
Yeah I didn't realize that required a plugin. As stated I was trying to find this answer on my own. I don't have any plugins on except the default ones (with only a Title Screen Menu moved).

-Yes, other consumables work fine.
-No, these items should only be used outside of battle. The Menu Screen was intentional.
-Yes, everytime I changed anything that I thought could fix the problem I saved and playtested with a quick event I made that adds the item to my party.

I caved in while waiting for an answer and simply made a common event, and set the event to increase the variable by 5. Once I did that, it worked perfectly fine. I wanted to avoid making common events for each specific increase, but I guess if I don't have many varying increase numbers it won't be that bad. I just was trying to find an easier way lol
 

UmbrotheUmbreon

Legendary Umbreon
Veteran
Joined
Jan 25, 2015
Messages
66
Reaction score
14
First Language
English
Primarily Uses
RMMV
If you want to understand how you can change the value of a variable in the damage formula, you can follow this tutorial:

Actually this tutorial was made with MZ, but it should work for MV as well.

I found an answer in this tutorial so will hold onto it.
 

eomereolsson

Veteran
Veteran
Joined
Sep 29, 2021
Messages
435
Reaction score
358
First Language
German
Primarily Uses
RMMV
Oh wait, now that you are using a common event you can use the item? We fell for the classic blunder, that if an item (or skill for that matter) has no discernable effect for the engine, it will not allow us to use it.
Sorry I didn't think of that earlier :rswt
 

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
5,459
Reaction score
3,536
First Language
English
Primarily Uses
RMMV
Your huge error with the notetags has already been resolved, it seems. Just to give you a quick answer to this part:
Currently I have a common event increasing the variable when the skill is used, but is there a way to add that into the damage formula?
If you're just incrementing by one, you can do:
Code:
(100 + a.mat + v[3]++) * 2 - b.mdf * 2

The ++ will cause the formula to use the original value for its calculation, then add 1.
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
5,060
Reaction score
4,685
First Language
English
Primarily Uses
RMMZ
Your huge error with the notetags has already been resolved, it seems. Just to give you a quick answer to this part:

If you're just incrementing by one, you can do:
Code:
(100 + a.mat + v[3]++) * 2 - b.mdf * 2

The ++ will cause the formula to use the original value for its calculation, then add 1.
Do note though that if you use auto battle in your game at all, when a battler who can use the skill is evaluating what to use, the variable will increase even if they don't use that skill on their turn.
 

UmbrotheUmbreon

Legendary Umbreon
Veteran
Joined
Jan 25, 2015
Messages
66
Reaction score
14
First Language
English
Primarily Uses
RMMV
Your huge error with the notetags has already been resolved, it seems. Just to give you a quick answer to this part:

If you're just incrementing by one, you can do:
Code:
(100 + a.mat + v[3]++) * 2 - b.mdf * 2

The ++ will cause the formula to use the original value for its calculation, then add 1.
Using the spell only increases it by one yes, but I found a small solution to that through the tutorial Parlu10 provided. I got other issues going on but those would be more appropriate for discussing in the Damage Formula thread.
 

Latest Threads

Latest Profile Posts

So, yeah. It's there.

Clarn Hold
(No storylines)
There was a tutorial on how to draw anime eyes. Just draw Among Us. So I tried.
Screenshot_107.jpg
DamageActor3_7.png added!
index.php

Making a "characters first appearance" drawing for my game. Now I just have to finish the sprite art animation for her grand entrance.​

Forum statistics

Threads
125,540
Messages
1,171,821
Members
164,614
Latest member
guymelul
Top