public

Rpg Maker Developers Group

Simple enough for a child, powerful enough for a developer

2 Followers
Preserved forum archive. This topic stores the original first post and locally mirrored RPG Maker Web attachments when available. It is posted by the BMMPlay archive account, not by the original creator.

Original Source

  • Original title: KMustDie VX
  • Original author: kyonides
  • Original date: September 3, 2025
  • Source thread: https://forums.rpgmakerweb.com/threads/kmustdie-vx.179916/
  • Source forum path: Game Development Engines > Ruby Game System (RGSS) Scripts > RGSS2 Scripts (RMVX)

Summary

KMustDie VX by Kyonides​ Introduction Imagine a game world where certain battles won't force you to kill ALL of the enemy troops on screen.

Archived First Post

KMustDie VX

by Kyonides

Introduction

Imagine a game world where certain battles won't force you to kill ALL of the enemy troops on screen.
Well, you can stop doing that right away because now you can make your battle dream come true!
Just set which troops are mandatory to kill via a script call and that's it!
You won't have to depend on a tough negotiator to deal with tyrants looking for free lands up for the grabs.

Script Call - Use natural index values like 1 upto 8 here:
Ruby:
$game_troop.must_die(EnemyIndex1, etc.)

The Script

Ruby:
# * KMustDie VX * #
#   Scripter : Kyonides
#   v1.0.1 - 2025-09-06

# This scriptlet allows you to set a given number of enemies that must die in
# battle before the player can be proclaimed as the victor there.

# * Script Call * #
# - Enter 1+ Enemy Indexes to set which enemies should die before battle ends.
#   You should use number 1 as the first position available there.
# $game_troop.must_die(EnemyIndex1, etc.)

class Game_Troop
  alias :kyon_must_die_gm_trp_init :initialize
  attr_reader :hunt_targets
  def initialize
    kyon_must_die_gm_trp_init
    @hunt_targets = []
  end

  def dead_now
    @enemies.select {|e| e.dead? }
  end

  def hunt_targets_dead?
    targets = dead_now.map {|e| e.index + 1 }
    @hunt_targets.any? and targets.sort == @hunt_targets
  end

  def must_die(*targets)
    @hunt_targets = targets.sort
  end
end

class Scene_Battle
  alias :kyon_must_die_scn_btl_judge :judge_win_loss
  alias :kyon_must_die_scn_btl_blt_end :battle_end
  def judge_win_loss
    if $game_troop.hunt_targets_dead?
      process_victory
      return true
    else
      kyon_must_die_scn_btl_judge
    end
  end

  def battle_end(result)
    $game_troop.hunt_targets.clear
    kyon_must_die_scn_btl_blt_end(result)
  end
end

DOWNLOAD DEMO!

Terms & Conditions

Free as in beer for non-commercial games.
Include my nickname in your game credits.
That's it!

Downloads / Referenced Files

Log in to download

Log in, then follow the RPG Maker Developers Group to see these download links.

Log in to download

License / Terms Note

Free as in beer for non-commercial games. Include my nickname in your game credits. That's it!

Creator Claims / Removal

If you are the original creator and want this listing reassigned, edited, or removed, join BMMPlay and contact the moderators with proof that matches the original RPG Maker Web profile, linked GitHub, itch.io page, or another public creator identity.

#039#rgss2#script-archive

Replies (0)

No replies yet.

0 replies 1 view

Log in to reply.

User Avatar