Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Graphic Design (https://forums.graalonline.com/forums/forumdisplay.php?f=9)
-   -   Adding tiles to your tileset - tutorial! (https://forums.graalonline.com/forums/showthread.php?t=47038)

Mykel 08-12-2003 02:24 AM

Adding tiles to your tileset - tutorial!
 
This could have gone in either GFX, or scripting, but I figure, if you need this script, it is for GFX, so I put it here


My prefered use, is addtiledef2
So that is the command I will show you how to use.


In the commands, it tells you to use it like this:

NPC Code:
addtiledef2 image,levelstart,x,y;



So you will start your script with this:

NPC Code:
addtiledef2



Ok, now, your image. To look right, it must fit the graal tiles. The graal tiles are 16pixels x 16pixels. Also, if it is .png, it must be 8bit to be able to be used. Put your image in Graal2001-->Levels-->Webgifs
Then go back to your script, and put the imagename in. My example imagename: untitled.png Now my example script looks like this:

NPC Code:
addtiledef2 untitled.png



Now for the level start. My example level start will be new1.nw Instead of putting new1.nw, I can just put new for my 'levelstart', and this way, any level that starts with new, will have this custom tileset. So put your levelname in. My example script now looks like this:

NPC Code:
addtiledef2 untitled.png,new



Now it is time for the x,y
What tile do you want to replace? Lets say you want to replace the yellow flower in the upper left. Left click, and highlight the tile and while still with the mouse held down look to the bottom of the editor screen. It says:

NPC Code:
(0,1)->(1,2)=(1,1)



All you need are the first two numbers. This means that the Tile is at 0x, and 1y.
This is a point where many people mess up.
Remember, that each tile is 16 pixels, so you can't just put in 0,1 for the x,y.
You should put 0*16,1*16; instead. The asterik (*) command in GScript means to multiply. So my final example script looks like this:

NPC Code:
addtiledef2 untitled.png,new,0*16,1*16;



And if you have done everything properly, it should work.

wonderboysp2p 08-12-2003 07:03 AM

:confused: im still a lil confused... im just now starting on gfx and does that just start replacing the tileset at the specified x,y?

Mykel 08-12-2003 07:05 AM

Yea, you hover over what tile in the tileset that you want to replace.

wonderboysp2p 08-12-2003 07:32 AM

eww wouldnt that take awhile to use an entire custom tileset X_x theres gotta be another way...

Snakeandy7 08-12-2003 12:17 PM

NPC Code:

addtiledef pics1.png,levelstart,0-1;

:p
deciding if it's new or edited..i think 0 - edited and 1- new).

Mykel 08-12-2003 07:13 PM

Quote:

Originally posted by Snakeandy7
NPC Code:

addtiledef pics1.png,levelstart,0-1;

:p
deciding if it's new or edited..i think 0 - edited and 1- new).

Yea, that's for addtiledef tho, not addtiledef2.

Mykel 08-12-2003 09:53 PM

I had messed up so for anyone who was confused, read back over my x,y part. I edited it. It was wrong.

GoZelda 08-27-2003 09:19 PM

I always went wrong with x and y =x
But now i know it's like setshape.

HunterTerryon 08-27-2003 10:11 PM

Teach us to do what era did XP I don't want my tile set limited to one bed and 2 chairs

marcoR 08-27-2003 10:54 PM

adding threads to the level section! lol jk... but I think this should be in level editting shouldnt it? meh, it's a half point, and seeing as we know each other i'll be nice. I forget how to do this tho...

Kappa00p2p 08-28-2003 07:52 PM

i was trying to get my servers tileset working. the script worked offline perfectly... however online my server almost died because all the tiles messed up... ie u couldnt walk on grass.

Mykel 11-05-2003 07:09 PM

Make sure you have all the GFX uploaded onto the server.

Muha_builder 11-05-2003 07:50 PM

a server i worked on had the same prob he restarted the server and it worked perfectly

davidpsy 11-05-2003 08:51 PM

1 Attachment(s)
Quote:

Originally posted by HunterTerryon
Teach us to do what era did XP I don't want my tile set limited to one bed and 2 chairs

See what era did was use addtiledef with a type 1 tileset. See with addtiledef2 it allows you to cover images either as big or smaller then the current tileset over it. So with addtiledef it puts an entire tileset image over the pics1 tileset. It also allows you to use two different types of tilesets type 0 which is pics1 and then there is type 1 which is this.

Gambet 11-07-2003 02:42 AM

well the script i use (i only use this when testing a tile set because you guys must have no lives if you add that script for every lvl)

//#CLIENTSIDE
if (created) {
addtiledef blah.png,lvl,1;
}

//Key//
blah.png (tiles gfx)
1 (the type)
////////

its a simple script and you guys really dont know much about inserting tiles to a server, and i think era split there tiles in 2 parts and uploaded it like that.

To add a tile set to your server (if its more then 64k), you put the tiles on a website then send stefan that website link and he will then add the tile set for you
(Note: the tiles will be placed in every lvl of ur server)

and thats how you do it, but if the tiles is shorter then 64k then you have to do it on your own.

Mykel 11-07-2003 06:08 PM

Quote:

Originally posted by Gambet
well the script i use (i only use this when testing a tile set because you guys must have no lives if you add that script for every lvl)

//#CLIENTSIDE
if (created) {
addtiledef blah.png,lvl,1;
}

//Key//
blah.png (tiles gfx)
1 (the type)
////////

its a simple script and you guys really dont know much about inserting tiles to a server, and i think era split there tiles in 2 parts and uploaded it like that.

To add a tile set to your server (if its more then 64k), you put the tiles on a website then send stefan that website link and he will then add the tile set for you
(Note: the tiles will be placed in every lvl of ur server)

and thats how you do it, but if the tiles is shorter then 64k then you have to do it on your own.

You don't have to put it in every level. See, look at the following:
------------------------------------------------------------------------
addtiledef2 untitled.png,new,0*16,1*16;
------------------------------------------------------------------------

The new makes it so that tileset works in all levels that start with new. You can change it to like levela, or anything like that, and have infinite tilesets that you need. They just correspond to the levelname.

Mykel 03-13-2004 02:43 AM

1 Attachment(s)
Lol, sorry for reviving, but I realized how usefull this still is as I went in to add grass tiles. But now this happened. The script is for it to replace 4,26 (the swamp tiles.)
o.o

WanDaMan 03-13-2004 12:35 PM

Quote:

Originally posted by Mykel
Lol, sorry for reviving, but I realized how usefull this still is as I went in to add grass tiles. But now this happened. The script is for it to replace 4,26 (the swamp tiles.)
o.o

Your x n' y is a bit out of place? ;)

haunter 03-13-2004 09:19 PM

Amatures....


Instead of putting 4,26 as your X,y co-ords put: 4*16,26*16

Mykel 03-13-2004 09:23 PM

lmao, guess I shudda read my own tutorial! :)

Raelyn 06-18-2004 08:51 PM

Ok, I have been trying to get tilesets I make to work for a long time, and I am a horrible scripter. -.- I just noticed this post and decided maybe it wasn't a lost cause, so I opened the editor and tried it. Though, it doesn't seem to be working unfortunately, it's not even showing any change whatsoever. Am I doing something wrong?


Here is what I have:

// NPC made by *Raelyn (VIP)
if (playerenters) {removetiledefs; addtiledef2 raeroadtile1.png,new,0*16,3*16;}

Now, my image is a 32x16 .png using only 4 different shades of grey and I saved it in psp7, and I'm trying to cover those two oppositing green brick tiles at the top of the tileset, as a test to see if I can figure this out, if nothing else.

Actually, I've just noticed something else, none of my pngs are working.. when I load them, nothing happens, so I hit play and it locks up. -.- Then I hit F4 and the whole level is reverted back to grass, but I can load other files from webgifs just fine. -.- Maybe my problem isn't the script. What could be wrong with my pngs? :o

Mykel 06-19-2004 08:03 AM

.gif always works for me.
Or if it is .png, make sure it is 8bit!

There are converting programs that can do this for you.
The one I used to use is:
Wiagra Batch Converter, search for it...

haunter 06-19-2004 08:39 AM

Or gif2MNG... But you know... If wasting time is like, your thing or whatever... Go with the other one.

Mykel 06-19-2004 08:41 AM

Quote:

Originally Posted by haunter
Or gif2MNG... But you know... If wasting time is like, your thing or whatever... Go with the other one.

I like it because it does many other things too...

WanDaMan 06-19-2004 09:22 AM

ok.. why are you multiplying the values?
okay, why not just do a simpler way..
count how many tiles you want across and x the number by 16, same for y..
or you can guess, whats what i normally do.
i.e
addtiledef wan_tiles.gif,world_a-01.nw,32,32;

and you only use removetiledef untill you've got the tile in the right location, afterwords it can be removed.

Raelyn 06-19-2004 01:49 PM

How do I even use gif2mng?

Edit: Ok, so I just dragged a gif onto it because apparently that works, and it did. But what if I don't want an MNG, what if I want a png, and does that automatically make it 8bit?

Raelyn 06-19-2004 06:34 PM

Ok, I just wanted to make an update here, for a program that is as simple as the lovely drag'n'drop gif2mng if you want instant 8bit pngs for graal I highly suggest the exorcist. :D I just found it, and it's awesome. :)

http://www.nigels.com/exorcist/Download.html

Very helpful. :)

teshy2 06-19-2004 06:39 PM

Quote:

Originally Posted by Mykel
Lol, sorry for reviving, but I realized how usefull this still is as I went in to add grass tiles. But now this happened. The script is for it to replace 4,26 (the swamp tiles.)
o.o

Oh, spiffy grass. I wanna roll around in it.



Uhm... yeah... *goes back on topic*

haunter 06-19-2004 08:49 PM

Quote:

Originally Posted by Raelyn
How do I even use gif2mng?

Edit: Ok, so I just dragged a gif onto it because apparently that works, and it did. But what if I don't want an MNG, what if I want a png, and does that automatically make it 8bit?

If you drop a static gif into gif2MNG then it will make it a png.

LordZen 06-19-2004 09:22 PM

Yea, and animated gif's turn into a mng...because png's cant be animated lol.

Mykel 06-21-2004 05:09 PM

Quote:

Originally Posted by teshy2
Oh, spiffy grass. I wanna roll around in it.



Uhm... yeah... *goes back on topic*

It looked crappy in a level. I sux at GFX. )=

Raelyn 11-24-2004 02:21 AM

2 Attachment(s)
Ok, I've gotten this to work before, but why does this keep happening to me?

If someone could explain this wierdness, I would appreciate it.

Zero Hour 11-24-2004 02:46 AM

What format are those tiled saved in?

Raelyn 11-24-2004 03:53 AM

Quote:

Originally Posted by Zero Hour
What format are those tiled saved in?

8bit png, see for yourself, I attached it.

I don't know why, but it does that, alot. >.>

Zero Hour 11-24-2004 07:08 AM

Weird...

Raelyn 11-24-2004 08:34 AM

Quote:

Originally Posted by Zero Hour
Weird...

My thoughts exactly, did you try the script with the image yourself? :o

LordZen 11-25-2004 08:30 AM

Sometimes, when I copy paste something from a ms paint window when that ms paint window had a saved gif or jpg open, copy pasting into animagic will result in a tv-static looking affect just like that.

Try copy pasting the image into paint, a blank paint window. Then copy paste that to whatever your saving with that is a simple program that can save in gif. Then, use gif2mng and I dont think you will have any problems after that.

Raelyn 11-27-2004 01:12 PM

Quote:

Originally Posted by LordZen
Sometimes, when I copy paste something from a ms paint window when that ms paint window had a saved gif or jpg open, copy pasting into animagic will result in a tv-static looking affect just like that.

Try copy pasting the image into paint, a blank paint window. Then copy paste that to whatever your saving with that is a simple program that can save in gif. Then, use gif2mng and I dont think you will have any problems after that.

This is horrible, when I can get the files to 8bit, they don't work, and other times, I save them as 8bit and they end up as 32bit, regardless, wtf.

I did what you said, saved my static gif, dropped it in gif2mng and out pops Mr.32bit png. >.>

I can't believe this craziness, why does graal have to use 8bit only, for christ sake, trying to get pngs into 8 bit is hard enough, and then when you do, they still don't work. >.>

LordZen 11-28-2004 08:59 AM

the gif2mng program is making it 32bit? Thats really strange.

Care to post the graphic? I can try to fix it for you.

xAndrewx 11-28-2004 10:08 AM

you've got a backpal on?


All times are GMT +2. The time now is 04:13 PM.

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