Knight Editor: Visual Doodad Editing

Kaelan

Veteran
Veteran
Joined
May 14, 2012
Messages
783
Reaction score
503
First Language
Portuguese
Primarily Uses
RMMV
Knight Editor
version 1.1.0



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 here, by clicking on the download button.
  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:

  • Doodad Selection


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


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


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)
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)
Remember to save your changes often!



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)
Sometimes it can be difficult to place doodads at the edges of the map, and the editor map 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)
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. Just keep in mind that you can only reverse the most recent change!
  • Delete All
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)
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)
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)
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)
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: Q E)
Pressing E or Q will make a doodad bigger or smaller by 10% of its original size. Holding Shift while pressing Q/E will adjust its size in increments of 100%. This has the same effect as changing its Scale 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.
 
Last edited:

padr81

Guy whose game is taking too long.
Veteran
Joined
Apr 26, 2013
Messages
706
Reaction score
702
First Language
english
Primarily Uses
N/A
Awesome dude.
 

ShadowDragon

Veteran
Veteran
Joined
Oct 8, 2018
Messages
1,696
Reaction score
556
First Language
Dutch
Primarily Uses
RMMV
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.
 

phamtruong1992

Mage Art - Green Dragon
Veteran
Joined
Nov 22, 2015
Messages
190
Reaction score
213
First Language
English
Primarily Uses
RMMV
OMG I'm so need this!!! Much more intuitive than the Yanfly's one. Thank you very much!
 

fizzly

Veteran
Veteran
Joined
Mar 23, 2012
Messages
596
Reaction score
366
First Language
Polish
Primarily Uses
RMMV
What a GOD MODE is this..... It's so awesome I can't even tell! Thank you!
 

Godarkhaos

Villager
Member
Joined
Oct 25, 2018
Messages
9
Reaction score
1
First Language
French
Primarily Uses
RMMV
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
 

Kaelan

Veteran
Veteran
Joined
May 14, 2012
Messages
783
Reaction score
503
First Language
Portuguese
Primarily Uses
RMMV
I'll add the extended doodad features in the next version
 

Feraleth

Veteran
Veteran
Joined
Jun 19, 2019
Messages
51
Reaction score
8
First Language
German
Primarily Uses
RMMV
Very nice Plugin :) But why it dont support Subfolders?
 

pasunna

Veteran
Veteran
Joined
Feb 3, 2019
Messages
485
Reaction score
190
First Language
thai
Primarily Uses
RMMV
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
 

Feraleth

Veteran
Veteran
Joined
Jun 19, 2019
Messages
51
Reaction score
8
First Language
German
Primarily Uses
RMMV
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?
 

pasunna

Veteran
Veteran
Joined
Feb 3, 2019
Messages
485
Reaction score
190
First Language
thai
Primarily Uses
RMMV
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
 

Feraleth

Veteran
Veteran
Joined
Jun 19, 2019
Messages
51
Reaction score
8
First Language
German
Primarily Uses
RMMV
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 :)
 

Kaelan

Veteran
Veteran
Joined
May 14, 2012
Messages
783
Reaction score
503
First Language
Portuguese
Primarily Uses
RMMV
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.

 

Feraleth

Veteran
Veteran
Joined
Jun 19, 2019
Messages
51
Reaction score
8
First Language
German
Primarily Uses
RMMV
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.

This is a valuable tip! Thank you very much :)
 

CoryH

Veteran
Veteran
Joined
Aug 25, 2018
Messages
115
Reaction score
87
First Language
English
Primarily Uses
RMMV
Great plug-in, thanks for sharing!
 

BCj

Veteran
Veteran
Joined
Jun 19, 2014
Messages
1,516
Reaction score
749
First Language
Dutch
Primarily Uses
N/A
Great plugin
 

AfroditeOhki

Villager
Member
Joined
Oct 3, 2019
Messages
28
Reaction score
9
First Language
Portuguese
Primarily Uses
RMMV
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 :)
 
Last edited:

Kaelan

Veteran
Veteran
Joined
May 14, 2012
Messages
783
Reaction score
503
First Language
Portuguese
Primarily Uses
RMMV
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.

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 :)
 
Last edited:

AfroditeOhki

Villager
Member
Joined
Oct 3, 2019
Messages
28
Reaction score
9
First Language
Portuguese
Primarily Uses
RMMV
Oh YESSSSS switches! Thank you THANK YOU!
 

AfroditeOhki

Villager
Member
Joined
Oct 3, 2019
Messages
28
Reaction score
9
First Language
Portuguese
Primarily Uses
RMMV
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?)
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

I based this on the armor of Actor 1_7 of the RTP. Hair is from Derex and Sythian Bard.
Stream will be live shortly! Going to do another art stream tonight so that I can finish my Fauna Focus piece~ Feel free to drop by!
Humans are fallible creatures, we all know that. It's when we're forced to look at ourselves that we start to disagree. :p
Expectation: Working on boss battle.
Reality: "Look at how awful are these code and database organization. Let me clean this mess", *yet, casually adding more modules that I have no idea if I would use it later*
Trying to learn to read Japanese so I read my manga. I like to buy them without all the edits made during translation.

Forum statistics

Threads
97,863
Messages
947,438
Members
129,086
Latest member
mikeymastermind
Top