Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Future Improvements (https://forums.graalonline.com/forums/forumdisplay.php?f=10)
-   -   Gs1 to Gs2 Converter (https://forums.graalonline.com/forums/showthread.php?t=76544)

PrinceOfKenshin 08-28-2007 01:21 PM

Gs1 to Gs2 Converter
 
I am going to work on a program that you put the gs1 script in then press a button and it converts to gs2. I just need a good NAT to help me with what converts to what. I know most of it, just might need some help. I figure this will help people stay updated with scripting. Also it might help teach people gs2. If you want to help just contact me.

Skyld 08-28-2007 01:48 PM

It's not really worth the time in my opinion. It makes more sense to actually learn GScript2, and the problem is that there are many things that work completely differently in the new engine. Handling of variables is one thing, things like public and object functions, etc.

Chompy 08-28-2007 03:33 PM

I could be interested ;o
But I agree with Skyld tho..

Horrified 08-28-2007 03:49 PM

Just converting doesn't really do it all the time...I mean a lot of the things when converted would also have to be improved a lot, as GS2 offers more effective ways of scripting.

Good luck with it, though.

PrinceOfKenshin 08-28-2007 08:58 PM

Quote:

Originally Posted by Skyld (Post 1344144)
It's not really worth the time in my opinion. It makes more sense to actually learn GScript2, and the problem is that there are many things that work completely differently in the new engine. Handling of variables is one thing, things like public and object functions, etc.

Yes i know i thought about that. Hmm maybe if i made a error code in the program. So that it works like on RC. Or even make it so that it can give the other options of the script. I'm going to try to figure a way around this problem :D

Angel_Light 08-29-2007 03:21 AM

you have my support/help.

zokemon 08-30-2007 06:34 AM

Bad idea x_x.
GS1 to GS2 is often like Japanese to English in many cases.

Inverness 08-30-2007 12:23 PM

No, we don't any converter for lazy people who don't want to learn GS2. There should not be anyone scripting in GS1 in the first place. I'll fire any NAT that uses a converter if I have the power to do it.

Crow 08-30-2007 02:53 PM

Quote:

Originally Posted by zokemon (Post 1344708)
Bad idea x_x.
GS1 to GS2 is often like Japanese to English in many cases.

Awesome example :D I'm somehow against it too, though I'm only against using it. You should code it, it will help you learn.

PrinceOfKenshin 08-31-2007 12:15 AM

Quote:

Originally Posted by Inverness (Post 1344729)
No, we don't any converter for lazy people who don't want to learn GS2. There should not be anyone scripting in GS1 in the first place. I'll fire any NAT that uses a converter if I have the power to do it.

:mad: Meanie i just wanted to help. I know personally Atrius still has a lot of scripts in gs1. It wasn't really going to be mean't to teach. I mean't it might help some people.

Crow 08-31-2007 02:16 PM

Help what kind of people though? Why would you want to convert a script from GS1 to GS2 if you are not a scripter? If you are a scripter and want to do that, learn GS2.

Switch 08-31-2007 08:53 PM

Quote:

Originally Posted by Crow (Post 1344915)
Help what kind of people though? Why would you want to convert a script from GS1 to GS2 if you are not a scripter? If you are a scripter and want to do that, learn GS2.

Maybe for scripters that know GS2, and can convert GS1 to GS2, but there are MANY scripts or lines (in he script). This would help them convert it.

DustyPorViva 08-31-2007 09:08 PM

It would be useful for LAT's and such for converting simple light/door scripts in such in levels, without having to bug NAT's to do such simple tasks.

Crow 08-31-2007 09:45 PM

Quote:

Originally Posted by Switch (Post 1344958)
Maybe for scripters that know GS2, and can convert GS1 to GS2, but there are MANY scripts or lines (in he script). This would help them convert it.

If it would be a pretty long script, a converter would **** it up even more.

PrinceOfKenshin 08-31-2007 09:54 PM

Well no need to argue i'm not making seeing how not many people think it will be useful. Besides it would be hard seeing how Gs2 has a lot of different things from gs1.

Googi 09-01-2007 02:59 AM

Just make it and post questions on the scripting forum if you run into problems?

Inverness 09-01-2007 03:01 AM

I don't people using GS1 and converting it to GS2 automatically to get by. Either learn GS2 or don't script.

That is my opinion.

Yes it would be good for converting all those old scripts to new engine, but I don't want people relying on that. Oh well, I suppose I'll just test them to make sure they don't use a converter.

foxboi 09-02-2007 07:33 PM

You don't HAVE to use it, either take the easy route or do it yourself.

Tyrial 09-03-2007 11:10 PM

Quote:

Originally Posted by Inverness (Post 1344729)
No, we don't any converter for lazy people who don't want to learn GS2. There should not be anyone scripting in GS1 in the first place. I'll fire any NAT that uses a converter if I have the power to do it.

And the hell are you? He didn't ask for your permission, he asked for help if you don't want to help don't waste time.

Admins 09-04-2007 01:21 AM

Personally I don't think it is really that important to do a mass conversion of GS1 syntax to GS2. A well written GS1 script is better than a buggy GS2 script, and there are more important things to care about:
- don't put huge scripts into levels, use classes instead
- don't use .graal levels anymore
- avoid scripts that do everything, better split things to easier understand and control it
- avoid tons of duplications of the same script, better use reusable functions and classes

If done correctly then there are no big problem of GS1-GS2 collisions: in the editor you can use GS1 for small things or for "join classname;", on the server you then write the logic using classes and db npcs.

zokemon 09-04-2007 12:17 PM

Inverness, you made the same typo twice in this thread in two different posts. ("I don't people" and "No, we don't any converter")
:P

Crow 09-04-2007 02:59 PM

Quote:

Originally Posted by zokemon (Post 1345716)
Inverness, you made the same typo twice in this thread in two different posts. ("I don't people" and "No, we don't any converter")
:P

Funny.

foxboi 09-04-2007 07:19 PM

Quote:

Originally Posted by Inverness (Post 1345010)
I don't people using GS1 and converting it to GS2 automatically to get by. Either learn GS2 or don't script.

That is my opinion.

Yes it would be good for converting all those old scripts to new engine, but I don't want people relying on that. Oh well, I suppose I'll just test them to make sure they don't use a converter.

That'd would be the smart thing to do. It's quite handy to have if it isn't that buggy. For instance, N-Pulse was waiting to be converted to gs2 for a long time.. Instead of running around and whining for the server to be converted, wouldn't you think this tool would come as a relief to the staff? (again, if it wasn't buggy).

Switch 09-04-2007 11:23 PM

Quote:

Originally Posted by Stefan (Post 1345618)
- don't use .graal levels anymore

What was the point of those o_O

DustyPorViva 09-05-2007 12:27 AM

They were what Graal used before .nw files came along. They weren't text files like .nw files are, so you can't open them with notepad and edit them. NW files didn't come around until G2k1 was released, and they were, I believe made specifically for New World... but since that flopped, G2k1 adopted them.

Inverness 09-05-2007 01:26 PM

Quote:

Originally Posted by zokemon (Post 1345716)
Inverness, you made the same typo twice in this thread in two different posts. ("I don't people" and "No, we don't any converter")
:P

Don't worry, I can't make accidental typos half as often as you do, you're still in the lead there.

zokemon 09-06-2007 04:42 AM

Quote:

Originally Posted by Inverness (Post 1345930)
Don't worry, I can't make accidental typos half as often as you do, you're still in the lead there.

Not on the forums! :frown:

sizzle1989 09-19-2007 05:14 PM

Wtf was the diffrence between gs1 and gs2 (I'm script illiterate)

Chompy 09-19-2007 05:21 PM

Quote:

Originally Posted by sizzle1989 (Post 1348697)
Wtf was the diffrence between gs1 and gs2 (I'm script illiterate)

GS2 is object oriented. GS1 wasn't.

sizzle1989 09-19-2007 10:10 PM

Ah, I see, and no I don't know what that means but obviously something rofl

TalonShriner 09-23-2007 05:34 PM

In the mean time, while this GS1-GS2 converter is being programed, how about someone fixes the commands document to GS2 commands instead of the obsolete GS1 commands? It would save everyone a lot of work in the future.

Skyld 09-23-2007 05:45 PM

Quote:

Originally Posted by TalonShriner (Post 1349296)
In the mean time, while this GS1-GS2 converter is being programed, how about someone fixes the commands document to GS2 commands instead of the obsolete GS1 commands? It would save everyone a lot of work in the future.

http://forums.graalonline.com/forums...5&postcount=20

mrnothersan 05-09-2011 09:57 PM

Has the translator been made yet...? It would be a great help to me...
Regards

WhiteDragon 05-09-2011 10:00 PM

Quote:

Originally Posted by mrnothersan (Post 1648629)
Has the translator been made yet...? It would be a great help to me...
Regards

No. Translating GS1 to GS2 would be a pain. Also, the resulting GS2 would pretty damn ugly.


It'd be nice if all GS1 learning references were just obliterated off the planet so people learning how to script wouldn't constantly learn the wrong thing.

mrnothersan 05-09-2011 10:16 PM

Quote:

Originally Posted by WhiteDragon (Post 1648631)
No. Translating GS1 to GS2 would be a pain. Also, the resulting GS2 would pretty damn ugly.


It'd be nice if all GS1 learning references were just obliterated off the planet so people learning how to script wouldn't constantly learn the wrong thing.

But i've made plenty of GS1 scripts before i even knew what GS2 was... i wouldn't really care about how ugly it was as long as it worked :p

cbk1994 05-09-2011 10:31 PM

Quote:

Originally Posted by mrnothersan (Post 1648635)
But i've made plenty of GS1 scripts before i even knew what GS2 was... i wouldn't really care about how ugly it was as long as it worked :p

With that attitude you won't ever become a good scripter.

mrnothersan 05-09-2011 10:33 PM

Quote:

Originally Posted by cbk1994 (Post 1648643)
With that attitude you won't ever become a good scripter.

mmhmm....

fowlplay4 05-09-2011 10:43 PM

Quote:

Originally Posted by mrnothersan (Post 1648629)
Has the translator been made yet...? It would be a great help to me...
Regards

Have you read:

http://wiki.graal.net/index.php/Creation/Dev/GS1_To_GS2

There's also like four other tutorials on this page:

http://wiki.graal.net/index.php/Creation/Dev/GScript

GS1 allows too many weird hacks that shouldn't be carried over to GS2. I.e:

PHP Code:

if (created || playerenters) {
  
// script


To be done properly in GS2 it would have to be re-written as:

PHP Code:

function onCreated() {
  
script();
}

function 
onPlayerEnters() {
  
script();
}

function 
script() {
  
// script


Considering GS1 still works, a translator isn't going to fix the problems caused by scripts not working with an npc-server.

mrnothersan 05-09-2011 10:49 PM

Quote:

Originally Posted by fowlplay4 (Post 1648651)
Considering GS1 still works, a translator isn't going to fix the problems caused by scripts not working with an npc-server.

:megaeek:GS1 works on a npc-server??... Errors occur on RC that normally wouldn't if i use it on GraalEditor...

fowlplay4 05-09-2011 11:39 PM

Quote:

Originally Posted by mrnothersan (Post 1648658)
:megaeek:GS1 works on a npc-server??... Errors occur on RC that normally wouldn't if i use it on GraalEditor...

Quote:

Originally Posted by fowlplay4 (Post 1648651)
Considering GS1 still works, a translator isn't going to fix the problems caused by scripts not working with an npc-server.

Which is probably because you don't have //#CLIENTSIDE at the top of your level script, so when it attempts to call functions (I.e: timereverywhere;) that don't exist on the server-side it displays errors.


All times are GMT +2. The time now is 02:08 AM.

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