Bizarre Monkey
I SHALL BE GLORIOUS!
- Xy$
- -0.10
Hello folks. My usual supplier of the codemonkey bizness is MIA and I don't know for how long and I can't keep waiting around. I can't imagine this should be too difficult for anyone who's into coding.
What do I want?
A port of a VX Ace script I had made at my request by Omegas7, into a plugin for MV.
What did this script do?
At base value, it was alike Tsukihime's event collision script for VX Ace, only without the erratic behaviour when moving sprites on a plan that wasn't flatly left or right (Jumps crashed the games, as did moving upper right, lower left, etc.) as well as alleviating the current legal issues, since I requested it for an IGMC entry, which made Tsukihime's scripts off limits, I'm aware his terms have changed now, but this was in mid 2014.
Essentially though, I figured Omegas7 was good enough to make my task a little easier, so I asked for the addition of batch event support. How this worked is that along with regular conditionals like this.
Where that would check event with ID 3 against the location of event with ID 5.
And this would check the player against event with ID 11.
This, a batch collision, would check all events with the comment <Batch 11> against it's argument, in this case 0 (the player.)
With this it made it substantially easier to event big aoe attacks and such as instead of doing all this:
And keeping in mind, that's for only one attack/event tile collision.
I could instead do this.
To add a bit of context, all events in <Batch 5>, which is a player attack that covers two tiles, is being checked against all events with <Batch 23>, which in this case was a boss monster.
But if you look at hectic evented bosses like this:
It looks really difficult to make, and it's really not, and without this script, it'd be no more difficult, just a lot more tedious and frustrating, not to mention an enormous strain on resources in comparison. Also the amount of variables you need to set aside for just this kind of thing is in the hundreds.
So that is what this does, and it's what I want the port to do.
Specifics on what exactly I want.
-I don't need any plugin commands for it.
-I want it to if at all possible, for it to use the same conditional checks as above. It would be a scripted conditional line like those shown.
-Comments that assign batches should only be active in the active event page, so for instance, if I turn an event that typically has batch ID in one page, I may not want it in another page where the attack is turned off. This should be pretty obvious, but it's worth mentioning.
Resources
Here's the original script.
I'd super appreciate this.
What's in this for you?
Outside of my gratitude and credit in the game, you'll also be added to special thanks. You'll also be mentioned along with Omegas7 when people ask me how did I manage all this. You also would be very likely to earn a position in the Corporation of XVI as lead programmer, if you wanted.
I can't pay, sadly. Christmas is coming up and expenses are mounting.
What do I want?
A port of a VX Ace script I had made at my request by Omegas7, into a plugin for MV.
What did this script do?
At base value, it was alike Tsukihime's event collision script for VX Ace, only without the erratic behaviour when moving sprites on a plan that wasn't flatly left or right (Jumps crashed the games, as did moving upper right, lower left, etc.) as well as alleviating the current legal issues, since I requested it for an IGMC entry, which made Tsukihime's scripts off limits, I'm aware his terms have changed now, but this was in mid 2014.
Essentially though, I figured Omegas7 was good enough to make my task a little easier, so I asked for the addition of batch event support. How this worked is that along with regular conditionals like this.
Code:
EventCollision.happens?(3,5)
Code:
EventCollision.happens?(0,11)
Code:
EventCollision.happens?(0,[11])
With this it made it substantially easier to event big aoe attacks and such as instead of doing all this:

And keeping in mind, that's for only one attack/event tile collision.
I could instead do this.

To add a bit of context, all events in <Batch 5>, which is a player attack that covers two tiles, is being checked against all events with <Batch 23>, which in this case was a boss monster.
But if you look at hectic evented bosses like this:
So that is what this does, and it's what I want the port to do.
Specifics on what exactly I want.
-I don't need any plugin commands for it.
-I want it to if at all possible, for it to use the same conditional checks as above. It would be a scripted conditional line like those shown.
-Comments that assign batches should only be active in the active event page, so for instance, if I turn an event that typically has batch ID in one page, I may not want it in another page where the attack is turned off. This should be pretty obvious, but it's worth mentioning.
Resources
Here's the original script.
Code:
# =============================================================================
# * Event collision checker
# Author : J.V.Wong - Omegas7 (admin@omega-dev.net)
# Date : June 16 2014
# Free for commercial use
# =============================================================================
# Determine if two events are colliding (have the same position)
# Also allows you to group several events into a single batch, and then check
# if two batches collide (or if 1 batch collides with an event, or viceversa)
# =============================================================================
# USAGE:
#
# * Check if event number 3 collides with number 5:
#
# EventCollision.happens?(3,5)
#
# * Create a batch of events:
#
# Put a comment in the event page with the following format:
# <batch N>
# N is the batch ID for this event page.
#
# * Check if any event in batch ID 8 collides event number 5:
#
# EventCollision.happens?([8],5)
#
# * Check if any event in batch ID 2 collides with any in batch ID 9:
#
# EventCollision.happens?([2],[9])
#
# * The player is considered as event number 0.
# =============================================================================
module EventCollision
class << self
# Get all events that belong to a given batch ID
def events_for_batch_id(id)
result = []
$game_map.events.each_value do |e|
next unless e.list
e.list.each do |c|
if (c.code == 108)
c.parameters[0][/<batch (\d*)>/]
if ($1.to_i == id)
result << e
break
end
end
end
end
result
end
# Check for collision
def happens?(first, second)
events = $game_map.events
a = (first.is_a?(Array) ? events_for_batch_id(first[0]) :
[first == 0 ? $game_player : events[first]])
b = (second.is_a?(Array) ? events_for_batch_id(second[0]) :
[second == 0 ? $game_player : events[second]])
a.each do |eventA|
b.each do |eventB|
return true if (eventA.x == eventB.x && eventA.y == eventB.y)
end
end
return false
end
end
end
What's in this for you?
Outside of my gratitude and credit in the game, you'll also be added to special thanks. You'll also be mentioned along with Omegas7 when people ask me how did I manage all this. You also would be very likely to earn a position in the Corporation of XVI as lead programmer, if you wanted.
I can't pay, sadly. Christmas is coming up and expenses are mounting.
Last edited: