- Pokémon Essentials Version
- v18.1 ➖
Gen 2 Style Dark Maps
Here is a short tutorial on how you can get Gen 2 Style Dark Maps really easily. It has the following advantages:
Only delete code if you are sure, that you won't need it anymore!
Instructions
1) In PField_FieldMoves:
Replace the HiddenMoveHandler::UseMove for Flash with the following
2) In PField_Field:
Delete or comment out all of the following code:
3) (Optional) In PField_Visuals:
Delete or comment out the whole class class DarknessSprite < SpriteWrapper
4) In Tilemap_XP:
Add the following methods at the very end, right before the last end
5) Still in Tilemap_XP:
Right after def refresh(autotiles=false) add updateColor
Tipps:
Images:
Player behind a rock, partially covered
Player normally visibile
Here is a short tutorial on how you can get Gen 2 Style Dark Maps really easily. It has the following advantages:
- All tiles are black, but remain their priority, so the player will notice if they are behind something
- The darkness level can be adjusted or be every other color
Only delete code if you are sure, that you won't need it anymore!
Instructions
1) In PField_FieldMoves:
Replace the HiddenMoveHandler::UseMove for Flash with the following
Ruby:
HiddenMoveHandlers::UseMove.add(:FLASH,proc { |move,pokemon|
next false if $PokemonGlobal.flashUsed
if !pbHiddenMoveAnimation(pokemon)
pbMessage(_INTL("{1} used {2}!",pokemon.name,PBMoves.getName(move)))
end
$PokemonGlobal.flashUsed = true
next true
})
2) In PField_Field:
Delete or comment out all of the following code:
Ruby:
# Display darkness circle on dark maps
darkmap = pbGetMetadata($game_map.map_id,MetadataDarkMap)
if darkmap
if $PokemonGlobal.flashUsed
$PokemonTemp.darknessSprite = DarknessSprite.new
scene.spriteset.addUserSprite($PokemonTemp.darknessSprite)
darkness = $PokemonTemp.darknessSprite
darkness.radius = darkness.radiusMax
else
$PokemonTemp.darknessSprite = DarknessSprite.new
scene.spriteset.addUserSprite($PokemonTemp.darknessSprite)
end
elsif !darkmap
$PokemonGlobal.flashUsed = false
if $PokemonTemp.darknessSprite
$PokemonTemp.darknessSprite.dispose
$PokemonTemp.darknessSprite = nil
end
end
3) (Optional) In PField_Visuals:
Delete or comment out the whole class class DarknessSprite < SpriteWrapper
4) In Tilemap_XP:
Add the following methods at the very end, right before the last end
Ruby:
def isDarkMap
return pbGetMetadata($game_map.map_id,MetadataDarkMap)
end
def isDark
return isDarkMap && !$PokemonGlobal.flashUsed
end
def updateColor
@color = Color.new(0,0,0,0)
@color = Color.new(0,0,0,255) if isDark
end
5) Still in Tilemap_XP:
Right after def refresh(autotiles=false) add updateColor
Tipps:
- You can change the color defintion at @color = Color.new(0,0,0,255) if isDark in defUpdateColor to get a different color a less black screen
- To make the entrances visible, place an event that has a light sprite
Images:
Player behind a rock, partially covered
Player normally visibile
- Credits
- Not required