Graal Forums  

Go Back   Graal Forums > Development Forums > Future Improvements
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 10-29-2004, 08:38 PM
Andares Andares is offline
Scr1pt3r-ish
Andares's Avatar
Join Date: Mar 2004
Posts: 55
Andares is on a distinguished road
Send a message via AIM to Andares
GScript <-> GScript2

I think that servers should be able to use both gscript and gscript2 on their server. Alot of the owners aren't going to want to rescript their entire systems, or stay using gscript alone. So why not make them backwards compatible or something?
__________________
Quote:
<Wan> Can I have a poll? Do people mind if I talk about sexual intercourse between two human beings?
<Kai> Wan, I think the problem is that it's basically ALL you talk about
<Wan> Ahhhhhh
Aim: AtariTandy | Job: Sanstrata)
Reply With Quote
  #2  
Old 10-29-2004, 09:15 PM
Kaimetsu Kaimetsu is offline
Script Monkey
Kaimetsu's Avatar
Join Date: May 2001
Posts: 18,222
Kaimetsu will become famous soon enough
GS2 is backwards-compatible. To my disapproval.
__________________
Reply With Quote
  #3  
Old 10-29-2004, 09:17 PM
Slash-P2P Slash-P2P is offline
Banned
Join Date: May 2004
Location: Burning Blade
Posts: 941
Slash-P2P is on a distinguished road
If I have to re-learn scripting, I'm gonna quit developing...
Reply With Quote
  #4  
Old 10-29-2004, 10:38 PM
zell12 zell12 is offline
Gone
zell12's Avatar
Join Date: Jun 2001
Location: Alberta, Canada
Posts: 8,541
zell12 has a spectacular aura about
Send a message via ICQ to zell12 Send a message via AIM to zell12 Send a message via MSN to zell12
Re-learn scripting? It is pretty much the same...
__________________
Reply With Quote
  #5  
Old 10-29-2004, 10:57 PM
Dach Dach is offline
call me Chad, it's cooler
Dach's Avatar
Join Date: Aug 2002
Posts: 1,899
Dach is on a distinguished road
You must have missed the memo. As Kai stated, it's already backwards compatible.

Quote:
Originally Posted by Kaimetsu
GS2 is backwards-compatible. To my disapproval.
Why is that? Are we losing functionality/efficiency from this? (I'm asking because I seriously don't know)
__________________
Scripting Documents:Old Script Documentation-Movement Tutorial
Reply With Quote
  #6  
Old 10-30-2004, 03:02 AM
Slash-P2P Slash-P2P is offline
Banned
Join Date: May 2004
Location: Burning Blade
Posts: 941
Slash-P2P is on a distinguished road
I know its backwards compatible but...I don't want to learn a bunc of new scripting commands to do certain things only GS2 allows.
Reply With Quote
  #7  
Old 10-30-2004, 03:22 AM
Lance Lance is offline
dark overlord
Lance's Avatar
Join Date: Sep 2003
Location: Space Jam Mountain
Posts: 5,072
Lance is on a distinguished road
Quote:
Originally Posted by Slash-P2P
I know its backwards compatible but...I don't want to learn a bunc of new scripting commands to do certain things only GS2 allows.
You do not wish to learn? How sad.
Reply With Quote
  #8  
Old 10-30-2004, 03:35 AM
Slash-P2P Slash-P2P is offline
Banned
Join Date: May 2004
Location: Burning Blade
Posts: 941
Slash-P2P is on a distinguished road
Quote:
Originally Posted by Lance
You do not wish to learn? How sad.
I don't wish to have to learn a whole script language over again

Maybe if I heard more about GScript2 I would be more interested in it...
Reply With Quote
  #9  
Old 10-30-2004, 10:11 AM
Kaimetsu Kaimetsu is offline
Script Monkey
Kaimetsu's Avatar
Join Date: May 2001
Posts: 18,222
Kaimetsu will become famous soon enough
Quote:
Originally Posted by Dach
Why is that?
Because nobody should be mixing GS1 with GS2. I would prefer to see a system where the language used is specified in some kind of directive at the top (like '//#GS1' or so).
__________________
Reply With Quote
  #10  
Old 10-30-2004, 10:39 AM
Loriel Loriel is offline
Somewhat rusty
Loriel's Avatar
Join Date: Mar 2001
Posts: 5,059
Loriel is a name known to allLoriel is a name known to allLoriel is a name known to allLoriel is a name known to all
Quote:
Originally Posted by Slash-P2P
If I have to re-learn scripting, I'm gonna quit developing...
Good bye.
Old gscript is deprecated, playerworlds will not want to hire people who can only develop in an outdated language.
Reply With Quote
  #11  
Old 10-30-2004, 12:11 PM
Admins Admins is offline
Graal Administration
Join Date: Jan 2000
Location: Admins
Posts: 11,693
Admins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud of
It's backwards compatible, you can mix old and new scripting language, you can do stuff like
player.chat = "hello " @ #a;
As long as your server wants to support Graal v2, you will need to keep the client-side scripts in old scripting though. The only thing that is not compatible with old scripting engine right now is the use of things like "this.x" which is a simple variable in old engine, while it is redirecting to the x position of the current object/npc in the new engine, will need to check what i can do about that.
Reply With Quote
  #12  
Old 10-30-2004, 05:13 PM
LogicBot LogicBot is offline
Banned
Join Date: Jul 2004
Location: <3Doomsday<3
Posts: 0
LogicBot is on a distinguished road
Send a message via ICQ to LogicBot Send a message via AIM to LogicBot
I heard that GScript2 is supposed to be easier.

And quitting just because you don't want to learn the new scripts is just arogance.
Reply With Quote
  #13  
Old 10-30-2004, 06:21 PM
Slash-P2P Slash-P2P is offline
Banned
Join Date: May 2004
Location: Burning Blade
Posts: 941
Slash-P2P is on a distinguished road
Quote:
Originally Posted by Loriel
Good bye.
Old gscript is deprecated, playerworlds will not want to hire people who can only develop in an outdated language.
I'm not looking to work on someones server. I own my own server.
Reply With Quote
  #14  
Old 10-30-2004, 06:47 PM
falco10291029 falco10291029 is offline
BEst User EVER!
Join Date: Apr 2004
Posts: 1,186
falco10291029 is on a distinguished road
I'll probably learn some of it at least, but i'm not going to take the time to get as good at it as i am with good ol gscript1
__________________
BEst Insult ever: If I had a dollar for every brain you DIDNT have, i'd have one dollar!
Reply With Quote
  #15  
Old 10-30-2004, 07:29 PM
Loriel Loriel is offline
Somewhat rusty
Loriel's Avatar
Join Date: Mar 2001
Posts: 5,059
Loriel is a name known to allLoriel is a name known to allLoriel is a name known to allLoriel is a name known to all
Which will be incredibly inferior to those that take full advantage of the great and dynamic strengths of object oriented NPCs!
Reply With Quote
  #16  
Old 10-30-2004, 07:54 PM
Slash-P2P Slash-P2P is offline
Banned
Join Date: May 2004
Location: Burning Blade
Posts: 941
Slash-P2P is on a distinguished road
I admit I'll try to learn GS2 but I don't know exactly what could make GS2 so much greater than GS1. I've barely heard anything about GS2 or seen any code examples.
Reply With Quote
  #17  
Old 10-30-2004, 09:08 PM
falco10291029 falco10291029 is offline
BEst User EVER!
Join Date: Apr 2004
Posts: 1,186
falco10291029 is on a distinguished road
same here
__________________
BEst Insult ever: If I had a dollar for every brain you DIDNT have, i'd have one dollar!
Reply With Quote
  #18  
Old 10-30-2004, 09:41 PM
Kaimetsu Kaimetsu is offline
Script Monkey
Kaimetsu's Avatar
Join Date: May 2001
Posts: 18,222
Kaimetsu will become famous soon enough
Quote:
Originally Posted by Slash-P2P
I admit I'll try to learn GS2 but I don't know exactly what could make GS2 so much greater than GS1
Have you ever programmed in such languages as C?
__________________
Reply With Quote
  #19  
Old 10-30-2004, 09:56 PM
Slash-P2P Slash-P2P is offline
Banned
Join Date: May 2004
Location: Burning Blade
Posts: 941
Slash-P2P is on a distinguished road
Quote:
Originally Posted by Kaimetsu
Have you ever programmed in such languages as C?
No. I've used a little bit of Visual Basic but thats it.
Reply With Quote
  #20  
Old 10-31-2004, 12:59 AM
falco10291029 falco10291029 is offline
BEst User EVER!
Join Date: Apr 2004
Posts: 1,186
falco10291029 is on a distinguished road
I know a little bit of basic, and i know the basic format of C, but that's it
__________________
BEst Insult ever: If I had a dollar for every brain you DIDNT have, i'd have one dollar!
Reply With Quote
  #21  
Old 10-31-2004, 11:59 AM
Kaimetsu Kaimetsu is offline
Script Monkey
Kaimetsu's Avatar
Join Date: May 2001
Posts: 18,222
Kaimetsu will become famous soon enough
Quote:
Originally Posted by Slash-P2P
No
Then I cannot blame you for being unable to see the possibilities. But do not assume that they don't exist.
__________________
Reply With Quote
  #22  
Old 10-31-2004, 04:41 PM
Slash-P2P Slash-P2P is offline
Banned
Join Date: May 2004
Location: Burning Blade
Posts: 941
Slash-P2P is on a distinguished road
Quote:
Originally Posted by Kaimetsu
Then I cannot blame you for being unable to see the possibilities. But do not assume that they don't exist.
I said I don't know what can make it so much better. I'm not doubting these ways exist.
Reply With Quote
  #23  
Old 11-05-2004, 09:23 PM
Dach Dach is offline
call me Chad, it's cooler
Dach's Avatar
Join Date: Aug 2002
Posts: 1,899
Dach is on a distinguished road
Quote:
Originally Posted by Kaimetsu
Because nobody should be mixing GS1 with GS2. I would prefer to see a system where the language used is specified in some kind of directive at the top (like '//#GS1' or so).
Oh, I see what you're getting at now. That'll definitely become something of a problem.

Quote:
Originally Posted by Stefan
As long as your server wants to support Graal v2, you will need to keep the client-side scripts in old scripting though.
Are you saying client-side won't support GS2?

Quote:
Originally Posted by Slash-P2P
I admit I'll try to learn GS2 but I don't know exactly what could make GS2 so much greater than GS1. I've barely heard anything about GS2 or seen any code examples.
From what I've seen you shouldn't have much trouble moving from GS1 to GS2.
__________________
Scripting Documents:Old Script Documentation-Movement Tutorial
Reply With Quote
  #24  
Old 11-05-2004, 09:36 PM
Kaimetsu Kaimetsu is offline
Script Monkey
Kaimetsu's Avatar
Join Date: May 2001
Posts: 18,222
Kaimetsu will become famous soon enough
Quote:
Originally Posted by Dach
Are you saying client-side won't support GS2?
v3.1 and upwards will support GS2, but not v2. I'm assuming Stefan will allow use of the earlier versions for a while after the new generation is released.
__________________
Reply With Quote
  #25  
Old 11-07-2004, 10:48 AM
Slash-P2P Slash-P2P is offline
Banned
Join Date: May 2004
Location: Burning Blade
Posts: 941
Slash-P2P is on a distinguished road
Does anyone have any real code examples or GS2?
All I've seen is something like:
player.chat="hello" or something
Reply With Quote
  #26  
Old 11-07-2004, 03:25 PM
Admins Admins is offline
Graal Administration
Join Date: Jan 2000
Location: Admins
Posts: 11,693
Admins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud of
NPC Code:

function compileScript() {
script = "";
script.add("function onCreated() {");

for (con: this.containers)
addControlCreationScript(script.link(),con,0);

script.add("}");
script.savelines("weapon.txt",0);

ScriptEditor.openScriptWindow(script);
}


Here an example of writing into a file (savelines), the new for-each operator, calling functions with parameters (addControlCreationScript), and calling public functions of other scripts/objects (ScriptEditor.openScriptWindow).
You can do similar things with addstring script,... instead of script.add, passing parameters by setting this. variables, and doing callnpc, but with the new script it's more simple (e.g. the functions of other objects can return values).
Reply With Quote
  #27  
Old 11-07-2004, 04:10 PM
xAndrewx xAndrewx is offline
Registered User
xAndrewx's Avatar
Join Date: Sep 2004
Posts: 5,260
xAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud of
Quote:
Originally Posted by Stefan
NPC Code:

function compileScript() {
script = "";
script.add("function onCreated() {");

for (con: this.containers)
addControlCreationScript(script.link(),con,0);

script.add("}");
script.savelines("weapon.txt",0);

ScriptEditor.openScriptWindow(script);
}


Here an example of writing into a file (savelines), the new for-each operator, calling functions with parameters (addControlCreationScript), and calling public functions of other scripts/objects (ScriptEditor.openScriptWindow).
You can do similar things with addstring script,... instead of script.add, passing parameters by setting this. variables, and doing callnpc, but with the new script it's more simple (e.g. the functions of other objects can return values).
Holy, thats new graal script? :O
__________________
Reply With Quote
  #28  
Old 11-07-2004, 08:23 PM
Slash-P2P Slash-P2P is offline
Banned
Join Date: May 2004
Location: Burning Blade
Posts: 941
Slash-P2P is on a distinguished road
Quote:
Originally Posted by Stefan
NPC Code:

the most confusing thing i've ever seen


Here an example of writing into a file (savelines), the new for-each operator, calling functions with parameters (addControlCreationScript), and calling public functions of other scripts/objects (ScriptEditor.openScriptWindow).
You can do similar things with addstring script,... instead of script.add, passing parameters by setting this. variables, and doing callnpc, but with the new script it's more simple (e.g. the functions of other objects can return values).
That's supposed to be simple?
Reply With Quote
  #29  
Old 11-08-2004, 02:31 AM
falco10291029 falco10291029 is offline
BEst User EVER!
Join Date: Apr 2004
Posts: 1,186
falco10291029 is on a distinguished road
Quote:
Originally Posted by SlashP2P
That's supposed to be simple?
I agree with slash wholeheartedly, that looks very advanced, or maybe you didn't explain it correctly, either way, it won't be easy to change over to Gscript2 :-/
__________________
BEst Insult ever: If I had a dollar for every brain you DIDNT have, i'd have one dollar!
Reply With Quote
  #30  
Old 11-08-2004, 09:41 PM
Dach Dach is offline
call me Chad, it's cooler
Dach's Avatar
Join Date: Aug 2002
Posts: 1,899
Dach is on a distinguished road
Quote:
Originally Posted by falco10291029
I agree with slash wholeheartedly, that looks very advanced, or maybe you didn't explain it correctly, either way, it won't be easy to change over to Gscript2 :-/
That would be an example of are more complex operation.

It really wasn't that hard to follow anyway, granted you have some programming knowledge.

He created a weapon file, put "function OnCreated() {" in there, used that cool for-each thing to most likely put some code in there, then added a "}", then saved the file and called the script editor to open the window.
and I just made a crappy run-on sentence of me babbling
__________________
Scripting Documents:Old Script Documentation-Movement Tutorial
Reply With Quote
  #31  
Old 11-08-2004, 11:44 PM
falco10291029 falco10291029 is offline
BEst User EVER!
Join Date: Apr 2004
Posts: 1,186
falco10291029 is on a distinguished road
I got mos tof it, like the fact that it was creating something, it's just complex and a little hard to follow, and seems like it will be ahrder than gscript 1
__________________
BEst Insult ever: If I had a dollar for every brain you DIDNT have, i'd have one dollar!
Reply With Quote
  #32  
Old 11-09-2004, 12:08 AM
Ajira Ajira is offline
Poont.
Join Date: Oct 2004
Location: NY, USA
Posts: 477
Ajira is on a distinguished road
I, personally, cannot wait.
Reply With Quote
  #33  
Old 11-09-2004, 03:22 AM
Admins Admins is offline
Graal Administration
Join Date: Jan 2000
Location: Admins
Posts: 11,693
Admins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud of
Quote:
Originally Posted by falco10291029
I got mos tof it, like the fact that it was creating something, it's just complex and a little hard to follow, and seems like it will be ahrder than gscript 1
No it's simplier, try the same with the old engine ...
e.g. imagine this:

setstring clientr.hp,#v(strtofloat(#s(clientr.hp)) + 1);

in new script is

clientr.hp++;
Reply With Quote
  #34  
Old 11-09-2004, 04:10 AM
falco10291029 falco10291029 is offline
BEst User EVER!
Join Date: Apr 2004
Posts: 1,186
falco10291029 is on a distinguished road
Quote:
Originally Posted by Stefan
No it's simplier, try the same with the old engine ...
e.g. imagine this:

setstring clientr.hp,#v(strtofloat(#s(clientr.hp)) + 1);

in new script is

clientr.hp++;
*tears of joy* Wow, editing strings with ++? It's so beautiful. But on a more serious note, i obviously meant the script you showed, not all of it since I can't possibly know what all the commands/ transformations will be like.
__________________
BEst Insult ever: If I had a dollar for every brain you DIDNT have, i'd have one dollar!
Reply With Quote
  #35  
Old 11-09-2004, 04:12 AM
LogicBot LogicBot is offline
Banned
Join Date: Jul 2004
Location: <3Doomsday<3
Posts: 0
LogicBot is on a distinguished road
Send a message via ICQ to LogicBot Send a message via AIM to LogicBot
Quote:
Originally Posted by Slash-P2P
That's supposed to be simple?
Looks simple. Current gScript looks more complicated to me.
Reply With Quote
  #36  
Old 11-09-2004, 06:13 AM
Slash-P2P Slash-P2P is offline
Banned
Join Date: May 2004
Location: Burning Blade
Posts: 941
Slash-P2P is on a distinguished road
Quote:
Originally Posted by LogicBot
Looks simple. Current gScript looks more complicated to me.
Some parts look complicated (such as Stefan's example), and some parts look easy such as changing a string with ++
Reply With Quote
  #37  
Old 11-09-2004, 08:12 PM
Kaimetsu Kaimetsu is offline
Script Monkey
Kaimetsu's Avatar
Join Date: May 2001
Posts: 18,222
Kaimetsu will become famous soon enough
Dudes, that wasn't a string.
__________________
Reply With Quote
  #38  
Old 11-09-2004, 09:59 PM
protagonist protagonist is offline
Banned
protagonist's Avatar
Join Date: May 2003
Location: CAW
Posts: 5,586
protagonist is on a distinguished road
Send a message via AIM to protagonist Send a message via MSN to protagonist
Quote:
Originally Posted by Kaimetsu
Dudes, that wasn't a string.


It was a spicey meatball! How could you all have been so mistaken!?
Reply With Quote
  #39  
Old 11-09-2004, 10:18 PM
Admins Admins is offline
Graal Administration
Join Date: Jan 2000
Location: Admins
Posts: 11,693
Admins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud of
In new scripting engine all variables are variant and are handled depending on the operation, so if you do + then it is automatically converting string to float. When changing "clientr.hp" it is also automatically sending it to the client (transferred as flag/string like before).

A simplier example:
NPC Code:

for (pl: allplayers) {
if (!(pl.x in |577,1008| && pl.y in |-200,320|)) {
pl.x = 768 + random(-5,5);
pl.y = 44 + random(-5,5);
pl.sendrpgmessage("Sorry you cannot walk out of this yet.");
}
}



This is for warping people back to the town (on graal3d) if they go out of the town. As you can see it is using the new for-each command, and you don't need to use the with-command so often anymore, since you can call functions of the object easier.
Reply With Quote
  #40  
Old 11-09-2004, 10:33 PM
Ajira Ajira is offline
Poont.
Join Date: Oct 2004
Location: NY, USA
Posts: 477
Ajira is on a distinguished road
Quote:
This is for warping people back to the town (on graal3d) if they go out of the town. As you can see it is using the new for-each command, and you don't need to use the with-command so often anymore, since you can call functions of the object easier.
I love it.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 11:46 PM.


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