PDA

View Full Version : Seeking the knowledge and wisdom of Kaimetsu's tile script ability


T-Squad
06-19-2001, 04:20 AM
im a n00b to changing tiles and such, then i look at your script and im like......*long silence*.......*mass confusion*.......and i cant figure it out...basicly, do the tile on graal have some mathematical relationship with each other, allowing people to easily change the tiles..? cause i sure dont know....bah if you dont reply im probably gonna find a way myself, but its alot easier this way...the only tile stuff i know is:
board[int(x)+64*int(y)] = tilex+tiley*16;
updateboard x,y,width,height;

yes, if you want to find 546768738496 measurements for tiles you can do it that way, but if you are smart (like me) you will sek the knowledge of Kai

*Soul Blade - always looking for an easy, intelligent (not stupid) way out of work....*

T-Squad
06-19-2001, 11:10 PM
i try and do many things with tiles...but im horrible with them. At this time, im rebuilding every default graal function to work with my server...which means i need to rebuild things like picking up bushes, seting ganis in certain tils, getting hurt on lava tiles...things like that. My current detection for tiles would take...well forever to type....i would have many lines to specify which tile is which....then i look at your script and know theres a different way....

T-Squad
06-20-2001, 12:40 AM
hmm so theres not specific realtionship between them? i saw your faheria intro...you completely changed that place from regular type tiles to a lava dark world...i didnt really study the script much (it wouldve confused me...i get confused with my own script sometimes :D) but i saw that it was short...so im think there must be some kind of relationship...

do you mind if i alter your script a little and kinda figure things out? im not gonna use it, just alter it to learn more

T-Squad
06-20-2001, 12:55 AM
well edit some things to see how it changes, to see exactly how the relationship works....

Slaktmaster
06-20-2001, 06:51 AM
Me wantzes to knowz too!:D
Me knowz no now :(
Me iz happy wen I are knowzez! :)

Shard_IceFire
06-20-2001, 07:57 AM
Yeah I'd like to know too!

T-Squad
06-20-2001, 08:33 AM
:-P to bad...you probably dont even know the basics to tile editing through script :D

Butz
06-20-2001, 10:23 PM
Amazing how when one person asks for something, all of a sudden there are tons of people wanting the same thing (and probably not for the same reason)

MoonAngel
06-21-2001, 12:19 AM
Originally posted by T-Squad
:-P to bad...you probably dont even know the basics to tile editing through script :D
if (playerenters||timeout) {
for (this.i=0;this.i<64;this.i++) for (this.j=0;this.j<64;this.j++) {
this.a=int(random(0,4080));
board[this.i+64*this.j]=this.a;
}
updateboard 0,0,64,64;
timeout=0.05;
}

this is how to randomize a level's tile when you don't know what to put in it :D :p :D

grim_squeaker_x
06-21-2001, 12:23 AM
Originally posted by MoonAngel

if (playerenters||timeout) {
for (this.i=0;this.i<64;this.i++) for (this.j=0;this.j<64;this.j++) {
this.a=int(random(0,4080));
board[this.i+64*this.j]=this.a;
}
updateboard 0,0,64,64;
timeout=0.05;
}

this is how to randomize a level's tile when you don't know what to put in it :D :p :D Hey you stole my script! Dammit.

T-Squad
06-21-2001, 12:26 AM
roflol...that stuff is easy, yet worthless...Kaimetsu's tile editing is great...his "Dream Intro" (as he calls it) shows you that...
*wishes he was a math genius like Kai, then realizes he does good without being a math genius :D *

T-Squad
06-21-2001, 12:27 AM
Originally posted by Kaimetsu
Code stealer. Anyway,


for(j=0;j!=4096;j++){
board[j]=int(random(0,4080));
}
updateboard 0,0,64,64;
timeout=0.05;


Is better.

:( how is that useful in anyway?

MoonAngel
06-21-2001, 12:30 AM
Originally posted by grim_squeaker_x
Hey you stole my script! Dammit.

>_< Lonewolf gave me this script and i made another one like that (useless stuff but who cares) and i couldnt find it so i posted this one =\ sowie =\

grim_squeaker_x
06-21-2001, 12:32 AM
Originally posted by MoonAngel


>_< Lonewolf gave me this script and i made another one like that (useless stuff but who cares) and i couldnt find it so i posted this one =\ sowie =\ Hehe it's okay, I just post it whenever someone asks for useless scripts anyway

vergil
06-21-2001, 12:37 AM
you dont need to be a genious to do what hes doing
thats simple
this is just graal script, thats all.

MoonAngel
06-21-2001, 12:39 AM
one thing i'd like to know is, who made that script on Graal Classic in the tree shrine, you know, the special effect that uses leaves as graphic, i just want to know who made that =\

T-Squad
06-21-2001, 12:56 AM
Originally posted by Kaimetsu


*shrugs*

I never claimed to be a genius, but if it was so easy then everybody would be able to do it, hmm?

hmph well Shadrock said hes a genius, and have I...:Dmwahaha so thats it. He is a genius....and Kai has got a point ;)

T-Squad
06-21-2001, 01:06 AM
Originally posted by Kaimetsu
"Genius" is such a transitional term anyway. One day it's an IQ of 140-150, one day it's 130-140. Bah, what's the difference? I'm just Kaimetsu: script monkey.

*smacks him across back of his head* you have no part in this! I said you're a genius and thats final!

Slaktmaster
06-21-2001, 05:03 AM
I've been trying hard to get it to work
its not that hard to understand the basics...
but to make it good, thats another thing.:(

grim_squeaker_x
06-21-2001, 05:54 PM
Originally posted by MoonAngel
one thing i'd like to know is, who made that script on Graal Classic in the tree shrine, you know, the special effect that uses leaves as graphic, i just want to know who made that =\ Tyhm made that.

06-22-2001, 11:22 AM
The upper left corner is 0, And on to the right until you hit 63.
Then it goes all the way back to the left, second row is 64->127
So if you take the X value and add it to (y*64) You get its board placement.

Once you understand how that works it's not difficult, but make sure you int() them first so there's no decimals.

Er1c
06-22-2001, 12:21 PM
I think I know what you're asking for... you want to be able to change all of one kind of tiles to a different kind.

All you need to do is make two arrays, use this.tile1 and this.tile2.

Then in this.tile1 make the array of all the tiles that you want the NPC to look for that should be changed, and in this.tile2 list all of the tiles (corrisponding to the other tiles) that the tiles in this.tile1 should turn into. When you list the tiles, you need to list them like this: tilex+tiley*16.

I'll make the NPC and put some comments in for you, dont just copy it, try to learn it for your self...


for (cx = 0;cx<64;cx++) for (cy = 0;cy<64;cy++) { //will check every tile in the level
if (board[cx+64*cy] in this.tile1) {//checks if the current tile being checked is supposed to be replaced
for (i = 0;i<arraylen(this.tile1);i++) {//this for statment will find where in this.tile1 the current tile is
if (board[cx+64*cy]==this.tile1[i])
break;//stops the loop keeping i equal to the position of the tile to replace
}
board[cx+64*cy] = this.tile2[i]//replaces the tile with the new one specifyed in this.tile2
updateboard cx,cy,1,1;//updates the board to make the changes noticable
}
}


Well I haven't tryed this out, so tell me if it works or not... hope that answers your question and that you learn from it instead of steal it.

T-Squad
06-22-2001, 01:33 PM
making one thing clear: i am not a n00b and already knew about that! thats simple stuff...

what i want to know about is how lets say Stefan does it...he uses letters and such...

T-Squad
06-22-2001, 01:35 PM
Originally posted by Er1c
I think I know what you're asking for... you want to be able to change all of one kind of tiles to a different kind.

All you need to do is make two arrays, use this.tile1 and this.tile2.

Then in this.tile1 make the array of all the tiles that you want the NPC to look for that should be changed, and in this.tile2 list all of the tiles (corrisponding to the other tiles) that the tiles in this.tile1 should turn into. When you list the tiles, you need to list them like this: tilex+tiley*16.

I'll make the NPC and put some comments in for you, dont just copy it, try to learn it for your self...


for (cx = 0;cx<64;cx++) for (cy = 0;cy<64;cy++) { //will check every tile in the level
if (board[cx+64*cy] in this.tile1) {//checks if the current tile being checked is supposed to be replaced
for (i = 0;i<arraylen(this.tile1);i++) {//this for statment will find where in this.tile1 the current tile is
if (board[cx+64*cy]==this.tile1[i])
break;//stops the loop keeping i equal to the position of the tile to replace
}
board[cx+64*cy] = this.tile2[i]//replaces the tile with the new one specifyed in this.tile2
updateboard cx,cy,1,1;//updates the board to make the changes noticable
}
}


Well I haven't tryed this out, so tell me if it works or not... hope that answers your question and that you learn from it instead of steal it.

grr every time i look at that it makes me angry :mad: from now on, i ask that no one attempt to help me in script unless you better then me in script....*rings kai bell* come help Soul Blade with how to put letters for tiles and make it shorter!

Er1c
06-22-2001, 01:47 PM
Originally posted by T-Squad
making one thing clear: i am not a n00b and already knew about that! thats simple stuff...

what i want to know about is how lets say Stefan does it...he uses letters and such...

LMAO, LETTERS AND STUFF!!!
Okay, maybe you aren't a noobie (dont know, sounds like one, but I don't know you and don't want to), but you sure are dumb! Letters and such!!! They are called variables, and you need to set them no matter what you do! Your stupidity amazes me.

Er1c
06-22-2001, 01:51 PM
Originally posted by T-Squad


grr every time i look at that it makes me angry :mad: from now on, i ask that no one attempt to help me in script unless you better then me in script....*rings kai bell* come help Soul Blade with how to put letters for tiles and make it shorter!

There's no way in hell that you are better then me at scripting. I don't even have to support that, look at your posts!!! Who's the one always asking people for help?

General
06-22-2001, 01:56 PM
God at least i learn it on my own, and i'm almost done with a bush script anyways

T-Squad
06-22-2001, 02:00 PM
hmm...maybe i should have thought more about the letters...but i could swear..bah...

btw Er1c i think i could outscript you...actually im pretty sure i could

T-Squad
06-22-2001, 02:08 PM
i was looking at some script i use to learn more about tile stuff, and look at this:
this.Csittiles = {
0x2a9,0x2aa,0x2b9,0x2ba,
0x2e1,0x2e2,0x2f1,0x2f2,
0x676,0x677,0x678,0x686,0x687,0x688,
0xa04,0xa05,0xa06,0xa07,0xa14,0xa15,0xa16,0xa17,0x a24,
0xa25,0xa26,0xa27,0xa34,0xa35,0xa36,0xa37,
0xd97,0xd98,0xda7,0xda8,
0xf37,0xf38,0xf39,0xf47,0xf48,0xf49
};
this.Gsitcheck = {1.25,2,1.75,2};

this.bush = {0x2,0x3,0x12,0x13};
this.bushreplace = {0x2a5,0x2a6,0x2b5,0x2b6};
this.bushleaps = {0};

x and a and b and f and so on....i looked though the whole script and not once did it set any of those variables..........

grim_squeaker_x
06-22-2001, 07:15 PM
They're in hexadecimals Soul Blade, if you want to see their normal numbers just look at the script using the debugger.
Plus I think this NPC will make a string list of all onwall tiles:
if (playerenters) {
setstring onwall.string,;
for (this.i=0;this.i<4080;this.i++) {
board[0]=this.i;
if (onwall(0,0)) setstring onwall.string,#v(this.i);
}
}
It's untested, but if it works you could also check for onwater tiles.

Er1c
06-23-2001, 12:01 AM
Originally posted by T-Squad
i was looking at some script i use to learn more about tile stuff, and look at this:
this.Csittiles = {
0x2a9,0x2aa,0x2b9,0x2ba,
0x2e1,0x2e2,0x2f1,0x2f2,
0x676,0x677,0x678,0x686,0x687,0x688,
0xa04,0xa05,0xa06,0xa07,0xa14,0xa15,0xa16,0xa17,0x a24,
0xa25,0xa26,0xa27,0xa34,0xa35,0xa36,0xa37,
0xd97,0xd98,0xda7,0xda8,
0xf37,0xf38,0xf39,0xf47,0xf48,0xf49
};
this.Gsitcheck = {1.25,2,1.75,2};

this.bush = {0x2,0x3,0x12,0x13};
this.bushreplace = {0x2a5,0x2a6,0x2b5,0x2b6};
this.bushleaps = {0};

Thats just the setting veriable part of the script... somewhere further down in that script you would see something like what I posted above. There arent many ways to get one tile to turn into another, and if there are alot of tile that need changing, what i posted is the best way to do it.


btw Er1c i think i could outscript you...actually im pretty sure i could
No you couldn't. Simple as that. Ask anyone that has seen my work...

MoonAngel
06-23-2001, 12:49 AM
Originally posted by Er1c
No you couldn't. Simple as that. Ask anyone that has seen my work...

Stop arguing and show your abilities to each other x.X

T-Squad
06-23-2001, 02:08 AM
hmm maybe i should show my nice lil boat...i love that thingy...btw Er1c youve never seen my work so who are you to talk? ive seen the *must..say....insulting....wo...rd....* on ToT and i know my stuff is far better then that cr*must...resist...making..fun...of ***...annoying...l..ittle...queer... server...*

Er1c
06-23-2001, 03:29 AM
No, you have not seen TOT. Only about 10 people have. The NPCs you are able to see on TOT were made by Falados, and the levels were made by waar and GodSpeed I believe. If you have a problem with it talk to them.

As for who's better, you're the one who asked the question, I'm the one who answered it.

T-Squad
06-23-2001, 03:32 AM
i never asked whos better....i said i knoew whos better...i better then you in script *of course* and Kaimetsu is better then me...im sure there are many others that are better but i dont know of them...anywya then Kyle is better then Kaimetsu...then Stefan is like the king superior super person...oh and TB3 is about even with me, he got some good ideas though which i lack...i need W-Dragoon for ideas ;-)

General
06-23-2001, 04:11 AM
W-Dragoon sent me the boat script...god it had suckage badly on the way it was scripted...you used flags for god sake! FLAGS!!! Any good scripter will tell you that you should have used this. variables instead of flags, especially in a weapon...

Tyhm
06-23-2001, 04:39 AM
There is one.

Falcor
06-23-2001, 05:12 AM
OK ER1c!!! Im getting godsped to change your account form Er1c_TOT to EGO_TOT!!! hehehehehehe

I know you can script well but you gloat too much.

Er1c
06-23-2001, 05:25 AM
Well listen to that fool, its annoying. I answer his stupid question and hes all "well i coulda done that" and ****, pisses me off. If you could do it why did you ask HOW to do it?

T-Squad
06-23-2001, 05:44 AM
a few things...

1) Supersonic you *** the one W-Dragoon sent you was the one he made, mine uses things you probably wouldnt even understand...

2) Er1c you dont even know what i was asking, only Kaimetsu knows cause he was the one that made the dream intro *****

3) once again, Supersonic is ***....i have nothing against Er1c except i do want to see some of his work

LilbrojX
06-23-2001, 05:50 AM
Originally posted by General
W-Dragoon sent me the boat script...god it had suckage badly on the way it was scripted...you used flags for god sake! FLAGS!!! Any good scripter will tell you that you should have used this. variables instead of flags, especially in a weapon...

YOU ARE A ****ING MORRON! I TOLD YOU I SCRIPTED THAT, AND I CAN'T SCRIPT AT ALL, THAT'S WHY I WENT TO A NOOB LIKE YOU FOR HELP!

here is a chat log on AIM, I am Lilbroj123

CHAT LOG WAS REMOVED, BUT IT SURE WAS FUNNY, JUST ASK SOUL, LOLOLOLOL! :D

General
06-23-2001, 05:53 AM
Sorry Soul, I thought he said you scripted that...Once again i underestimated you...

LilbrojX
06-23-2001, 05:54 AM
good boy super sonic

CrazedMerlin
06-24-2001, 11:28 AM
Originally posted by Gspeed2000
Stop the flames, bring out the beer.

Er1c please remove the huge TOT thing from your signature.

TOT is the ring the shall rule them all, only G2001 and NW should be a threat to it ;)
TEH HUEKED IN FUNIX WERKS FER J00?