Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   PlayerWorlds Main Forum (https://forums.graalonline.com/forums/forumdisplay.php?f=15)
-   -   Playerworld Inspections: Scripting (https://forums.graalonline.com/forums/showthread.php?t=64956)

Malinko 03-25-2006 10:03 PM

Playerworld Inspections: Scripting
 
Skyld created a document for the GraalBible on the scripting review for playerworld inspections. As he is the only GST that is doing it.

It can be found here. For those who would like a link: http://wiki.graal.net/index.php/Crea...orld_Scripting

If there is stuff that should be added, please post within this thread. Do NOT edit the Wiki page, as we will do that if needed.

napo_p2p 03-25-2006 11:56 PM

Looks good to me.

coreys 03-28-2006 05:12 AM

I suppose the creation of this was in response to the complains of people like Tenex. Or was this done before then? Either way, seems good to me.

napo_p2p 03-28-2006 09:01 AM

Quote:

Originally Posted by coreys
I suppose the creation of this was in response to the complains of people like Tenex. Or was this done before then? Either way, seems good to me.

Actually, it has really has always been there, but this document lays out what the GST will be looking for specifically in their inspections.

Projectshifter 03-28-2006 09:28 AM

I dunno, I think it should be rewritten. Obviously the GST knows what is being looked for but it doesn't seem to be laid out properly to give them an accurate portrayal of how it is scored. The whole styling/readability thing should just be mentioned in the foreward, if the scripts can't be read, they're going to be skipped over and it's basically an automatica fail, along with scripts that have serious security holes are are going to basically be able to be abused with very little trouble.

Yeah security and efficiency are a big deal, but at the same time the NPCs are inspected for just more than that. Oh well, it doesn't really seem like there are any playerworlds right now that are organized enough to get to this stage :(

napo_p2p 03-28-2006 09:52 AM

Quote:

Originally Posted by Projectshifter
I dunno, I think it should be rewritten.

I think it's a good backbone. It can always be revised.


Quote:

Originally Posted by Projectshifter
The whole styling/readability thing should just be mentioned in the foreward, if the scripts can't be read, they're going to be skipped over and it's basically an automatica fail,

That's a good point, so I second that ;).

Projectshifter 03-28-2006 11:25 AM

Quote:

Originally Posted by napo_p2p
I think it's a good backbone. It can always be revised.

I think a good backbone is important, but I don't agree with how it is layered and how the information is presented. It just isn't really an accurate portrayal of the NPC inspection process. Not unless it's really changed that much in the last year ;)

Loriel 03-28-2006 12:11 PM

Quote:

Originally Posted by Projectshifter
I think a good backbone is important, but I don't agree with how it is layered and how the information is presented. It just isn't really an accurate portrayal of the NPC inspection process. Not unless it's really changed that much in the last year ;)

It is a wiki. Post a better idea.

Malinko 03-28-2006 06:03 PM

Well, Skyld created this, as he is the only one doing the scripting inspection for playerworld inspections.

Though, suggestions are welcomed, of course, from the original members of the Global Scripting Team.

Though, it's better to discuss it here and see if it seems like a good idea, then it can be added to the "official" document, rather than someone not on the team putting stuff that isn't apart of the real inspection.

Andy0687 03-28-2006 06:54 PM

How can styling and readbility be judged?

I dont get the basis for doing that, if the scripts work and are not computer intensive, who cares who can read it, chances are everyone on the server has an idea what is going on, and thats all that is importaint. Right?

Malinko 03-28-2006 09:38 PM

Well, I'm guessing he means, don't make it like one huge long line.

He'll have to clear it up.

Skyld 03-28-2006 09:41 PM

Quote:

Originally Posted by Andy0687
How can styling and readbility be judged?

I dont get the basis for doing that, if the scripts work and are not computer intensive, who cares who can read it, chances are everyone on the server has an idea what is going on, and thats all that is importaint. Right?

Styling and readability can easily be judged on whether the script's structure is immediately obvious when you open a script.
For example, a script like this...
PHP Code:

function oncreated()
{if (
this.foo==this.bar)
{
this.something=somethingelse;
this.otherFunction();}


... is much less readable than:
PHP Code:

function onCreated()
{
  if (
this.foo == this.bar)
  {
    
this.something this.somethingelse;
  }


... especially with longer scripts.

If you have to sit and think out the structure of a script, i.e. how many code blocks you've ventured into at a given point and for what conditions, then it's badly structured.

Yen 03-28-2006 09:44 PM

I should ban Skyld from any server with my NPCs. :[
He'll be all.. 'WTF!? SHUTDOWN!!!!'

Malinko 03-28-2006 09:50 PM

Quote:

Originally Posted by Yen
I should ban Skyld from any server with my NPCs. :[
He'll be all.. 'WTF!? SHUTDOWN!!!!'

You can't ban an admin level though.

Warcaptain 03-28-2006 10:00 PM

Quote:

Originally Posted by Malinko
You can't ban an admin level though.

You can IP ban them (or at least you used to be able to)

I know I banned contego all the time as a joke, but that was when he didnt have Level 5 RC.

excaliber7388 03-28-2006 10:09 PM

The easier it is to read the script, the easier it is for them to help/inspect it. If they have a hard time reading it, they won't waste their time. Some of DR's older scripts are in poorly formatted gs1 but thats changing. ;)

Gambet 03-28-2006 10:24 PM

The styling and readability bit is quite lackluster. Sure, nobody wants to inspect a server with hundreds of nearly illegible forms of print, but the fact that both, NC and the Graal Editor, allow for styling should completely dismiss such a rule to most degrees.

You gave such a horid example, Skyld. If anything, I would hold the rule to those that code in single lines, something along the lines of:

NPC Code:

function onCreated() {if (this.foo == this.bar) {this.something = this.somethingelse;}}



or even

NPC Code:

function onCreated() {
if (this.foo == this.bar) { this.something = this.somethingelse; }
}



Because with your example, I could easily copy that code, and paste it in an empty npc on Graal Editor, and press the Style button, and viola.

But for the most part, code can be easily styled via the Graal Editor, or even NC, but I believe NC misplaces brackets when styling or it misplaces triggers (not sure exactly which).


I don't believe that lack-of-styled scripts should give a server an automatic failiure. I believe the GST should aid them in the proper forms of styling code, or even, helping them have it styled via Graal Editor. Some coders choose to style code in a specific way, and sometimes that way makes it harder for others to read, but is natural to them. It would be rather unfair for one to dismiss the content of a server just because the GST has a hard time reading the code. If the code is to the point where even styling it would do no good, then chances are, it possibly has tons of inefficiency and loop holes, and therefore, this rule could apply, but other then that, I would have some discrepancies with how it is carried out and enforced.

The GST should be around to aid the players, not ignore them because their method of styling, if any, is un-ordinary. Help the players, do not discourage them. If all of their npcs are horribly styled, then show them methods of styling. Maybe you could even style one of their currently un-styled npcs, as an example. After that, have them style another npc, and you judge how well they styled the npc. If they have done a good job, tell them you'd come back later that day or on another day, and even tell them that you would help them if any help is needed. The more global-to-staff interaction there is, the more safe and secure a playerworld team would feel, in case of an emergency; in which case they would need to contact globals (if needed). The current problem is that current playerworld staff dislike globals, mostly, because they just hop from server to server and act like they run the place. Globals should learn to interact with the fellow players, not act superior to them, unless of course, you need to handle a situation that is, or is getting, out of control. In this case, you would not exactly act superior, but you would act in a more foreman sort of way. Show the players that you are to be respected and listened to by treating the players as you would like them to treat you in return.

Curt1zzle 03-28-2006 11:49 PM

I had Jagen banned from my playerworld using a script.

Everytime he logged on it would just auto-disconnect him. Not a ban, but kept him off.

Sulukra 03-28-2006 11:52 PM

Quote:

Originally Posted by Curt1zzle
I had Jagen banned from my playerworld using a script.

Everytime he logged on it would just auto-disconnect him. Not a ban, but kept him off.

Myrrodin has something like that, except ours just constantly re-connects them the second they log on.

Skyld 03-29-2006 12:26 AM

Quote:

Originally Posted by Gambet
Because with your example, I could easily copy that code, and paste it in an empty npc on Graal Editor, and press the Style button, and viola.

Precisely. Anyone can do that.
Quote:

Originally Posted by Gambet
I don't believe that lack-of-styled scripts should give a server an automatic failiure. I believe the GST should aid them in the proper forms of styling code, or even, helping them have it styled via Graal Editor. Some coders choose to style code in a specific way, and sometimes that way makes it harder for others to read, but is natural to them. It would be rather unfair for one to dismiss the content of a server just because the GST has a hard time reading the code.

This is not the case at all. I say this to make it easier and quicker to inspect, not possible or impossible to inspect.
Quote:

Originally Posted by Gambet
The GST should be around to aid the players, not ignore them because their method of styling, if any, is un-ordinary. Help the players, do not discourage them. If all of their npcs are horribly styled, then show them methods of styling. Maybe you could even style one of their currently un-styled npcs, as an example.

I would happily do that anyway.

Yen 03-29-2006 12:32 AM

Quote:

Originally Posted by Malinko
You can't ban an admin level though.

You were there when I accidently banned all of Babylon's RCs. >_>
Not so much ban, but 'disable.'

Projectshifter 03-29-2006 01:07 AM

Quote:

Originally Posted by Andy0687
How can styling and readbility be judged?

That's one of the reasons I don't like what is on the wiki right now. You don't get judged on that, but if you can't read it you can't evaluate the script. I have seen too many servers that have scripts that aren't indented at all. It makes it virtually impossible to read, and it isn't the job of the GST to go through and style everything. If someone wants their server up, then they should have no problem styling their scripts, even if it's after the fact and they do it with NC or the offline editor. It's kind of a lesson they need to learn. If you plan to continue coding, regardless of what language, you're not going to be taken seriously if you don't style, no matter how good your stuff is.

napo_p2p 03-29-2006 01:12 AM

Quote:

Originally Posted by Projectshifter
That's one of the reasons I don't like what is on the wiki right now. You don't get judged on that, but if you can't read it you can't evaluate the script. I have seen too many servers that have scripts that aren't indented at all. It makes it virtually impossible to read, and it isn't the job of the GST to go through and style everything. If someone wants their server up, then they should have no problem styling their scripts, even if it's after the fact and they do it with NC or the offline editor. It's kind of a lesson they need to learn. If you plan to continue coding, regardless of what language, you're not going to be taken seriously if you don't style, no matter how good your stuff is.

I remember a long time ago, I asked Projectshifter to help me with some pickaxe script, but I had it all on one line, and I think it killed him.

But then I used:
with(getplayer(Projectshifter)) {playerhearts += 20;}

So he breathes again.

Projectshifter 03-29-2006 01:14 AM

Quote:

Originally Posted by napo_p2p
I remember a long time ago, I asked Projectshifter to help me with some pickaxe script, but I had it all on one line, and I think it killed him.

But then I used:
with(getplayer(Projectshifter)) {playerhearts += 20;}

So he breathes again.

I was revived and then promptly arrested for strangling napo and his lack of styling ;)


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

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