Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Addtiledef (https://forums.graalonline.com/forums/showthread.php?t=60664)

Gamba_Legend 08-24-2005 04:51 PM

Addtiledef
 
I don't understand how the addtiledef script works.
I tried adding my own tiles in for the server and all I got was nothing. -.-

//#CLIENTSIDE
if (created) {
addtiledef reborn_tiles.gif,0,0;
}
if (playerplayerenters) {
addtiledef reborn_tiles.gif,0,0;
}

can anyone tell me what I'm doing wrong?

Skyld 08-24-2005 04:53 PM

I thought you had to specify the prefix of the level names it applies to, or is that addtiledef2 only?

ForgottenLegacy 08-24-2005 04:53 PM

The second-to-last zero, that's what levelnames have to start with. I believe the syntax is:
NPC Code:

addtiledef imagename,levelstart,random boolean thing i dont know;

so

addtiledef tgctiles.png,tgc_,0;



That should be what you need o-o

ForgottenLegacy 08-24-2005 04:55 PM

Quote:

Originally Posted by Skyld
I thought you had to specify the prefix of the level names it applies to, or is that addtiledef2 only?

That's fer both.

NPC Code:

addtiledef image,levelstart,boolean;

addtiledef2 image,levelstart,tilestartx,tilestarty;



I've personally never used the second one, but it is used on Babylon, reason why I have the syntax o-o Hope that helps! <3

Gamba_Legend 08-24-2005 04:57 PM

and this script will make it work all the time or do I have to add it to a player's weapon inventory?

Skyld 08-24-2005 05:01 PM

Add it to a weapon, in case someone removes their tile definitions.

ForgottenLegacy 08-24-2005 05:01 PM

The script will work from when the player enters the level to the time when the player disconnects from the server. I'd suggest putting it inside an 'if (created) {' block inside a system NPC, clientsided of course. That's how we have it on Babylon.

Gamba_Legend 08-24-2005 05:06 PM

1 Attachment(s)
oh yeah and I did something wrong I think...
now the level in both editor and offline mode have scrambled/distorted gfx all over life theres a big error..

//#CLIENTSIDE
if (created) {
addtiledef reborn_tiles.gif,gamba_test.nw,0;

^thats what I did (and I don't understand what the 0 is for)
and this is what I got (screenie):

ForgottenLegacy 08-24-2005 05:32 PM

Ah yes, the spazzy tiledefs. And I don't understand what the zero is either, I just leave it.

As for the spazzy problem, just exit and reenter levels and move around a bit as the tileset downloads from the server. Or...! If you're doing this offline, then make sure the Graal exe can find the tiledef image. That spazzy tiledef happens, too, when Graal can't locate the tileset you want. Just fiddle around, I get that thing all the time. o-o

Gamba_Legend 08-24-2005 05:41 PM

OH?!
damn I've been fiddling with it awhile...but I'm sure it'll work eventually.
Thank you everyone for your help. =)

Gamba_Legend 08-24-2005 05:53 PM

ok I give up everything is having a problem.
I want to make it work on my online server and offline of course so I can make levels with it.
I want it to work on all levels whenever someone signs on.
Can someone tell me exactly what to do/script step by step please?
-I feel retarded =(

alissalee 08-24-2005 07:17 PM

Gamba we just need to work on it by the server with the lvls in the script after it finds the teldefs we can then start bilding the lvl thats the way to make it or how i learnd from One of the servers i worked at

nullify 08-24-2005 07:35 PM

use setbackpal tilesetname.png;

Gamba_Legend 08-24-2005 07:56 PM

thanks nullify
and everyone excuse the person I haven't fired yet -.-

Gamba_Legend 08-24-2005 07:58 PM

it says file does not exist when I try the backpal
aren't backpals used for a different type of lighting effects? O_O

Gamba_Legend 08-24-2005 08:00 PM

Nevermind that last post...
it works but every tiles is a new neon color instead now XD

Gamba_Legend 08-24-2005 08:17 PM

how do I make this work both online and offline for every level?
what do I do on rc?
what do I do script on the npc?

Ajira 08-24-2005 08:18 PM

Erm, backpals are deprecated. Use seteffect.

ForgottenLegacy 08-24-2005 09:04 PM

Quote:

Originally Posted by nullify
use setbackpal tilesetname.png;

NO! DO NOT use setbackbal! Never! EVER! z-z RAWR!!

That command has been deprecated and I'd like to never see it again. Please do not use it, ever again. Thank you <3

calani 08-24-2005 09:21 PM

Quote:

Originally Posted by ForgottenLegacy
addtiledef imagename,levelstart,random boolean thing i dont know;

The 'random boolean thing' tells the script whether the tileset is the old format or the new format (classic tileset (pics1.png) versus new order, such as picso.png used on GK)


Also, for the levelstart part, you only need to add the first few characters of the levelname. This is useful for gmaps where all the levels start with the same thing, such as babylon_*.nw or rift_arena1_*.nw
For test levels, or other levels that you only want the addtiledef to work on single levels, add the full name so that it doesn't accidentally load on another level that has a similar name (testleveljo for testleveljo.nw, but it would also work on testleveljohn.nw)

ForgottenLegacy 08-24-2005 09:35 PM

Cheers to Cal o-o :D That's a good way of explaining it.

calani 08-24-2005 09:37 PM

Oh, and yes. setbackpal = evil.
....unless of course you want to confuse the hell out of a lat ^_~ *halo*

ForgottenLegacy 08-24-2005 09:40 PM

Quote:

Originally Posted by calani
Oh, and yes. setbackpal = evil.
....unless of course you want to confuse the hell out of a lat ^_~ *halo*

Halo? So those horns are there to keep the halo up? o_O Makes sense.

On topic: Setbackpal, along with playersays(), followplayer, and toinventory have been deprecated with Graal3 and GS2. The command/function 'toweapons' is severely frowned upon and may/should be deprecated soon, as well.

calani 08-24-2005 09:48 PM

Quote:

Originally Posted by ForgottenLegacy
The command/function 'toweapons' is severely frowned upon and may/should be deprecated soon, as well.

get rid of the "may/" part and you'll be a bit more accurate.

Malinko 08-25-2005 02:27 AM

For your tiledefs problem:

C:\*GRAALFOLDER*\levels\tiledefs\

Delete all the text documents within here to restore the options to default.

For your script problem:

Refer to post in this thread by ForgottenLegacy.

xAndrewx 08-25-2005 12:29 PM

Use .png 8bit.
Make sure the image is indexed.
addtiledef tileset.png,reborn_,0;

nullify 08-25-2005 07:18 PM

Backpals are obviously old, but they are always set to pics1, hence the need to be changed.

Gamba_Legend 08-25-2005 11:34 PM

O_O
thanks.

alissalee 08-26-2005 01:51 AM

your ganna fire me Gamba X.x

calani 08-27-2005 08:35 AM

get a nat instead :D

alissalee 10-02-2005 03:41 AM

2 Attachment(s)
ok now i did that how do i make it show up on the server it works in editor
wait let me try something else nope didnt work look at them please the one u can see the tileset is offline and one that u cant is online help me please

napo_p2p 10-02-2005 03:53 AM

Is it clientsided?

alissalee 10-02-2005 04:26 AM

yes


All times are GMT +2. The time now is 01:15 PM.

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