Map Objects - v1.2 (12/04/2019)

Discussion in 'RGSS3 Scripts (RMVX Ace)' started by Sixth, Jun 6, 2018.

  1. Sixth

    Sixth Veteran Veteran

    Messages:
    2,130
    Likes Received:
    798
    First Language:
    Hungarian
    Primarily Uses:
    RMVXA
    Code:
    #===============================================================================
    # * [ACE] Map Objects
    #===============================================================================
    # * Made by: Sixth (www.rpgmakervxace.net, www.forums.rpgmakerweb.com)
    # * Version: 1.2
    # * Updated: 12/04/2019
    # * Requires: Sixth's Smooth Animation System
    #             Sixth's Smooth Animation Module
    #-------------------------------------------------------------------------------
    # * < Change Log >
    #-------------------------------------------------------------------------------
    # * Version 1.0 (06/06/2018)
    #   - Initial release.
    # * Version 1.1 (13/01/2019)
    #   - Compatibility updates for... some scripts.
    #     If you don't see any display errors with the map objects and don't get
    #     any crashes, you probably don't need to update the script at all, at
    #     least not for compatibility reasons.
    #   - Minor performance update.
    # * Version 1.2 (12/04/2019)
    #   - Fixed the font options. Due to some compatibility edits in the previous
    #     version, some of these options were not working properly.
    #     IMPORTANT: If you changed some font options and want to restore those
    #     changes, make sure to check the new option key symbols, because they are
    #     changed now! For example, :type became :name, :font_col became :color, 
    #     and so on.
    #   - Added a new feature that will let you toggle the editor's HUD with a key
    #     simple press. Might be useful during object selection around the edges of
    #     the map, for example.
    #-------------------------------------------------------------------------------
    # * < Description >
    #-------------------------------------------------------------------------------
    # * This script will add a new editor to your project which allows setting up
    #   map objects (images) for mapping purposes.
    # * This is NOT a game feature! These added map images got only one purpose, and
    #   that is to allow for less-restricted mapping, since they are not bound to
    #   any tile based grid system.
    # * Okay, maybe they got more than one purpose, such as adding infinite layers
    #   to your maps, re-using the same images with different properties (such as
    #   zoom level, color, tone, hue, ect), making animated map objects, and they
    #   can be used in certain situations where normal mapping (or even parallax
    #   mapping) just won't suffice (such as allowing the character objects to show
    #   up behind or before them based on the characters' position).
    # * This new editor will only work in test-play mode! Well, unless you put all
    #   your data and images used for this new editor in a non-encrypted folder (or
    #   if your game is not encrypted at all), but I don't recommend doing that.
    #   The already setup map objects will be shown normally on your maps during
    #   normal gameplay, but the editor itself will not work, because it is not
    #   possible to save any data (or even check for files) in encrypted
    #   folders/data.
    # * IMPORTANT NOTE - FOR REAL! :
    #   Do NOT force close the game (with the big red "X" button on the top right
    #   corner of the game window, or by any other means) while you are EDITING an
    #   already placed map object! If you do that, the map object currently being
    #   edited will be deleted for good! I don't plan to add any prevention methods
    #   for this case, so you will have to keep this in mind while editing your
    #   map objects.
    # * ANOTHER IMPORTANT NOTE:
    #   The new editor will automatically save your changes after any of these:
    #   - Confirming the placement of a new OR an already added map object.
    #   - Canceling the placement of an already added map object.
    #   - Removing an already added map object.
    #   There will be no warnings or questions asked, it WILL happen!
    # * Some minor data will also be saved for the editor only (meaning it will NOT
    #   be used during normal gameplay at all) at certain actions, such as the last
    #   map edited and it's scroll values, the state of the grid display (visible or
    #   not) and the last used movement mode for object placement (normal or
    #   fine-tune mode). The data for these will be stored in the same folder where
    #   your map object data are saved. You can remove the file containing these
    #   data before you ship your game, although I doubt that your game's size
    #   (or you) can't tolerate that extra few KBs. :D
    #-------------------------------------------------------------------------------
    # * < Installation >
    #-------------------------------------------------------------------------------
    # * IMPORTANT: Backup your project before attempting to install this system!
    #   There shouldn't be any issue just from installing this new editor, but just
    #   to be safe, make a quick backup anyway.
    # * Place this script between Materials and Main!
    # * The script will automatically create all folders needed for the editor the
    #   first time you start your game with this script installed. However, if you
    #   already got these folders setup, don't worry, nothing will be deleted in
    #   them, the script will recognize them too.
    # * You need to place your image files in the designated folders before you
    #   could use them in the editor.
    #-------------------------------------------------------------------------------
    # * < Compatibility Info >
    #-------------------------------------------------------------------------------
    # * The new editor uses the default map spriteset with some modifications.
    #   I didn't change any major aspects of it, just disabled some viewport
    #   update methods which interfered with the map scroll update in the editor,
    #   made the player and follower sprites hidden and added the grid display.
    # * I have no idea if this editor will work with some custom scripts modifying
    #   the map spriteset or not, I never tested it with any of these scripts.
    #   But I know that there are many scripts modifying this class to add new
    #   visual displays, so there is a chance of compatibility issues between them.
    #   I can't guarantee that I will make any compatibility patches, but you can
    #   let me know about these issues regardless, maybe I will be in the mood of
    #   making some patches during my coffee breaks.
    #-------------------------------------------------------------------------------
    # * < Known Issues >
    #-------------------------------------------------------------------------------
    # * No known issues.
    #-------------------------------------------------------------------------------
    # * < Terms of Use >
    #-------------------------------------------------------------------------------
    # * Free to use for whatever purposes you want.
    # * Credit me (Sixth) in your game, pretty please! :P
    # * Posting modified versions of this script is allowed as long as you notice me
    #   about it with a link to it!
    #===============================================================================
    

    - Script:

    This new map editor requires more than 1 script, so instead of uploading all of them, lookie below for a handy demo. :p

    - Demo:
    Linky: https://drive.google.com/open?id=1ZNP0zO9IEUxESxyn2-lTng6khWE6GERN

    - Addons:
    Some Addon:
    Code:
    #===============================================================================
    # * [ACE] Map Objects - Some Addon
    #===============================================================================
    # * Made by: Sixth (www.rpgmakervxace.net, www.forums.rpgmakerweb.com)
    # * Version: 1.1
    # * Updated: 13/01/2019
    # * Requires: Sixth's Map Objects
    #-------------------------------------------------------------------------------
    # * < Change Log >
    #-------------------------------------------------------------------------------
    # * Version 1.0 (06/06/2018)
    #   - Initial release.
    # * Version 1.1 (13/01/2019)
    #   - Minor performance update.
    #-------------------------------------------------------------------------------
    # * < Description >
    #-------------------------------------------------------------------------------
    # * Just like the great script name implies (not really :D), this addon will let
    #   you change the properties of the already added map objects during the game
    #   with script calls.
    #-------------------------------------------------------------------------------
    # * < Installation >
    #-------------------------------------------------------------------------------
    # * Place this script below my Map Objects script but above Main!
    #-------------------------------------------------------------------------------
    # * < Compatibility Info >
    #-------------------------------------------------------------------------------
    # * Same as my Map Objects script, of course.
    #-------------------------------------------------------------------------------
    # * < Known Issues >
    #-------------------------------------------------------------------------------
    # * No known issues.
    #-------------------------------------------------------------------------------
    # * < Terms of Use >
    #-------------------------------------------------------------------------------
    # * Free to use for whatever purposes you want.
    # * Credit me (Sixth) in your game, pretty please! :P
    # * Posting modified versions of this script is allowed as long as you notice me
    #   about it with a link to it!
    #===============================================================================
    
    It's included in the demo, so get this addon from there too.

    - Screenshots:
    Screenshots arrived! O_O
    [​IMG]
    [​IMG]
    [​IMG]
    [​IMG]
    [​IMG]
    [​IMG]
    [​IMG]
    [​IMG]
    [​IMG]
    [​IMG]

    - Author's Notes:

    The demo includes some scripts not made by me. These scripts retain their original terms of use, so if you plan to use them, read those terms!
    All required scripts and addons are included in the demo.
    I didn't add many images to the demo to keep the size low, but of course, you can add as many as you want in your project.

    I made this script quite a while ago and was too lazy to re-check my code, so it's possible that I left in some bugs. If you find them, let me know and I will squash them.
     
    Last edited: Apr 12, 2019
    #1
  2. Robert-Character Creator

    Robert-Character Creator Waiting for Replies Veteran

    Messages:
    483
    Likes Received:
    208
    Location:
    California, USA
    First Language:
    English
    Primarily Uses:
    RMVXA
    I'll have to try this today! I'm still tired from today's Final, so it'll probably be tonight. If I find any bugs or anything, I'll let you know!
     
    #2
  3. Vis_Mage

    Vis_Mage Novice Magician Veteran

    Messages:
    380
    Likes Received:
    138
    Location:
    Ridge Island
    First Language:
    English
    Primarily Uses:
    RMVXA
    Gotta say, this is pretty awesome! :kaopride:

    I had always hoped Ace would get something similar to Yanfly's doodads on MV, but you took it even a step further! I could see this being very useful for a lot of people.
     
    #3
    Sixth likes this.
  4. Robert-Character Creator

    Robert-Character Creator Waiting for Replies Veteran

    Messages:
    483
    Likes Received:
    208
    Location:
    California, USA
    First Language:
    English
    Primarily Uses:
    RMVXA
    Okay! I didn't have the chance to test this until today, but from what I could see, this is amazing! It looks to be everything I need, though I'll have to test it more thoroughly to be sure. Thank you so much, Sixth!
     
    #4
    Sixth likes this.
  5. hhldegujia

    hhldegujia Villager Member

    Messages:
    7
    Likes Received:
    1
    First Language:
    chinese
    Primarily Uses:
    RMVXA
    It really chage VA's mapping way!! Thanks for your scripts !It looks like VA is not dead :)
    Can I make a suggestion? It more convenient if you add a“copy object” command 。
    Anyway,thanks a lot!!!
     
    #5
    Sixth likes this.
  6. Cerveau

    Cerveau Villager Member

    Messages:
    24
    Likes Received:
    6
    First Language:
    Tagalog
    Is this permanent modification for the map, mean will it reflect on the real map editor once the game closed? Or is it more on decorative?

    For example, you created a map without any object on it and just some body of waters and land mass, then you start the game, then you add chair objects in game, then you close... will chair objects appear on the map editor?

    Sorry i know i should try the demo, but i kind of not in a good place to try it now and will be very later... but im so excited to know early, so im up to my imagination for now. Please and thanks.
     
    #6
  7. Knayter

    Knayter *teleport behind you* Nothing personal kid Veteran

    Messages:
    229
    Likes Received:
    479
    Location:
    Viet Nam
    First Language:
    Viet Nam
    Primarily Uses:
    RMVXA
    I have been looking for this script forever!! finally a similar doodad script for vx ace!! <3 <3 Thank you so much!!
     
    #7
    Sixth likes this.
  8. Sixth

    Sixth Veteran Veteran

    Messages:
    2,130
    Likes Received:
    798
    First Language:
    Hungarian
    Primarily Uses:
    RMVXA
    @Cerveau
    If you mean the map editor of the engine, than no, placed map objects will not show up there.
    These will only show up in the map editor I made (shown on the screenshots in the opening post), and of course, during the game.

    Adding them to the default editor would require editing the DLL or exe file of the engine, and that is not allowed.
     
    #8
  9. BCj

    BCj Veteran Veteran

    Messages:
    1,440
    Likes Received:
    679
    Location:
    NL
    First Language:
    Dutch
    Primarily Uses:
    N/A
    So if I understand correctly, this offers you the option of parallax mapping, without doing it in photoshop, all editor based?
     
    #9
  10. Knayter

    Knayter *teleport behind you* Nothing personal kid Veteran

    Messages:
    229
    Likes Received:
    479
    Location:
    Viet Nam
    First Language:
    Viet Nam
    Primarily Uses:
    RMVXA
    that right, but not editor based, you make the map while play testing the game
     
    #10
  11. BCj

    BCj Veteran Veteran

    Messages:
    1,440
    Likes Received:
    679
    Location:
    NL
    First Language:
    Dutch
    Primarily Uses:
    N/A
    Yeah, I got that :) but the things don't have to be alligned on the grid as far as I believe, right? And multiple layers would be possible?
     
    #11
  12. Knayter

    Knayter *teleport behind you* Nothing personal kid Veteran

    Messages:
    229
    Likes Received:
    479
    Location:
    Viet Nam
    First Language:
    Viet Nam
    Primarily Uses:
    RMVXA
    yeah, no grid, and basically unlimited layers iirc
     
    #12
  13. BCj

    BCj Veteran Veteran

    Messages:
    1,440
    Likes Received:
    679
    Location:
    NL
    First Language:
    Dutch
    Primarily Uses:
    N/A
    Just tested it, and it looks good! Real easy to change too, and you can change tiles on the fly, so no more re-photoshopping everything when you get a new tileset.
    @Sixth Out of curiosity, can you also change tilesets mid-game? E.g. you have a farming sim, and there's some tiles/objects that need changing, can you make it so your script would load Graphics/MO_Editor/Winter_Animated instead of Graphics/MO_Editor/Animated?
     
    #13
  14. Sixth

    Sixth Veteran Veteran

    Messages:
    2,130
    Likes Received:
    798
    First Language:
    Hungarian
    Primarily Uses:
    RMVXA
    You can change the images during the game with script calls if you use that addon for the script (also included in the demo).

    I think, I messed up the documentation in that addon. You can change the full path to the file and the image name too with the same property option (called 'img'), in fact, you must add the full path to the file in the script call plus the image name, or else your image won't load (or your game will crash if you don't use that debug script for skipping missing images).
    I didn't make any script calls for changing the folder only or the image only, because they are stored in one string.

    But regardless, yes, you can do what you asked with the script call explained in that addon.
    There is no script calls for changing a bunch of them at once though, so you may have to use tons of these script calls to change what you want. That, or if you know a little coding, you can make a script call to change a bunch of them at once fairly easily. I can make one for you, but due to my limited free time nowadays, it may take a while.
     
    #14
  15. Isabella Ava

    Isabella Ava Veteran Veteran

    Messages:
    636
    Likes Received:
    752
    First Language:
    English
    Hi @Sixth,
    i installed your script into my project and
    i got this bug after select Map Editor 〈(゜。゜)
    upload_2018-12-28_14-50-5.png
    upload_2018-12-28_14-50-43.png
     
    #15
  16. Shaz

    Shaz Veteran Veteran

    Messages:
    37,706
    Likes Received:
    11,410
    Location:
    Australia
    First Language:
    English
    Primarily Uses:
    RMMV
    That means you have another script that redefines Game_Map's update method. The default update method takes one argument but makes it optional. One of your other scripts seems like it makes it mandatory.

    Do a global search for class Game_Map and see what added scripts show up in the list. Check each of those and see if one of them has an update method that takes an argument but doesn't provide a default value (arg = value).

    You could also check your Game_Map script and find the update method and confirm that it does have the argument set to optional:
    Code:
    def update (main = false)
    There have been updates to Ace, and it's possible that you have an older version and this might be one of the things that changed.

    Alternately, you can just change that line (1816) to this:
    Code:
    $game_map.update(false)
    as that's what the default is.
     
    Last edited: Dec 28, 2018
    #16
    Isabella Ava likes this.
  17. Isabella Ava

    Isabella Ava Veteran Veteran

    Messages:
    636
    Likes Received:
    752
    First Language:
    English
    Hi @Shaz, you're totally correct. A script that redefine Game_map update cause this.
    It worked now! Awesome Σ(*ノ´>ω<。`)ノ
     
    #17
  18. Shaz

    Shaz Veteran Veteran

    Messages:
    37,706
    Likes Received:
    11,410
    Location:
    Australia
    First Language:
    English
    Primarily Uses:
    RMMV
    Out of interest, what was that script? I wonder what it did that made it want to make the argument mandatory.

    A better solution would be changing THAT script to make the argument optional - change it to this:
    Code:
    def update (main = false)
    That means if you add any other scripts that call the method, it won't also cause problems with them.
     
    #18
  19. Isabella Ava

    Isabella Ava Veteran Veteran

    Messages:
    636
    Likes Received:
    752
    First Language:
    English
    It was an ancient script i grabbed on internet named "MultiFog Layer" plugin, not really sure why did it do that, perhaps it was too old.
    That's a nice tip, thank you
     
    #19
  20. Shaz

    Shaz Veteran Veteran

    Messages:
    37,706
    Likes Received:
    11,410
    Location:
    Australia
    First Language:
    English
    Primarily Uses:
    RMMV
    it wasn't mine, was it? I have a multi-fog script for Ace.
     
    #20
    Isabella Ava likes this.

Share This Page