Status
Not open for further replies.

Yawgmoth

Veteran
Veteran
Joined
Jan 9, 2018
Messages
138
Reaction score
11
First Language
English
Primarily Uses
RMMV
Hi all,

I am using Yanfly's Skill Cost Item Plugin which allows you to assign items as costs to a skill. I was just wondering if their was a way to increase the number of required item by 1 permanently with each use of the skill? If so what would that note tag be?

http://yanfly.moe/2015/12/12/yep-43-skill-cost-items/
 

SwiftSign

Veteran
Veteran
Joined
Aug 5, 2015
Messages
184
Reaction score
45
First Language
English
Primarily Uses
RMMV
In the skill’s damage formula add

“$gameVariables.setValue(1, $gameVariables.value(1) +1);”

Before the rest of your damage formula.

Then in the Skill’s note box:

<Custom Item Id Cost>
cost = $gameVariables.value(1);
</Custom Item Id Cost>

Ensure you set Variable 1 (or whatever Id you use) to its initial cost value at the beginning of the game, even if the initial cost is zero.
 

Yawgmoth

Veteran
Veteran
Joined
Jan 9, 2018
Messages
138
Reaction score
11
First Language
English
Primarily Uses
RMMV
Thank you for the quick response,

I will try this later tonight once I put my son down for bed. I just had one more question. Where should I set Variable 1 to it's initial cost at? within this note tag? or quite literally the beginning of the game?

Thank you again, I will let you know hoe it goes tonight.
 

Tiamat-86

old jrpg gamer
Veteran
Joined
Dec 5, 2017
Messages
1,079
Reaction score
524
First Language
english
Primarily Uses
RMMV
<Custom type x Cost>
cost = v[y];
</Custom type x Cost>

change type to item weapon or armor
change x to the id of the item
change y to the id of the variable you will use
and have the skill trigger a common event that will raise that variable by 1
 

Yawgmoth

Veteran
Veteran
Joined
Jan 9, 2018
Messages
138
Reaction score
11
First Language
English
Primarily Uses
RMMV
Thanks guys, I have the variable set at the start of the game now and have the note tags filled in as above and have created the common event the skill will call. I'm sure I have everything from above set correctly, I think something is wrong in one of the other note tags on the same skill.

<Custom Soul Shard 42 Cost>

cost = $gameVariables.value(2);

</Custom Item Id Cost>


<Learn Cost Eval>

// Set the param ID of the stat you wish to adjust.

var id = 0;

// Increase the parameter by this amount.

user._paramPlus[id] += 10;

// Adjust the number of times upgraded by 1.

user._upgradeParam[id] += 1;

// Refresh the user.

user.refresh();

</Learn Cost Eval>


<Custom Cost Display>

\}Passive\{

</Custom Cost Display>


<Hide in Battle>

The skill is suppose to require 2 soul shards to use and increases MHP by 10 and then increase the soul shard requirement by 1 permanently each time the skill is activated. I would like to make a series of similar skills for different stats and characters. Any further help is appreciated. Thanks for all the help so far!
 

Attachments

  • Screenshot (9).png
    Screenshot (9).png
    293.2 KB · Views: 6
  • Screenshot (10).png
    Screenshot (10).png
    255.5 KB · Views: 6
  • Screenshot (11).png
    Screenshot (11).png
    252.7 KB · Views: 5
  • Screenshot (12).png
    Screenshot (12).png
    221.9 KB · Views: 5

Yawgmoth

Veteran
Veteran
Joined
Jan 9, 2018
Messages
138
Reaction score
11
First Language
English
Primarily Uses
RMMV
This is the error message when I learn the skill.
 

Attachments

  • Screenshot (13).png
    Screenshot (13).png
    404 KB · Views: 2

Tiamat-86

old jrpg gamer
Veteran
Joined
Dec 5, 2017
Messages
1,079
Reaction score
524
First Language
english
Primarily Uses
RMMV
those stat boosting learn skills are not ment to be used as actual skills. hens the
// Make the user forget the skill.
user.forgetSkill(skill.id);

also you dont have an actual learn cost is your note tag
i dont think you can make this use an item since there is no <custom learn item cost> tags you could use.

you also dont need both the common event and the damage formula thing SwiftSign mentioned earlier. they are both doing the same thing.
and you may want to make items like that have the occasion set to never. so it doesnt accidentally get used as a normal item that has no effects.

so heres what you do.
1st change the items occasion to never for safty sake.
remove the learn cost eval and cost display note tags
set damage type to none
add to the common event a change parameter increase max HP 10
and your starting autorun event will need to have the variable start at 1
if its left at 0 the 1st time you use the skill it will consume all of your soul shards
now just have your character start with that skill already learned

if you want each caracter to have their own increases you will need to have a different skill, variable, and common event for each character,
and obviously a different set for each parameter.

edit
<Custom Soul Shard 42 Cost>
cost = $gameVariables.value(2);
</Custom Item Id Cost>

this should look like

<Custom item 42 Cost>
cost = v[2];
</Custom Item 42 Cost>
 
Last edited:

bgillisp

Global Moderators
Global Mod
Joined
Jul 2, 2014
Messages
14,448
Reaction score
15,727
First Language
English
Primarily Uses
RMVXA

I've moved this thread to Plug-In Support. Thank you.

 

Yawgmoth

Veteran
Veteran
Joined
Jan 9, 2018
Messages
138
Reaction score
11
First Language
English
Primarily Uses
RMMV
@Tiamat-86 Thanks so much for talking me through this!

Thanks to everyone!

This post is closed.
 

bgillisp

Global Moderators
Global Mod
Joined
Jul 2, 2014
Messages
14,448
Reaction score
15,727
First Language
English
Primarily Uses
RMVXA

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

 
Status
Not open for further replies.

Latest Threads

Latest Profile Posts

Trailer is almost done for the game i can't wait to show it to everyone
I've got good news and bad news. The good news is, there aren't any bad news to report. The bad news is, there aren't any good news to report.

Or as others say, yesterday was uneventful.


I am curious that can you "understand/get the point" about what does this place do generally?
(ARPG game)
If anyone knows any C# programmers, please send them my way.
Chilling at night in a tavern.
ChillingAtTavern.png

After 'multiple breakdowns', it's finally over. 10/10 will do this again.

Forum statistics

Threads
129,856
Messages
1,205,751
Members
171,032
Latest member
RoyKerry
Top