Страница 137 из 147 ПерваяПервая ... 3787127135136137138139 ... ПоследняяПоследняя
Показано с 1,361 по 1,370 из 1470

Тема: Помощь с скриптами (RGSS)

  1. #1361
    Хранитель Аватар для Paranoid
    Информация о пользователе
    Регистрация
    22.12.2014
    Сообщений
    2,776
    Записей в дневнике
    34
    Репутация: 28 Добавить или отнять репутацию

    По умолчанию

    Цитата Сообщение от HopeBree Посмотреть сообщение
    хмм, поэкспериментируем и с автотайлами
    начал конверт с вх, а там ,на сколько знаю, теней таких нет в итоге у меня они отображаются везде D:
    Охохо, вот это поворот.
    Лицензионный VX Ace. Спасибо Петр.
    2 года мукеризма в пустую.

  2. #1362
    Познающий Аватар для DeadElf79
    Информация о пользователе
    Регистрация
    09.08.2013
    Сообщений
    276
    Записей в дневнике
    12
    Репутация: 22 Добавить или отнять репутацию

    По умолчанию

    Subzeroy, за код спасибо, но... Зачем менять отрисовку, когда можно [s]ехать верхом[/s] заменить данные карты? Это проще и быстрее.

    Посмотрел я экспериментами и вычислил, что в $game_map.data тени хранятся на слое под индексом 3 (начиная с 0).

    HopeBree, решение я нашел ^_^
    Вот код, он влияет на карту прямо перед отрисовкой, но карту в редакторе не меняет:
    Код:
    class Scene_Map < Scene_Base
      def create_spriteset
        remove_shadows
        @spriteset = Spriteset_Map.new
      end
      
      def remove_shadows
        width = $game_map.width
        height = $game_map.height
        for x in 0...width
          for y in 0...height
            $game_map.data[x,y,3] = 0
          end
        end
      end
    end
    Последний раз редактировалось DeadElf79; 23.01.2016 в 15:44.

  3. #1363
    Маститый Аватар для HopeBree
    Информация о пользователе
    Регистрация
    27.03.2013
    Сообщений
    1,204
    Записей в дневнике
    6
    Репутация: 38 Добавить или отнять репутацию

    По умолчанию

    спасибо, но тут чутка по другому D:
    прикреплю уже переделанный под асе скрипт
    как я понял, туман войны создается уже поверх самой карты и именно там создаются тени
    твой код удалит тени только с самой карты, но не с тумана
    Спойлер :
    PHP код:
    #==============================================================================
    #    Fog of War
    #    Version: 1.0
    #    Author: modern algebra (rmrk.net)
    #    Date: July 6, 2010
    #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    #  Description:
    #
    #    This script allows you to create "fog of war" on specified maps. This is a
    #   concept familiar to RTS games as it is used to hide the movement of enemy 
    #   units when they are not in range of your own units. This script brings that
    #   concept to RMVX, and allows for two layers: a permanent one that is cleared
    #   forever once a unit explores the area, and a temporary one that is clear 
    #   only for as long as it is within range of a unit. You can use either layer
    #   or both for any given map.
    #
    #    This script also allows for other events (not just the player) to have 
    #   vision, and will hide other events not within direct vision of a unit 
    #   unless you specify that event to show anyway.
    #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    #  Instructions:
    #
    #    Paste this script above Main and below other custom scripts in the Script
    #   Editor.
    #
    #    You can specify a map to use Fog of War in one of three ways:
    #      1) Add it to the FOW_MAPS hash at line 154
    #        Simply add a line between the { and } brackets like this:
    #          map_id => mode,
    #            map_id : the ID of the map you are setting up
    #            mode   : the type of fow you want.
    #              0 => use both the permanent and temporary layers
    #              1 => use only the permanent layer
    #              2 => use only the temporary layer
    #      2) Use the following code in a script command:
    #        show_fow (mode, map_id)
    #             mode   : same as line 31. If excluded, defaults to system value
    #             map_id : the map ID. If excluded, defaults to the current map.
    #      3) Use this code in a comment on the first line of an event page:
    #        \show_fow[mode]
    #             mode   : same as line 31. If excluded, defaults to system value
    #
    #    Any one of those ways will set the fog of war up; you don't need to use 
    #   all three. I included so many options just for greater utility and since 
    #   some ways may be easier depending on the type of game you're making.
    #
    #    You can hide a fog of war in one of two ways:
    #      1) Use the following code in a script command:
    #        hide_fow (map_id)
    #          map id : the Map ID. If excluded, defaults to current map.
    #      2) Use this code in a comment on the first line of an event page:
    #        \hide_fow
    #
    #    You can clear the fog of war entirely using this code in a script command:
    #      clear_fow (map_id, xrange, yrange)
    #        map_id : the ID of the map. If excluded, it defaults to current map
    #        xrange : The x range (a...b) to clear. If excluded, it will clear the
    #          whole width of the map
    #        yrange : the y range (c...d) to clear. If excluded, it will clear the
    #          whole height of the map
    #    Note that unlike hide_fog, this will completely clear the permanent fog 
    #   layer. So, if you were to turn the fog back on, there would be no 
    #   permanent fog layer. If you wanted to retain what was not yet revealed, 
    #   then you should use hide_fog instead.
    #
    #    You can reset the fog of war by using this code in a script command:
    #      reset_fow (map_id, xrange, yrange)
    #        map_id : the ID of the map. If excluded, it defaults to current map
    #        xrange : The x range (a...b) to clear. If excluded, it will reset the
    #          whole width of the map
    #        yrange : the y range (c...d) to clear. If excluded, it will reset the
    #          whole height of the map
    #    This will shroud the entire map, effectively meaning that any progress in
    #   revealing the map before will be entirely erased.
    #
    #    You can give an event vision in either of two ways:
    #      1) Use this code in a comment on the first line of an event page:
    #        \fow_vision[radius, circular?]
    #          radius    : the range within sight. i.e. # squares in each direction
    #            If excluded, defaults to value of FOW_DEFAULT_SIGHT at line 152
    #          circular? : either true or false. If true, the vision range will be
    #            circular. If false, it will be a diamond. If excluded, defaults to 
    #            the value of FOW_CIRCLE_SIGHT at line 153
    #      2) Use the following code in a script command:
    #        set_unit_vision (event_id, radius, circular?)
    #          event_id  : ID of the event you want to change. If 0, sets the 
    #            vision of the current event; if -1, sets the player vision.
    #          radius    : same as at line 71
    #          circular? : same as at line 73
    #      Note that unit vision will reset any time it advances to the next page,
    #     so comments are by far the better way to go.
    #
    #    You can set some events to be visible even when covered by fog of war. 
    #   This is particularly useful if you are using events as an extra layer of 
    #   mapping. To do so, place this comment in the first line of a comment on 
    #   an event page.
    #      \ignore_fow
    #
    #    You can change the autotiles used for fog of war with the code in a script
    #   command:
    #      change_fow_autotile (layer, filename)
    #        layer    : either :permanent or :temporary, and it changes that layer
    #        filename : the new filename
    #    Note that it will not change it for the current map until you leave and
    #   come back, so if doing this, it should be done in the map before you need
    #   it.
    #
    #    Lastly, you can check if a square is visible by using the following code
    #   in a script call of a conditional branch:
    #      square_visible? (x, y)
    #        x, y : coordinates to check.
    #
    #    Note that whereever you do something by comment, it will only apply for 
    #   that page of the event and only when that page is first created.
    #
    #    See the Configurable Region at line 122 for some default configuration
    #   options that you can set. There you can set which autotiles you want to use
    #   to create the fog, as well as the opacity of each layer. In addition, you 
    #   can set up the default values for vision radius and circle function, as 
    #   well as set up which maps have fog of war.
    #==============================================================================
    #    Configurable Region
    #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    #  FOW_PERMANENT_AUTOTILE - the name of the autotile file you want to use for
    #    the permanent layer of the fog of war. The file must be saved in System.
    #  FOW_PERMANENT_OPACITY - the opacity of the permanent layer of the fog of war
    #  FOW_TEMPORARY_AUTOTILE - the name of the autotile file you want to use for
    #    the temporary layer of the fog of war. The file must be saved in System.
    #  FOW_TEMPORARY_OPACITY - the opacity of the temporary layer of the fog of war
    #  FOW_DEFAULT_SIGHT - the default radius of vision for the player. It is also
    #    the default if you set an event to have vision but do not specify radius.
    #  FOW_CIRCLE_SIGHT - the default boolean value for whether player vision 
    #    should be circular. true => circular; false => diamond. It is also the 
    #    default value when setting an event to have vision if left unspecified
    #  FOW_MAPS - one of the ways of specifying a map to have fog of war. It will
    #    apply only once the very first time the player enters a map, and other 
    #    ways of setting fog of war will take priority. To set a map up, just add
    #    a new line between the curly brackets that looks like this:
    #        map_id => mode,
    #          map_id : the ID of the map you are setting up
    #          mode   : the type of fow you want.
    #              0 => use both the permanent and temporary layers
    #              1 => use only the permanent layer
    #              2 => use only the temporary layer
    #    Don't neglect the comma; it's important.
    #==============================================================================

    FOW_PERMANENT_AUTOTILE "FogOfWar2"
    FOW_PERMANENT_OPACITY 255
    FOW_TEMPORARY_AUTOTILE 
    "FogOfWar"
    FOW_TEMPORARY_OPACITY 160
    FOW_DEFAULT_SIGHT 
    3
    FOW_CIRCLE_SIGHT 
    true
    FOW_MAPS 
    = {
      
    => 0,
    }
    FOW_MAPS.default = -1

    #==============================================================================
    # *** Cache
    #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    #  Summary of Changes:
    #    aliased method - self.system
    #==============================================================================

    module Cache
      
    class << self
        
    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        # * Self.system
        #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        
    alias ma_fow_systm_2fk9 system
        def system 
    (filename, *args)
          if 
    filename == "FOW Autotile H78J"
            
    begin
              ma_fow_systm_2fk9
    (filename, *args)
            
    rescue
              
    @cache[filename] = create_default_autotile
            end
          
    else
            
    ma_fow_systm_2fk9(filename, *args)
          
    end
        end
      
    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      # * Create Default Autotile
      #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      
    def create_default_autotile
        autotile 
    Bitmap.new(64,96)
        
    # Create a Default FOW Autotile if the FOW autotile specified doesn't exist
        
    default_autotile = [
          [
    0000000000000000000000000000000000000000000000000000000000000000000646464646464640000000000000000000000],
                [
    000000000000000000000000000000000000000000000000000000000000000006464641281281281281286464646464000000000000000000],
          [
    000000000000064646464000000000000000000000000000064646464640000000000006464646412812819219219219219212812812812864646464000000000000000],
          [
    0000000064646464646412812812864000000000000000000000064646464646412812812864646464000000646464641281281281922552552552552552552551921921921281281281286400000000000000],
          [
    0000006464641281281281281281921921921286400000000000000000006464641281281281281281921921921281281286464646464646464128128128192192255255255255255255255255255255255255255192192192128640000000000000],
          [
    00000641281281281921921921921922552551921286400000000000000000064128128128192192192192192255255255255192192128128128128128128128128192192255255255255255255255255255255255255255255255255255255192128640000000000000],
          [
    0000641281281921922552552552552552552552551921286400000000000000006412812819219225525525525525525525525525525525525519219219219219219225525525525525525525525525525525525525525525525525525525525525525519212864000000000000],
          [
    0000641281921922552552552552552552552552551921286400000000000000006412819219225525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525519212864000000000000],
          [
    0006464128192255255255255255255255255255255192128128640000000000000064641281922552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552551921281286400000000000],
          [
    000641281922552552552552552552552552552552552551921286400000000000000641281922552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552551921286400000000000],
          [
    00064128192255255255255255255255255255255255255192128646400000000000006412819225525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525519212864640000000000],
          [
    0006412819225525525525525525525525525525525525525519212812864640000000000064128192255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255192128128646400000000],
          [
    00646412819225525525525525525525525525525525525525525519219212812864640000000064641281922552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552551921921281286464000000],
          [
    006412819225525525525525525525525525525525525525525525525525519219212812864640000006412819225525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525519219212812864640000],
          [
    00641281922552552552552552552552552552552552552552552552552552552551921921281286464000064128192255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255192192128128646400],
          [
    0064128192255255255255255255255255255255255255255255255255255255255255255192192128640000641281922552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552551921921286400],
          [
    0064128192255255255255255255255255255255255255255255255255255255255255255255192128640000641281922552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552551921286400],
          [
    00641281922552552552552552552552552552552552552552552552552552552552552552552551921286400064128192255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255128646400],
          [
    00641281922552552552552552552552552552552552552552552552552552552552552552552551921286400646412825525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525519212864000],
          [
    064641922552552552552552552552552552552552552552552552552552552552552552552552552551921286406412819225525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525519212864000],
          [
    064128192255255255255255255255255255255255255255255255255255255255255255255255255255192128640641281922552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552551286464000],
          [
    06412819225525525525525525525525525525525525525525525525525525525525525525525525525519212864064128192255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255192128640000],
          [
    064128192255255255255255255255255255255255255255255255255255255255255255255255255255192128646464128255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255192128640000],
          [
    64641922552552552552552552552552552552552552552552552552552552552552552552552552552551921286464128192255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255192128640000],
          [
    641281922552552552552552552552552552552552552552552552552552552552552552552552552552551921286464128192255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255192128640000],
          [
    641281922552551921921921921921921922552552552552552552552552552552552552552552552552551921286464128192255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255192128640000],
          [
    641281921921921281281281281281281281921922552552552552552552552552552552552552552552551921286464128192255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255192128640000],
          [
    641281921281286464646464646412812819219219219225525525525525525525525525525525519212864641281922552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552551286464000],
          [
    641281286464640000064646412812812812819219219219225525525525525525519219212864646412825525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525519212864000],
          [
    06464000000000006464646412812812812819219219219219219219212864006412819225525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525519212864000],
          [
    0000000000000000006464646412812812812812812812812864006464128255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255128646400],
          [
    000000000000000000000064646464646464640000641281922552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552551921286400],
          [
    0641281281922552552552552552552552552552552552552552552552552552552552552552551921286464000641281922552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552551921286400],
          [
    641281922552552552552552552552552552552552552552552552552552552552552552552552551921281281286400646412825525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525512864640],
          [
    1281922552552552552552552552552552552552552552552552552552552552552552552552552552551921921286400064128192255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255192128640],
          [
    128255255255255255255255255255255255255255255255255255255255255255255255255255255255255192128128000641281922552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552551286464],
          [
    192255255255255255255255255255255255255255255255255255255255255255255255255255255255255255192192000646412825525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525519212864],
          [
    25525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525500006412819225525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525519212864],
          [
    25525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525500006412819225525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525519212864],
          [
    25525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525500006412819225525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525519212864],
          [
    25525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525500006412819225525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525519212864],
          [
    2552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552550000641281922552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552551286464],
          [
    255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255000064128192255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255192128640],
          [
    2552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552550006464128255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255192128640],
          [
    25525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525500064128192255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255192128640],
          [
    2552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552550006412819225525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525512864640],
          [
    2552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552550064641282552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552551921286400],
          [
    25525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525500641281922552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552551921286400],
          [
    25525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525500641281922552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552551921286400],
          [
    2552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552550064128192255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255192128640],
          [
    2552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552550064128192255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255192128640],
          [
    2552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552550646419225525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525519212864],
          [
    25525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525506412819225525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525519212864],
          [
    25525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525506412819225525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525519212864],
          [
    25525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525506412819225525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525519212864],
          [
    25525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525506412819225525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525519212864],
          [
    2552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552552550446412819225525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525525519212864],
          [
    2552551921921922552552552552552552552552552552552552552552552552552552552552552552552552552552556006412819219219219219219219225525525525525525525525525525525525525525525525525525525525525525525525525519219219219219219225525525525525525525525525525525525525525525525525525519212864],
          [
    192192128128128192255255255255255255255255255255255255255255255255255255255255255255255255255255300646412812812812812812812819219225525525525525525525525525525525525525525525525525525525525519219212812812812812812812812819219225525525525525525525525525525525525525525525519212864],
          [
    19212864646412819225525525525525525525525525525525525525525525525525525525525525525519219219231026464646464646464128128192192192192255255255255255255255255255255255255255192192128128128646464646464646412812812819219219225525525525525525525525525525525519212864],
          [
    12864016412819225525525525525525525525525525525525525525525525525525525525525525519212812821012000000646464128128128128128192192192255255255255255255255192128128128646464640000006464646412812812819219219219225525525525525525519219212864],
          [
    640006412819225525525525525525525525525525525525525525525525525525525525519219212864640100000000000064646464641281281281281921921921921921281286464646400000000000064646464128128128128192192192192192192192128640],
          [
    0006412819225525525525525525525525525525525525525525525525525525525525525519212864000000000000000000006464646464128128128128128646464000000000000000000064646464128128128128128128128128640],
          [
    006412819219225525525525525525525525525525525525525525525525525525525525525519212864000000000000000000000000646464646464640000000000000000000000000646464646464646400]
        ]
        
    color Color.new(000)
        for 
    i in 0...64
          
    for j in 0...96
            color
    .alpha default_autotile[i][j]
            
    autotile.set_pixel(ijcolor)
          
    end
        end
        
    return autotile
      end
     end
    end

    #==============================================================================
    # ** Game_System
    #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    #  Summary of Changes:
    #    new public variables - fow_perm_autotile; fow_temp_autotile, fow_data
    #    new methods - clear_fog, reset_fog
    #==============================================================================

    class Game_System
      
    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      # * Public Instance Variables
      #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      
    attr_writer :fow_perm_autotile
      attr_writer 
    :fow_temp_autotile
      
    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      # * Lazy Instantiation of the new variables
      #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      
    def fow_perm_autotile
        
    @fow_perm_autotile FOW_PERMANENT_AUTOTILE if !@fow_perm_autotile
        
    return @fow_perm_autotile
      end
      def fow_temp_autotile
        
    @fow_temp_autotile FOW_TEMPORARY_AUTOTILE if !@fow_temp_autotile
        
    return @fow_temp_autotile
      end
      
    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      # * Fog of War Data
      #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      
    def fow_data (map_id $game_map.map_id)
        @
    fow_data = {} if !@fow_data
        fow_reset_data 
    (map_id) if !@fow_data[map_id]
        return @
    fow_data[map_id]
      
    end
      
    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      # * Reset Fow Data
      #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      
    def fow_reset_data (map_id)
        
    map load_data (sprintf("Data/Map%03d.rvdata2"map_id))
        @
    fow_data[map_id] = Table.new(map.widthmap.height3
        
    paint_fog(map_id02816)
        
    paint_fog(map_id12864)
      
    end
      
    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      # * Fow Active
      #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      
    def fow_active (map_id $game_map.map_id)
        @
    fow_active = {} if !@fow_active
        
    if !@fow_active[map_id]
          @
    fow_active[map_id] = FOW_MAPS[map_id] == -? [false0] : [trueFOW_MAPS[map_id]] 
        
    end
        
    return @fow_active[map_id]
      
    end
      
    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      # * Fow Set Active
      #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      
    def fow_set_active (indexvaluemap_id $game_map.map_id)
        @
    fow_active = {} if !@fow_active
        
    @fow_active[map_id] = fow_active (map_id)
        @
    fow_active[map_id][index] = value
      end
      
    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      # * Paint Fog
      #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      
    def paint_fog (map_idlayervaluexrange = -1..0yrange = -1..0)
        
    data fow_data (map_id)
        
    xrange 0...data.xsize if xrange.first 0
        yrange 
    0...data.ysize if yrange.first 0
        
    for x in xrange
          
    for y in yrange
            data
    [xylayer] = value
          end
        end
      end
      
    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      # * Square Visible?
      #    x, y : coordinates of event
      #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      
    def square_visible? (xy)
        return 
    true unless $game_map.fow_active
        
    return fow_data[xy0] == && fow_data[xy1] == 0
      end
    end

    #==============================================================================
    # ** Game_Temp
    #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    #  Summary of Changes:
    #    new instance variables - fow_temp_updatables, fow_perm_updatables
    #==============================================================================

    class Game_Temp
      
    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      # * Public Instance Variables
      #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      
    attr_accessor :fow_temp_updatables
      attr_accessor 
    :fow_perm_updatables
      
    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      # * Object Initialization
      #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      
    alias malgbr_fow_iniz_4tj2 initialize
      def initialize 
    (*args)
        
    malgbr_fow_iniz_4tj2(*args)
        @
    fow_temp_updatables = []
        @
    fow_perm_updatables = []
      
    end
    end

    #==============================================================================
    # ** Game_Map
    #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    #  Summary of Changes:
    #    new instance variable - fow_active, fow_permanent, fow_temporary
    #    aliased method - setup
    #==============================================================================

    class Game_Map
      
    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      # * Public Instance Variables
      #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      
    attr_accessor :fow_active
      attr_accessor 
    :fow_permanent
      attr_accessor 
    :fow_temporary
      
    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      # * Setup
      #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      
    alias malg_fwar_setup_6dx9 setup
      def setup 
    (*args)
        
    malg_fwar_setup_6dx9(*args# Run Original Method
        
    @fow_active $game_system.fow_active[0]
        @
    fow_permanent $game_system.fow_active[1] != 2
        
    @fow_temporary $game_system.fow_active[1] != 1
        $game_system
    .paint_fog(map_id00unless @fow_temporary 
        $game_system
    .paint_fog(map_id10unless @fow_permanent 
      end
    end

    #==============================================================================
    # ** Game_Character
    #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    #  Summary of Changes:
    #    aliased method - update, initialize
    #    new methods - create_vision_field, update_fow
    #==============================================================================

    class Game_Character
      
    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      # * Update
      #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      
    alias mornal_fogwr_udt_3pk9 update
      def update 
    (*args)
        
    mornal_fogwr_udt_3pk9(*args# Run Original Method
        
    update_fow if @vision_field && $game_map.fow_active
      end
      
    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      # * Update Fog of War
      #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      
    def update_fow
        
    if @fow_origin != [@x, @y]
          
    diff_x = @- @fow_origin[0]
          
    diff_y = @- @fow_origin[1]
          @
    fow_origin = [@x, @y]
          
    new_field = []
          @
    vision_field.each { |xynew_field.push ([diff_xdiff_y]) }
          
    $game_temp.fow_temp_updatables |= @vision_field new_field
          
    @vision_field.clear
          
    @vision_field new_field
        end
        $game_temp
    .fow_perm_updatables |= @vision_field
      end
      
    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      # * Create Vision Field
      #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      
    def create_vision_field (radius FOW_DEFAULT_SIGHTcircle FOW_CIRCLE_SIGHT)
        
    delete_vision_field
        
    @fow_origin = [@x, @y]
        @
    vision_field = []
        return [] if 
    radius == 0
        radius 
    radius.abs if radius 0
        
    if circle
          
    for i in -1*radius..radius
            
    for j in -1*radius..radius
              
    @vision_field.push([@i, @j]) if (i**j**2) <= radius**1
            end
          end
        
    else
          @
    vision_field.push([@x, @radius], [@x, @radius], [@radius, @y], [@radius, @y])
          for 
    i in -1*(radius 1)..(radius 1)
            for 
    j in -1*(radius 1)..(radius 1)
              @
    vision_field.push([@i, @j]) if (i.abs j.abs) <= radius
            end
          end
        end
        $game_temp
    .fow_perm_updatables |= @vision_field unless !$game_map.fow_active
        
    return @vision_field
      end
      
    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      # * Delete Vision Field
      #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      
    def delete_vision_field
        
    return unless @vision_field
        $game_temp
    .fow_temp_updatables |= @vision_field
        
    @vision_field.clear
        
    @vision_field nil
      end
    end

    #==============================================================================
    # ** Game_Event
    #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    #  Summary of Changes:
    #    aliased methods - setup, transparent
    #==============================================================================

    class Game_Event
      
    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      # * Setup
      #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      
    alias modernalg_fow_setup_2fg8 setup_page
      def setup_page 
    (*args)
        
    modernalg_fow_setup_2fg8(*args)
        if @
    page == nil
          
    @ignore_fow false
        
    else
          
    # Get comment
          
    0
          comment 
    ""
          
    while [108408].include? (@page.list[i].code)
            
    comment += @page.list[i].parameters[0]
            
    += 1
          end
          
    @ignore_fow = !comment[/\\IGNORE_FOW/i].nil?
          if 
    comment[/\\FOW_VISION\[(\d*),?\s*(\w*)\]/i] != nil
            r 
    = $1.empty? ? FOW_DEFAULT_SIGHT : $1.to_i
            c 
    = $2.empty? ? FOW_CIRCLE_SIGHT : $2.downcase == "true" 
            
    create_vision_field(rc)
          
    elsif comment[/\\FOW_VISION/i] != nil
            create_vision_field
          
    else
            
    delete_vision_field
          end
          
    if comment[/SHOW_FOW\[(\d+)\]/i] != nil
            $game_map
    .interpreter.show_fow($game_map.map_id, $1.to_i)
          
    elsif comment[/SHOW_FOW/i] != nil
            $game_map
    .interpreter.show_fow
          elsif comment
    [/HIDE_FOW/i] != nil
            $game_map
    .interpreter.hide_fow
          end
        end
      end
      
    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      # * Transparent
      #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      
    alias malg_fow_trnsp_hider_6yh3 transparent
      def transparent 
    (*args)
        return 
    true if !@ignore_fow && !$game_system.square_visible?(@x, @y)
        return 
    malg_fow_trnsp_hider_6yh3(*args)
      
    end
    end

    #==============================================================================
    # ** Game_Player
    #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    #  Summary of Changes:
    #    aliased method - initialize
    #==============================================================================

    class Game_Player
      
    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      # * Object Initialization
      #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      
    alias modrnl_fogw_initz_6iu8 initialize
      def initialize 
    (*args)
        
    modrnl_fogw_initz_6iu8(*args# Run Original Method
        
    x= @x, @y
        
    @x, @= -100, -100
        create_vision_field
        
    @xxy
      end
    end

    #==============================================================================
    # ** Game_Interpreter
    #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    #  Summary of Changes:
    #    new methods - show_fow, hide_fow, clear_fow, reset_fow, set_event_vision,
    #      delete_event_vision
    #==============================================================================

    class Game_Interpreter
      
    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      # * Show Fog of War
      #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      
    def show_fow (mode = -1map_id $game_map.map_id)
        
    $game_system.fow_set_active(0truemap_id)
        
    $game_system.fow_set_active(1modemap_id) if mode != -1
        $game_map
    .fow_active true
        $game_map
    .fow_permanent $game_system.fow_active[1] != 2
        $game_map
    .fow_temporary $game_system.fow_active[1] != 1
        $game_system
    .paint_fog(map_id00unless $game_map.fow_temporary 
        $game_system
    .paint_fog(map_id10unless $game_map.fow_permanent 
      end
      
    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      # * Hide Fog of War
      #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      
    def hide_fow (map_id $game_map.map_id)
        
    $game_system.fow_set_active(0falsemap_id)
        
    $game_map.fow_active false
      end
      
    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      # * Clear Fog of War
      #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      
    def clear_fow (map_id $game_map.map_idxrange = -1..0yrange = -1..0)
        
    $game_system.fow_set_active(11map_id)
        
    $game_map.fow_temporary false
        $game_system
    .paint_fog(map_id00xrangeyrange)
        
    $game_system.paint_fog(map_id10xrangeyrange)
      
    end
      
    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      # * Reset Fog of War
      #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      
    def reset_fow (map_id $game_map.map_idxrange = -1..0yrange = -1..0)
        
    $game_system.paint_fog(map_id02816xrangeyrange)
        
    $game_system.paint_fog(map_id12864xrangeyrange)
      
    end
      
    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      # * Set Charact Vision
      #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      
    def set_unit_vision (event_idFOW_DEFAULT_SIGHTFOW_CIRCLE_SIGHT)
        
    event_id = @event_id if event_id == 0
        character 
    event_id $game_player $game_map.events[event_id]
        return if 
    character.nil?
        
    character.create_vision_field(rc)
      
    end
      
    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      # * Delete Event Vision
      #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      
    def delete_unit_vision (event_id)
        return if 
    $game_map.events[event_id].nil?
        
    $game_map.events[event_id].delete_vision_field
      end
      
    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      # * Square Visible?
      #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      
    def square_visible? (xy)
        return 
    $game_system.square_visible?(xy)
      
    end
      
    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      # * Change FOW Autotile
      #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      
    def change_fow_autotile (layerfilename)
        case 
    layer
        when 
    :permanent then $game_system.fow_perm_autotile filename
        when 
    :temporary then $game_system.fow_temp_autotile filename
        end
      end
    end

    #==============================================================================
    # ** Tilemap FogofWar
    #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    #  This tilemap shows a fog layer for the fog of war
    #==============================================================================

    class Tilemap_FogofWar Tilemap
      
    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      # * Object Initialization
      #     permanent : the type of layer this is
      #     autotile  : the name of the autotile to use
      #     viewport  : the viewport to use
      #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      
    def initialize (viewport nil)
        
    super (viewport)
        
    begin
          perm_autotile 
    Cache.system($game_system.fow_perm_autotile)
        
    rescue
          perm_autotile 
    Cache.system("FOW Autotile H78J")
        
    end
        begin
          temp_autotile 
    Cache.system($game_system.fow_temp_autotile)
        
    rescue
          temp_autotile 
    Cache.system("FOW Autotile H78J")
        
    end
        self
    .map_data $game_system.fow_data
        self
    .bitmaps[0] = Bitmap.new(512384)
        
    self.bitmaps[1] = Bitmap.new(512384)
        
    self.bitmaps[1].blt(00temp_autotiletemp_autotile.rectFOW_TEMPORARY_OPACITY)
        
    self.bitmaps[1].blt(640perm_autotileperm_autotile.rectFOW_PERMANENT_OPACITY)
        
    self.bitmaps[2] = Bitmap.new(512256)
        
    self.bitmaps[3] = Bitmap.new(512480)
        
    self.bitmaps[4] = Bitmap.new(256512)
        for 
    i in 5...9 do self.bitmaps[i] = Bitmap.new(512512end
      end
        
      def create_shadow_bitmap
        
    @layers[5].bitmap.dispose if @layers[5].bitmap
        bmp 
    Bitmap.new(@map_data.xsize 32, @map_data.ysize 32)
        @
    layers[5].bitmap bmp
        
    for i in 1...@map_data.xsize
          
    for j in 0...@map_data.ysize
            
    if !projects_shadow?(@map_data[i,j,0])
              if 
    projects_shadow?(@map_data[i-1,j,0]) && (== || projects_shadow?(@map_data[i-1,j-1,0]))
                
    bmp.fill_rect(32321632Color.new(0,0,0,0))
              
    end
            end
          end
        end
      end  
      
    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      # * Get FOW Tilemap ID
      #    x, y  : coordinates to check
      #    layer : the layer of the tilemap, permanent or temporary
      #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      
    def fow_tilemap_id (xylayer 0)
        
    data self.map_data
        
    return if || || data[xylayer] == 0
        base 
    layer == 2816 2864
        count 
    0
        
    # Check Adjacent squares first
        
    count += if data[1ylayer] == 0
        count 
    += if data[x1layer] == 0
        count 
    += if data[1ylayer] == 0
        count 
    += if data[x1layer] == 0
        id 
    = case count 
        when 0 then fow_check_corners
    (xylayer)
        
    when 1 then 16 + ((fow_check_corners(xylayer, [24])) / 2)
        
    when 2 then 20 + ((fow_check_corners(xylayer, [48])) / 4)
        
    when 3 then 34 + ((fow_check_corners(xylayer, [4])) / 4)
        
    when 4 then 24 + ([0,8,1,9].index(fow_check_corners(xylayer, [18])))
        
    when 5 then 32
        when 6 then 36 
    + ((fow_check_corners(xylayer, [8])) / 8)
        
    when 7 then 42
        when 8 then 28 
    fow_check_corners(xylayer, [12])
        
    when 9 then 40 + ((fow_check_corners(xylayer, [2])) / 2)
        
    when 10 then 33
        when 11 then 43
        when 12 then 38 
    fow_check_corners(xylayer, [1])
        else
          
    31 count
        end
        
    return base id
      end
      
    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      # * Check Corners
      #    x, y    : coordinates to check
      #    corners : the corners to check and account for
      #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      
    def fow_check_corners (xylayercorners = [1248])
        
    count 0
        data 
    self.map_data
        count 
    += if corners.include? (1) && data[11layer] == 0
        count 
    += if corners.include? (2) && data[11layer] == 0
        count 
    += if corners.include? (4) && data[11layer] == 0
        count 
    += if corners.include? (8) && data[11layer] == 0
        
    return count
      end
      
    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      # * Frame Update
      #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      
    def update
        data 
    self.map_data
        
    # $game_temp.fow_perm_updatables = squares currently in vision
        # $game_temp.fow_temp_updatables = squares that are no longer in vision
        
    perm_update_squares = []
        
    temp_update_squares = []
        if 
    $game_map.fow_temporary
          
    ($game_temp.fow_temp_updatables $game_temp.fow_perm_updatables).each { |xy|
            
    data[xy0] = 2816
            
    for i in ([10].max)..([1data.xsize 1].min)
              for 
    j in ([10].max)..([1data.ysize 1].min)
                
    temp_update_squares |= [[ij]]
              
    end
            end
          
    }
          
    $game_temp.fow_perm_updatables.each { |xy|
            if 
    data[xy0] != 
              data
    [xy0] = 0
              
    for i in ([10].max)..([1data.xsize 1].min)
                for 
    j in ([10].max)..([1data.ysize 1].min)
                  
    temp_update_squares |= [[ij]]
                
    end
              end
            end
          
    }
        
    end
        
    if $game_map.fow_permanent
          $game_temp
    .fow_perm_updatables.each { |xy|
            if 
    data[xy1] != 0
              data
    [xy1] = 0
              
    for i in ([10].max)..([1data.xsize 1].min)
                for 
    j in ([10].max)..([1data.ysize 1].min)
                  
    perm_update_squares |= [[ij]]
                
    end
              end
            end
          
    }
        
    end
        temp_update_squares
    .each { |xydata[xy0] = fow_tilemap_id(xy0) }
        
    perm_update_squares.each { |xydata[xy1] = fow_tilemap_id(xy1) }
        
    $game_temp.fow_perm_updatables.clear
        $game_temp
    .fow_temp_updatables.clear
      end
    end

    #==============================================================================
    # ** Spriteset_Map
    #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    #  Summary of Changes:
    #    aliased methods - create_tilemap, update_tilemap, dispose_tilemap
    #==============================================================================

    class Spriteset_Map
      
    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      # * Create Tilemap
      #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      
    alias modrnb_fow_crttilmp_5tf2 create_tilemap
      def create_tilemap 
    (*args)
        
    modrnb_fow_crttilmp_5tf2(*args# Run Original Method
        # Create viewport between tile and picture layers
        
    @fow_viewport Viewport.new(00Graphics.widthGraphics.height)
        @
    fow_viewport.40
        data 
    $game_system.fow_data
        $game_system
    .fow_reset_data($game_map.map_id) if @tilemap.map_data.xsize != data.xsize || @tilemap.map_data.ysize != data.ysize
        
    @fow_tilemap Tilemap_FogofWar.new(@fow_viewport)
      
    end
      
    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      # * Dispose of Tilemap
      #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      
    alias malgbr_fow_dispmap_7yh2 dispose_tilemap
      def dispose_tilemap 
    (*args)
        
    malgbr_fow_dispmap_7yh2(*args# Run Original Method
        
    for i in 0...9 do @fow_tilemap.bitmaps[i].dispose end
        
    @fow_tilemap.dispose
      end
      
    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      # * Update Tilemap
      #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      
    alias monaba_fogwar_tilmup_2fu8 update_tilemap
      def update_tilemap 
    (*args)
        
    monaba_fogwar_tilmup_2fu8(*args# Run Original Map
        
    @fow_tilemap.ox = @tilemap.ox
        
    @fow_tilemap.oy = @tilemap.oy
        
    @fow_viewport.visible $game_map.fow_active
        
    @fow_tilemap.update
      end
    end

    class Tilemap_FogofWar
      
    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      # * Object Initialization
      #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      
    alias ma_hos_initz_fow_6yh2 initialize
      def initialize 
    (*args)
        
    # Eliminate the top layer
        
    $game_system.paint_fog($game_map.map_id02816)
        
    $game_player.update_fow
        ma_hos_initz_fow_6yh2
    (*args# Run original method
      
    end
    end 

  4. #1364

    По умолчанию

    Цитата Сообщение от DeadElf79 Посмотреть сообщение
    Subzeroy, за код спасибо, но... Зачем менять отрисовку, когда можно [s]ехать верхом[/s] заменить данные карты? Это проще и быстрее.[/code]
    Не спорю. Просили класс Tilemap - я скинул. Не знаю, правда, на сколько он повторяет тот, что в действительности в мейкере, потому что Graphics на том же сайте не весь работает...

  5. #1365
    Маститый Аватар для Seibur
    Информация о пользователе
    Регистрация
    07.01.2012
    Адрес
    Изумрудный город
    Сообщений
    1,206
    Записей в дневнике
    3
    Репутация: 58 Добавить или отнять репутацию

    По умолчанию

    Ребята, подскажите пожалуйста что нужно сделать чтобы разбить скилы на подтипы\отдельные пункты?
    [URL="https://yanflychannel.wordpress.com/rmvxa/menu-scripts/ace-skill-menu/[/URL]
    Последний раз редактировалось Seibur; 31.01.2016 в 19:24.
    Прохлада и спокойствие мне вполне по душе

    Спойлер :

    き っ と 、 女 の 子 は お 砂 糖 と ス パ イ ス と 素 敵 な 何 か で で き て い る。

  6. #1366
    Маститый Аватар для HopeBree
    Информация о пользователе
    Регистрация
    27.03.2013
    Сообщений
    1,204
    Записей в дневнике
    6
    Репутация: 38 Добавить или отнять репутацию

    По умолчанию

    вроде в нем ни как, есть какой-то другой скрипт для группировки скилов
    Последний раз редактировалось HopeBree; 22.02.2016 в 06:43.

  7. #1367
    Маститый Аватар для HopeBree
    Информация о пользователе
    Регистрация
    27.03.2013
    Сообщений
    1,204
    Записей в дневнике
    6
    Репутация: 38 Добавить или отнять репутацию

    По умолчанию

    как можно заставить использовать Sprite_Characters для каждого играбельного персонажа свой, пытался через if работает, но тогда и евенты начинают его использовать

  8. #1368
    Хранитель Аватар для Paranoid
    Информация о пользователе
    Регистрация
    22.12.2014
    Сообщений
    2,776
    Записей в дневнике
    34
    Репутация: 28 Добавить или отнять репутацию

    По умолчанию

    Помогите с небольшим скриптом. Мне нужно создать свой пункт во внутреннем меню игры, который бы ссылкался на общее событие. Сам пытался, но работает он не корректно.
    Собственно что я делал. Добавил в Window_MenuCommand в строчке Add Main Commands to List вот это
    Код:
    add_command("Персонаж", $game_temp.reserve_common_event(01), main_commands_enabled)
    Пункт появился, но при нажатии на него ничего не происходит. Зато при выходе из меню, всегда запускается общее событие. А мне хочется чтобы при нажатии на пункт запускалось общее событие.
    Лицензионный VX Ace. Спасибо Петр.
    2 года мукеризма в пустую.

  9. #1369

    По умолчанию

    Цитата Сообщение от Paranoid Посмотреть сообщение
    Помогите с небольшим скриптом. Мне нужно создать свой пункт во внутреннем меню игры, который бы ссылкался на общее событие. Сам пытался, но работает он не корректно.
    Собственно что я делал. Добавил в Window_MenuCommand в строчке Add Main Commands to List вот это
    Код:
    add_command("Персонаж", $game_temp.reserve_common_event(01), main_commands_enabled)
    Пункт появился, но при нажатии на него ничего не происходит. Зато при выходе из меню, всегда запускается общее событие. А мне хочется чтобы при нажатии на пункт запускалось общее событие.
    Второй параметр отвечает за символ команды. Замени, скажем, на :common_event. Затем найди создание этого окна (например, @command_window = Window_Command.new) и ниже вызови метод @command_window.setHandler(:common_event, $game_temp.reserve_common_event(1))

  10. #1370
    Хранитель Аватар для Paranoid
    Информация о пользователе
    Регистрация
    22.12.2014
    Сообщений
    2,776
    Записей в дневнике
    34
    Репутация: 28 Добавить или отнять репутацию

    По умолчанию

    Цитата Сообщение от Subzeroy Посмотреть сообщение
    Второй параметр отвечает за символ команды. Замени, скажем, на :common_event. Затем найди создание этого окна (например, @command_window = Window_Command.new) и ниже вызови метод @command_window.setHandler(:common_event, $game_temp.reserve_common_event(1))
    В Window нет создания окна общих событий или что ты имеешь в виду?
    Лицензионный VX Ace. Спасибо Петр.
    2 года мукеризма в пустую.

Страница 137 из 147 ПерваяПервая ... 3787127135136137138139 ... ПоследняяПоследняя

Информация о теме

Пользователи, просматривающие эту тему

Эту тему просматривают: 5 (пользователей: 0 , гостей: 5)

Метки этой темы

Социальные закладки

Социальные закладки

Ваши права

  • Вы не можете создавать новые темы
  • Вы не можете отвечать в темах
  • Вы не можете прикреплять вложения
  • Вы не можете редактировать свои сообщения
  •  
Помощь с скриптами (RGSS)