Author Topic: [XP] Threat System v1.2  (Read 27784 times)

Offline Fantasist

  • Lexima Warrior
  • *******
  • Posts: 2222
  • LV: 146
  • Gender: Male
    • View Profile
    • Blog
[XP] Threat System v1.2
« on: July 13, 2009, 06:40:40 PM »
Threat System
Authors: Fantasist
Version: 1.2
Type: Enemy behavior enhancement
Key Term: Battle Add-on

Introduction

During battle, enemies will choose their targets based on their "threat" rather than randomly. The threat for an actor changes depending on what they do. For example, attacking raises threat and defending decreases threat.

Features

  • Players maintain "threat" and the enemies attack the most dangerous actors first
  • Offers a new aspect of control in battles
  • Configurable change in threat for attack, defend, skill and items
  • Configurable "Threat Chance" decides how often enemies choose actors based on their threat (leaving some randomness for those who prefer it)
  • An ignore list for enemies who use random actor selection
  • Temporarily disable the threat system by using a switch
  • A "threat-by-damage" mode where threat is calculated based on damage inflicted
  • Two ways of keeping track of threat: status window mod for DBS and threat window for other battle system mods

Screenshots

N/A

Demo

http://www.sendspace.com/file/rxrtfp

Script

Place this script anywhere above "Main" and below "Scene_Debug".

(click to show/hide)

Instructions

Look for the configuration section in the script and configure the following.

  • ATTACK_THREAT: Threat to increase when actor attacks
  • DEFEND_THREAT: Threat to decrease when actor defends
  • THREAT_CHANCE: The chance of enemies attacking based on threat
  • THREAT_DISPLAY: Display players' threats besides their name
  • THREAT_WINDOW: Whether to enable or disable threat window. To enable it, set it to "true". If you want to set it's position and width, you can also set it to an array with it's X position, Y position and width (eg: [0, 64, 160]).
  • ENEMY_IGNORE: List of enemy IDs which ignore the threat system

Skill Threat Configuration:

   Look for "SKILL THREAT CONFIG BEGIN" and follow the example. In the given example:
Code: [Select]
when 57 then [10, -2]
the skill 57 (Cross Cut) increases user's threat by 10 and decreases the rest of the party's threat by 2.

Item Threat Configuration:

   Works exactly the same as skill threat configuration.

Compatibility

Might be incompatible with other battle systems or battle addons.

Credits and Thanks

Credit Fantasist (me) for making this.

  • Fantasist, for making this script
  • KCMike20, for requesting this script
  • Blizzard, for helping me
  • winkio, for helping me
  • Jackolas, for pointing out a bug
  • yukiharu for fixing force action bug
  • Fenriswolf for requesting enemy ignore list
  • Kagutsuchi, for requesting threat-by-damage feature

Author's Notes

If you have any problems, suggestions or comments, you can find me at:

   forum.chaos-project.com

Enjoy ^_^
« Last Edit: October 23, 2011, 10:43:00 AM by Fantasist »
Do you like ambient/electronic music? Then you should promote a talented artist! Help out here. (I'm serious. Just listen to his work at least!)

The best of freeware reviews: Gizmo's Freeware Reviews



Offline Aqua

  • Lexima Warrior
  • *******
  • Posts: 2554
  • LV: 118
  • Gender: Female
  • Quack!
    • View Profile
Re: [XP] Threat System v1.0
« Reply #1 on: July 13, 2009, 06:43:21 PM »
Work of art like always :D

Offline Seox

  • Ethereal Devastator
  • ****
  • Posts: 332
  • LV: 25
  • Gender: Male
  • REVOLVER OCELOT ARE AWESOME. O_O
    • View Profile
Re: [XP] Threat System v1.0
« Reply #2 on: July 13, 2009, 08:37:42 PM »
You beat me to this by weeks. Holy god.. Even has the same NAME. You just saved me a LAWT of time. THANK YOU! *powers up*


I'm gonna add edits for my game, where enemies with greater INT have a greater chance of attacking POTENTIAL threats, IE mages, and not as much of attacking the PERCEIVED threats.


Thanks again!
... (<<<<<<<<<<<<<<< TEH DOTS OF DOOM. Hey, kinda catchy. :naughty:)

Offline Jackolas

  • Astral Trancist
  • *****
  • Posts: 500
  • LV: 31
  • Gender: Male
  • Its just me
    • View Profile
    • My Clan
Re: [XP] Threat System v1.0
« Reply #3 on: July 13, 2009, 08:41:35 PM »
still think its 1 of the most requested scripts out there :P

great work as always :P

Offline Blizzard

  • This sexy
  • Administrator
  • has over 9000 posts
  • *****
  • Posts: 19916
  • LV: 642
  • Gender: Male
  • Magic midgets.
    • View Profile
    • You're already on it. (-_-')
Re: [XP] Threat System v1.0
« Reply #4 on: July 13, 2009, 09:18:18 PM »
Fantasist makes my fantasies come true. <3 *levels up*
Check out Daygames and our games:

King of Booze      King of Booze: Never Ever      Pet Bots
Drinking Game for Android      Never have I ever for Android      Pet Bots for Android
Drinking Game for iOS      Never have I ever for iOS      Pet Bots for iOS
Drinking Game on Steam


Quote from: winkio
I do not speak to bricks, either as individuals or in wall form.

Quote from: Barney Stinson
When I get sad, I stop being sad and be awesome instead. True story.

Offline Seox

  • Ethereal Devastator
  • ****
  • Posts: 332
  • LV: 25
  • Gender: Male
  • REVOLVER OCELOT ARE AWESOME. O_O
    • View Profile
Re: [XP] Threat System v1.0
« Reply #5 on: July 13, 2009, 09:27:20 PM »
Fantasist makes my fantasies come true. <3 *levels up*

I dunno if that was epic or phail.  :P

XD, no, really, it's a great script. Just tested it with mah battle system, and it works *perfectly*. Great job!
... (<<<<<<<<<<<<<<< TEH DOTS OF DOOM. Hey, kinda catchy. :naughty:)

Offline C.C. rOyAl

  • Ethereal Devastator
  • ****
  • Posts: 381
  • LV: 2
  • Gender: Male
  • CP's only concept artist!
    • View Profile
Re: [XP] Threat System v1.0
« Reply #6 on: July 13, 2009, 10:53:09 PM »
does this work with Blizzards ABS?
(click to show/hide)

Offline Aqua

  • Lexima Warrior
  • *******
  • Posts: 2554
  • LV: 118
  • Gender: Female
  • Quack!
    • View Profile
Re: [XP] Threat System v1.0
« Reply #7 on: July 13, 2009, 10:54:40 PM »
No

Offline winkio

  • Epiq
  • Administrator
  • Guardian of Chaos
  • *****
  • Posts: 4506
  • LV: 199
  • Gender: Male
  • I am lying.
    • View Profile
Re: [XP] Threat System v1.0
« Reply #8 on: July 13, 2009, 10:56:32 PM »
I'll eventually convert it if someone else doesn't beat me to it.

Offline C.C. rOyAl

  • Ethereal Devastator
  • ****
  • Posts: 381
  • LV: 2
  • Gender: Male
  • CP's only concept artist!
    • View Profile
Re: [XP] Threat System v1.0
« Reply #9 on: July 13, 2009, 11:02:53 PM »
k cool cuz this sounds real cool 
(click to show/hide)

Offline Blizzard

  • This sexy
  • Administrator
  • has over 9000 posts
  • *****
  • Posts: 19916
  • LV: 642
  • Gender: Male
  • Magic midgets.
    • View Profile
    • You're already on it. (-_-')
Re: [XP] Threat System v1.0
« Reply #10 on: July 13, 2009, 11:32:15 PM »
Should be fairly easy. It rewrites only a few methods in Scene_Battle.
Check out Daygames and our games:

King of Booze      King of Booze: Never Ever      Pet Bots
Drinking Game for Android      Never have I ever for Android      Pet Bots for Android
Drinking Game for iOS      Never have I ever for iOS      Pet Bots for iOS
Drinking Game on Steam


Quote from: winkio
I do not speak to bricks, either as individuals or in wall form.

Quote from: Barney Stinson
When I get sad, I stop being sad and be awesome instead. True story.

Subsonic_Noise

  • Guest
Re: [XP] Threat System v1.0
« Reply #11 on: July 13, 2009, 11:36:42 PM »
Wouldn't we also need this for Remexos? An MMO without such a system would be a bit hard to play.
Very nice script btw, it's one of these scripts many people could need, but nobody had the idea yet^^

Offline Kagutsuchi

  • Ethereal Devastator
  • ****
  • Posts: 468
  • LV: 2
  • Gender: Male
  • The God of .. eating souls?
    • View Profile
    • University Hosted Web Page - In Norwegian
Re: [XP] Threat System v1.0
« Reply #12 on: July 14, 2009, 02:28:01 AM »
Does this script give you threat depending on how much damage you do?

Offline C.C. rOyAl

  • Ethereal Devastator
  • ****
  • Posts: 381
  • LV: 2
  • Gender: Male
  • CP's only concept artist!
    • View Profile
Re: [XP] Threat System v1.0
« Reply #13 on: July 14, 2009, 04:03:36 AM »
thats basicly right. just read the request on Script Request. it goes into pretty good detail
(click to show/hide)

Offline Seox

  • Ethereal Devastator
  • ****
  • Posts: 332
  • LV: 25
  • Gender: Male
  • REVOLVER OCELOT ARE AWESOME. O_O
    • View Profile
Re: [XP] Threat System v1.0
« Reply #14 on: July 14, 2009, 06:12:18 AM »
Does this script give you threat depending on how much damage you do?

No. Even misses generate threat. Try the demo, you'll see very quickly how it works. However, with basic scripting knowledge, an edit is possible. I might not be able to SOON, but within the next couple of days, I can edit it for you.
« Last Edit: July 14, 2009, 07:04:05 AM by Seox »
... (<<<<<<<<<<<<<<< TEH DOTS OF DOOM. Hey, kinda catchy. :naughty:)

Offline C.C. rOyAl

  • Ethereal Devastator
  • ****
  • Posts: 381
  • LV: 2
  • Gender: Male
  • CP's only concept artist!
    • View Profile
Re: [XP] Threat System v1.0
« Reply #15 on: July 14, 2009, 06:14:37 AM »
lol i feel retarded  :^_^':
(click to show/hide)

Offline Seox

  • Ethereal Devastator
  • ****
  • Posts: 332
  • LV: 25
  • Gender: Male
  • REVOLVER OCELOT ARE AWESOME. O_O
    • View Profile
Re: [XP] Threat System v1.0
« Reply #16 on: July 14, 2009, 07:02:42 AM »
Why? You didn't do anything wrong ^_^. You actually tried to help. No need to feel bad.
... (<<<<<<<<<<<<<<< TEH DOTS OF DOOM. Hey, kinda catchy. :naughty:)

Offline Kagutsuchi

  • Ethereal Devastator
  • ****
  • Posts: 468
  • LV: 2
  • Gender: Male
  • The God of .. eating souls?
    • View Profile
    • University Hosted Web Page - In Norwegian
Re: [XP] Threat System v1.0
« Reply #17 on: July 14, 2009, 12:43:09 PM »
Does this script give you threat depending on how much damage you do?

No. Even misses generate threat. Try the demo, you'll see very quickly how it works. However, with basic scripting knowledge, an edit is possible. I might not be able to SOON, but within the next couple of days, I can edit it for you.
Good ^^ I could see that some people might want to use this version of a threat system, but to me it just doesn't make sense to have a threat system where how much damage you deal doesn't deside your threat.
< wow and aoc geek =D

Offline Fantasist

  • Lexima Warrior
  • *******
  • Posts: 2222
  • LV: 146
  • Gender: Male
    • View Profile
    • Blog
Re: [XP] Threat System v1.0
« Reply #18 on: July 14, 2009, 02:32:17 PM »
Thank you everyone :)

You beat me to this by weeks. Holy god.. Even has the same NAME. You just saved me a LAWT of time. THANK YOU! *powers up*
lol! I was supposed to complete this a year ago!

I'll eventually convert it if someone else doesn't beat me to it.
Sure, I'd appreciate that. I don't know BABS enough to do it XD

Good ^^ I could see that some people might want to use this version of a threat system, but to me it just doesn't make sense to have a threat system where how much damage you deal doesn't deside your threat.
< wow and aoc geek =D
A threat system can ideally do a lot of stuff, a LOT. Many of them, though, are the user's preference. I admit I could've done a better job with it's capabilities, but I've gotten sick of RGSS. You see, I'm at a point of life where everything I do should pay off to my education or my career, or I feel like I'm wasting time, or worse; that I'm letting my peers go way ahead in the game. I don't want to touch RMXP just for scripting anymore. I will only use it when I have the time and plan for my game. I left a lot of requests hanging and I felt bad, so I'm sort of completing them.
btw, if any of that rant sounded like I was offended or something, it's not that, I appreciate your remarks :)
Do you like ambient/electronic music? Then you should promote a talented artist! Help out here. (I'm serious. Just listen to his work at least!)

The best of freeware reviews: Gizmo's Freeware Reviews



Subsonic_Noise

  • Guest
Re: [XP] Threat System v1.0
« Reply #19 on: July 14, 2009, 02:50:53 PM »
You see, I'm at a point of life where everything I do should pay off to my education or my career, or I feel like I'm wasting time, or worse;
No! Don't think like that! Education and career isn't everything!