Tile Changer (Copy Tiles and Change Tiles)

● ARCHIVED · READ-ONLY
Started by Shaz 112 posts Page 2 of 6 View original ↗
  1. I just tried in a clean client and got this error, version 1.6.1

    SvsCoOw.png

    E8xTESV.png
  2. Can you please show a screenshot of your map properties, where you've set up the 'load' details? And one of the console when you get the error (F8 to open developer tools, then go to the Console tab).

    Did you note that you need to set up the map notes, and the name you use in the plugin command is unrelated to the editor map name or the display name? If you set up your map notes and called it MAP002 that's okay, but if you didn't, that's where your error is.

    For the above plugin command to work, you would have to have this in your map 1's notes:

    Code:
    <load:[{"name":"MAP002","map":2}]>
  3. This sounds interesting, almost like giving multiple tilesets to a map.
  4. No. Each map that you copy from must use the same tileset. It is more like being able to change your map as you progress through the game.
  5. @Shaz Hello, I'm having the same problem as Black Mamba:

    My input:
    Plugin Command on Parallel event: CopyTiles 0 0 'outsides' 1 1 17 27
    Note in Map Properties I want to copy from: <load:[{"name":"outsides","map":007}]>

    Weirdly enough I got 2 different outcomes while I changed nothing:
    Console1:
    rpg_managers.js:1919 Uncaught SyntaxError: Unexpected number in JSON at position 27
    SceneManager.onError @ rpg_managers.js:1919
    rpg_managers.js:1920 chrome-extension://odlameecjipmbmbejkplpemijjgpljce/index.html 1
    SceneManager.onError @ rpg_managers.js:1920
    index.html:1 Uncaught SyntaxError: Unexpected number in JSON at position 27
    at JSON.parse (<anonymous>)
    at Function.DataManager.onLoad (Shaz_TileChanger.js:122)
    at XMLHttpRequest.xhr.onload (rpg_managers.js:86)
    rpg_managers.js:1949 TypeError: Cannot read property 'width' of undefined
    at Game_Map.calcIndex (Shaz_TileChanger.js:264)
    at Game_Map.copyTiles (Shaz_TileChanger.js:241)
    at Game_Interpreter.pluginCommand (Shaz_TileChanger.js:274)

    Console 2:
    TypeError: Cannot read property 'width' of undefined rpg_managers.js:1949
    at Game_Map.calcIndex (Shaz_TileChanger.js:264)
    at Game_Map.copyTiles (Shaz_TileChanger.js:241)
    at Game_Interpreter.pluginCommand (Shaz_TileChanger.js:274)
  6. I suspect BlackMamba's issue was that he used the wrong info in the note box, but he hasn't come back to confirm that.

    Your issue is saying there's something strange in the JSON - possibly in the map you're trying to copy from.

    Can you try changing this:
    Code:
    <load:[{"name":"outsides","map":007}]>

    to this:
    Code:
    <load:[{"name":"outsides","map":7}]>

    and see if it works?

    Leading zeros frequently cause issues.

    Edit: yes, the error is being thrown on the line that tries to read the "load" setting from the map notes.
  7. I'm still getting the same error, tried loading from and too another map with another map too.
  8. i dont remember what was the error =\
    but its fixed now, i need check
  9. @Arend Galenkamp
    can you please send me the json files for your two maps?

    Unexpected number in JSON at position 27
    at JSON.parse (<anonymous>)
    at Function.DataManager.onLoad (Shaz_TileChanger.js:122)

    Position 27 of the JSON.parse statement is your 0 in 007. You removed the zeros, and saved and you're still having the same error?
  10. Thanks. I'll take a look at this tonight. It's weird - I'm using the plugin right now and the same command (different map/selection, of course) and it's working fine for me.

    I really don't think it's going to make a difference, but could you please go to your js/rpg_managers.js file and let me know what the version number is at the top of the script? If it's not there, check the rpg_core.js file instead. If it's also not there, you'll be on 1.0.0.


    Edit: You have the <load:...> note on the wrong map. If you want to copy an area from map 7 to map 53, the <load: ... 7> goes into the note box on map 53, and the CopyTiles command also goes onto an event on map 53. I can't even see the CopyTiles command on either of those maps, so where do you have it? It should be on an event on map 53, not in a common event, and not in an event on map 7.

    So, map A is the map the player will be roaming about on, and you want to change it as the game progresses. So you build map B which has other versions of portions of the map, and at different times in the game, you want to copy areas from map B onto map A. So in the note box on map A, you tell it to load map B so it's ready when you want to use it. And in an event on map A, you have a condition that determines it's time to change the map, and there you have your plugin command to CopyTiles from whatever "name" you gave to map B in the note, and it copies them onto the current map, map A. This doesn't need to be in a parallel process, and it certainly doesn't need to run repeatedly. Once you copy tiles, it will remember and will reload them each time you re-enter the map.

    Note - both maps have to be created using the same tileset.
  11. First off, thanks for your time; it's working now. Like you said I didn't have the "Loadline" in the notetag in the map its own properties. Wasn't really clear to me. You probably didn't see the CopyTiles command after a hour or so because I went on working on the map (it's in 3D now) so I put it in an action button event so it wouldn't get in the way (OneDrive file, so it keeps updating automatically).
  12. Arend Galenkamp said:
    OneDrive file, so it keeps updating automatically
    I hope you mean only the backup here?
    NEVER have a working directory in any cloudservice!!
    This will risk the existance of all data due to the fact that all RPG-Makers work like a database with their files, keeping them constantly open.
    Any cloudsync while the editor works will risk the existance of those files, if you check through the forums you'll find dozens of projects that were completely destroyed by a badly timed cloudsync.
  13. @Andar No I actually have the complete project in the OneDrive folder on my PC to have it backed-up all the time. I work every day in that project folder and I haven't come across any problems as of yet. Didn't know it could harm it so much though. I think it has something to do that some cloud services don't recognise the local saved version as the most recent one until it's completely uploaded, but OneDrive does as far as I know. Besides that it wouldn't be that big of a deal since I back-up my complete project everyday on another hard drive; and once every week on an USB stick and external hard drive.
  14. I did a search through both files for CopyTiles and neither of them had the command. In the files you've given me, which map, and which event id, has the plugin command?
  15. Well yeah you're not gonna find it now, I've removed the command from the map a few hours ago. In case you downloaded them already. It was on map 053 in event 034: CopyTiles 2 2 'outsides' 1 1 6 6
  16. It wasn't there when I downloaded them 12 hours ago.

    anyway - as long as it's working for you now ...

    I'm with Andar on the location of your project. You might do a daily backup elsewhere, but you're risking losing that day's work. And if your daily backups overwrite each other, you could overwrite your other-location backup with the damaged files before realising they're damaged. But it's up to you whether you're willing to take that risk (and off topic so I won't talk about it anymore here).
  17. Arend Galenkamp said:
    and I haven't come across any problems as of yet.
    YET is the keyword here. The problem is that the effect depends on timing and is rare, but it will happen if you risk it often enough even if nothing happens for a thousand times.

    A file can only be accessed by a single program. If another program tries to open it at the same time, it'll get nothing but errors.
    With regular files that is not a problem because they're opened and closed only on saving.
    However, a database can't work that way - it contains too much data to be handled by regular saving (each saving would take minutes to complete). Because of that, all RPG Makers and all databasing programs (like Filemaker, MS Access and similiar) keep all files open while they're running, changing specific parts of the files on the fly.
    If a cloudsync happens while the programs are open, it won't get any data back - and that might convince it that the files are empty, so it makes their cloudspace mastercopy empty. You close the program (RMMV) and if you haven't changed that part of the database after the failed cloudsync, the file on the harddrive might retain its older data.
    Next cloudsync reveals that the empty cloudcopy is more current than your local copy - and goodbye to your data when the local file is "updated".

    as said that is not automatic and a rare occurrance, but it can destroy your project - and has done this for several people already.
  18. Hi! This plugin may very well be one of the core engines of my project, so thank you for making it! I have to ask two questions, even though I unfortunately already suspect the answer is no:

    - does it copy region ids?
    - is it compatible with Doodads (that is, will it copy them when placed with Yep Grid Free Doodads)?
  19. Regions are on layer 5, so if you call the command and either leave the layers blank (to copy all layers) or include 5 in the list to be copied, then layers will be copied.

    This plugin is grid-based and works from the map you've created in the editor. Doodads is not grid based and saves all its data in its own file - even regions (I didn't realise you could change the regions via doodads). It would not be compatible in that it would not copy/change anything related to doodads, but you should still be able to use the two together without any code incompatibility issues.