• Do not use Discord to host any images you post, these links expire quickly! You can learn how to add images to your posts here.
  • Eevee Expo's webhost has been having technical issues since Nov. 20th and you might be unable to connect to our site. Staff are also facing issues connecting, so please send a DM to Cat on-site or through Discord directly for faster service!
Resource icon

Gen 2 Style Dark Maps 1.0.0.0

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:
  • 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
I haven't tested it with every possible scenario, but Flash works just fine.

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:
Expand Collapse Copy
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:
Expand Collapse Copy
# 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:
Expand Collapse Copy
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:
[2021-03-17] 15_32_00.247.png

Player behind a rock, partially covered

[2021-03-17] 15_32_03.447.png

Player normally visibile
Credits
Not required
Author
Hollow_Ego
Views
3,246
First release
Last update

Ratings

0.00 star(s) 0 ratings

More resources from Hollow_Ego

Back
Top