RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
[RESOLVED] Show picture by Map x,y

0 Members and 1 Guest are viewing this topic.

pokeball joyOfflineFemale
*
Rep:
Level 85
I heard the voice of the salt in the desert
2012 Best RPG Maker User (Mapping)Project of the Month winner for June 20092010 Best RPG Maker User (Creativity)2011 Best RPG Maker User (Creativity)2011 Best RPG Maker User (Mapping)Winner - 2011 Winter Project of the Season2010 Best Artist2010 Best RPG Maker User (Graphical)2010 Best RPG Maker User (Mapping)2014 Best RPG Maker User - Graphics2014 Best RPG Maker User - Mapping2014 Best Artist2013 Best RPG Maker User (Mapping)2013 Best RPG Maker User (Graphical)2010 Most Attractive Female Member2010 Most Deserving Of A Promotion
Surprise! another request...I'm just a big ol' leech aint I?

What I need:
I'm looking to pretty much have a fog style script that draws a picture according to the MAP x and y, instead of screen x and y. I need to utilize it for .png mapping to draw tiles overlapping the player/events (an overlay layer), so it must be locked to 0, 0 on the map, a fog or typical show picture is on the screen x and y and will move with the player. Ideally I'd like to still be able to use fogs above the fixed map overlay (currently using hevendor's fogs, in spoiler below).

Hev's fogs:
Spoiler for:
#==============================================================================
# ** RMXP Fog feature for RMVX
#------------------------------------------------------------------------------
# Allows you to display a fog on map. Brings back the "old" Fog feature from
# RPG Maker XP.
# 08-03-2008 (dd-mm-yyyy) © Hevendor of hbgames.org
# 09-03-2008 Edits/additions by Jirbytaylor
# 09-03-2008 (dd-mm-yyyy) Edited by Hevendor
# Version 1.2.3
# Latest update: fixed bug where fog showed over pictures
#==============================================================================

module Fog_Map_Settings
  #============================================================================
  # * Configure Fog numbers -> names for setup timesaving. Format:
  # {fognumber => 'fogname.extension', ...}
  # where 'Fogname.extension' must be the name of a fog picture and its extension
  # located in the pictures folder
  #============================================================================
  Fog_names = {1 => 'treeshade.png', 2 => 'Fog01.png', 3 => 'cloud.jpg'}
  #============================================================================
  # * Set maps you wish to have fogs here. Format:
  # Fog_maps = {mapID => Fog number, mapID2 => Fog number, ...}
  #============================================================================
  Fog_maps = {2 => 1, 3 => 1, 10 =>2, 11 =>2, 12 =>2, 13 =>2, 6 => 3, 26 =>1, 29 =>1}
  #============================================================================
  # * Set up fog settings. Uses (fog number => setting, ...) format
  # - Opacity - Opacity of fog, ranging from 0 (invisible) to 255 (opaque)
  # - Zoom - size of fog. '1' is normal not '100'.
  # - Blend - 0 - Normal, 1 - Add, 2 - Subtract
  # - SxSy - Scroll settings. (fog number => [sx,sy] ...)
  #============================================================================
  Fog_opacity = {1 => 50, 2 => 100, 3 => 50}
  Fog_zoom = {1 => 1, 2 => 1, 3 => 2}
  Fog_blend = {1 => 2, 2 => 2, 3 => 1}
  Fog_sxsy = {1 => [0, 0], 2 => [1, 2], 3 => [2, 1]}
end

class Game_Map
  #--------------------------------------------------------------------------
  # * Public Instance Variables
  #--------------------------------------------------------------------------
  attr_reader :map_id                     # map ID
  attr_reader :fog_ox                     # fog oX
  attr_reader :fog_oy                     # fog oY
  #--------------------------------------------------------------------------
  # * Alias Definitions
  #--------------------------------------------------------------------------
  alias hev_fog_feature_map_update update
  alias hev_fog_feature_map_initialize initialize
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    @fog_ox = 0
    @fog_oy = 0
    hev_fog_feature_map_initialize
  end
  #--------------------------------------------------------------------------
  # * Update Fog
  #--------------------------------------------------------------------------   
  def update_fog
    if Fog_Map_Settings::Fog_maps.include?($game_map.map_id)
      @fog_ox -= Fog_Map_Settings::Fog_sxsy[Fog_Map_Settings::Fog_maps[@map_id]][0] / 8.0
      @fog_oy -= Fog_Map_Settings::Fog_sxsy[Fog_Map_Settings::Fog_maps[@map_id]][1] / 8.0
    end
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    hev_fog_feature_map_update
    update_fog
  end
end

class Spriteset_Map
  #--------------------------------------------------------------------------
  # * Alias Definitions
  #--------------------------------------------------------------------------
  alias hev_fog_feature_initialize initialize
  alias hev_fog_feature_create_viewports create_viewports
  alias hev_fog_feature_dispose dispose
  alias hev_fog_feature_update_viewports update_viewports
  alias hev_fog_feature_update update
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    hev_fog_feature_initialize
    create_fog
  end
  #--------------------------------------------------------------------------
  # * Create Viewport
  #--------------------------------------------------------------------------
  def create_viewports
    @viewport4 = Viewport.new(0, 0, 544, 416)
    @viewport4.z = 9
    hev_fog_feature_create_viewports
  end
  #--------------------------------------------------------------------------
  # * Create Fog
  #--------------------------------------------------------------------------
  def create_fog
    @fog = Plane.new(@viewport4)
    if Fog_Map_Settings::Fog_maps.include?($game_map.map_id)
      fog_number = Fog_Map_Settings::Fog_maps[$game_map.map_id]
      update_fog
      @fog.bitmap = Cache.picture(Fog_Map_Settings::Fog_names[fog_number])
      @fog.opacity = Fog_Map_Settings::Fog_opacity[fog_number]
      @fog.zoom_x = @fog.zoom_y = Fog_Map_Settings::Fog_zoom[fog_number]
      @fog.blend_type = Fog_Map_Settings::Fog_blend[fog_number]
    end       
  end
  #--------------------------------------------------------------------------
  # * Update Fog Sprite
  #--------------------------------------------------------------------------
  def update_fog
    if @fog != nil
      @fog.ox = $game_map.display_x / 8 + $game_map.fog_ox
      @fog.oy = $game_map.display_y / 8 + $game_map.fog_oy
    end
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    hev_fog_feature_update
    update_fog
  end
  #--------------------------------------------------------------------------
  # * Dispose of Fog Sprite
  #--------------------------------------------------------------------------
  def dispose_fog
    @fog.dispose
  end
  #--------------------------------------------------------------------------
  # * Dispose
  #--------------------------------------------------------------------------
  def dispose
    dispose_fog
    hev_fog_feature_dispose
  end
end

So the layers end up being like this:

Fogs
Overlay (picture by map x ,y)
Events
Editor tiles
Parallax

And a pictorial version:
Spoiler for:
Overlay:



Editor:



Parallax:




All together now!


So that's the gist, I've searched the best I could here and at HB, and RRR is wiped out of scripts for the most part.

I'd really appreciate the help, I can make it work only if I make a map at the minimum size for vx, but I'd like to use this mapping style on larger maps.

Thanks!


« Last Edit: June 18, 2010, 02:24:09 AM by joy »

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Best Member2012 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Most Mature Member2011 Best Veteran2011 Favourite Staff Member2011 Best RPG Maker User (Scripting)2011 Best Use of Avatar and Signature Space2010 Best RPG Maker User (Scripting)2010 Best Use Of Avatar And Signature Space
Well, it can be done by events by having a parallel process reposition the picture everytime the player moves, but that's a pain and it's an easy enough script to make so I will see if I can whip something up.

pokeball joyOfflineFemale
*
Rep:
Level 85
I heard the voice of the salt in the desert
2012 Best RPG Maker User (Mapping)Project of the Month winner for June 20092010 Best RPG Maker User (Creativity)2011 Best RPG Maker User (Creativity)2011 Best RPG Maker User (Mapping)Winner - 2011 Winter Project of the Season2010 Best Artist2010 Best RPG Maker User (Graphical)2010 Best RPG Maker User (Mapping)2014 Best RPG Maker User - Graphics2014 Best RPG Maker User - Mapping2014 Best Artist2013 Best RPG Maker User (Mapping)2013 Best RPG Maker User (Graphical)2010 Most Attractive Female Member2010 Most Deserving Of A Promotion
Eee! You are so very awesome.

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Best Member2012 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Most Mature Member2011 Best Veteran2011 Favourite Staff Member2011 Best RPG Maker User (Scripting)2011 Best Use of Avatar and Signature Space2010 Best RPG Maker User (Scripting)2010 Best Use Of Avatar And Signature Space
Alright! It's finished I think: http://rmrk.net/index.php/topic,39052.0.html

Making it work with that fog script made me add a few features that I am sure will confuse the hell out of pretty much anyone, but it made the script better kind of :P

Basically, follow the instructions. Where you want to use the picture as a top layer of tiles, you will want to make your event like this:

Code: [Select]
Control Switch: [Fix to Map Switch] = ON
Control Switch: [Picture Layer Switch] = ON
Control Variable: [Picture Z Variable] = 2
Show Picture

Turning the Fix to Map Switch off will return it to default, so that you can still set pictures to be fixed to the screen, rather than the map.

If you have any questions, I am happy to answer.

pokeball joyOfflineFemale
*
Rep:
Level 85
I heard the voice of the salt in the desert
2012 Best RPG Maker User (Mapping)Project of the Month winner for June 20092010 Best RPG Maker User (Creativity)2011 Best RPG Maker User (Creativity)2011 Best RPG Maker User (Mapping)Winner - 2011 Winter Project of the Season2010 Best Artist2010 Best RPG Maker User (Graphical)2010 Best RPG Maker User (Mapping)2014 Best RPG Maker User - Graphics2014 Best RPG Maker User - Mapping2014 Best Artist2013 Best RPG Maker User (Mapping)2013 Best RPG Maker User (Graphical)2010 Most Attractive Female Member2010 Most Deserving Of A Promotion
Eee! Fantastic! Making a map to test it now. I'll show the results.

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Best Member2012 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Most Mature Member2011 Best Veteran2011 Favourite Staff Member2011 Best RPG Maker User (Scripting)2011 Best Use of Avatar and Signature Space2010 Best RPG Maker User (Scripting)2010 Best Use Of Avatar And Signature Space
Do you have any suggestions for making it easier to use or is it fine as it is?

pokeball joyOfflineFemale
*
Rep:
Level 85
I heard the voice of the salt in the desert
2012 Best RPG Maker User (Mapping)Project of the Month winner for June 20092010 Best RPG Maker User (Creativity)2011 Best RPG Maker User (Creativity)2011 Best RPG Maker User (Mapping)Winner - 2011 Winter Project of the Season2010 Best Artist2010 Best RPG Maker User (Graphical)2010 Best RPG Maker User (Mapping)2014 Best RPG Maker User - Graphics2014 Best RPG Maker User - Mapping2014 Best Artist2013 Best RPG Maker User (Mapping)2013 Best RPG Maker User (Graphical)2010 Most Attractive Female Member2010 Most Deserving Of A Promotion
I can use it fine as-is, however, I am having trouble getting it to allow "above character" events to be above the overlay picture, even setting the variable to two.

What I mades~~


*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Best Member2012 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Most Mature Member2011 Best Veteran2011 Favourite Staff Member2011 Best RPG Maker User (Scripting)2011 Best Use of Avatar and Signature Space2010 Best RPG Maker User (Scripting)2010 Best Use Of Avatar And Signature Space
Well, the FPM_LAYER_SWITCH has to be on too.

*
Rep: +0/-0Level 74
RMRK Junior
I can use it fine as-is, however, I am having trouble getting it to allow "above character" events to be above the overlay picture, even setting the variable to two.

What I mades~~




Hey JOY
could you PLZ tell me where did you get the ground tiles
they are so awsome :(.

********
Furry Philosopher
Rep:
Level 94
Rawr?
2013 Best RPG Maker User (Creativity)Randomizer - GIAW 11Gold - GIAW 11 (Hard)Secret Santa 2013 ParticipantFor frequently finding and reporting spam and spam bots2012 Best RPG Maker User (Mapping)2012 Best RPG Maker User (Programming)Secret Santa 2012 ParticipantGold - GIAW 9Project of the Month winner for September 2008For taking a crack at the RMRK Wiki2011 Best RPG Maker User (Programming)2011 Best Veteran2011 Kindest Member2010 Best RPG Maker User (Story)2010 Best RPG Maker User (Technical)
I hardly think this is the place to ask her that.