I'm working on a modification to the RMXP default battle system. As part of my modification, I've been trying to detach the basic attack command from its normal behavior, so that I can have more control over what it does. My idea was to use a cloned copy of the battler3 script with my mods for calculating damage in it, then pass those via variable to a common event (the first one in the common events tab) that would carry out the 'show animation' and 'deal damage' portions of the effect.
I've gotten this to work loosely; using an actual attack does nothing, and setting the common event to trigger at the beginning of a turn shows that the variables are being set, and damage dealt and displayed* properly, but I can't figure out how to call the common event from inside the script itself - until I can figure out how to do that, my system won't work right.
I only loosely (if that) have any clue how what I want to do is supposed to work. Below is the code for my version of this attempt. (I've set the variables I wanted earlier, and the 'official' attack action has been commented out.)
Anyone have any suggestions for what I need to do to fix this? And if you do, would you please share them with me?
*I need to extend my thanks to Jaberwoky on these forums, who handled my questions regarding that.
I've gotten this to work loosely; using an actual attack does nothing, and setting the common event to trigger at the beginning of a turn shows that the variables are being set, and damage dealt and displayed* properly, but I can't figure out how to call the common event from inside the script itself - until I can figure out how to do that, my system won't work right.
I only loosely (if that) have any clue how what I want to do is supposed to work. Below is the code for my version of this attempt. (I've set the variables I wanted earlier, and the 'official' attack action has been commented out.)
Code:
#-------------------------------------------------------------------------------
#Begin: Place Alternate (Common Event Call) Battle Damage effects
#-------------------------------------------------------------------------------
# Get common event
common_event = $data_common_events[0]
# If common event is valid
if common_event != nil
# Make child interpreter
@child_interpreter = Interpreter.new(@depth + 1)
@child_interpreter.setup(common_event.list, @event_id)
end
#-------------------------------------------------------------------------------
#End: Place Alternate (Common Event Call) Battle Damage effects
#-------------------------------------------------------------------------------
Anyone have any suggestions for what I need to do to fix this? And if you do, would you please share them with me?
*I need to extend my thanks to Jaberwoky on these forums, who handled my questions regarding that.