The RPG Maker Resource Kit

Other Game Creation => Program Troubleshooting => Topic started by: MightySword2010 on April 15, 2009, 12:57:47 PM

Title: Advanced Technical Questions (RPG2K)
Post by: MightySword2010 on April 15, 2009, 12:57:47 PM
Alright, so I'm having a hard time with doing advanced scripts...

I have a bomb enemy, and I want it to explode, deal damage, and then die, in the same turn if possible. How could I go around that?

Also, is there a way to make it so using a move deals no damage or recoils under a certain condition? (IE: using a laser on a mirror-covered enemy,
laser reflected back on the player, damage dealt; casting fire on a fire enemy, no damage dealt)

Title: Re: Advanced Technical Questions (RPG2K)
Post by: Sirius on April 15, 2009, 06:50:20 PM
Ok, I've got some basic methods of doing some of those.

For your bomb enemy, make a battle event with a trigger Monster [your bomb enemy] Turns elapsed [XX] (let's say 5 for this). Then show battle animation of whatever your explosion is, reduce your party's hp by however much you want it to, then reduce your bomb's hp by 100%, and voila, your bomb will be set to explode in 5 turns. It's pretty rigid, but hopefully it's a start.

Spoiler for Bomb?:
(https://rmrk.net/proxy.php?request=http%3A%2F%2Fimg21.imageshack.us%2Fimg21%2F4191%2Fbombq.jpg&hash=57e602990d5c5cc0eca2be052ea07e7ad20bdb89)

If you want an attack to do no damage, make sure the damage multiplier for that skill has one letter set to 0% (Maybe you'll want to make your own attribute for the attack getting negated). When your hero uses that fireball//laser/exploding duck, damage will always be 0.

Spoiler for No damage:
(https://rmrk.net/proxy.php?request=http%3A%2F%2Fimg15.imageshack.us%2Fimg15%2F4558%2Fnegated.jpg&hash=7027e88e29aed685ae7df792335fe8fae8ce10db)

Make sure your enemy's resistance to that is set to E

Ok, I'm having trouble getting reflected damage to work out nicely, so maybe you can experiment with it too. So far I've set a battle command to [Hero] uses the [Skill] command, and then changing the hero's hp to however much your laser would have hurt the enemy. Use some battle animations, and it should look pretty believable.

Spoiler for Reflect, sort of:
(https://rmrk.net/proxy.php?request=http%3A%2F%2Fimg14.imageshack.us%2Fimg14%2F533%2Freflect.jpg&hash=660a5d132921e1e797384cce7e3af9771ddb10c9)

Oh wait, these were in 2K3, but the DB should be pretty much the same. Feel free to change these as much as you need to, too. They're just really basic, experimental events, & there are definitely better ways to make them work.
Title: Re: Advanced Technical Questions (RPG2K)
Post by: MightySword2010 on April 25, 2009, 03:06:10 PM
Thanks for the help. I made the enemy activate a switch when it's ready to blow up, though.

Another question: How do I make it so a deceased party member's HP goes to one when a battle is over?

EDIT: My bomb script activates the moment the switch is activated. Any way to make it wait a turn?
Title: Re: Advanced Technical Questions (RPG2K)
Post by: Sirius on April 25, 2009, 05:52:50 PM
Heh, that bomb one's really bothersome... I'll start with the 1 hp thing though.

You'll want to make switches for all of your characters, then copy this into every monster group

Spoiler for Step 1:
(https://rmrk.net/proxy.php?request=http%3A%2F%2Fimg16.imageshack.us%2Fimg16%2F4271%2Fhp1r.jpg&hash=9e01d4bc6d0e5f21c5fda4b76fbd584191f5f955)
Again, you need switches and pages for all of your characters, this one is just demonstration.

After you get that down, set up a common event for all your characters individually, make it a parallel process with their switch, and do this:

Spoiler for Step 2:
(https://rmrk.net/proxy.php?request=http%3A%2F%2Fimg7.imageshack.us%2Fimg7%2F1216%2Fhp2u.jpg&hash=f1dc48e2af88bee8d916f4d8a47b24e4364cabe7)

Now after every battle, your deceased should come back to life </triumph>! The process is a bit tedious though.

Bleh, now for the bomb one... You'll need 1 variable for the turn delay, and 2 switches: one for the skill itself, and one to make sure the skill doesn't keep going off. Start by making your first page add a Bomb! variable every time he takes a turn.

Spoiler for Bomb 1:
(https://rmrk.net/proxy.php?request=http%3A%2F%2Fimg15.imageshack.us%2Fimg15%2F9916%2Fbomb1a.jpg&hash=fa7b1f7c76d1c13aa21b9016fc35033256889ab7)

Next page, you'll need a trigger to allow your bomb to use his explosion skill.

Spoiler for Bomb 2:
(https://rmrk.net/proxy.php?request=http%3A%2F%2Fimg12.imageshack.us%2Fimg12%2F8603%2Fbomb2.jpg&hash=b2bbb518b8c1dbfd91021b195674036e46771cfb)

Now that he's allowed to use the skill, make it so that he starts the countdown, then can't use the skill again (That was a headache).

Spoiler for Bomb 3:
(https://rmrk.net/proxy.php?request=http%3A%2F%2Fimg9.imageshack.us%2Fimg9%2F3901%2Fbomb3k.jpg&hash=a17099741c7af7e236dc1ec198962495c1761fb6)

Finally, rig him to explode! Oh, if you're wondering why I set the variable to 100, it's because I don't want him randomly exploding in the heat of battle.

Spoiler for Bomb 4:
(https://rmrk.net/proxy.php?request=http%3A%2F%2Fimg26.imageshack.us%2Fimg26%2F5615%2Fbomb4.jpg&hash=07d3e360a11a1eea8b421a2ed3dccff0aba42b63)

There you have it. Only problem is that the bomb will take one more turn before going down, I'll look into that. Oh yeah, I forgot about the bomb skill, my bad. Ok, make yourself a switch skill (I called mine "Warning!" because it shows up no matter what, might as well make it relevant), and have it turn on your first bomb switch.

Spoiler for The skill:
(https://rmrk.net/proxy.php?request=http%3A%2F%2Fimg25.imageshack.us%2Fimg25%2F1219%2Fbombskill1.jpg&hash=ca22cab830700adf83a861bff8b4c029db39cdd9)

Ok, this here's the real last step. Make your second switch a condition to use the skill on the Monsters tab

Spoiler for The skill: Revisited:
(https://rmrk.net/proxy.php?request=http%3A%2F%2Fimg6.imageshack.us%2Fimg6%2F6623%2Fbombskill2.jpg&hash=4c4f34acd5dca949d564039600c8385592d16110)

There you have it, way too much work for something that should be pretty simple. Just watch, as soon as I post this I'll find some easy way to do it. Oh well, use it if you want.