Gold as damage

I'm trying to make a skill called cash blaster, it takes 10% of the players gold and is supposed to deal that same amount in raw damage. Sadly my way of having a common event check gold amount and having the damage calculation as
v[11] * 0.1
doesn't seem to work the gold cost is all figured out and working but the damage not yet. I've seen you can set a variable in damage calculation such as actor id but i'm not sure how to do that for gold. Thank you for your time.
can you show us a screenshot of your common event?
the process should be rather straigth with control variable and change enemy HP, the only problematic part might be if you don't know how to target the change enemy hp command in the common event.
can you show us a screenshot of your common event?
the process should be rather straigth with control variable and change enemy HP, the only problematic part might be if you don't know how to target the change enemy hp command in the common event.
The common event is as simple as setting varible 11 to = current gold
By default all common events are processed at the end of the turn, after all skills.
so unless you use plugins to call the common event earlier, you need to do the damage inside the common event because at the time the skill is used the variable will still have the values from previously and not the current number (or zero if the variable hasn't been used before
By default all common events are processed at the end of the turn, after all skills.
so unless you use plugins to call the common event earlier, you need to do the damage inside the common event because at the time the skill is used the variable will still have the values from previously and not the current number (or zero if the variable hasn't been used before
Do you know how i can make the common event target the enemy the character is targetting in that case?
I'm trying to make a skill called cash blaster, it takes 10% of the players gold and is supposed to deal that same amount in raw damage. Sadly my way of having a common event check gold amount and having the damage calculation as
v[11] * 0.1
doesn't seem to work the gold cost is all figured out and working but the damage not yet. I've seen you can set a variable in damage calculation such as actor id but i'm not sure how to do that for gold. Thank you for your time.
This might work the way you want in the damage formula without a common event:
JavaScript:
const p = $gameParty, dmg = p.gold() * .1; p.loseGold(dmg); dmg
This might work the way you want in the damage formula without a common event:
JavaScript:
const p = $gameParty, dmg = p.gold() * .1; p.loseGold(dmg); dmg
This works pretty much perfectly thank you! though im using visustella to deduct the gold cost, so i think i can remove p.losegold and everything after that right? or would that cause issues?
This works pretty much perfectly thank you! though im using visustella to deduct the gold cost, so i think i can remove p.losegold and everything after that right? or would that cause issues?
I see - I think the common event would be fine for you to deduct the gold with VS, so try this instead in the formula:
JavaScript:
v[11] = $gameParty.gold() * .1; v[11]
And then from there, your common event will have the 10% gold amount you need in variable 11 to deduct with VS command(s).
I see - I think the common event would be fine for you to deduct the gold with VS, so try this instead in the formula:
JavaScript:
v[11] = $gameParty.gold() * .1; v[11]
And then from there, your common event will have the 10% gold amount you need in variable 11 to deduct with VS command(s).
This pretty much removes the need for a common event all together as i use the notes to deduct gold with vs. so thank you!
This pretty much removes the need for a common event all together as i use the notes to deduct gold with vs. so thank you!
Awesome! I forget about those notetags which are pretty awesome and really do come in handy - if anything, I prefer them over the damage formula for running script, etc.

If you are using VS, you may consider using the tags for certain things (or even putting the gold stuff there instead of the damage formula) since the damage formula can get a bit weird, especially on auto-battle stuff and a few other possibilities.

Original thread: https://forums.rpgmakerweb.com/threads/gold-as-damage.170281/