I've been trying to create a class whose skills cost gold to use, but I'm having problems with this.
I'm using Yanfly's Skill core plugin, but since it doesn't have a preset for skills costing gold, this makes things difficult. I found little help with the skill costs items plugin either.
I figured I could try using the example formulas on yanfly's site, but I haven't had much luck with those either:
<Custom Requirement>
if ($gameParty.gold() > 100) {
value = true;
} else {
value = false;
}
</Custom Requirement>
<Custom Execution>
$gameParty.loseGold(100);
</Custom Execution>
<Cost Display Eval>
var variableId = 200;
var value = 100;
$gameVariables.setValue(200, 100);
</Cost Display Eval>
<Custom Cost Display>
\c[2]\v[200]\c[2] Gold
</Custom Cost Display>
This is what I put in the skill's notetag. I'll admit I'm not an expert at creating code, so forgive me if I'm doing something wrong. I figure I have to put something in the value= true or false section, but I'm not sure what or how to format it. This is essentially what happens:
The skill works, and the cost displays thanks to the display eval, but it doesn't actually subtract from the gold pool. I want to make a skill that costs 100 gold to use.
I put the plugins in the order recommended on yanfly's site. I've also made sure to check and see if this has been addressed before. I found nothing, but if it has then I'm sorry for repeating.
I also apologize if I'm not asking this question in the proper forum. This seemed like the correct one.
I'm using Yanfly's Skill core plugin, but since it doesn't have a preset for skills costing gold, this makes things difficult. I found little help with the skill costs items plugin either.
I figured I could try using the example formulas on yanfly's site, but I haven't had much luck with those either:
<Custom Requirement>
if ($gameParty.gold() > 100) {
value = true;
} else {
value = false;
}
</Custom Requirement>
<Custom Execution>
$gameParty.loseGold(100);
</Custom Execution>
<Cost Display Eval>
var variableId = 200;
var value = 100;
$gameVariables.setValue(200, 100);
</Cost Display Eval>
<Custom Cost Display>
\c[2]\v[200]\c[2] Gold
</Custom Cost Display>
This is what I put in the skill's notetag. I'll admit I'm not an expert at creating code, so forgive me if I'm doing something wrong. I figure I have to put something in the value= true or false section, but I'm not sure what or how to format it. This is essentially what happens:
The skill works, and the cost displays thanks to the display eval, but it doesn't actually subtract from the gold pool. I want to make a skill that costs 100 gold to use.
I put the plugins in the order recommended on yanfly's site. I've also made sure to check and see if this has been addressed before. I found nothing, but if it has then I'm sorry for repeating.
I also apologize if I'm not asking this question in the proper forum. This seemed like the correct one.
