LazESigma

Veteran
Veteran
Joined
Nov 9, 2013
Messages
50
Reaction score
2
First Language
English
Primarily Uses
Hello, I have a skill called "Purge" that will Remove any Buff parameter on a hero.

(ATK, MAT, MDF, LUK, ect...)

What I'm trying to figure out is the enemy casting this can currently cast it whenever.

I want to conditionally have the enemy only cast Purge when a hero actually has

a Buff that can be removed.  Does this make sense and is this possible?

Thanks,

Eric
 

kerbonklin

Hiatus King
Veteran
Joined
Jan 6, 2013
Messages
1,726
Reaction score
276
First Language
English
Primarily Uses
RMMV
I would say you would need a custom AI script, and have it check if any actor battler has parameter buffs in order to use that skill.  Database enemy action patterns do not support this.  However custom AI scripts can be quite complicated, meant for decent-knowledge scripters.
 
Last edited by a moderator:

Hollow

(◡‿◡✿)
Veteran
Joined
Jul 14, 2012
Messages
519
Reaction score
442
First Language
English
Primarily Uses
RMMV
Hm, I think you could do this by finding all the skills and/or items that give the player a buff, and have them call a common event that turns on a switch. Then, condition the enemy's Purge skill to happen only when that switch is on.

Also in the Purge skill itself, have it call another common event that turns the switch off so the enemy won't keep casting it.
 
Last edited by a moderator:

kerbonklin

Hiatus King
Veteran
Joined
Jan 6, 2013
Messages
1,726
Reaction score
276
First Language
English
Primarily Uses
RMMV
Hm, I think you could do this by finding all the skills and/or items that give the player a buff, and have them call a common event that turns on a switch. Then, condition the enemy's Purge skill to happen only when that switch is on.

Also in the Purge skill itself, have it call another common event that turns the switch off so the enemy won't keep casting it.
States/Buffs being removed from a character cannot also influence switches at the same time. Completely different things coded differently. So there would be no way to properly turn the switch off at the end of a specified amount of turns, for a specific Buff.

An AI script would be the easiest solution, a quick check of actors have buffs or not.
 
Last edited by a moderator:

Hollow

(◡‿◡✿)
Veteran
Joined
Jul 14, 2012
Messages
519
Reaction score
442
First Language
English
Primarily Uses
RMMV
...But it's not multiple turns, though? OP said they wanted the skill to cast once to remove all buffs, and then not cast again until there are more buffs to be removed. The common event in the Purge skill itself will turn off the switch, so there's no need to check whether or not a buff was removed.

Or are you talking about something else that I'm not getting?  :unsure:
 

kerbonklin

Hiatus King
Veteran
Joined
Jan 6, 2013
Messages
1,726
Reaction score
276
First Language
English
Primarily Uses
RMMV
The Buffs on the actors themselves are possibly multi-turned. Hell they could be up to 10 turns or 1 turn.

Let's say I use an Attack buff on my actor, 3 turns long. Let's pretend the buff skill also put a switch ON. (your example per say)

When the enemy uses Purge, he would turn the switch OFF (once again your example)

So what would happen if the enemy didn't use purge? What if he used Attack or another skill instead for 3 turns long? On the 4th turn my actors already ran out of the Attack buff but the switch is still ON, and there would be no way to turn it OFF by non-scripting means. He'll then use Purge even though I don't have a buff.

And trying to make a scripted means for that case would be extremely complex to the point where it's...well....pointless.
 
Last edited by a moderator:

Hollow

(◡‿◡✿)
Veteran
Joined
Jul 14, 2012
Messages
519
Reaction score
442
First Language
English
Primarily Uses
RMMV
Ah, I see what you mean.

Okay, well a non-scripting way around that would be to have another state called "Has Buff" or something, and add that to the player when there's a buff (just add the state in the skill/item, too, when you add a buff). Then in a troop event, have a conditional branch run each turn checking whether or not the actor has the "Has Buff" state; if they do, then don't do anything, but if they don't, then turn the switch off.
 

kerbonklin

Hiatus King
Veteran
Joined
Jan 6, 2013
Messages
1,726
Reaction score
276
First Language
English
Primarily Uses
RMMV
But then you run into the problem where if each Buff has a different turn count duration. What if I have an Attack buff for 2 turns and a Defense buff for 4 turns? What if the game uses multiple Attack buffs of different time durations? It would be too much to check to work out, and the switch would get wonky due to accidental "Has Buff" miss-checks.
 
Last edited by a moderator:

Hollow

(◡‿◡✿)
Veteran
Joined
Jul 14, 2012
Messages
519
Reaction score
442
First Language
English
Primarily Uses
RMMV
Ah, yeah, and regular states don't stack. :(   I guess OP could find a state stacking script like this one to fix that problem. All of this might still net OP more progress on his project then requesting a custom AI script and having to wait for someone to do it. Unless, do you know of any pre-made ones that would do the trick? I just did a preliminary search and I couldn't really find any.   :|
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,693
Reaction score
3,023
First Language
Tagalog
Primarily Uses
RMVXA
you can use this to manually check if there is a buff...

class Game_Battler  def has_buff?    (1..8).each do |id|      return true if buff?(id)    end  end  return falseendbut to use it as a condition to whether or not the enemy will cast Purge or not, is a different matter... of course you could probably make a battle event that runs every turn start to check the buffs, and turn a switch... but then again, what if there are multiple actors, then you'd also need to identify which one returned true, and you will still need to modify the target acquisition of the enemy so that it will only cast it on the actors that has t he buff...

If there's only 1 actor, it becomes easier since you won't need to dabble with the targetting... but once there are more than 1 actors, you will now need to modify the target acquisition of your enemy too...

it's far easier to actually use Force Action and troop events to do this rather than the default AI...
 
Last edited by a moderator:

LazESigma

Veteran
Veteran
Joined
Nov 9, 2013
Messages
50
Reaction score
2
First Language
English
Primarily Uses
Thanks everyone for your input.  I somehow knew in theory, I was thinking of

an easy thing logically to do, but knew it would be pretty complex to pull off without

some script handling.  I'll give Troop Events a shot, thanks!
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,693
Reaction score
3,023
First Language
Tagalog
Primarily Uses
RMVXA
it is complex to do, even with scripting... XD

if Ace comes with a better AI set-up or at least conditions for targeting too instead of just conditions on when a skill is usable by the enemy, it would make things a lot easier...
 
Last edited by a moderator:

Latest Threads

Latest Posts

Latest Profile Posts

Just lost about half a day's worth of work because rpg maker crashed during playtesting and corrupted my file :kaolivid:
Boku.gif
advanced_puzzling.PNG
Having a lot of fun making different poses for my character sets! Open to suggestions/critique!

CSKttqh.png

AABS laser beams features:
1,Shoot penetrating laser beams for player's normal attack
2,Beam's width/damage/comsumes/loot can be controlled by events/variables with great flexibility
3,Beam can rebound to walls or certain regionID
4,Can play SE when shooting beams
5,Beam's images can be solid images or animated ones.
Surprising nobody, it turns out "next Friday" for the next Jump into Javascript has become "possibly Sunday if you're lucky" XD

Forum statistics

Threads
117,017
Messages
1,103,865
Members
152,914
Latest member
Jester926
Top