Graalians

Graalians (https://www.graalians.com/forums/index.php)
-   General Graal Discussion (https://www.graalians.com/forums/forumdisplay.php?f=2)
-   -   [v3] Level Editor Basics (https://www.graalians.com/forums/showthread.php?t=11234)

Kiwi 10-22-2012 09:02 AM

[v3] Level Editor Basics
 

level editor basics, with Kiwi


Yeah, this is version three. I was going to add two new sections, but then for various reasons I decided only to go with the tree tutorial. There are others around, but this way they're all in one place. So, for those who didn't see the previous versions, these are various tutorials on how to do basic things with the level editor. They're all in one place so people don't need to make their own threads. They really shouldn't need to do that anyway, because there are guides everywhere, if they knew how to search, but past evidence shows that people can't. So, here we go.
Also, if you like it, feel free to rep me.



- Getting the Level Editor -
Spoiler

First, you need to open up the Graal client. Log in, and in the bottom left of the window you will see this:
http://i1085.photobucket.com/albums/...raal/Start.png
Click start, and select 'Install Packages'. You will now see this:
http://i1085.photobucket.com/albums/...llPackages.png
Next, click, in the section 'Developer Tools', click 'Level Editor'. I made a handy red square to show you where it is (even if it is a wee bit small). You will now see a screen similar to this:
http://i1085.photobucket.com/albums/...or_install.png
In the bottom middle, there will be a button saying 'Install'. It's different to me because I've already installed it.

It will download it to your 'Graal' folder. Open it up, and you will see this:
http://i1085.photobucket.com/albums/...aal/Hurrah.png
NOTE: The Level Editor a .exe file, so you can only open it on Windows (unless you have Wine). An alternative option is Gonstruct.



- Making an NPC -
Spoiler

First, you'll need to open up Level Editor. On the right hand side, you should see this:
http://i1085.photobucket.com/albums/...ditor-Side.png
Click the option in the minuscule red square. You will see this:
http://i1085.photobucket.com/albums/..._selection.png
See that outline that kind of looks like one of those white body outlines at a crime scene, except in this crime scene the body was run over by a tank? Click it, and drag it on to your level. Double click it, and this will open:
http://i.imgur.com/lqSr1.png
The bottom white writing area is where you put the NPC script. To the right is the handy basic script list, and up the top is where you select the NPC image. Pretty simple.

NPCs are often used for treetops you can walk behind, or to add in tiles that aren't in the tileset. If you want to make your own NPC images, they MUST saved in 8-bit, or else they won't work.



- Creating a gMap -
Spoiler

If you don't know, a Gmap (Graal Map) is more than one level connected. They are used, on servers, to create large overworlds. They can be 2x2, 100x100, anything (but I'd advise against creating a 1000x1000 and deciding to make a gigantic world - keep it doable). You open them in the level editor, and use a handy arrow to move around all your levels.

To make one, you can use this handy tool, create by a guy named Rick. Isn't he nice?

It's very easy to use. First, type in your prefix. This can be something like 'mygmap_', or maybe something like 'worldiagmap_' - anything. Just don't forget an underscore. Next, chose your width, and your height. The default, 10x10, would create a Gmap that is ten levels by ten levels.

http://i1085.photobucket.com/albums/...pGenerator.png

Finally, choose your center x, and center y. This is a location like the 'unstick me' spot in Graal City - when you appear when you load the level. Now that you've selected all your options, click generate, and your gmap will download onto your computer, in a folder saying '[YOURPREFIX]_'.

http://i1085.photobucket.com/albums/..._toolbar-1.png

To open your Gmap, go into the Level Editor. Select open - it looks like an opened folder. Open your new folder, and select the level that should say, '[YOURPREFIX]_00-00'. Right now, it'll just be one level. But don't worry, to open the rest, simply open up a new NPC, and enter in the following:
PHP Code:

loadmap [YOURPREFIX]_.gmap

Here is an example of what it should look like:
http://i.imgur.com/LSFCT.png
You should now be able to traverse and create your new world!

[for another handy gMap generation option, take a look at Crow's Gmap Generator]



- Setting a Tileset -
Spoiler

A tileset is a set of graphics used to make Graal servers look different. You can have them in your levels, too.

First, you need to understand that there are two types of tilesets: type 0 and type 1. Type 0 is the illogical mess used in tilesets like pics1, the Classic PC tileset, and the iClassic tileset. It takes some time to get used to, but eventually you do.
Template :: Dusty's Guide

Type 1 is used in tilesets like the Delteria one, and the Era tileset. Tiles are arranged in a manner that is far more logical, but type one tilesets can still take just as long to get used to.
Template :: Template Two

For this guide, we'll pretend you are using a different tileset, and wanting to use pics1. First, make and open up a new NPC in your level, as shown in the NPC section. Type this into it:
PHP Code:

//#CLIENTSIDE
if (created) { 
  
removetiledefs
  
addtiledef pics1.png,,0


Where 'pics1.png' is is where you put the tileset name. For this, it needs to have '.png' at the end, and the tileset needs to be in the Tiles folder (Graal>Levels>Tiles). Again, it needs to be 8-bit.

Between the next two commas (,), you put the level prefix. For now, you could leave this blank. It's useful if you are working with a gMap, because it will change all the levels with the prefix you put in to have the same tileset (the one you just selected). Example:
PHP Code:

addtiledef pics1.png,mylevel_,0

Finally, where the '0' is is where the tileset type goes. I sure do hope you haven't forgotten what they are already. You should know, if you read this properly, that, because we're using pics1, it needs to stay a zero. If it was the Era tileset we wanted, it should become a one.

Sometimes, you'll get an error where there's a black zigzag running across the level, and it's grey where the tiles are meant to be. If this happens, make sure the script is all correct. If this still doesn't work, try deleting FILENAMECACHE.txt.




- Tiling Trees -


Dylan 10-22-2012 09:36 AM

Great little tutorial. :3 need to spread rep sry

Trylios 10-22-2012 10:46 AM

I do not know gmap a lot but I just would like to ask a question, the letters and numbers after the prefix of the filename is not that organized and sucks, is there a possible way to change it in a easy way? I have changed some filename and tried it again on the Level Editor, it doesn't let me go to that level.

I hope you could help, Thanks.

Johnaudi 10-22-2012 11:59 AM

Level Editor isn't a good tool for Gmaps.

Good tutorial tho!

Robert. 10-22-2012 03:45 PM

There is a special programme for Gmaps. I think you can download it in Developement Tools.

Johnaudi 10-22-2012 07:13 PM

Quote:

Posted by Robert. (Post 218492)
There is a special programme for Gmaps. I think you can download it in Developement Tools.

Yes, I'm used to it a lot, I'll make a tutorial about it tomorrow =]

Kiwi 10-22-2012 08:30 PM

I made it on what I use, and how I like to do things. I find the one in the tutorial best, so.

MattKan 10-22-2012 08:52 PM

Quote:

Posted by Johnaudi (Post 218435)
Level Editor isn't a good tool for Gmaps.

Good tutorial tho!

Works perfectly for me :0

Nivag pls 10-23-2012 01:21 AM

Looking good :)

ArtaXerXes 10-24-2012 03:24 AM

This is a great tutorial for a Graal player who hasn't dabbled in Graal development yet!

Johnaudi 10-24-2012 08:05 PM

Quote:

Posted by MattKan (Post 218634)
Works perfectly for me :0

It does, but placing tiles between two levels will be cut by the left, so it won't be very handy.

Trylios 10-25-2012 06:29 AM

I don't think that is "_" is needed on the prefix because it will be doubled.

Crow 10-25-2012 01:38 PM

Quote:

Posted by Trylios (Post 218415)
I do not know gmap a lot but I just would like to ask a question, the letters and numbers after the prefix of the filename is not that organized and sucks, is there a possible way to change it in a easy way? I have changed some filename and tried it again on the Level Editor, it doesn't let me go to that level.

I hope you could help, Thanks.

The format used by Rick, which I also inherited in my tool, is actually just perfect, and, in fact, very organized. Levels to the right and bottom of the "center" get numbered accordingly, levels to the left and top get letters instead. This allows easy expansion of gmaps at a later point in time. You can't just rename the levels either, since you would also have to rename their links in the adjacent levels and their reference in the .gmap file.


Quote:

Posted by Trylios (Post 220349)
I don't think that is "_" is needed on the prefix because it will be doubled.

You're correct.

Fatnoob 10-25-2012 02:45 PM

I wanna know when graal is making MAC OS X programs... >_<

Kiwi 10-25-2012 07:22 PM

Quote:

Posted by Fatnoob (Post 220539)
I wanna know when graal is making MAC OS X programs... >_<

Use Gonstruct and stop complaining. I want a brand new shiny level editor first.


All times are GMT. The time now is 03:00 PM.

Powered by vBulletin/Copyright ©2000 - 2024, vBulletin Solutions Inc.