Attacking/Blocking in battle is sometimes impossible?

funtimewaffle

Villager
Member
Joined
Aug 8, 2020
Messages
6
Reaction score
0
First Language
English
Primarily Uses
RMVXA
Despite my best efforts, I can't get some characters to use attacks when I want them too. During battle, sometimes I can't use regular attacks for some reason. Neither can I block. I can only use items or MP/TP attacks. It isn't too big a deal later in the game, but early on it becomes impossible to progress because of it.

I'm not a great scripter, so after tinkering with all the different settings I could, I came here to see if there were any scripts or something that I could use with the characters or classes to allow them to always have attack/block as an option. Last resort is giving an item that lets you skip your turn completely if need be, but I don't really want to have to do that.
 

HumanNinjaToo

The Cheerful Pessimist
Veteran
Joined
Apr 18, 2013
Messages
1,226
Reaction score
601
First Language
English
Primarily Uses
RMMV
You’ve got to have some script causing this problem correct? What scripts do you have installed? There should be no issues using attack and guard skill in the vanilla engine
 

funtimewaffle

Villager
Member
Joined
Aug 8, 2020
Messages
6
Reaction score
0
First Language
English
Primarily Uses
RMVXA
You’ve got to have some script causing this problem correct? What scripts do you have installed? There should be no issues using attack and guard skill in the vanilla engine
I haven't messed with scripts or mods or anything like that, right now it's just the vanilla. The only things I've imported from outside of the program are images and music, but I doubt those have an effect on whether or not you can attack.
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
2,602
Reaction score
1,933
First Language
English
Primarily Uses
RMMV
Can you give me a step by step example of this issue with screenshots?
 

funtimewaffle

Villager
Member
Joined
Aug 8, 2020
Messages
6
Reaction score
0
First Language
English
Primarily Uses
RMVXA
Can you give me a step by step example of this issue with screenshots?
(don't mind the placeholder actor name and enemy)

There's not a whole lot to it, it's just that the attack and guard buttons are grayed out and can't be used. I haven't tested it much elsewhere, but the first battle is forced once you step on the checkered tile shown in the second screenshot. Sometimes 'efg' (again, placeholder) will be unable to attack or guard, but sometimes Jessica can't attack or guard either. Just wondering if I could allow them to always have the option of attacking or guarding.
 

Attachments

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
2,602
Reaction score
1,933
First Language
English
Primarily Uses
RMMV
The issue really is that they *should* always have that option unless something is stopping them from doing so, and if you haven't intended to stop them from doing so we need to figure out what's going wrong.

So if you're not using any custom scripts whatsoever and have nothing but the default:

Code:
add_command(Vocab::attack, :attack, @actor.attack_usable?)
The enabled property of the attack command depends on the attack_usable? method of the current actor:

Code:
def attack_usable?
    usable?($data_skills[attack_skill_id])
  end[code]

That returns the result of calling usable? passing in index attack_skill_id of $data_skills (which contains the data for the Attack skill, obviously)

[code]
def usable?(item)
    return skill_conditions_met?(item) if item.is_a?(RPG::Skill)
    return item_conditions_met?(item)  if item.is_a?(RPG::Item)
    return false
  end
Here we're looking at whether the skill conditions are met:

Code:
def skill_conditions_met?(skill)
    usable_item_conditions_met?(skill) &&
    skill_wtype_ok?(skill) && skill_cost_payable?(skill) &&
    !skill_sealed?(skill.id) && !skill_type_sealed?(skill.stype_id)
  end
So we check whether usable item conditions are met:

Code:
def usable_item_conditions_met?(item)
    movable? && occasion_ok?(item)
  end
Code:
def movable?
    exist? && restriction < 4
  end
movable? checks whether the actor exists (they do) and that their restriction is less than 4 (meaning they aren't afflicted by a state that causes action restrictions)

occasion_ok? is obviously going to return true because attack can be used in battle.

skill_wtype_ok? is going to return true assuming you haven't set a weapon type requirement for the attack skill.

skill_cost_payable? is going to return true because attack has no costs.

skill_sealed and skill_type_sealed likewise wouldn't affect attack.

So the only point at which it could really possibly be disabled would be if something has added a restrictive state to the actor.
 
Last edited:

funtimewaffle

Villager
Member
Joined
Aug 8, 2020
Messages
6
Reaction score
0
First Language
English
Primarily Uses
RMVXA
The issue really is that they *should* always have that option unless something is stopping them from doing so, and if you haven't intended to stop them from doing so we need to figure out what's going wrong.
I mean, I've messed with everything I can think of. I even tried altering settings that didn't seem to play into it, and to no avail. I have no scripts or anything, so I don't know what would be stopping them. I've tried combinations of armor, no armor, weapon, no weapon, different armor, different weapons, messing with skill formulas, lowering (and raising) the variance, screwing with their classes, changing animations, fiddling with the enemy itself, fiddling with the troops, and I'm sure I tried other things that aren't coming to mind right this second.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
39,949
Reaction score
13,585
First Language
English
Primarily Uses
RMMV
They haven't been hit with some petrify-type state, have they? Can they access Items and Skills?

Your messing around with so much stuff to try and fix the problem could have caused problems itself. Did you make any intentional changes to these skills? If not, maybe create a new project and copy those skill slots from the new one into your current one, just to reset everything back to vanilla. You can have both games open in Ace at the same time, select the skill in one and copy, then select the skill in the other and paste.
 
Last edited:

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
2,602
Reaction score
1,933
First Language
English
Primarily Uses
RMMV
Would you be able to archive your project and send it so I can try to figure out why it's disabling?
 

funtimewaffle

Villager
Member
Joined
Aug 8, 2020
Messages
6
Reaction score
0
First Language
English
Primarily Uses
RMVXA
They haven't been hit with some petrify-type state, have they? Can they access Items and Skills?

Your messing around with so much stuff to try and fix the problem could have caused problems itself. Did you make any intentional changes to these skills? If not, maybe create a new project and copy those skill slots from the new one into your current one, just to reset everything back to vanilla. You can have both games open in Ace at the same time, select the skill in one and copy, then select the skill in the other and paste.
I do have a state that makes them unable to attack, but it shouldn't be getting assigned to them. Aside from that, they can still access items and skills whenever. The issue is the only skill the main character has at the beginning uses TP instead of MP, so unless you start the battle with enough TP you're essentially softlocked. I guess I could just make it an MP skill, but if they're not supposed to be limited to only items and skills then I definitely want to get that fixed in the long run. I'll check out the state real quick and make sure that it isn't affecting them.
 

TheoAllen

Self-proclaimed jack of all trades
Veteran
Joined
Mar 16, 2012
Messages
5,573
Reaction score
6,497
First Language
Indonesian
Primarily Uses
RMVXA
How to make an attack unusable by default without the influence of scripts.
  • Make MP cost
  • Make TP cost
  • Occasion (only in the menu or never)
  • Weapon requirement
  • Seal skill type
  • Seal skill
  • State restriction
The question. Have you made a change to skill 1 and skill 2?
 

funtimewaffle

Villager
Member
Joined
Aug 8, 2020
Messages
6
Reaction score
0
First Language
English
Primarily Uses
RMVXA
How to make an attack unusable by default without the influence of scripts.
  • Make MP cost
  • Make TP cost
  • Occasion (only in the menu or never)
  • Weapon requirement
  • Seal skill type
  • Seal skill
  • State restriction
The question. Have you made a change to skill 1 and skill 2?
I adjusted the formula to fit the damage that my actors and enemy's deal, alongside their amount of health. I messed around with the formula too, and that doesn't seem to be having an effect on anything other than the damage dealt. Haven't really done much with the things listed, and when I have, I've reverted it back to normal, so I doubt that it's causing the issue.
 

kyonides

Reforged is laughable
Veteran
Joined
Nov 17, 2019
Messages
285
Reaction score
70
First Language
English
Primarily Uses
RMXP
Make a new project, paste the very same scripts you've been using on this project there. See if your character is still unable to attack.
If everything works smoothly, then you definitely misconfigured something in the database.
Or you could upload some short demo to let us test it and find out what's preventing your hero from attacking his foes.
 

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

Latest Threads

Latest Posts

Latest Profile Posts

Power has been restored FINALLY to our home in Lake Charles. Hurricane Laura tried to wreck our lives and disrupt my work on the commercial project i have going with Cloud 9 but the key word is TRIED!!! Slowly moving from the shelter to home over the next week or so. I WILL NOT QUIT!
I am happy because the RPG Maker MZ character comes with extra bust and full body art, but I am disappointed because the quality of the character's PIxel art has decreased.
Only My Opinion that Pixel art MV is better.
I think my SV will be weird, but I would love to change it up.

"Signature characters" - the mascots of your game. Cute, quirky, lovable, recognizable.
i.e.
Kirby, Disgaea prinnies, creepers, Sonic, Mario, DQ slimes, pikachu (all starters), chocobos.

You see what I'm saying.
Getchu one.
Made a video showcasing a plugin that changes the animation rate for animated tiles in our games.

(Plugin by Caethyril )

Forum statistics

Threads
103,222
Messages
998,113
Members
134,709
Latest member
katana100
Top