Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Code Gallery (https://forums.graalonline.com/forums/forumdisplay.php?f=179)
-   -   Level Editor (https://forums.graalonline.com/forums/showthread.php?t=134258087)

Switch 02-20-2010 01:05 AM

Level Editor
 
7 Attachment(s)
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).

cbk1994 02-20-2010 05:59 AM

The interface needs some work, and I would recommend removing signs completely. You might also want to eventually add tabs like with the offline level editor.

Besides that, it looks off to a good start :)

Deas_Voice 02-20-2010 03:04 PM

nice work, man.
i think you should use a "GuiTreeViewCtrl" for loading levels, if people are going to use this for all their levels.
and tabs for working with more then 1 level.
^^

awesome work, keep at it!

coreys 02-20-2010 08:22 PM

Like I said on RC, you need multiple tile selection :3 And even without there's no sort of feedback showing that you've selected a tile, it is pretty confusing at first.

Ooo, and flood fill :D

Switch 02-22-2010 02:15 AM

1 Attachment(s)
Small update:
Added hints for textboxes with little to no information (links, signs, NPCs, and the tileset changer).

Switch 02-23-2010 12:48 AM

1 Attachment(s)
Another update:
LAYER SUPPORT!
This might not be 100% but I think it's good enough for use. If there's a problem post what it is here.
Also, ignore the white pixel at the top left of the level in view. I needed to add that so you didn't get a black screen over your level. It won't actually be there in the level.

Soala 02-23-2010 01:06 AM

Geez Switchy, stop getting x100 times better everyday <3

Switch 02-24-2010 12:10 AM

1 Attachment(s)
Fixed some transparent tileset problems.

TSAdmin 02-24-2010 02:08 AM

For adding/editing level links, I wouldn't just make someone face 6 text fields filled with numbers, they should probably have text labels denoting what changing the number in the field will change (New X, New Y, X, Y, W, H)

Switch 02-24-2010 03:03 AM

Quote:

Originally Posted by TSAdmin (Post 1558306)
For adding/editing level links, I wouldn't just make someone face 6 text fields filled with numbers, they should probably have text labels denoting what changing the number in the field will change (New X, New Y, X, Y, W, H)

Quote:

Originally Posted by Switch (Post 1557748)
Small update:
Added hints for textboxes with little to no information (links, signs, NPCs, and the tileset changer).

fillin up space dawg

TSAdmin 02-24-2010 05:26 AM

Quote:

Originally Posted by Switch (Post 1558322)
reply

I know, but not quite what I'm getting at. Hints are one thing, the thing is you have to hover your mouse over them to find out what they are though there's more than sufficient room to just add text labels, which is what my reply addressed.

Quote:

Originally Posted by TSAdmin (Post 1558306)
For adding/editing level links, I wouldn't just make someone face 6 text fields filled with numbers, they should probably have text labels denoting what changing the number in the field will change (New X, New Y, X, Y, W, H)


Switch 02-24-2010 05:50 AM

Quote:

Originally Posted by TSAdmin (Post 1558333)
I know, but not quite what I'm getting at. Hints are one thing, the thing is you have to hover your mouse over them to find out what they are though there's more than sufficient room to just add text labels, which is what my reply addressed.

I see what you're saying.
At the time of making them I didn't want to make the window larger than it was because it was fitting perfectly so I just added hints, but I could replace them with some GuiTextCtrls.

fowlplay4 02-24-2010 06:12 AM

Well since you're scripting it, cut the fat and improve it instead of mimicking what we already have.

I.e: X, Y, Width, and Height really aren't needed.

Things that would be useful:

- NPC Filters (Hiding Character NPCs only, Hiding other NPCs, Hide All NPCs)
- Improved Link Editing (Hover-over link to see/edit exit details)

Also, Nice work.

Switch 02-28-2010 07:35 AM

Quote:

Originally Posted by fowlplay4 (Post 1558338)
Well since you're scripting it, cut the fat and improve it instead of mimicking what we already have.

I.e: X, Y, Width, and Height really aren't needed.

Things that would be useful:

- NPC Filters (Hiding Character NPCs only, Hiding other NPCs, Hide All NPCs)
- Improved Link Editing (Hover-over link to see/edit exit details)

Also, Nice work.

I was working with the assumption that most level artists wanted to get into the new style of level NPC scripting and only using join() for most things, so I just put everything in a list (including signs and links) so you can edit everything from 1 place easily, especially when you put one over another and want to get the specific one.

Admins 02-28-2010 03:12 PM

Text labels are always good do that it also works on touchscreen :)


All times are GMT +2. The time now is 12:12 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.