Gold Steal Skill for enemies

Status
Not open for further replies.

Little Paw

Veteran
Veteran
Joined
May 5, 2013
Messages
707
Reaction score
294
First Language
English
Primarily Uses
I'm trying to make a skill for an enemy that will allow it to steal gold from the player.

What I've tried doing is making a skill that runs a Common Event, which Sets a variable to a random number between 1 and 50 (this is early-game, so I don't want them to steal too much gold), then Decreases Gold by the value set in that variable.

That's it. And the only operation that the skill runs is that Common Event.

Problem is... the game crashes when I try and use it...

So... is this a problem with the battle system (Yami's CTB system) or am I doing something wrong here? I also need some way to make it display a message at the top of the screen like normal skill information that will tell you how much gold was stolen.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
Show us the common event and the skill.  Also show us the exact error message you get.

When you use this skill (or any similar that don't actually do damage), what's displayed for damage - does it say it misses, or 0 damage, or something else?

Also, can you provide a link to the battle system you're using, in case it's the problem (I just refuse to go looking for scripts - if someone wants help with a script and they haven't provided a link, I'll just move on to the next person who needs help).
 
Last edited by a moderator:

Little Paw

Veteran
Veteran
Joined
May 5, 2013
Messages
707
Reaction score
294
First Language
English
Primarily Uses
Show us the common event and the skill.  Also show us the exact error message you get.

When you use this skill (or any similar that don't actually do damage), what's displayed for damage - does it say it misses, or 0 damage, or something else?

Also, can you provide a link to the battle system you're using, in case it's the problem (I just refuse to go looking for scripts - if someone wants help with a script and they haven't provided a link, I'll just move on to the next person who needs help).


A few notes:

- This skill is meant to be a sort of mimic skill for a steal-able skill. The Gold Draw that you steal from the enemy is not the same Gold Draw that the enemy actually uses. The Gold Draw that you get actually works perfectly fine and is based on Yanfly's Steal Items script. However, I needed something for the enemy to use, since it's supposed to be a "Copy Skill", so that's why this skill exists, and it's this one that is causing a problem.

- This skill was tested with an enemy who only knows this skill, the enemy version of Gold Draw. It does not have the player version of Gold Draw at all at this point, or even a normal Attack command. As soon as the enemy's turn comes up, the game crashes with that error.

- I'm using Yami's Charge Turn Battle script, but it's been modified to fix a crashing bug. You can find the modified version in this thread: http://forums.rpgmakerweb.com/index.php?/topic/13223-game-crashing-whenever-berserkconfuseetc-is-used-on-actor-in-yami-ctb/
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
It's saying @subject.current_action.item is nil.

Try removing the common event from the skill and just add a basic damage formula.  If it still crashes, that lets you know it's the script, not the common event.  If it doesn't crash, add the common event back in and remove the damage.  Then remove the note from the skill - it's POSSIBLE (unlikely, but still worth checking) that the script is reading it as more than just a note.
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
yeah, it is possible that yami's script (or some other script that you are using) is actually reading the note as a tag for the system...

btw, does the one you made for actors work? and have you tested the skill for some other enemy?
 
Last edited by a moderator:

Little Paw

Veteran
Veteran
Joined
May 5, 2013
Messages
707
Reaction score
294
First Language
English
Primarily Uses
It's saying @subject.current_action.item is nil.

Try removing the common event from the skill and just add a basic damage formula.  If it still crashes, that lets you know it's the script, not the common event.  If it doesn't crash, add the common event back in and remove the damage.  Then remove the note from the skill - it's POSSIBLE (unlikely, but still worth checking) that the script is reading it as more than just a note.
Ahahaha, I'm such a moron. The problem was that the enemy had 0 MP and the skill costs MP and I had not set up my usual condition to use Attack if MP = 0.

Also, I figured out that I can get the second line of the skill Using Message to display variable numbers, so I've also fixed my other problem by making it display "X Gold was stolen!" in that line.

I'm so stupid. Stupid, stupid, stupid!

yeah, it is possible that yami's script (or some other script that you are using) is actually reading the note as a tag for the system...

btw, does the one you made for actors work? and have you tested the skill for some other enemy?
Yeah, the one for actors has always worked. That one isn't done with events, it's done with a script.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
Strange that that situation resulted in that message, then.

I'm assuming you mean it's working now, so ...

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.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,860
Messages
1,017,040
Members
137,569
Latest member
Shtelsky
Top