Posts: 27
Threads: 3
Joined: Mar 2022
10-28-2024, 10:29 AM
(This post was last modified: 10-28-2024, 10:46 AM by Tepe.)
Hi, I'm starting this topic to solve the Mr. Mo script integrity error in version 5.5 of Immense Events by Der Wulfman.
Maybe you have some ideas or a solution to the problem of not being able to attack huge events with the Mr. Mo script?
I'm attaching a package with scripts for your reference.
Mr_Mo_ABS 5.5
Edit 1:
Immense event can be attacked by skills but not by meele, arrows and bullets.
Posts: 11,243
Threads: 650
Joined: May 2009
I will get to it when I can. I am nit at my PC where I do all my RMXP work right now, and won't expect to until the Heater repair men have left . My house is very .. VERY... chilly right now *BRRRR*
Ya know, ya haven't added an avatar to your account. I just had to don my 'cowl' for Halloween.
Up is down, left is right and sideways is straight ahead. - Cord "Circle of Iron", 1978 (written by Bruce Lee and James Coburn... really...)
Above are clickable links
Posts: 27
Threads: 3
Joined: Mar 2022
Okay! I'm waiting for good news. :D Maybe in some while i will solve this problem but will see what can I do.
Posts: 11,243
Threads: 650
Joined: May 2009
10-29-2024, 04:57 AM
(This post was last modified: 10-29-2024, 04:58 AM by DerVVulfman.)
Analysis performed. Two areas to confront. Should work with the actual MrMo ABS 4.5 as well.
Funny. Whoever doctored this system neglected to change the date. It still has MrMo's 4.5 date of 01/04/06.
INCIDENTALLY, it is using a variation of my PERSONALITY comment option. The staying at a distance and run if dying was from my MrMo Addon #3: Cassandra script. (here) ... which I also included two FIXES that may have been overlooked by whomever did this.
I will have to work on it tomorrow, sometime after a repair crew is done with the furnace replacement.
Up is down, left is right and sideways is straight ahead. - Cord "Circle of Iron", 1978 (written by Bruce Lee and James Coburn... really...)
Above are clickable links
Posts: 11,243
Threads: 650
Joined: May 2009
There is a third section that is within both MrMo's ABS v4.5 circa 2006, and the edition supplied that needs to be touched upon. It is a section handling ballistic weapon hits. Unfortunately, there are some differences between the two and I am loathe to have two separate scripts... so I will put in an auto-detect feature so it knows if it is dealing with 4.5 or this.
BUT, for melee combat:
2024-10-29 18-51-36_x264_Segment_0_x264.mp4 (Size: 714.89 KB / Downloads: 2)
Oh, I wish I had a generic "Play the MP4" bbcode (yet).
I reduced the framerate of the video to 15fps because I didn't figure I needed it for this. However, the video shows a DUMMY enemy target being hit from all sides and based upon the enemy's SIZE. I set the enemy to be 3tiles wide and 2 tiles tall regardless of it facing vertically or horizontally. :)
And melee combat works.
Ballistics is next.
Up is down, left is right and sideways is straight ahead. - Cord "Circle of Iron", 1978 (written by Bruce Lee and James Coburn... really...)
Above are clickable links
Posts: 11,243
Threads: 650
Joined: May 2009
Here it is... basic instructions.
Code: #==============================================================================
# ** MrMo's Immense Events Patch
#------------------------------------------------------------------------------
# by DerVVulfman
# version 1.0
# 10-30-2024
# RGSS / RPGMaker XP
#
#==============================================================================
#
# INSTALLATION:
#
# The Immense Events script must be below MrMo's ABS.
# This patch goes below both.
# Par-tay!
#
#------------------------------------------------------------------------------
#
# USAGE:
#
# Apply the 'size' command used by Immense Events to the 'first page' in any
# enemy event. The size is only defined once for any event and won't reset.
# Using the 'size' command multiple times for an event changing its graphics
# will not function.
#
#------------------------------------------------------------------------------
#==============================================================================
# ** MrMo_ABS
#------------------------------------------------------------------------------
# This class deals with the Action Battle System and controls all Player,
# Enemy and Companion Actions on the map.
#==============================================================================
class MrMo_ABS
#--------------------------------------------------------------------------
# * In Direction?(source, target) - Near Fantastica
# source : source of search (object performing test)
# target : target of search (object being searched)
#--------------------------------------------------------------------------
def in_direction?(source, target)
#
# Obtain size differences
change = get_size(target)
o_ch_x, o_ch_y = change[0], change[1]
#
# Get facing direction of seearch source
dir = source.direction
#
# Cycle through object/target x coordinates
for x in (target.x - o_ch_x)..(target.x + o_ch_x)
# Return with success based on diretion and coordinates
return true if dir == 2 and source.y <= target.y and source.x == x
return true if dir == 8 and source.y >= target.y and source.x == x
end
#
# Cycle through object/target y coordinates
for y in (target.y - o_ch_y)..(target.y)
# Return with success based on diretion and coordinates
return true if dir == 4 and source.x >= target.x and source.y == y
return true if dir == 6 and source.x <= target.x and source.y == y
end
#
# Return failed
return false
#
end
#--------------------------------------------------------------------------
# * In Range?(Element, Object, Range) - Near Fantastica
# source : source of search (object performing test)
# target : target of search (object being searched)
# range : range distance in tiles
#--------------------------------------------------------------------------
def in_range?(source, target, range)
#
# Get differences
change = get_size(source)
s_ch_x, s_ch_y = change[0], change[1]
change = get_size(target)
t_ch_x, t_ch_y = change[0], change[1]
#
# Loop through source and target coordinates with tile extensions
for xs in (source.x - s_ch_x)..(source.x + s_ch_x)
for xt in (target.x - t_ch_x)..(target.x + t_ch_x)
for ys in (source.y - s_ch_y)..(source.y)
for yt in (target.y - t_ch_y)..(target.y)
#
# Confirm if updated coordinate are within the range test
return true if in_range_numeric?(xs, ys, xt, yt, range)
#
end
end
end
end
#
# Exit method with no confirmation
return false
#
end
#--------------------------------------------------------------------------
# * In Range based on given values (variant of Near Fantastica's)
# s_x : source object's x-coordinates
# s_y : source object's y-coordinates
# t_x : target object's x-coordinates
# t_y : target object's y-coordinates
# range : range distance in tiles
#--------------------------------------------------------------------------
def in_range_numeric?(s_x, s_y, t_x, t_y, range)
#
x = (s_x - t_x) * (s_x - t_x)
y = (s_y - t_y) * (s_y - t_y)
r = x + y
return true if r <= (range * range)
return false
#
end
#--------------------------------------------------------------------------
# * Obtain extending tile quantity (size) based on facing direction
# t : target object character
#--------------------------------------------------------------------------
def get_size(t)
#
# Get facing direction of target
d = t.direction
#
# Set the size variables depending on the direction
t_x = ((d == 2 or d == 8) ? t.vertical_size_x : t.horizontal_size_x).to_i
t_y = ((d == 2 or d == 8) ? t.vertical_size_y : t.horizontal_size_y).to_i
#
# Work out the number of tiles either side of the event
t_x /= 2
t_y -= 1
#
# Return array with horizontal and vertical tile extensions
return [t_x, t_y]
#
end
end
#==============================================================================
# ** Game_Ranged_Weapon
#------------------------------------------------------------------------------
# This class handles ranged missiles that deliver damage based on the weapon
# currently equipped.
#==============================================================================
class Game_Ranged_Weapon < Range_Base
#--------------------------------------------------------------------------
# * Check Event Trigger Touch(x,y)
#--------------------------------------------------------------------------
def check_event_trigger_touch(x, y)
#
# If using non-official update to 4.5
faux = (Object.const_defined?(:DEFEND_DAMAGE_PERCENT))
#
# Exit if the stop flag is set
return if @stop
#
if faux
# Exit and set stop flag if neither an enemy nor player
if $ABS.enemies[@parent.id].nil? and !@parent.is_a?(Game_Player)
return @stop = true
end
end
#
# Hit the player if missile in range of the player
hit_player if in_range_ballistic?(x, y, $game_player, 1)
#
# Cycle through all map events
for event in $game_map.events.values
#
# Skip if not an enemy, or missile not in range to strike
next if $ABS.enemies[event.id].nil?
next unless in_range_ballistic?(x, y, event, 1)
#
# Acquire hit condition tests
if faux
# Adding unofficial friendly-fire option
hate = true
unless $ABS.enemies[@parent.id].nil?
e_id = $ABS.enemies[event.id].enemy_id
hate = $ABS.enemies[@parent.id].hate_group.include?(e_id)
end
end
c1 = event.character_name == ""
c2 = ($ABS.enemies[event.id] != nil and $ABS.enemies[event.id].dead?)
c3 = event.erased
c4 = @parent.is_a?(Game_Event) and !hate
#
# Move if hit condition not met, or perform hit
if (c1 or c2 or c3) && !faux
force_movement
elsif (c1 or c2 or c3 or c4) && faux
force_movement
else
hit_event(event.id)
end
#
end
end
#--------------------------------------------------------------------------
# * In Range?(Element, Object, Range) - Near Fantastica
# source : source of search (object performing test)
# target : target of search (object being searched)
# range : range distance in tiles
#--------------------------------------------------------------------------
def in_range_ballistic?(x, y, target, range)
#
# Get differences
change = $ABS.get_size(target)
t_ch_x, t_ch_y = change[0], change[1]
#
# Loop through source and target coordinates with tile extensions
for xt in (target.x - t_ch_x)..(target.x + t_ch_x)
for yt in (target.y - t_ch_y)..(target.y)
#
# Confirm if updated coordinate are within the range test
return true if $ABS.in_range_numeric?(x, y, xt, yt, range)
#
end
end
#
# Exit method with no confirmation
return false
#
end
end
I had to perform an auto-detect switch (looking for "DEFEND_DAMAGE_PERCENT" which is not part of 4.5) because the unofficial version's ballistic's enemy hit detect system adds a 4th condition.
This will eventually be placed within the Scripts Database with better written instructions... and credit to Tepe for the request.
Up is down, left is right and sideways is straight ahead. - Cord "Circle of Iron", 1978 (written by Bruce Lee and James Coburn... really...)
Above are clickable links
Posts: 27
Threads: 3
Joined: Mar 2022
10-30-2024, 08:36 PM
(This post was last modified: 10-30-2024, 09:17 PM by Tepe.)
Okay I check this. :D
Melee attack, works great! But with ballistic is still problem because when NPC fire to enemy then enemy don't take damage and ... when character equip ranged weapon then fire to self. :D
Posts: 4,615
Threads: 548
Joined: Dec 2009
10-30-2024, 09:28 PM
(This post was last modified: 10-30-2024, 09:29 PM by kyonides.)
(10-30-2024, 08:36 PM)Tepe Wrote: ...when NPC fire to enemy then enemy don't take damage and ... when character equip ranged weapon then fire to self. :D
That's what we'd call a misfire or friendly fire depending on the circumstances.
Battle systems should also include that feature, now that I think about it.
"For God has not destined us for wrath, but for obtaining salvation through our Lord Jesus Christ," 1 Thessalonians 5:9
Maranatha!
The Internet might be either your friend or enemy. It just depends on whether or not she has a bad hair day.
My Original Stories (available in English and Spanish)
List of Compiled Binary Executables I have published...
HiddenChest & Roole
Give me a free copy of your completed game if you include at least 3 of my scripts!
Just some scripts I've already published on the board...
KyoGemBoost XP VX & ACE, RandomEnkounters XP, KSkillShop XP, Kolloseum States XP, KEvents XP, KScenario XP & Gosu, KyoPrizeShop XP Mangostan, Kuests XP, KyoDiscounts XP VX, ACE & MV, KChest XP VX & ACE 2016, KTelePort XP, KSkillMax XP & VX & ACE, Gem Roulette XP VX & VX Ace, KRespawnPoint XP, VX & VX Ace, GiveAway XP VX & ACE, Klearance XP VX & ACE, KUnits XP VX, ACE & Gosu 2017, KLevel XP, KRumors XP & ACE, KMonsterPals XP VX & ACE, KStatsRefill XP VX & ACE, KLotto XP VX & ACE, KItemDesc XP & VX, KPocket XP & VX, OpenChest XP VX & ACE
Posts: 27
Threads: 3
Joined: Mar 2022
10-30-2024, 10:03 PM
(This post was last modified: 10-30-2024, 11:17 PM by Tepe.)
Ok i solved one problem.
Line 170:
Code: hit_player if in_range_ballistic?(x, y, $game_player, 1)
Change on:
Code: hit_player if in_range_ballistic?(x, y, $game_player, 1) && @parent != $game_player
Second problem is still to fix.
- Event's insensitivity to the shot.
Posts: 11,243
Threads: 650
Joined: May 2009
10-31-2024, 01:45 AM
(This post was last modified: 10-31-2024, 02:03 AM by DerVVulfman.)
I chose to attack two birds with one stone.
Code: #==============================================================================
# ** MrMo's Immense Events Patch
#------------------------------------------------------------------------------
# by DerVVulfman
# version 1.0
# 10-30-2024
# RGSS / RPGMaker XP
#
#==============================================================================
#
# INSTALLATION:
#
# The Immense Events script must be below MrMo's ABS.
# This patch goes below both.
# Par-tay!
#
#------------------------------------------------------------------------------
#
# USAGE:
#
# Apply the 'size' command used by Immense Events to the 'first page' in any
# enemy event. The size is only defined once for any event and won't reset.
# Using the 'size' command multiple times for an event changing its graphics
# will not function.
#
#------------------------------------------------------------------------------
#==============================================================================
# ** MrMo_ABS
#------------------------------------------------------------------------------
# This class deals with the Action Battle System and controls all Player,
# Enemy and Companion Actions on the map.
#==============================================================================
class MrMo_ABS
#--------------------------------------------------------------------------
# * In Direction?(source, target) - Near Fantastica
# source : source of search (object performing test)
# target : target of search (object being searched)
#--------------------------------------------------------------------------
def in_direction?(source, target)
#
# Obtain size differences
change = get_size(target)
o_ch_x, o_ch_y = change[0], change[1]
#
# Get facing direction of seearch source
dir = source.direction
#
# Cycle through object/target x coordinates
for x in (target.x - o_ch_x)..(target.x + o_ch_x)
# Return with success based on diretion and coordinates
return true if dir == 2 and source.y <= target.y and source.x == x
return true if dir == 8 and source.y >= target.y and source.x == x
end
#
# Cycle through object/target y coordinates
for y in (target.y - o_ch_y)..(target.y)
# Return with success based on diretion and coordinates
return true if dir == 4 and source.x >= target.x and source.y == y
return true if dir == 6 and source.x <= target.x and source.y == y
end
#
# Return failed
return false
#
end
#--------------------------------------------------------------------------
# * In Range?(Element, Object, Range) - Near Fantastica
# source : source of search (object performing test)
# target : target of search (object being searched)
# range : range distance in tiles
#--------------------------------------------------------------------------
def in_range?(source, target, range)
#
# Get differences
change = get_size(source)
s_ch_x, s_ch_y = change[0], change[1]
change = get_size(target)
t_ch_x, t_ch_y = change[0], change[1]
#
# Loop through source and target coordinates with tile extensions
for xs in (source.x - s_ch_x)..(source.x + s_ch_x)
for xt in (target.x - t_ch_x)..(target.x + t_ch_x)
for ys in (source.y - s_ch_y)..(source.y)
for yt in (target.y - t_ch_y)..(target.y)
#
# Confirm if updated coordinate are within the range test
return true if in_range_numeric?(xs, ys, xt, yt, range)
#
end
end
end
end
#
# Exit method with no confirmation
return false
#
end
#--------------------------------------------------------------------------
# * In Range based on given values (variant of Near Fantastica's)
# s_x : source object's x-coordinates
# s_y : source object's y-coordinates
# t_x : target object's x-coordinates
# t_y : target object's y-coordinates
# range : range distance in tiles
#--------------------------------------------------------------------------
def in_range_numeric?(s_x, s_y, t_x, t_y, range)
#
x = (s_x - t_x) * (s_x - t_x)
y = (s_y - t_y) * (s_y - t_y)
r = x + y
return true if r <= (range * range)
return false
#
end
#--------------------------------------------------------------------------
# * Obtain extending tile quantity (size) based on facing direction
# t : target object character
#--------------------------------------------------------------------------
def get_size(t)
#
# Get facing direction of target
d = t.direction
#
# Set the size variables depending on the direction
t_x = ((d == 2 or d == 8) ? t.vertical_size_x : t.horizontal_size_x).to_i
t_y = ((d == 2 or d == 8) ? t.vertical_size_y : t.horizontal_size_y).to_i
#
# Work out the number of tiles either side of the event
t_x /= 2
t_y -= 1
#
# Return array with horizontal and vertical tile extensions
return [t_x, t_y]
#
end
end
#==============================================================================
# ** Game_Ranged_Weapon
#------------------------------------------------------------------------------
# This class handles ranged missiles that deliver damage based on the weapon
# currently equipped.
#==============================================================================
class Game_Ranged_Weapon < Range_Base
#--------------------------------------------------------------------------
# * Check Event Trigger Touch(x,y)
#--------------------------------------------------------------------------
def check_event_trigger_touch(x, y)
#
# If using non-official update to 4.5
faux = (Object.const_defined?(:DEFEND_DAMAGE_PERCENT))
#
# Exit if the stop flag is set
return if @stop
#
if faux
# Exit and set stop flag if neither an enemy nor player
if $ABS.enemies[@parent.id].nil? and !@parent.is_a?(Game_Player)
return @stop = true
end
end
#
# Hit the player if missile in range of the player
hit_player if in_range_ballistic?(x, y, $game_player, 1)
#
# Cycle through all map events
for event in $game_map.events.values
#
# Skip if not an enemy, or missile not in range to strike
next if $ABS.enemies[event.id].nil?
next unless in_range_ballistic?(x, y, event, 1)
#
# Acquire hit condition tests
if faux
# Adding unofficial friendly-fire option
hate = true
unless $ABS.enemies[@parent.id].nil?
e_id = $ABS.enemies[event.id].enemy_id
hate = $ABS.enemies[@parent.id].hate_group.include?(e_id)
end
end
c1 = event.character_name == ""
c2 = ($ABS.enemies[event.id] != nil and $ABS.enemies[event.id].dead?)
c3 = event.erased
c4 = @parent.is_a?(Game_Event) and !hate
#
# Move if hit condition not met, or perform hit
if (c1 or c2 or c3) && !faux
force_movement
elsif (c1 or c2 or c3 or c4) && faux
force_movement
else
hit_event(event.id)
end
#
end
end
#--------------------------------------------------------------------------
# * In Range?(Element, Object, Range) - Near Fantastica
# source : source of search (object performing test)
# target : target of search (object being searched)
# range : range distance in tiles
#--------------------------------------------------------------------------
def in_range_ballistic?(x, y, target, range)
#
# Exit false if ballistic strikes parent/attacker
return false if @parent == target
#
# Get differences
change = $ABS.get_size(target)
t_ch_x, t_ch_y = change[0], change[1]
#
# Loop through source and target coordinates with tile extensions
for xt in (target.x - t_ch_x)..(target.x + t_ch_x)
for yt in (target.y - t_ch_y)..(target.y)
#
# Confirm if updated coordinate are within the range test
return true if $ABS.in_range_numeric?(x, y, xt, yt, range)
#
end
end
#
# Exit method with no confirmation
return false
#
end
end
The magic is instead moved into the in_range_ballistic? method.
# range : range distance in tiles
#--------------------------------------------------------------------------
def in_range_ballistic?(x, y, target, range)
#
# Exit false if ballistic strikes parent/attacker
return false if @parent == target
#
# Get differences
change = $ABS.get_size(target)
Similar to yours, it is more broad and decides to check if the parent is the target being passed into the method. If the target happens to be the parent, it will return 'false' indicating that the check is a failure. Thus, it will prevent the player from hitting itself, or prevent enemies from hitting themselves.
It is rather odd that the patch did not require this addition to the in_range_ballistic? method for the official v4.5 from 2006 and this edition you're using somehow does... something I clearly would not have expected.
VIDEO EDIT:
2024-10-30 20-58-19_x264_Segment_0_x264_Segment_0_x264.mp4 (Size: 842.87 KB / Downloads: 2)
<-- Yep, I shot em.
FURTHER EDIT: I'd set the troll guy to a size of 3,3,2,2... to allow for the player to miss if shooting horizontally and behind it... just the bottom two tiles for the whole 60 degree perspective thingamabob. But that's me.
Up is down, left is right and sideways is straight ahead. - Cord "Circle of Iron", 1978 (written by Bruce Lee and James Coburn... really...)
Above are clickable links
|