Author Topic: [XP] Taunt States  (Read 5900 times)

Offline G_G

  • Green Gmod Game_Guy AKA G4 AKA hyper-G AKA G-force
  • Global Moderator
  • Chaos Ultimate
  • ****
  • Posts: 6585
  • LV: 407
  • Gender: Male
    • View Profile
[XP] Taunt States
« on: April 07, 2012, 05:54:27 PM »
Taunt States
Authors: game_guy
Version: 1.0
Type: State Modification
Key Term: Battle Add-on

Introduction

When Taunting an enemy, the taunter has a higher chance of being attacked by all enemies. This script, rather than using skills, it uses states to control the taunt levels.

Features

  • Customizable Taunt States
  • Can Even Be Used to Avoid Attacks

Screenshots

N/A

Demo

N/A

Script

(click to show/hide)

Instructions

In the script. Place above main. The usual. ;3

Compatibility

Should be compatible with anything, any battle system, assuming it uses the "random_target_actor" method from Game_Party.

Credits and Thanks

  • game_guy ~ Creation of this fine script.
  • GrimTrigger ~ For requesting it.

Author's Notes

Enjoy my probable last script!

Offline KK20

  • Master Scripter Fixer
  • Global Moderator
  • Lexima Warrior
  • ****
  • Posts: 2957
  • LV: 369
  • Gender: Male
  • Bringer of Salt
    • View Profile
Re: [XP] Taunt States
« Reply #1 on: April 08, 2012, 01:47:20 AM »
Hah, that was the idea I was gonna use. Thanks for typing this out so I didn't have to. :D

Looks good to me. I'm surprised that something as easy as this can't be found with a quick Google search. Also sounds like a good ToA script.

*tosses Rare Candy*



(click to show/hide)
NNID: KK20-CP

Offline GrimTrigger

  • Transcended Spirit
  • ***
  • Posts: 115
  • LV: 3
  • Cutscenes.....bane of my existance.
    • View Profile
Re: [XP] Taunt States
« Reply #2 on: April 08, 2012, 05:35:28 AM »
There's a problem when I go to test this out.


Script 'taunt' line 47: NoMethodError occurred.

undefined method 'include' for  []:Array


I'm testing this using the troop battle test window, 4 characters. Have a skill to apply the state....

#=========================
  # CONFIGURE STATES
  # -Add new lines.
  # state_id => taunt_level,
  #=========================
    17 => 1,
    18 => 2,
    19 => 4,                        <=======(this one I'm trying to apply with a skill)
    20 => -4,


Not entirely sure if I'm doing it wrong, or if the script has an error.
Until The Final Blade Falls:
Quick Side Quest Guide

Latest Tileset Project

Offline KK20

  • Master Scripter Fixer
  • Global Moderator
  • Lexima Warrior
  • ****
  • Posts: 2957
  • LV: 369
  • Gender: Male
  • Bringer of Salt
    • View Profile
Re: [XP] Taunt States
« Reply #3 on: April 08, 2012, 06:21:05 AM »
It's a typo. Go to Line 47 in the script, which should be:
Code: [Select]
taunt += value if @states.include(key)}
Add a question mark after include:
Code: [Select]
taunt += value if @states.include?(key)}



(click to show/hide)
NNID: KK20-CP

Offline GrimTrigger

  • Transcended Spirit
  • ***
  • Posts: 115
  • LV: 3
  • Cutscenes.....bane of my existance.
    • View Profile
Re: [XP] Taunt States
« Reply #4 on: April 08, 2012, 06:44:00 AM »
I did and I no longer get the error message. I tested it out, but saw no real difference in the "Taunter" being attacked. With four enemies, and four characters, he didn't appear to be getting focused fired, or even hit more than usual
Until The Final Blade Falls:
Quick Side Quest Guide

Latest Tileset Project

Offline G_G

  • Green Gmod Game_Guy AKA G4 AKA hyper-G AKA G-force
  • Global Moderator
  • Chaos Ultimate
  • ****
  • Posts: 6585
  • LV: 407
  • Gender: Male
    • View Profile
Re: [XP] Taunt States
« Reply #5 on: April 08, 2012, 06:53:12 AM »
Hmmm. try increasing the 4 then. Maybe to 10 for a noticeable difference.

Offline GrimTrigger

  • Transcended Spirit
  • ***
  • Posts: 115
  • LV: 3
  • Cutscenes.....bane of my existance.
    • View Profile
Re: [XP] Taunt States
« Reply #6 on: April 08, 2012, 07:12:09 AM »
Hmmm. try increasing the 4 then. Maybe to 10 for a noticeable difference.

I doubled it and saw no real difference. I used a value of 100 and saw that it did make the enemies (5 now that I'm testing) hit the intended character about 80-90 percent of the time. At 300, it was essentially pure focus fire (which is what I want.) Perhaps the way RMXP handles it's roulette is based on large numbers (I think somewhere I read that RMXP doesn't perform as well with small numbers, but it might not be the case for this specific issue.)

So far no problems. Thanks!
Until The Final Blade Falls:
Quick Side Quest Guide

Latest Tileset Project

lipucd

  • Guest
Re: [XP] Taunt States
« Reply #7 on: April 11, 2012, 09:35:26 AM »
Honestly this was something I was looking for.
For a game project I'm developing I wanted a way to make attacks go elsewhere if under select status effects ( such as unable to move, yet others could still act ). With this I think I can at last get results close to what I would like. It's not perfect as it seems like with big groups the change in attacks doesn't happen till the start of the next round, and sometimes they will STILL target someone even under said status when I give them -500 or something and there are others lacking it. Still, the fact that it does effect the desision making, so that I can have status' spread around more evenly is VERY nice!

Offline KK20

  • Master Scripter Fixer
  • Global Moderator
  • Lexima Warrior
  • ****
  • Posts: 2957
  • LV: 369
  • Gender: Male
  • Bringer of Salt
    • View Profile
Re: [XP] Taunt States
« Reply #8 on: April 12, 2012, 12:06:04 AM »
The reason why a state that gives -500 won't work is because of this line right here:
Code: [Select]
n = [4 - position + actor.calculate_taunt, 1].max
The smallest value you can have is 1. If you really wanted to, you can modify the equation to fit your needs. But whatever you do, 1 must always be the minimum value (or unspeakable errors occur). You can do something like:
Code: [Select]
n = [50 - position * 10 + actor.calculate_taunt, 1].max
But that's up to you to decide.



(click to show/hide)
NNID: KK20-CP

Offline G_G

  • Green Gmod Game_Guy AKA G4 AKA hyper-G AKA G-force
  • Global Moderator
  • Chaos Ultimate
  • ****
  • Posts: 6585
  • LV: 407
  • Gender: Male
    • View Profile
Re: [XP] Taunt States
« Reply #9 on: April 12, 2012, 12:14:43 AM »
There was a reason I made it limit it to 1. First of all, nothing happens when you iterate a negative number. The block never gets executed. But think about it, if you have all members with 0 or less, then enemies won't be able to attack at all. I wouldn't find something like that very fun in a game at all. I guess thats just me, if you really want to change it, just use this instead.
Code: [Select]
n = 50 - position * 10 + actor.calculate_taunt