Chaos Project

RPG Maker => RPG Maker Scripts => Script Troubleshooting => Topic started by: Kise on July 08, 2017, 10:44:27 am

Title: Problem with battle mechanics.
Post by: Kise on July 08, 2017, 10:44:27 am
Hello. I have a problem with default battle mechanics - sometimes after enemy casts a spell which costs 100% of it's SP, just stands without doing anything next few turns. The only actions allowed for enemy are default attack set at 10, and paralyze at 9. I captured it on video.

https://youtu.be/CmUCv-Fba_Y

I couldn't find a solution for this in database, so I thought it might have to do something with scripts. Sorry if it's wrong section.
Title: Re: Problem with battle mechanics.
Post by: KK20 on July 08, 2017, 03:36:20 pm
I can't reproduce this problem. You sure it's a clean project?
Title: Re: Problem with battle mechanics.
Post by: Kise on July 08, 2017, 04:26:36 pm
Yeah. Here's demo from the video - https://ufile.io/s8c0k
It's doesn't happen always, but happens.
Title: Re: Problem with battle mechanics.
Post by: KK20 on July 08, 2017, 04:51:33 pm
Oh okay, I guess I was just stupidly unlucky. I see what the problem is now.

In Game_Enemy, method make_action, I added a check for if the enemy has the ability to use the the skill. I placed it right in between here:

      # Confirm HP conditions
      if self.hp * 100.0 / self.maxhp > action.condition_hp
        next
      end

      # Confirm can even use skill
      if action.kind == 1 && !skill_can_use?(action.skill_id)
        next
      end

      # Confirm level conditions
      if $game_party.max_level < action.condition_level
        next
      end

Gonna update the internal bugs (http://forum.chaos-project.com/index.php/topic,14458.html) thread with this. Thanks for finding that!
Title: Re: Problem with battle mechanics.
Post by: Kise on July 09, 2017, 03:11:05 am
Thanks for fixing it! :)