5 hours ago
(This post was last modified: 2 hours ago by DerVVulfman.
Edit Reason: Relaying 2.1 edition days later.
)
The changes recommended actually do nothing. Allow me to explain.
Within the Game_Character class, the code already reads:
By the fact that it first must check that the $game_map.fow_dynamic flag must be on, the map must have fog-of-war engaged. As such, the inclusion of your if $game_map.fow condition is actually unnecessary.
Insofar as the changes to GAME_PLAYER, combining the $game_map.fow and @jump_count == 0 upon a single line within the update_jump method offers no actual change except cosmetic.
For the update_move method within GAME_PLAYER, your line that handles $game_map.fow, the X/Y coordinates and the jumping? test does the same as within this version, so it too is only cosmetic.
The inclusion of...
Do recall that before this line, it has the line reading "super". This means that this method inherits from its superclass, the Game_Character class. And within Game_Character's own update_move, this update of the player's position is already handled.
Ergo, these changes would do nothing.
EDIT: I just found out that Wachunga released a version after what had been discussed, minor changes within Game Player to accommodate anyone 'else' adding code to the move and jump methods. An easy update.
Also, stack-error preventative code has been added to Game_Map and Game_Player to what I now have
Within the Game_Character class, the code already reads:
def update_move
#
# Perform the original method
wachunga_fow_gch_update_move
#
# Perform only for dynamic maps (must be FOW)
if $game_map.fow_dynamic
# If character moved and not game player
if (@x != @last_fow_x or @y != @last_fow_y) and self != $game_player
# Check if character entered or exited player's visual range
$scene.spriteset.update_event_transparency(self)
end
end
#
# Record last position
@last_fow_x = @x
@last_fow_y = @y
#
end
Minor note: I used @last_fow_x and @last_fow_x, an alteration if another Game_Character script uses like variables, these specific for the FOG script alone.#
# Perform the original method
wachunga_fow_gch_update_move
#
# Perform only for dynamic maps (must be FOW)
if $game_map.fow_dynamic
# If character moved and not game player
if (@x != @last_fow_x or @y != @last_fow_y) and self != $game_player
# Check if character entered or exited player's visual range
$scene.spriteset.update_event_transparency(self)
end
end
#
# Record last position
@last_fow_x = @x
@last_fow_y = @y
#
end
By the fact that it first must check that the $game_map.fow_dynamic flag must be on, the map must have fog-of-war engaged. As such, the inclusion of your if $game_map.fow condition is actually unnecessary.
Insofar as the changes to GAME_PLAYER, combining the $game_map.fow and @jump_count == 0 upon a single line within the update_jump method offers no actual change except cosmetic.
For the update_move method within GAME_PLAYER, your line that handles $game_map.fow, the X/Y coordinates and the jumping? test does the same as within this version, so it too is only cosmetic.
The inclusion of...
# Update last recorded FOW position
@last_fow_x, @last_fow_y = @x, @y
... actually means nothing. Its already been taken care of.@last_fow_x, @last_fow_y = @x, @y
Do recall that before this line, it has the line reading "super". This means that this method inherits from its superclass, the Game_Character class. And within Game_Character's own update_move, this update of the player's position is already handled.
Ergo, these changes would do nothing.
EDIT: I just found out that Wachunga released a version after what had been discussed, minor changes within Game Player to accommodate anyone 'else' adding code to the move and jump methods. An easy update.
Also, stack-error preventative code has been added to Game_Map and Game_Player to what I now have