Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Call common event during the battle end report?

Hey guys, I wanted to make a little system for a game in RPG Maker XP, where when you win a battle the game counts the number of enemies you killed over a certain period of time and will give you bonus xp for higher amounts of kills. The only way I could do this is if I could call a common event during the battle end report but I'm not sure how to do it.

I tried placing $game_temp.common_event_id = [27] in all the scripts that modifies the battle end report but it doesn't seem to be working. Any help would be greatly appreciated. Thanks in advance!
 
Umm...It's easy, you just go to TROOPS > EVENTS and add Conditional branch (all enemies, so you will need to do this many times, the number of enemies): ENEMY: KO inflicted > Call common event. There might be an easier way, but this is one, if you dont like messing in the scripts:)
 
Actually, event-based systems suck. Sure that comes as a surprise to everyone... but yeah.

In Scene_Battle, you should find a method called end_battle or something like that. If I got that horribly wrong, just search for the string "@gold += ", because it's in there. Somewhere in there, add $game_system.enemies_defeated += 1 (and initialize and attribute it in Game_System itself).
Now if you don't want to call battles but enemies, don't place it in end_battle, but whereever enemies are actually defeated. Sorry I can only give rough outlines as on where to go, but you should get the trick, seeing you've already looked into scripts a bit.

@robin: Assuming someone who posts in Script Support not wanting to mess with the scripts makes perfect sense... :huh: That aside, using a common event for handling that because you "don't want to mess with scripts" is like buying a new watch every time the batteries run empty, because you don't want to exchange the batteries.
 
I want to know if its possible to call a common event when the battle ends but before it changes back to the map and how to do it. I honestly don't have the time to try to figure out how to do it with ruby with college and all.
 
This might be a post that will not be considered helpful, but actually is (so if you don't like constructive input, don't read any further).

I gave you pretty much a lighted path to where you have to go to do it. It does involve a bit of work on your side, but I don't really feel bad about that, as it will actually help you to understand what you're doing, and after all, this is Script Support, not Script Request, so I'm going to assume you have an interest in learning.
Even if you don't want to take my way and invest a bit of time to get a well-working system, you can still follow robin's event way, that will function, but be less well performing and integrated.
And if you're seriously say that you can't find the time to invest 2 minutes to do that, then game design is not a hobby for you. Try something short-timed and more daily-life-integrated such as 'daydreaming', 'walking' or 'figure out why a couple of hours of college every day takes up all 24'.
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top