Skill That Targets a Random Unit?

Psykai

Veteran
Veteran
Joined
Dec 8, 2017
Messages
104
Reaction score
4
First Language
English
Primarily Uses
RMVXA
Hey guys, hopefully this is a simple one.

I was pondering a new character to add to one of my projects who is a kind of 'clutsy mage' but it solely depends on whether I can simply accomplish a targeting idea. The concept is that her spells will have high damage and critical potential, however limited functionality as they may miss and could also randomly hit an ally, including the caster.

I've searched all over the place but I can't seem to find a script that lets you add that kind of thing and I can't believe that it doesn't already exist :S I figured this would be something common in many projects.

An example of the kind of thing I'm wanting is, say, a Lightning Bolt skill that targets a single random unit (enemy or ally) in battle. Alternatively, the player could choose a target for the skill but have a small chance that the target will randomly change to another enemy or ally upon use.

I'm already using Yanfly's Target Manager (which doesn't allow for this kind of thing by default) if that helps with potential compatability issues.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,433
Reaction score
7,712
First Language
German
Primarily Uses
RMMV
There is such a script, but it is rather unknown.
SES target manager

Sorry, I don't have the link on my current computers (despite the fact that it was my idea that creates that script), it's on their site.
 

Psykai

Veteran
Veteran
Joined
Dec 8, 2017
Messages
104
Reaction score
4
First Language
English
Primarily Uses
RMVXA
I took a quick look at it but there were only a handful of instructions for a few examples and none that seemed to show how to set up a skill like the one I wanted. It seems to require a 'core' too which I was a little hesitant to get in case it messed with some of my other scripts.
 

TheoAllen

Self-proclaimed jack of all trades
Veteran
Joined
Mar 16, 2012
Messages
5,599
Reaction score
6,552
First Language
Indonesian
Primarily Uses
RMVXA
Unless their 'core' script is badly written, it should not break any games. The idea of core script is a collection of function for scripter's convenient sake, and it should not touch anything regarding the compatibility with other scripts. If this said core is modifying the default engine works, it's a bad core script. I'd say, just try it.
 

Psykai

Veteran
Veteran
Joined
Dec 8, 2017
Messages
104
Reaction score
4
First Language
English
Primarily Uses
RMVXA
I got it and tried to figure out how to setup a skill but the script doesn't really come with many examples/instructions that give you an idea of how to make certain things.

For example one of the filters is "enemy_only" which makes sense and I imagine "allies_only" would also work but I have no idea what I'd type to make it target either at random.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,433
Reaction score
7,712
First Language
German
Primarily Uses
RMMV
The default is every battler from both sides, the filters are only to exclude something from the target list.
I don't remember what the command for random scope was, can you link to it?
As said I've only limited computer access at the moment...
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,713
First Language
English
Primarily Uses
RMVXA
Please give a link to the website where the script can be found so that people who want to help can check it.
[move]RGSSx Script Support[/move]
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,433
Reaction score
7,712
First Language
German
Primarily Uses
RMMV
OK, here is the short version:

By default, everything (both actors and enemies) are in the target group.
The filter is the part where you remove targets from the list - for example with the filter for enemy only youi remove all actors from the target list.
The part behind the "Target manager" in the opening line tells how many or which targets from the list are really selected for the skill.

<Target Manager: rand 1>
</Target Manager>
Would result in a skill that hits one random target of everything, either actor or enemy.

As said the filters are only needed if you want to exclude possible targets, for example if you want the skill only to target wounded battlers or only actors or whatever.
 

Psykai

Veteran
Veteran
Joined
Dec 8, 2017
Messages
104
Reaction score
4
First Language
English
Primarily Uses
RMVXA
That's awesome and much simpler than I imagined but unfortunately I just discovered that in-game the SES Target Manager brings up a 'target select' message box which seems to have replaced the one that came with MOG's Battle HUD and the new one is positioned BEHIND my characters so I can't even see it :/ so it's probably not something I can use after all unless I can disable that particular feature?
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,433
Reaction score
7,712
First Language
German
Primarily Uses
RMMV
You can try placing mogs script below the target manager, but unfortunately yes - such a rework of the target system does require a rework of the target selection window.
So you would most probably require a patch to make those scripts compatible.
 

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

Latest Threads

Latest Profile Posts

Day 9 of giveaways! 8 prizes today :D
He mad, but he cute :kaopride:

Our latest feature is an interview with... me?!

People4_2 (Capelet off and on) added!

Just beat the last of us 2 last night and starting jedi: fallen order right now, both use unreal engine & when I say i knew 80% of jedi's buttons right away because they were the same buttons as TLOU2 its ridiculous, even the same narrow hallway crawl and barely-made-it jump they do. Unreal Engine is just big budget RPG Maker the way they make games nearly identical at its core lol.

Forum statistics

Threads
106,040
Messages
1,018,479
Members
137,824
Latest member
dobratemporal
Top