Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 11-27-2007, 10:03 AM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
Online Level Editor : Progress

So I decided to start an online level editor. I will post the progress of this as I work on it. This will include up-to-date features, planned features, screenshots, and any ideas you all have for it.

Current Features:
  • Loads the current tileset.
  • Docks onto the side of the window, does no obstruct gameplay
  • Can be hidden and opened at will..
  • Loads your predefined object list from clientside. This means you can create object lists for your tileset via the offline editor, and they will transfer to the online editor.
  • Can be resized at intervals of 16 pixels.

Planned Features:
  • New GUI graphics, similar to offline editor.
  • Basic level editing features--tile manipulation and such.
  • Links, Sign, Baddy, Chest manipulation.
  • Infinite(or as many as Graal can handle) layer support. I have a very firm idea of how this will work, so this shouldn't be too hard.
  • 8-directional, non-hindered movement.
  • More advanced tile manipulation tools, such as multiple tile background selection. This will make it possible to bucket-fill with a layout of tiles, instead of just a single tile.
  • When it is possible, external editor window.

So if you have any ideas, go ahead! I also need some help with a few things. Right now I can load the tileobject files, but I don't know how to extract the tile information from what's in them. I'll also need some help with the more complicated things, such as bucket-filling(calculating what can be filled).
Here's some screenshots.
Attached Thumbnails
Click image for larger version

Name:	editor1.JPG
Views:	308
Size:	45.3 KB
ID:	43391   Click image for larger version

Name:	editor2.JPG
Views:	267
Size:	48.6 KB
ID:	43392  
Reply With Quote
  #2  
Old 11-27-2007, 11:43 AM
Novo Novo is offline
[TServerDeveloper]
Join Date: Jun 2006
Posts: 448
Novo will become famous soon enough
KuJi said:

PHP Code:
Read Tile Objects / New World tiles.

Each tile consists of two letters. For our example we will use "J4"
which is the black tile (0x278 or 632)

function 
onCreated()
{
    
// Read Tile Objects format ex.
    
temp.read = {"J""4"}; // each tile consists of two letters
    
temp.b64 "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
    
temp.tile = (temp.b64.pos(temp.read[0]) << 6) + (temp.b64.pos(temp.read[1]));
    
    echo(
"Tile: " temp.tile " - " 0x278);

Also... "Bucket-Filling" is known as "Flood-Filling". You can find such by having a pathfinder where the edge-cost is 0, and you want all possible vertex that can be reached.
Reply With Quote
  #3  
Old 11-27-2007, 11:48 AM
Tolnaftate2004 Tolnaftate2004 is offline
penguin.
Join Date: Jul 2004
Location: Berkeley, CA
Posts: 534
Tolnaftate2004 is a jewel in the roughTolnaftate2004 is a jewel in the rough
Send a message via AIM to Tolnaftate2004
PHP Code:
function bucketfill(fx,fy,ft) {
  
// fill x, fill y, fill tile
  
temp.rt tiles[fx,fy];
  
tiles[fx,fy] = ft;
  
updateboard(fx,fy,1,1);
  for (
temp.i=0temp.i<4temp.i++) {
    
temp.tx fx+vecx(temp.i);
    
temp.ty fy+vecy(temp.i);
    if (
tiles[temp.tx,temp.ty] == temp.rt)
      
bucketfill(temp.tx,temp.ty,ft);
  }
  return;

I can change this to flood a pattern if you wish, I just need some more details about it (a random tile of several or a pattern?, etc.).
__________________
◕‿‿◕ · pfa · check yer syntax! · src

Killa Be: when i got that locker in 6th grade the only thing in it was a picture of a midget useing a firehose :/
Reply With Quote
  #4  
Old 11-27-2007, 02:52 PM
Angel_Light Angel_Light is offline
Varia Developer
Angel_Light's Avatar
Join Date: Nov 2005
Location: Knoxville, TN
Posts: 1,684
Angel_Light is on a distinguished road
Send a message via AIM to Angel_Light Send a message via MSN to Angel_Light
Few more features I suggest,
  • Sand Path Cursor
  • Ability to load more than one tileset
  • Ability to "Scroll" through multiple Tilesets
  • Script Editor?
__________________
Deep into the Darkness peering...
Reply With Quote
  #5  
Old 11-27-2007, 04:23 PM
Laek2007 Laek2007 is offline
Hooaah!!!
Laek2007's Avatar
Join Date: Nov 2007
Location: Uppsala, Sweden
Posts: 137
Laek2007 is an unknown quantity at this point
Send a message via AIM to Laek2007
Moondeath has already done a Online editor. But I'm not a huge fan of it.

I'm oldfashion even if someone did a good online editor. I would still use the offline one
__________________
  • Quit graal
Reply With Quote
  #6  
Old 11-27-2007, 06:44 PM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
Quote:
Originally Posted by Angel_Light View Post
Few more features I suggest,
  • Sand Path Cursor
  • Ability to load more than one tileset
  • Ability to "Scroll" through multiple Tilesets
  • Script Editor?
I was going to do the Sand Path... but found no use since most level makers don't really like it, and since you can easily just put the script in a weapon.
As for the tileset thing... to be honest I don't know how to do this.
I also don't know about the script editor... I might, but I think that's a bit out of my league.

Also, thanks a ton for all the info guys, it really helps a lot.

And I'm a big fan of the offline editor as well... but I don't see that getting any updates anymore, so I'm going to try to tailor this as close to the offline one as possible.
Reply With Quote
  #7  
Old 11-28-2007, 12:24 AM
Admins Admins is offline
Graal Administration
Join Date: Jan 2000
Location: Admins
Posts: 11,693
Admins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud of
I can eventually provide the current online level editor from Kingdoms Debug if you are going to improve that, so that we don't redo the work of each other. You can also contact Skyld for that I think.

I think it would be best to not support classic chests, baddies etc. anymore, and use npcs (putnpc2) for everything, make a new chest class or so.
Reply With Quote
  #8  
Old 11-28-2007, 12:31 AM
Inverness Inverness is offline
Incubator
Inverness's Avatar
Join Date: Aug 2004
Location: Houston, Texas
Posts: 3,613
Inverness is a jewel in the roughInverness is a jewel in the rough
I was going to make an online editor myself, so I'd like to take a shot at that.
__________________
Reply With Quote
  #9  
Old 11-28-2007, 01:20 AM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
I agree, I guess it is a bit fruitless to work on something already done, but at the same time it's a challenge for me, and a chance for me to have it the way I like it(as well as others who give input). I also agree I should probably remove the baddies/chests/NPCs bit.
I might change my mind when I see the Kingdoms editor though.

Either way, a small update, predefined objects are completely done This is what I like the most about it because it incorporates offline editing into online editing. Also makes it easy for those who work with their tilesets offline to be able to continue working with their predefined objects online as well. Also proud because it's barely noticeable loading the data, even on my 500Mhz. Flood-filling is also done, as is setting your flood tile.

(Ya, the screenshot doesn't show the right tiles, but only because there is a custom tileset in use, and no level with pics1.png).
Attached Thumbnails
Click image for larger version

Name:	editor3.JPG
Views:	264
Size:	61.7 KB
ID:	43399  
Reply With Quote
  #10  
Old 11-28-2007, 02:18 AM
Inverness Inverness is offline
Incubator
Inverness's Avatar
Join Date: Aug 2004
Location: Houston, Texas
Posts: 3,613
Inverness is a jewel in the roughInverness is a jewel in the rough
Hm, for me apparently, level.npcs seems to be empty clientside yet is correct serverside?
__________________
Reply With Quote
  #11  
Old 11-28-2007, 02:25 AM
Angel_Light Angel_Light is offline
Varia Developer
Angel_Light's Avatar
Join Date: Nov 2005
Location: Knoxville, TN
Posts: 1,684
Angel_Light is on a distinguished road
Send a message via AIM to Angel_Light Send a message via MSN to Angel_Light
Are these implemented?
  • Copying tiles that have been already layed
  • Copying and pasted slected tiles
  • Copy, cut, and paste buttons

as for the multiple tilesets you can just index the tile images and have the player set the tileset image to certain indexes. Then have a scroll bar with the tilest image name and use the tileset image the player has selected.
__________________
Deep into the Darkness peering...
Reply With Quote
  #12  
Old 11-28-2007, 02:31 AM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
Copying tiles that have been already layed - Not yet, but will be. I've already accomplished this offline so I know how to.
Copying and pasted slected tiles - Will be easily done.
Copy, cut, and paste buttons - Also easily done. I'm going to add a toolbar to the top of the screen that has different tool buttons as well as the layer stuff.

As for multiple tilesets, it would be possible to organize them, I'm just unsure how to actually implement them in addtiledefs.
Reply With Quote
  #13  
Old 11-28-2007, 02:35 AM
Inverness Inverness is offline
Incubator
Inverness's Avatar
Join Date: Aug 2004
Location: Houston, Texas
Posts: 3,613
Inverness is a jewel in the roughInverness is a jewel in the rough
You can change the tileset of the level but not use more than one o.o
Thats what it sounds like you're trying to do.
__________________
Reply With Quote
  #14  
Old 11-28-2007, 09:54 AM
Pimmeh Pimmeh is offline
Rgesitreed Uesr
Pimmeh's Avatar
Join Date: May 2007
Location: Utrecht, the Netherlands
Posts: 1,586
Pimmeh has a spectacular aura about
Send a message via AIM to Pimmeh Send a message via MSN to Pimmeh
Oh when its done I am so gonna hug you untill you give it TO MEH
__________________
Oh, Death,
No wealth, no ruin, no silver, no gold
Nothing satisfies me but your soul
Reply With Quote
  #15  
Old 11-29-2007, 03:20 AM
Inverness Inverness is offline
Incubator
Inverness's Avatar
Join Date: Aug 2004
Location: Houston, Texas
Posts: 3,613
Inverness is a jewel in the roughInverness is a jewel in the rough
Heres what I've done for my own Level Editor so far. Don't expect the script to be nice and pretty and super-efficient.
I just completed the multiple tile selection and pasting into the level in its most basic form.

Also it joins util_triggercontrol, which can be found here:
http://forums.graalonline.com/forums....php?p=1354520
Attached Files
File Type: txt LE.txt (12.2 KB, 249 views)
__________________
Reply With Quote
  #16  
Old 11-29-2007, 04:48 AM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Quote:
Originally Posted by Stefan View Post
I can eventually provide the current online level editor from Kingdoms Debug if you are going to improve that, so that we don't redo the work of each other. You can also contact Skyld for that I think.

I think it would be best to not support classic chests, baddies etc. anymore, and use npcs (putnpc2) for everything, make a new chest class or so.
You should release it to the public.

Then I could finally leave Windows 4 good, and go to Mac for developing!
__________________
Reply With Quote
  #17  
Old 01-10-2008, 05:52 PM
Deas_Voice Deas_Voice is offline
Deas
Deas_Voice's Avatar
Join Date: Jun 2007
Location: Sweden
Posts: 2,264
Deas_Voice is a jewel in the roughDeas_Voice is a jewel in the rough
Send a message via AIM to Deas_Voice Send a message via MSN to Deas_Voice Send a message via Yahoo to Deas_Voice
Quote:
Originally Posted by Inverness View Post
Heres what I've done for my own Level Editor so far. Don't expect the script to be nice and pretty and super-efficient.
I just completed the multiple tile selection and pasting into the level in its most basic form.

Also it joins util_triggercontrol, which can be found here:
http://forums.graalonline.com/forums....php?p=1354520
if u say update level the tiles disipairs
but its nice and a good start
__________________
.
WTF is real life, and where do I Download it?
There is no Real Life, just AFK!
since 2003~
I Support~
ღAeonღ | ღTestbedღ | ღDelteriaღ

if you are going to rep me, don't be an idiot, leave your name!
I got nothing but love for you
Reply With Quote
  #18  
Old 01-10-2008, 06:40 PM
Chompy Chompy is offline
¯\(º_o)/¯
Chompy's Avatar
Join Date: Sep 2006
Location: Norway
Posts: 2,815
Chompy is just really niceChompy is just really niceChompy is just really nice
Send a message via MSN to Chompy
Quote:
Originally Posted by Deas_Voice View Post
if u say update level the tiles disipairs
but its nice and a good start
'savelevels=true'

must be in server options
__________________
Reply With Quote
  #19  
Old 02-24-2008, 10:16 PM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
So I've got a question.
I figure the best way to save levels(thus, using a button), would be to manually change the data in the .nw file text-wise.
I want to be able to show changes made by tiles, but change tiles[x,y] and updating board has some problems... mainly cut bush tiles and such make bushes appear. How to circumvent this, without using images?
Reply With Quote
  #20  
Old 02-24-2008, 10:18 PM
Inverness Inverness is offline
Incubator
Inverness's Avatar
Join Date: Aug 2004
Location: Houston, Texas
Posts: 3,613
Inverness is a jewel in the roughInverness is a jewel in the rough
Quote:
Originally Posted by Deas_Voice View Post
if u say update level the tiles disipairs
but its nice and a good start
Its not supposed to save.
__________________
Reply With Quote
  #21  
Old 02-24-2008, 10:18 PM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
What I did when messing around making one was update the board and tiles on clientside, and keep an array of the changes, and then if they hit "save" then it triggers the server with the array, which just uses updateboard and changing the tiles. Also had an option that immediately triggers the server as well.

If I can get Jave to fix my IP I can post some code.
__________________
Reply With Quote
  #22  
Old 02-25-2008, 12:42 AM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
Quote:
Originally Posted by cbkbud View Post
What I did when messing around making one was update the board and tiles on clientside, and keep an array of the changes, and then if they hit "save" then it triggers the server with the array, which just uses updateboard and changing the tiles. Also had an option that immediately triggers the server as well.

If I can get Jave to fix my IP I can post some code.
The problem with this is certain tiles will update themselves... bushes and such.
Reply With Quote
  #23  
Old 02-25-2008, 01:12 AM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Quote:
Originally Posted by DustyPorViva View Post
The problem with this is certain tiles will update themselves... bushes and such.
Oh, I see what you mean.

Yeah, only way to do it is through editing the file
__________________
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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


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