[RM2K3] COUPLE OF QUESTIONS ON SCRIPTS FOR COMBAT

Posts

Pages: 1
I'm currently working on a small project in my spare time using RPG Maker 2k3. However, I've run into a problem with two events I really want in the game but can't figure out. The first is more difficult to describe so I'll start with that:

One of the characters the player uses is supposed to become more and more outclassed as the game goes on by her allies. In a particular battle she gets a major power upgrade and becomes just as powerful as her allies if not moreso. I had wanted the character herself to be statistically inferior to her allies so the player will actually feel she's not strong enough as opposed to her just saying so. The problem is I can't figure out how to do that in the battle she's supposed to get her upgrade. The idea I had was to create two separate Heroes in the database with identical appearances but one with better stats and skills, and mid-battle have her switch to her better self, if that makes any sense. I can't do this because I can't figure out how to keep the equipment she currently has equipped. I can equip specific pieces of gear to her, but I can't assume the player will even have those pieces of equipment. I don't want to add brand new equipment either because the player will wonder where it came from. I also don't want to add stuff like classes and titles because no other character uses them- there's no need. For this one character to have a class while everyone else doesn't will become suspicious, and to add repetitive classes when it's obvious what each character is meant to represent just means more work for me that could be avoided.

A friend suggested I force the player to equip a specific item to her that can be replaced when she's switched out for her superior self. In the context of the story it makes perfect sense- around this time she starts to feel like a burden to the team so she'd be willing to do this to prove otherwise. However this means she wouldn't be at full power for the second half of the battle so the player won't feel like she's actually gotten stronger. It's a serious case of "Do, don't show". Is there a way to store the current equipment of a character and to equip them to another version of said character mid battle? Assume the gear is equippable for both.



The second question's easier, but I'm still stumped. I had intended to make the final boss difficult by adding five invisible enemies to represent the various parts of the boss that can be targeted (as in, assuming the boss is a giant dragon that covers half the screen, his head, claws, feet, and body can all be selected to attack and all have separate HP meters and attack sets). What I had hoped would happen would be to have the main boss- the body- be invincible until the other parts of his body are destroyed. I had also hoped each part would regenerate to full health, but that's just extra. If the boss can't be made invincible (at least can't be selected in battle) until specific enemies are defeated, then is there a way to make the boss remain on the screen until all enemies have been destroyed, but with no way to target him directly? That way when the main sprite dies the player won't wonder why they're selecting empty space.

I apologize if I'm asking for a lot. I'm trying to work on work-arounds for both of these problems but so far nothing comes up that beats these particular methods. The first example could easily be worked around by changing her class, but I really don't want to add classes into the game when there's only four characters. Especially when one class is "pirate cleric". If there's any way to achieve either of them, I'd really like to know. Thank you.


Edit: scratch the first question, I think I found a better scenario that takes care of this problem. Still stumped on the final boss thing though.
How about taking the main image of the enemy and cutting it up into parts, then have the main body phase in after the parts are killed?

Like, you'd really have six enemies all told - the five parts and the full enemy - but the enemy in full would only come into play after the last part loses almost all of its' health (like, when one gets down to the last 10% of health, check to see if any other part is alive. If so, nothing happens but if not, call forth the last enemy (that being the full enemy) and then kill off the last piece).

There's a command when you're placing enemies where if you right-click on them you can choose to hide them and then use a command in battle to show them.

To have the full enemy still shown on-screen and not have the body parts disappear, use a battle background with the enemy image on it and line them up in the battle set-up part. Then, when it turns into the last enemy, change the battle background to one without the enemy. (Not 100% sure if the battle background exchange will work but the rest should. There is another way to do it, using battle animations, but it's kinda fiddly. Probably best to check that this works first.)


Also, pirate clerics are cool. I have one (well, more a big gruff ex-pirate healer with a peg-leg ;p ) in one of my own games.
I suppose I could try that. Is there a way to control where the target pointer shows up? I had another idea to create duplicate images of the boss and hide them behind him. You'd be selecting different parts of his body but in reality you're selecting another image of the boss where the cursor is pointing somewhere else. That way when any part is destroyed there'd still be another image of him behind ready to show up, and when everything's destroyed he'll still be on the screen to give his "This cannot be" speech before exploding for 15 seconds in standard RPG fashion. Plus, if the boss is flying, it could create a cool "after image".

Keep in mind I'm pretty new to this. I'm not even using sprites other than the ones provided in the RTP. Do you recommend any free software for putting the boss' image on a background? Or is MS paint/paint.net alright?
If you're using 2k3 I recommend iDraw - it will only load 256 colour png/bmp files, which is perfect for 2k/3. It also has a lot of neat tools , though I recommend messing around with a dummy file to learn how to use it/what things do. Once you do know how to use it, though, it's a breeze to do any editing you need for 2k/3. It should be easy enough to find via google search and last I heard, it's a free program.

You could also get something like graphics gale which others have used. It's not set at 256 colours and is very versatile for image editing.

As for your idea, I'm not sure - it's been a while since I last messed with battles in 2k3 in any meaningful way. Maybe I'll try do a mock-up of my idea and send you a demo if I get enough time today, but you'll have to check out your idea - as far as I recall there's no way to change the pointer will show up, which is why I recommended pieces of the enemy with a background image. It would still show the enemy in full but it would make the pieces that were killed off untargetable.
Actually, a windows version of iDraw seems to be hard to find. It's always for Mac. I keep a windows copy in my locker. I've had to supply that link several times.
Odd, the first I found was Windows and I've never seen a Mac version. ?.?
Do you happen to know a site that has this iDraw? If not I can try to find it on my own.

Either way, thanks for the advice. Admittedly the final boss fight is very far down the line, but I wanted to cover my basis before that happened.
Here. It's now added to RMN as a utility, so we won't lose the bloody thing (I had to dig around for my own copy since a few of the older RM sites went down/took their versions down for some reason (spring clean-up I guess?)). Enjoy~
Thank you, I really appreciate the help. :)
Hey, here's an idea. A much simpler idea if it works. For the sake of simplicity, I'm going to just assume that there's only 3 body parts and the main boss that you want to be invincible until the other body parts are killed. I'm going to call the main, invincible body part "Monster 1", and the others "Monster 2" to "Monster 4".

Trigger: Monster 1 HP = 0% to 99%

<>Variable0001 set = Monster 2 HP
<>Variable0002 set = Monster 3 HP
<>Variable0003 set = Monster 4 HP
<>Branch: If Var0001 Not equal to 0
<><>Branch: If Var0002 Not equal to 0
<><><>Branch: If Var0003 Not equal to 0
<><><><>Change Monster HP: Monster 1's HP 9999 Recovered
<><><><>
<><><>End:
<><><>
<><>End:
<><>
<>End:
<>

As for reviving the body parts, maybe you could make a second page and have a trigger that makes it so that when Monster 1 takes x number of turns, then it removes death condition from Monsters 2-4 and heals them.

EDIT: I don't know if removing death condition will revive them at low life or full life (I'd guess low life), but even if it is full life, you could still heal them anyway because it would look more intimidating to the player to see all those healing numbers fly up. :P
Huh.....I didn't even think to use variables.....it's worth a shot. I'll do a mockup of the boss when I get home to try it out.

Edit: A question about the revive mechanic, though. Doesn't the x number of turns thing only work once? Like, if I put "boss takes 10 turns" then after that it never activates again?

If not, is there a way to set it so that a boss part revives after a set amount of turns instead of always on the main boss' x turn? For example, you destroy his left claw and the next turn his right claw. I'm thinking the way it's set up is after the body's 10th turn, both claws come back even though the left claw should've come back before the right one.
Variables are *always* the answer to *everything.* hehehehe. =P

EDIT: I actually had a mistake in my variables there. I had it checking for 0s, when it should have been checking for not 0s. lol. I edited it. I don't know if monsters' HP can go into the negatives though. If it can, then you would need to set them to "greater than 0" instead ("them" being the three branch checks).
I haven't actually used rm2k3's default battle system in many years, so I apologize for my rustiness. Hmm. What about the "Turns Elapsed" instead of "Monster has taken x turns"? According to the help file, it sounds like this could work.
-> Turns Elapsed : Processing of the event will start when the specified number of turns have elapsed. Input is in the form A x + B. For example, if A=3 and B=1, the event will be processed every 3 turns starting with turn 1. (1st, 4th, 7th etc.) If both A and B are set to 0, the event will be processed at the very beginning of the battle before command input.
You could make it so that each individual body part has its own page in the script. You can give each body part a different number of turns before it respawns so that they don't all respawn at once. This would make it so that they won't necessarily respawn in the same order that you killed them, but it would have the potentially-just-as-good affect of encouraging the player to kill the body parts in a specific order (if you kill the fastest respawning one first, for example, it'll be harder to kill the other ones before it comes back).

Trigger: Number of Turns Elapsed: 6 x + 6 (every 6 turns starting on turn 6)
<>v0001 set = Monster 1 HP
<>v0002 set = Monster 2 HP
<>Branch: If v0001 = Greater than 0
<><>Branch: If v0002 = 0
<><><>Remove Death from Monster 2
<><><>Complete heal Monster 2
(Monster 3 and 4 would get their own pages, with maybe values of 10 and 15 or whatever for the turn elapse trigger.

Or maybe you could have a variable for each body part, and make it so that whenever the main boss performs an action, it checks the HP of all of his body parts. If any of them are 0, then add +1 to the variable for that monster. Then have an individual page for each body part, with the trigger being their respective variable equaling the number of turns you want that limb to wait before respawning, then respawn it, heal it, and set its variable back to 0. You would have to make a separate copy of this event page with the trigger changed for every different command that the boss can use, but I think it would work.

Trigger: Monster 1 Uses Battle Command: Fight/Skill/Item/Etc.(Different copy of the page for each one)
v0001 = Monster 1 HP
v0002 = Monster 2 HP
v0003 = Monster 3 HP
v0004 = Monster 4 HP
Branch: If v0001 = Greater than 0
>Branch: If v0002 = 0
>> v0005 + 1 (number of turns limb 1 is dead)
>Branch: If v0003 = 0
>> v0006 + 1 (number of turns limb 2 is dead)
>Branch: If v0004 = 0
>> v0007 + 1 (number of turns limb 3 is dead)
>

(assuming limb 1 respawns 6 turns after being killed)
Trigger: v0005 is above 5 (because apparently you can't just do "=6"; you can still do that in conditional branches though, at least)
Remove Death from Monster 2
Complete Heal Monster 2
Set v0005 = 0

(assuming limb 2 respawns 10 turns after being killed)
Trigger: v0006 is above 9
Remove Death from Monster 3
Complete Heal Monster 3
Set v0006 = 0

(assuming limb 3 respawns 15 turns after being killed)
Trigger: v0007 is above 14
Remove Death from Monster 4
Complete Heal Monster 4
Set v0007 = 0


EDIT: I just realized that my above code for making your boss invincible is a little off. In that state, it will only heal the boss if all three limbs are still alive. It should be like this:

Trigger: Monster 1 HP = 0% to 99%

<>Variable0001 set = Monster 2 HP
<>Variable0002 set = Monster 3 HP
<>Variable0003 set = Monster 4 HP
<>Branch: If Var0001 Not equal to 0
<><>Complete Healing: Monster 1
<><>
<>Else:
<><>Branch: If Var0002 Not equal to 0
<><><>Complete Healing: Monster 1
<><><>
<><>Else:
<><><>Branch: If Var0003 Not equal to 0
<><><><>Complete Healing: Monster 1
<><><><>
<><><>End:
<><><>
<><>End:
<><>
<>End:
<>
I just tried out the code you initially gave me (the edited one) and it seems to work fine...except if you kill the pieces out of order, they both deactivate.

For example, using this code:

Trigger: Monster 1 HP = 0% to 99%

<>Variable0001 set = Monster 2 HP
<>Variable0002 set = Monster 3 HP
<>Variable0003 set = Monster 4 HP
<>Branch: If Var0001 Not equal to 0
<><>Branch: If Var0002 Not equal to 0
<><><>Branch: If Var0003 Not equal to 0
<><><><>Change Monster HP: Monster 1's HP 9999 Recovered
<><><><>
<><><>End:
<><><>
<><>End:
<><>
<>End:
<>

It's set up that now if monster 2 or 3 dies first, it doesn't matter how much HP monster 4 has because it no longer checks for it. XD I think what I'm going to have to do is not nest the coniditonals inside one another but create three separate conditions that checks each piece individually, something like:

Trigger: Monster 1 HP = 0% to 99%

<>Variable0001 set = Monster 2 HP
<>Variable0002 set = Monster 3 HP
<>Variable0003 set = Monster 4 HP
<>Branch: If Var0001 Not equal to 0
<>Change Monster HP: Monster 1's HP 9999 Recovered
<>End
<>Branch: If Var0002 Not equal to 0
<>Change Monster HP: Monster 1's HP 9999 Recovered
<>End
<>Branch: If Var0003 Not equal to 0
<>Change Monster HP: Monster 1's HP 9999 Recovered
<>End

Since the idea is the final boss is invincible until those three parts are dead, it doesn't matter how many times they're healed, just as long as destroying those three pieces lets him take damage.

*tests*


...yep, looks that works. :D The final boss heals for 9999 each time you hit him until you destroy all other enemies. This is perfect, thank you. I would've never figured it out.

I'll need to test the respawning code you presented, but with all of your help I can make this work, so thank you. :D
You're welcome. And I actually already edited that code last night (the one with the nested conditionals). I rewrote it last night to look MUCH more like yours does. Maybe you didn't notice the edited post (I did not edit the original post, I just redid it in the post above yours). Your modification is extremely close to my entire modification. The *only* thing you missed was to put the other conditionals under ELSE conditions (that way he'll only heal once when you hit him instead of three times).
I'm really glad I could help though. If you need some help figuring out the respawn code, just let me know, and I'll try to explain it better. :) Or if there's any mistakes in it, then I'll fix it. lol. :P
Hm...I kinda liked my code because having him heal even when attacking the other pieces is intimidating, but I suppose if I want the pieces to come back it makes sense to have your variation instead. I can't have him heal to max health every 5 turns, I don't even think the player can deal that much damage that quickly :x

Though I'm wondering if the effort's worth it. Instead of making the pieces respawn every few turns, I should just make the pieces have a ton of HP so they last longer and once they die they're gone for good. I was kinda going for the battle against Exor in Super Mario RPG but I can see how that would be annoying.
My code was actually for every six turns, not every five turns (it was listed as "more than 5"), but that really doesn't matter. My choice of number was entirely arbitrary. You could have it be 15, 28, 117, or whatever you wanted. I was just trying to help show you the theory behind how it would be accomplished.

As for the effort being worth it, well I guess that's up to you. Although I've found that when you find yourself in a situation where you're wondering if the effort is worth it, it usually is. Those are usually the details that really help your game shine (at least in my opinion). Granted, I'm not saying that your game would be somehow lesser if you didn't include it, but I do think it would be somehow enhanced by sheer virtue of the effort put into making it nonstandard/nonstock. I know that when I play a 2k/3 game that uses the default battle system, I always like to see as much innovation and tinkering with it as is possible. But of course, that's just my subjective perspective. I doubt that most people who aren't developers would give it as much consideration.
I understand what you're saying, but having been a game tester I try to look at things from the perspective of the player instead of how complex or innovative the mechanics are. How is the player going to enjoy this final battle? If I have it set up the player must destroy the pieces and keep them destroyed or the boss will just heal back all the damage done to him, will players enjoy that versus having the pieces be destroyed for good? How long does that make the fight? How difficult will the boss be because of it? How powerful should the pieces be and how much HP should they have? Is the weight of the story felt in this battle or is it just another boring bullet sponge that blocks the player's progress?

Granted, this is all assuming I can have it set up so only attacking the boss with the pieces up will heal him instead of always healing him whenever a player attacks anything, but my personal opinion on how complex a battle should be is trumped by the player's opinion on how fun it is. As long as my players are happy, I'm happy.
I couldn't agree more. And that's why it's ultimately up to you. I can only offer my two cents based on a few measly paragraphs of dialogue that we've exchanged, right? I'm just glad that I was able to help. ^_^
Yes, and thank you for doing it. :) I know I was asking for a lot, but hopefully I'll take your code and make this battle amazing.
Pages: 1