- Joined
- Mar 31, 2016
- Messages
- 12
- Reaction score
- 0
- First Language
- English
- Primarily Uses
In the game that I'm making, I've decided to try to change the basic combat slightly. The main feature of this so far, is something I thought would be relatively simple, namely changing the nature of TP so that any actor or enemy which TP reached max, would die. This is the script I have for it so far:
class Game_BattlerBase
# OVERWRITE
def refresh
state_resist_set.each {|state_id| erase_state(state_id) }
@hp = [[@hp, mhp].min, 0].max
@mp = [[@mp, mmp].min, 0].max
@hp == 0 || @tp == max_tp ? add_state(death_state_id) : remove_state(death_state_id)
end
end
class Game_Battler < Game_BattlerBase
alias tp_knockout_die die
def die
tp = max_tp
tp_knockout_die
end
alias tp_knockout_revive revive
def revive
tp_knockout_revive
tp -= 1 if tp == max_tp
end
end
This seems based on the testing I've done, to work perfectly fine for the player, but once an enemy is killed, I'm given this error:
"Script 'Scene_battle' line 584: NoMethodError occured.
undefined method 'make_targets' for nil:NilClass"
I've tried removing every other custom script I have installed from the game, with only one exception. Which is this "TP Damage Type, by Hime" which can be found here: http://himeworks.com/2013/11/tp-damage-type/
The reason I didn't remove this particular script when testing, was just because I needed that script in order to fill up an enemy's TP. However, performing a TP-based attack seemed to work fine, and I've made no modifications to that script. As one would expect, the game only crashes once the enemy seems to reach full TP (after two TP-based attacks that fill half of an enemy's TP being done).
class Game_BattlerBase
# OVERWRITE
def refresh
state_resist_set.each {|state_id| erase_state(state_id) }
@hp = [[@hp, mhp].min, 0].max
@mp = [[@mp, mmp].min, 0].max
@hp == 0 || @tp == max_tp ? add_state(death_state_id) : remove_state(death_state_id)
end
end
class Game_Battler < Game_BattlerBase
alias tp_knockout_die die
def die
tp = max_tp
tp_knockout_die
end
alias tp_knockout_revive revive
def revive
tp_knockout_revive
tp -= 1 if tp == max_tp
end
end
This seems based on the testing I've done, to work perfectly fine for the player, but once an enemy is killed, I'm given this error:
"Script 'Scene_battle' line 584: NoMethodError occured.
undefined method 'make_targets' for nil:NilClass"
I've tried removing every other custom script I have installed from the game, with only one exception. Which is this "TP Damage Type, by Hime" which can be found here: http://himeworks.com/2013/11/tp-damage-type/
The reason I didn't remove this particular script when testing, was just because I needed that script in order to fill up an enemy's TP. However, performing a TP-based attack seemed to work fine, and I've made no modifications to that script. As one would expect, the game only crashes once the enemy seems to reach full TP (after two TP-based attacks that fill half of an enemy's TP being done).
