Knight Editor: Visual Doodad Editing

● ARCHIVED · READ-ONLY
Started by Kaelan 104 posts Page 1 of 6 View original ↗


  1. Introduction

    Knight Editor is an extension of Yanfly's Grid-Free Doodads plugin that is designed for use with mouse point-and-click controls. Yanfly's plugin is very useful for parallax mapping, but sometimes editing maps with keyboard-controlled menus can feel a bit sluggish. That's where this plugin comes in!

    Installation

    To use this plugin, you must do the following:
    1. Install Yanfly's Grid Free Doodads plugin in your project, as per the plugin instructions. Make sure it works correctly before continuing.
    2. Download the Knight Editor plugin files.
    3. Copy the KNT_Editor.js plugin into your plugins folder.
    4. Copy the gui folder that comes with this plugin into your project's img folder.
    5. Copy the pixi-filters.js file that comes with this plugin into your project's /js/libs folder. This should be the same folder that contains your project's other pixi files.
    6. Replace your project's index.htmlfile with the one that comes with this plugin.
      • Alternatively, if you'd like to keep your current index.html file, insert the following line inside the <body></body> tag of your index file, after all other pixi-___.js files:
      • <script type="text/javascript" src="js/libs/pixi-filters.js"></script>
    7. Place this plugin below Yanfly's plugin in your load order and configure the plugin parameters to your liking.
    8. Load your project in play-test mode, and press F10 to verify the plugin is working.
    You can also download a sample project here.

    Note that I cannot redistribute Yanfly's own plugin under their terms, so the sample project only has a placeholder YEP_GridFreeDoodads.js file. Please get a copy of the plugin from Yanfly's website and replace the one inside the sample project to run it.

    Features & Usage Instructions

    Knight Editor retains most of the features you're used to from Yanfly's plugin, while adding a few new details. To place doodads:
    • Press the F10 key to bring up the editor UI
    • Click on a doodad folder at the bottom right of the screen
    • Click on the image of one of the loaded doodads to select it
    • ..and left-click anywhere on the map to place it! It's that simple :)
    • To unselect a doodad, right-click anywhere on the map
    There are a number of additional convenience features added to facilitate map editing:

    Spoiler
    • Doodad Selection
    bJb7ZaO.png

    If there are more doodads than fit in the visible space in either the Doodad Folder or Doodad Selection windows, you can scroll the contents by using the mouse wheel.
    • The Doodad Edit Panel
    st04cmI.png

    Click on an already placed doodad to bring up its properties panel and further modify it. You can also edit the properties of new doodads as you're placing them.
    • Positioning
    You can move an already placed doodad by clicking on it and dragging it to wherever you want. If you need more precise movement, the arrow keys will move them by single pixels. Holding shift while pressing an arrow key moves them more quickly.
    • Selection Highlights
    fdZnAe7.png

    The Editor will highlight your currently selected doodad to make it easier to distinguish from other similar doodads placed on the map. However, sometimes the effect can interfere with the doodad's appearance in ways that make it hard to edit or hard to look at. To address this, the editor has several different ways of highlighting your current selection. You can choose which one is used in the plugin parameters.
    • Additional Configuration
    You can also edit the fonts used by the editor, as well as the sound effects played when you use it by changing the plugin parameters. Feel free to change its appearance to your taste! Personally, I like using 'Arimo' as my editor font :kaojoy:
    • Import (Hotkey: I) OHXo9Wd.png
    Press the Import button to import doodads from another map. This can be useful when making several similar-looking maps. If you provide a Map ID that doesn't exist in your project, the Import Doodad window will display the ID number in red.
    • Save (Hotkey: Ctrl + S) o8ZnHaa.png
    Remember to save your changes often!

    S44lrn1.png

    If you forget whether your map has any unsaved edits, you can check the save indicator at the bottom of the screen. There will be an asterisk(*) shown next to the Doodad tab on the toolbar.
    • Minimize (Hotkey: N) XyMuRXi.png
    Sometimes it can be difficult to place doodads at the edges of the map, and the editor may cover up the place you want to put your doodads on. In those cases, you can use the Minimize button to hide the editor windows and make your entire map visible. Pressing the Minimize button again brings the editor windows back.
    • Undo (Hotkey: Ctrl + Z) CobAesx.png
    Everybody makes mistakes! If you accidentally delete a doodad or simple don't like your latest changes to it, you can reverse them by pressing the Undo button. This can also reverse the effects of the Delete All and Import buttons.
    • Delete All zq2rr09.png
    If you want to quickly remove all doodads from the map, you can use the Delete All button. There's no hotkey for this for safety reasons. If you press it by accident anyway, don't forget that you can still use the Undo button to reverse the changes!
    • Region Toggle (Hotkey: R) MMUK05Z.png
    Toggles showing your map regions, if you have any set. This can be useful when using some of Yanfly's other plugins, like Region Restrictions.
    • Revert Settings (Hotkey: Backspace) S43pdB1.png
    If you don't like a doodad's properties, you can use the Revert button in the Doodad Edit Panel to reset them all to their default values.
    • Copy (Hotkey: C) h2m2BjJ.png
    Sometimes you want to have very particular edits to a given doodad, then place several of them on the map. You can do this by editing a new doodad's properties while placing it, but what about doodads that have already been placed? That's what the Copy button is for. It will give you a copy of any already placed doodad on your cursor so you can make more of them with the exact same settings. You can find it in the Doodad Edit Panel.
    • Delete (Hotkey: Del) Q2a7uVB.png
    Remove any individual doodads you don't like by clicking the Delete button in the Doodad Edit Panel.
    • Map Scroll (Hotkeys: W A S D)
    Use WASD to move the camera while editing doodads. It will snap back to the player once you turn the editor off.
    • Change Layer (Hotkey: Mouse Wheel)
    You can change the current layer of a selected doodad by moving the mouse wheel up or down. This has the same effect as changing its layer in the Doodad Edit Panel.
    • Change Scale (Hotkey: Z X)
    Pressing X or Z will make a doodad bigger or smaller by 10% of its original size. Holding Shift while pressing Z/X will adjust its size in increments of 100%. This has the same effect as changing its Scale in the Doodad Edit Panel.
    • Rotate (Hotkey: Q E)
    Pressing E or Q will make a doodad rotate clockwise or counter-clockwise. Holding Shift while pressing Q/E will rotate faster. This has the same effect as changing its Rotation in the Doodad Edit Panel.
    • Change Opacity (Hotkey: Number Keys)
    Pressing the number keys 1 - 0 changes the opacity of the currently selected doodad. This has the same effect as changing its Opacity in the Doodad Edit Panel.
    • Toggle Grid Lock Mode (Hotkey: G)
    Sometimes, you may want doodads aligned with your map grid. You can press G to toggle Grid Lock Mode. You can further edit the size of the grid tiles in the Doodad Edit Panel. Unlike most other doodad settings, Grid Lock Mode is global and will stay on until you turn it off, even when selecting a different doodad or moving to a different map. This makes it a bit easier to edit many grid-locked doodads at a time.

    These are all summarized in the plugin description, so look there if you forget!

    Restrictions

    This can almost be used in the same way you use Yanfly's original plugin. However, there are a few additional restrictions:
    • Subfolders are not supported. All doodads must be in a folder of the form 'doodads/category/doodad.png'. So, 'doodads/Plants/Tree1.png' is OK, but 'doodads/Plants/Trees/Tree1.png' is not. In this case, please move the Tree folder, so it's directly under 'doodads/'.

    • Hue has been replaced entirely by Tone for color changes. If you load a map with existing doodads that have Hue changes, they will be lost . In that case, please re-adjust colors using the Tone sliders instead. This was done because adjusting Hue is significantly slower than adjusting Tone for sprites, and I want to avoid supporting features that can lead to laggy maps.
    Terms of Use

    This plugin may be freely used in any free or commercial project. You are free to modify this plugin, as long you credit the original author when doing so. Redistribution is not prohibited, but it's best avoided as you may end up sharing a copy that is out of date. Instead, I recommend sharing the plugin by linking to its Gitlab page.

    If you use this plugin to develop your project, credits are appreciated but not required.

    Credits

    The 'Grid Free Doodads' plugin was originally written by Yanfly:
    http://www.yanfly.moe/wiki/Grid-Free_Doodads_(YEP)

    Icons used under the free licence from:
    https://icons8.com

    pixi-filters is provided under the MIT license:
    https://github.com/pixijs/pixi-filters/blob/master/LICENSE

    Compatibility

    As of version 1.1, Yanfly's 'Extended Doodad Pack 1' plugin is supported. Make sure to include it before the Knight Editor in your load order.

    This plugin was made with MV version 1.6.1, so I can't guarantee compatibility with any older versions. I don't use older MV versions, so I don't have any plans of adding support for them.

    Other than that, there shouldn't be any major compatibility issues. Let me know if you have any problems.
  2. Awesome dude.
  3. can be very usefull for ppl that like using yanfly doodas, more over, when its compatable and do the same thing
    grid free doodas does with animation, it can make life so much easier with a single mouse click.
  4. OMG I'm so need this!!! Much more intuitive than the Yanfly's one. Thank you very much!
  5. What a GOD MODE is this..... It's so awesome I can't even tell! Thank you!
  6. This is amazing! I'll have to try that out once I get home! :D
    Though I wonder, will it be compatible with the extended doodad pack in the future? :0
  7. I'll add the extended doodad features in the next version
  8. Very nice Plugin :) But why it dont support Subfolders?
  9. Feraleth said:
    Very nice Plugin :) But why it dont support Subfolders?
    because it will much hard to code
    and the out come may input more lag
    like how mv deal with bgm now
    that it search the path before play
    unlike other thing that have a fixed path
  10. pasunna said:
    because it will much hard to code
    and the out come may input more lag
    like how mv deal with bgm now
    that it search the path before play
    unlike other thing that have a fixed path

    I Understand. For these types of problems I mostly use preload plugins. In itself, it's not that bad, it's just not so nice when you have a project that started with Subfolders. So that means that you have to insert all the doodads again and you can't take them over. Or am I wrong?
  11. Feraleth said:
    I Understand. For these types of problems I mostly use preload plugins. In itself, it's not that bad, it's just not so nice when you have a project that started with Subfolders. So that means that you have to insert all the doodads again and you can't take them over. Or am I wrong?
    you are not wrong and I just answer your why
    you use preload plugin that aplug and play work
    but this plugin creater he need to hard code everything
    and why it is not imprement in the first place
    because he think it not worth his time to deal with it
  12. pasunna said:
    you are not wrong and I just answer your why
    you use preload plugin that aplug and play work
    but this plugin creater he need to hard code everything
    and why it is not imprement in the first place
    because he think it not worth his time to deal with it

    Unfortunately my English is not that good and I therefore use a translator :D If that came across a bit "bumpy" from me, I'm sorry. Too bad, of course, but its absolutly understandable That he doesn't think it's worth it. Thank you for your answer :)
  13. Like pasunna said, I didn't implement subfolders because they add a lot of unnecessary extra complications to both the code and the UI.

    The Doodad information isn't encrypted or anything, it's all stored in human-readable English. If you have existing Doodads that you want to move out of subfolders, you can just open your Doodads.json file in any modern text editor (I use Visual Studio Code) and do a Find And Replace (Ctrl+H, usually) on your folder names. And don't forget to move the actual files, of course.

    LCFDxtI.png
  14. Kaelan said:
    Like pasunna said, I didn't implement subfolders because they add a lot of unnecessary extra complications to both the code and the UI.

    The Doodad information isn't encrypted or anything, it's all stored in human-readable English. If you have existing Doodads that you want to move out of subfolders, you can just open your Doodads.json file in any modern text editor (I use Visual Studio Code) and do a Find And Replace (Ctrl+H, usually) on your folder names. And don't forget to move the actual files, of course.

    LCFDxtI.png

    This is a valuable tip! Thank you very much :)
  15. Great plug-in, thanks for sharing!
  16. Great plugin
  17. This is amazing! Thank you so much!

    I'll be here waiting with baited breath for compatibility with switches - otherwise I can't use it for my game. Meanwhile, is there a workaround? Can I turn the extended doodad pack and this script on and off so I can place the doodads with your script on and the other off, and set up the switches with the extended plugin on and yours off? Or would turning it off erase the switch information?
    Edit: nevermind, I tested it, it works! So a nice workaround for now :)
  18. Updated the plugin to version 1.1 !

    Changes:
    • Cleaned up some of the editor code to make it easier to add features to it in the future
    • Fixed a bug with Doodad positions when not in Test Play mode
    • Added support for Switches and Party Member checks from Yanfly's Extended Doodad Pack 1. There is now a third tab under the Doodad Edit Panel containing the new options. They will only show up if you have the Extended Doodad Pack 1 plugin active and loaded before the Knight Editor in your load order.
    q8jPS6k.png

    Get the updated files in the link in the original post, or here. Don't forget to also update the image folder, a few new images were added for the switch UI.

    This should make for feature parity with everything Yanfly released for Doodads, so hopefully no more workarounds are needed now :)
  19. Oh YESSSSS switches! Thank you THANK YOU!
  20. Ok, I'm having a problem with it.

    This happens as soon as I click a previously placed doodad:

    1586967304201.png

    This doesn't happen if Yanfly's Extended Doodads plugin is off, and it doesn't happen with new doodads I place with your plugin even with the extended plugin on. (Even if I save and return, I can still edit it without problems, so I'm guessing it's some sort of extra info that was being saved before without your plugin?)