I've been working on a level editor for the past few days after seeing Dusty's tile functions and realizing how I could use them effectively.
You can change the key needed to be pressed to open the editor in onKeyPressed() on the clientside. The default is F9.
(npcserver) needs folder rights to "r [folders that can load]/*.nw" to load and "rw [folders that can load and save]/*.nw" to load and save them online. Default folder is "levels/*.nw", so you should give (npcserver) folder rights to it.
NPC Code:
r levels/mainlevels/*.nw
rw levels/uploadedlevels/*.nw
The above will allow it to load the levels in levels/mainlevels/ but not save, and will allow it to load and save levels in levels/uploadedlevels/.
You can change the folder that will load/save online by changing temp.folder. You can also add checks for who is trying to load/save, but temp.folder has to be the folder and (if you want) file name start they can use. Default setting is "levels/[accountname]_". Remember that you must include "/"'s and can't load multiple folders at the same time; It is suggested you have people save to their own folders/a to-be-moved folder instead of a main folder which an admin can move for security.
PHP Code:
temp.folder = "levels/mainlevels/"; //Will allow the editor to load the folder "levels/mainlevels/".
temp.folder = "levels/uploadedlevels/" @player.account@ "_"; //Will allow the editor to load the folder "levels/uploadedlevels/" with every level starting with the player's account and an underscore.
Offline loading occurs in the player's "Graal/levels/" folder and saving occurs in the player's "Graal/scriptfiles/[servername]/" folder on their computer.
Near future updates:
- Layers (ASAP)
- Multiple tile selection/placement
- Right-click fill
Thanks to Dusty for his tile functions (
http://forums.graalonline.com/forums...hp?t=134258008), Aeko for the button images, and Skyld for the NPC scripting syntax highlighting profile (the ones used in Scripted RC).