Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting > New Scripting Engine (GS2)
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #16  
Old 05-11-2006, 03:15 AM
Skrobo2 Skrobo2 is offline
In the real world ogod.
Skrobo2's Avatar
Join Date: Dec 2005
Location: Refugio, Texas
Posts: 435
Skrobo2 is on a distinguished road
People are probably going to get mad at me or something , but I'd like a commands.rtf for GS2. That would be much better than going to the wiki all the time. :]
__________________


Quote:
Originally Posted by Darlene159 View Post
I would rather have dead forums.
Reply With Quote
  #17  
Old 05-11-2006, 01:31 PM
Angel_Light Angel_Light is offline
Varia Developer
Angel_Light's Avatar
Join Date: Nov 2005
Location: Knoxville, TN
Posts: 1,684
Angel_Light is on a distinguished road
Send a message via AIM to Angel_Light Send a message via MSN to Angel_Light
Talking

I have a idea to add to the new engine.

function onPlayerkills() {
if (params[0]=="AccountName") {
blah();
player.chat = "You killed" SPC player.killed;
}
else if (params[1]=="NPC or Player var") {
blah();
}
}

for the default system hitpoint sys and it would see if the playerkilled someone or a NPC. it should also hold who got killed for awhile
__________________
Deep into the Darkness peering...

Last edited by Angel_Light; 05-11-2006 at 01:48 PM..
Reply With Quote
  #18  
Old 05-11-2006, 02:22 PM
ApothiX ApothiX is offline
Okiesmokie
Join Date: May 2004
Posts: 1,447
ApothiX is on a distinguished road
Quote:
Originally Posted by Skrobo2
People are probably going to get mad at me or something , but I'd like a commands.rtf for GS2. That would be much better than going to the wiki all the time. :]
Quote:
Originally Posted by ApothiX
Run graal4 with the command line option "-listscriptfunctions" and open the file it generates.
Sad, I've already said that in this thread.


Quote:
Originally Posted by Angel_Light
I have a idea to add to the new engine.

function onPlayerkills() {
if (params[0]=="AccountName") {
blah();
player.chat = "You killed" SPC player.killed;
}
else if (params[1]=="NPC or Player var") {
blah();
}
}

for the default system hitpoint sys and it would see if the playerkilled someone or a NPC. it should also hold who got killed for awhile
This is a documentation request thread, not a suggestion thread.


Quote:
Originally Posted by Prozac
Thank you for the links. Interesting that the weapons have only one .attribute that can be checked.

I request a doumentation format that is less like the wikipedia format, and more like ace's scripting guide - which i found here

http://web.archive.org/web/*/http://.../commands.html
(the december version worked ok but some of the images are missing)

but keep the search feature-
still, the outline and left frame nav, right frame content, was the most user friendly way to look up information that i have encountered for gscript.

In fact, much of what is in ace's scripting guide covers a lot of concept that would just need the gs2 version, and it could be come a more user friendly documentation than the list o' commands, with little to no expliation of how to actually implement the given commands in any kind of context, that much of the wiki is.

ace's explinations and how he displayed the information + gs2 + a search option = a helpful guide.

Also, why is the letter T before stuff like Graalvar? and Why make a page called tgraalvar when graalvar is not a variable that you will need to use when making any kind of weapon, system, display or anything in-game? just seems like unnecesary overcomplicaiton. that's my 2 cents.
TServerWeapon only has one attribute because it is derived from TServerNPC, hence the reason I linked you to that too. 'T' is a common prefix for denoting objects, it is good practice to use it so that the programmer/scripter can easily know what the datatype/variable represents without having to search for the declaration in the source code.
__________________


[06:24:19] * Parts: Skyld (i=silent@unaffiliated/skyld) ("Perhaps Okiesmokie did not realise that I like the boys. ")
Reply With Quote
  #19  
Old 05-11-2006, 05:45 PM
Prozac Prozac is offline
one of the good guys
Prozac's Avatar
Join Date: Jan 2006
Posts: 245
Prozac is on a distinguished road
Send a message via AIM to Prozac
Quote:
Originally Posted by ApothiX

TServerWeapon only has one attribute because it is derived from TServerNPC, hence the reason I linked you to that too. 'T' is a common prefix for denoting objects, it is good practice to use it so that the programmer/scripter can easily know what the datatype/variable represents without having to search for the declaration in the source code.
Good point, but in that case, the wiki would help the person developing the Graal application(s) - which in this case is only one person, Stefan. (and whoever else in france that he has hired, who knows).

Shouldn't the public wiki made for the players be focuses on what the players will actually encounter?

For example, in stead of the top of the page being

Creation/Dev/Script/Client/TServerPlayer

perhaps it could be more like

Creation/Development/NPCs/Client/player.attributes that you can access and modify

a bit more wordy and less 1337 code looking - but that's what people new to programming need. This is a game engine that is ideal for new players. No one is going to pay you money to make npc's, at least not a professional software company. It should be written for the programming novice and beginner level, not for the one who has years of coding under their belt.
Reply With Quote
  #20  
Old 05-11-2006, 11:57 PM
jake13jake jake13jake is offline
Former Classic Staff
jake13jake's Avatar
Join Date: Dec 2002
Location: Northwest Vermont
Posts: 1,452
jake13jake will become famous soon enough
Quote:
Originally Posted by Prozac
It should be written for the programming novice and beginner level, not for the one who has years of coding under their belt.
That's what a tutorial is for :P. I would say that the wiki is good for people with a year experience, and really good for people with more experience. Write one. Write a tutorial. It is a wiki after all. That way we could hire people for scripting that are using gscript2 for their first computer language (although sometimes often second for the HTML people). Unfortunately, there's still the fact that hiring trainee scripters is a huge security risk if you don't have a dev server *cough*.
Reply With Quote
  #21  
Old 05-12-2006, 07:23 AM
Rick Rick is offline
PipBoy Extraordinaire!
Rick's Avatar
Join Date: Jul 2004
Location: Long Beach, California.
Posts: 831
Rick is on a distinguished road
Quote:
Originally Posted by Prozac
Good point, but in that case, the wiki would help the person developing the Graal application(s) - which in this case is only one person, Stefan. (and whoever else in france that he has hired, who knows).

Shouldn't the public wiki made for the players be focuses on what the players will actually encounter?

For example, in stead of the top of the page being

Creation/Dev/Script/Client/TServerPlayer

perhaps it could be more like

Creation/Development/NPCs/Client/player.attributes that you can access and modify

a bit more wordy and less 1337 code looking - but that's what people new to programming need. This is a game engine that is ideal for new players. No one is going to pay you money to make npc's, at least not a professional software company. It should be written for the programming novice and beginner level, not for the one who has years of coding under their belt.
They are named after the class name. Why not just go to Client#Classes / Object Types ?
Reply With Quote
  #22  
Old 05-12-2006, 02:13 PM
ApothiX ApothiX is offline
Okiesmokie
Join Date: May 2004
Posts: 1,447
ApothiX is on a distinguished road
Quote:
Originally Posted by Prozac
Good point, but in that case, the wiki would help the person developing the Graal application(s) - which in this case is only one person, Stefan. (and whoever else in france that he has hired, who knows).

Shouldn't the public wiki made for the players be focuses on what the players will actually encounter?

For example, in stead of the top of the page being

Creation/Dev/Script/Client/TServerPlayer

perhaps it could be more like

Creation/Development/NPCs/Client/player.attributes that you can access and modify

a bit more wordy and less 1337 code looking - but that's what people new to programming need. This is a game engine that is ideal for new players. No one is going to pay you money to make npc's, at least not a professional software company. It should be written for the programming novice and beginner level, not for the one who has years of coding under their belt.
I believe I said the programmer and the scripter. No, they should not change the wiki to what you stated, and for one reason. The objects are available in scripts.

For example, if you wanted to make a new TStaticVar, you would do:

PHP Code:
temp.mykewlvar = new TStaticVar();
temp.mykewlvar.test "Zomg this variable now has members, and can be passed as a parameter to a function while keeping it's members."
__________________


[06:24:19] * Parts: Skyld (i=silent@unaffiliated/skyld) ("Perhaps Okiesmokie did not realise that I like the boys. ")
Reply With Quote
  #23  
Old 07-07-2006, 05:45 PM
upsilon upsilon is offline
Shmoo
upsilon's Avatar
Join Date: Dec 2005
Location: Birmingham, Alabama
Posts: 58
upsilon is on a distinguished road
The graal bible has command documentation, but i havent beenable to find any event documentation.
Reply With Quote
  #24  
Old 07-08-2006, 01:29 PM
ApothiX ApothiX is offline
Okiesmokie
Join Date: May 2004
Posts: 1,447
ApothiX is on a distinguished road
Quote:
Originally Posted by upsilon
The graal bible has command documentation, but i havent beenable to find any event documentation.
Not looking in the right place. It has lists of events for the types of variables that call the events. If you cannot find the event where it should be, keep going up the hierarchy until you find it. (By up, I mean to the parent)
__________________


[06:24:19] * Parts: Skyld (i=silent@unaffiliated/skyld) ("Perhaps Okiesmokie did not realise that I like the boys. ")
Reply With Quote
  #25  
Old 07-10-2006, 03:28 PM
upsilon upsilon is offline
Shmoo
upsilon's Avatar
Join Date: Dec 2005
Location: Birmingham, Alabama
Posts: 58
upsilon is on a distinguished road
Quote:
Originally Posted by ApothiX
It has lists of events for the types of variables that call the events.
so they are classified by the caller? thats a bit weird. I have no idea what (for instance), calls the onCreated() event. Makes it very hard to just look around for events.

The only event descriptions ive found so far are in the gui stuff, and those are listed for the classes these things are called on. Could you point out an example maybe? Im not entirely sure i even understood you correctly.
Reply With Quote
  #26  
Old 07-10-2006, 10:10 PM
Tyhm Tyhm is offline
Psionic Youth
Tyhm's Avatar
Join Date: Mar 2001
Location: Babord, West Graal Deaths:1009 Kills:1
Posts: 5,635
Tyhm will become famous soon enough
He's got a point, you know.
if(created) ideally meant When the level is first entered - by anyone, anywhere - run this event. And for quite a few versions it meant The first time any given player enters the level, so it got replaced with if(playerenters&&isleader&&this.open<1){ this.open=1;...
So the conditions in Plain English would be nice. Is "created" called when the level is uploaded? When the level is refreshed? When the NPCServer restarts? Does it wait for a player to enter the level and in so doing provide a processor on which to run scripts, or does the server run the script even if nobody ever finds the level?
__________________
"Whatever," said Bean, "I was just glad to get out of the toilet."

"Power does not corrupt. Fear corrupts, perhaps the fear of a loss of power."- John Steinbeck
"I'm only acting retarded, what's your excuse?" queried the Gord.
- My pet, the Levelup Gnome

http://forums.graalonline.com/forums...&postcount=233
Reply With Quote
  #27  
Old 07-10-2006, 10:21 PM
upsilon upsilon is offline
Shmoo
upsilon's Avatar
Join Date: Dec 2005
Location: Birmingham, Alabama
Posts: 58
upsilon is on a distinguished road
well i can pretty much guess the answers to all of that. Id assume that the memory allocator is what actually calls onCreated when memory is allocated for the object, but many of them are not so obvious, and i dont see any documentation for the memory allocator .

It looks like theres some documentation on GUI events, so the rest of it getting filled in is probably just a matter of time. I just haven't gotten to the point where i need to know about GUI object events yet. So i hadnt looked there.
__________________
Health nuts are going to feel really stupid someday, lying in hospitals dying of nothing. - Redd Foxx
Reply With Quote
  #28  
Old 07-11-2006, 11:46 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
Well the onCreated event occurs when the object is created The loading behaviour of levels is another thing.
Should make some documentation on events though, especially for the new scripting engine where the event-functions are handled differently than the old-script 'if (eventname)' thing.
Reply With Quote
  #29  
Old 07-12-2006, 12:35 AM
Tyhm Tyhm is offline
Psionic Youth
Tyhm's Avatar
Join Date: Mar 2001
Location: Babord, West Graal Deaths:1009 Kills:1
Posts: 5,635
Tyhm will become famous soon enough
Created by/for the client, or by/for the server? You don't have to answer right away, but this is the sort of question that'd make life easier if it was in the documentation, see. :-)
__________________
"Whatever," said Bean, "I was just glad to get out of the toilet."

"Power does not corrupt. Fear corrupts, perhaps the fear of a loss of power."- John Steinbeck
"I'm only acting retarded, what's your excuse?" queried the Gord.
- My pet, the Levelup Gnome

http://forums.graalonline.com/forums...&postcount=233
Reply With Quote
  #30  
Old 07-12-2006, 02:02 AM
ApothiX ApothiX is offline
Okiesmokie
Join Date: May 2004
Posts: 1,447
ApothiX is on a distinguished road
Quote:
Originally Posted by Tyhm
Created by/for the client, or by/for the server? You don't have to answer right away, but this is the sort of question that'd make life easier if it was in the documentation, see. :-)
Both. It depends if it's clientside or serverside.
__________________


[06:24:19] * Parts: Skyld (i=silent@unaffiliated/skyld) ("Perhaps Okiesmokie did not realise that I like the boys. ")
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 06:28 AM.


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