RPG MAKER VX ACE-BODY PARTS FOR ENEMIES

Posts

Pages: 1
You've all played games where enemies have more than one body part to target. I want the same thing, although some kinks to it;

1. Targeting body parts and defeating them can yield extra EXP/etc, but ONLY if they're defeated. If the attached actual enemy is defeated before its parts, you don't get shit from the part itself.

2. A clean way to program the 'if the boss dies first all the parts die too' effect.

3. This is more visual than anything, but I like the effects that go with say, if you defeat a robots arm, then the arm part dies while the rest of the body is intact. This seems easy to do, right? Just graphic separate parts. Until what happens is, when the actual main part dies there's a moment where the body part is floating separately before the other eventing kicks in.
LouisCyphre
can't make a bad game if you don't finish any games
4523
This shouldn't be that hard. Gimme some time to think on it and hit my AIM or something.
AIM? Ain't nobody got time for that!

(i dont have aim anymore)
LouisCyphre
can't make a bad game if you don't finish any games
4523
The quickest, easiest, and ugliest way is to edit the "add_state" method for enemies. You can either make a new script and alias over it, or just edit it directly. If you do edit directly, make sure to leave a #herpderp mog was here comment or something so you know what you did and can find where you did it.

The patchwork way is to just check the monster's ID and the state's ID.

"am I the boss" self.id == 76
"is that death I'm being given" state == 0
"well then fuck all those guys" $game_troop.members.each { |enemy| enemy.die }

There's other solutions, but this is the most efficient method to kill all the parts of one boss in one fight. No need to track down and configure some ass-backwards script by kujasthong9999 or whatever.

EDIT: If you want to do this with multiple bosses, just add their IDs to an array. Like:

[76, 83, 1345, 2].include?(self.id)

If the monster's ID is in the array, it's a multi-part boss "main part". Easy.

This should solve 2 and 3 for you handily. I'll give 1 more thought later (maybe after it's reported that you implemented this without problems).
lol

I am extremely new to RPG Maker VX Ace and scripting and all of this stuff. Can you elaborate just a little bit?
LouisCyphre
can't make a bad game if you don't finish any games
4523
alright, let's teach a man to fish

DISCLAIMER: People will bitch at me for recommending that you directly edit the base scripts. Poo on them, I say; a small and well-documented edit here or there can do wonders for your game.

Okay, if you open up your script editor, you can find Game_Battler, and then find this method:



Easy enough, right? When you run add_state(0) on a battler, it does the busywork of actually applying the state to the characters. This goes for both actors and enemies.

I want you to copy-paste it to the Game_Enemy class. Normally, Game_Enemy inherits this class from Game_Battler, just like actors do. By pasting this in, you're giving Game_Enemy its own version that, when edited, will not affect your actors. It shouldn't be too hard to make it fit in. Just don't paste it in the middle of another method and you're golden.

Then, I want you to make it look like this:



The #green bits are comments. You don't need to type those, and you don't need that many line breaks. (But you knew that, probably.)

Get this working, and I'll toy with something to make the parts' EXP stop registering.
Why not just alias the default base scripts chaos? Wouldn't that be easier to track? :0
LouisCyphre
can't make a bad game if you don't finish any games
4523
because then I have to teach mog how to alias

I used pictures so he couldn't copy-paste because I am a(n instructional) bastard
Pages: 1