There was once upon a gaming time when certain user was looking for a way to automatize some custom battle loss common event the user needed to mark the last spot where the player's party died. It was supposed to let the player retrieve the EXP the heroes had lost there. This support request led me to create and publish this curious scriptlet here.
Please read the embedded comments to learn how to use it properly. If some portion of the code does not include a comment, then the reason got to be that it has a very self evident name already.
How to Disable an Option
You can disable either the experience lost or the gold lost features by setting the START_LOSE_EXP_PERCENT or the START_LOSE_GOLD_PERCENT constant to 0 (zero).
During gameplay, you would need to use any of these script calls.
EXP
Ruby:
$game_temp.lose_exp_percent = 0
复制代码
GOLD
Ruby:
$game_temp.lose_gold_percent = 0
复制代码
The Script
Ruby:
# * KLastDefeat XP * #
# Scripter : Kyonides
# v1.1.0 - 2025-09-03
# * THIS IS NOT A PLUG & PLAY SCRIPT * #
# This scriptlet allows you to automatically clone a template event that
# will be used to mark the last place where you were killed by mobs.
# The KLastDefeat module includes several CONSTANTS that you should edit to let
# the scriptlet find and clone your template event whenever it is needed.
# By using a script call, you can now retrieve the EXP or the Gold your actors
# had lost there.
# If you don't want the heroes to lose either EXP or gold, set the value of
# the START_LOSE_ constants to 0 and that option will be disabled by default.
# * Script Calls * #
# - Set a custom Lose EXP Percent Before Battle starts
# $game_temp.lose_exp_percent = 25
# - Set a custom Lose Gold Percent Before Battle starts
# $game_temp.lose_gold_percent = 25
# - Let the party retrieve the EXP they had lost on that map.