Save-Point
KBlockStates - Printable Version

+- Save-Point (https://www.save-point.org)
+-- Forum: Material Development (https://www.save-point.org/forum-8.html)
+--- Forum: Scripts Database (https://www.save-point.org/forum-39.html)
+--- Thread: KBlockStates (/thread-8725.html)



KBlockStates - kyonides - 04-30-2023

KBlockStates
XP + ACE

by Kyonides Arkanthes


Introduction

This script prevents your heroes or your enemies from choosing a target that is still afflicted by a Blocked Target alias Untargetable State.

Set the value of the TARGET_STATE Constant found in the KBlockStates module to your Untargetable State ID.

Other Notes

This scriptlet seems to work with the default battle system so feel free to try it in your game project.
I have not tested it while using any other battle system.
The only reason why I came up with this idea was because Hime's script had a weird bug that has remained untouched ever since 2015...



Terms & Conditions

Free for use in your game.
Include my nickname in your game credits. Angry
That's it. Winking


RE: KBlockTarget ACE - kyonides - 05-04-2023

A Convenient Script Update!

This new installment of my enigmatic script now prevents you from using skills that target enemies if there is no enemy free of the Block Target State aka Untargetable State. Since the attack command is just a call to the Attack skill, it also gets blocked in no time. This prevents you from getting a no index error at all. Two Thumbs Up!

Happy Waiting Till Your Target Gets Unblocked! Laughing



RE: KBlockStates - kyonides - 05-05-2023

A New Port is Available!

There is a new port to RMXP, guys! Grinning
It is not just an adaptation, it also includes 2 new features! Shocked

Available States:
  • Traditional Block Target or Untargetable State Laughing
  • No Attack State - Simple Attacks Get Blocked! Confused
  • No Healing State - Healing Skills Get Blocked! Confused

Keep in mind that I have already renamed the scripts. Thus, now refer to them as the KBlockStates scripts.

Don't forget to ask Sylvia about the "Bad States" whenever you see her! Winking



RE: KBlockStates - kyonides - 05-07-2023

The Scripts Have Been Updated!
Shocked
Now it allows you to set different Block States in a list (an Array [something, here] object).
Who Knows? I don't know why I had to do it, but some forumer made the request anyway. Confused
Some script commands have been shortened for convenience. Happy with a sweat
You know, RMXP's script call box is a little small. Laughing

The RMVX ACE port also includes a bug fix for the Healing Block State. Grinning


RE: KBlockStates - kyonides - 05-08-2023

Another Update Has Arrived!

This time it includes a check or two to make sure some of the previous features work as intended. That is specially true for XP that now includes an add-on for the Default Battle System. In VX Ace case, it includes the inability to use items to favor some untargetable friend or even a foe!

Even so, that's not the end of it! Grinning

Now it allows you to magically (RM state-wise) Seal Your Bag! Shocked
Happy with a sweat I know, that doesn't sound like a popular feature, does it?
But don't worry, my friends! Winking It only works in battle and for certain heroes, the ones afflicted by that state.
Really? Or did you even think for a moment that mobsters like Witch Zombie Wizard Dark Elf and others would love to see you consume potions and elixirs to get cured or replenish your mana points right away?

Of course not! Freddy Kruger Jason Vorhees 



RE: KBlockStates - kyonides - 07-10-2023

Small Update

Version 1.0.0 for RMVX ACE has been published and it brings a change in how "untargetable" your foes are.

If you need the state to TOTALLY prevent your foes AND your allies from choosing a battler with that specific state, include the state ID in the TOTAL_BLOCK_TARGET_STATES array.

Perhaps you might prefer to just block your foes from targeting you, then include the state ID in the PARTIAL_BLOCK_TARGET_STATES array instead.

Code:
module KBlockStates
  ATTACK_STATE = 26
  HEALING_STATE = 27
  SEALED_BAG_STATE = 28
  # Pick your favorite Blocked Target State IDs, i.e. [3, 5, 7]
  TOTAL_BLOCK_TARGET_STATES = [29]
  PARTIAL_BLOCK_TARGET_STATES = [30]
  def self.random_target_state_id
    pos = rand(TOTAL_BLOCK_TARGET_STATES.size)
    TOTAL_BLOCK_TARGET_STATES[pos]
  end
end



RE: KBlockStates - kyonides - 08-14-2023

ACE Targets Updated!

Since ACE version 1.1.0 has been released, you are now able to pick a skill scope, namely All Enemies and leave a specific note in the Skill Note Box to apply its effects on Dead Enemies only.

Note Tag for Dead Enemies
Code:
<dead enemies>



RE: KBlockStates - kyonides - 08-14-2023

XP Targets Updated!

Since XP version 1.1.0 has been released, you are now able to pick a skill scope, namely All Enemies and configure a Skill by adding a specific State (+) to its States List and it will apply its effects on Dead Enemies only.

This is how the KBlockStates module looks like nowadays.

Code:
module KBlockStates
  NO_TARGET_FOUND = "%s failed to launch the attack."
  ATTACK_STATE = 17
  HEALING_STATE = 18
  NO_GUARD_STATE = 19
  SEALED_BAG_STATE = 20
  DEAD_ENEMIES_STATE = 23
  # Pick your favorite Blocked Target State IDs, i.e. [3, 5, 7]
  TOTAL_BLOCK_TARGET_STATES = [29]
  PARTIAL_BLOCK_TARGET_STATES = [30]
  def self.random_target_state_id
    pos = rand(TOTAL_BLOCK_TARGET_STATES.size)
    TOTAL_BLOCK_TARGET_STATES[pos]
  end
end

Pay attention to the DEAD_ENEMIES_STATE Constant because you need to set the right State ID for your game.