*Posted by theo for quests but is really for all scripters*
Stalker, who is currently fixing old esps, asked me to make sure that the scripts that will be created from now on will be comperhensible so that it is absolutely clear what they do.
So I would like to introduce several basic rules of scripting aesthetics and ask every scripter to keep them in mind. Messy and uncomperhensible scripts in quests will not pass review be they working or not.
1) Correct format to name scripts in map 1 quests will be now on:
TR_m1_(quest initials - applies only if script is made for purpose of one quest and has no other use. Otherwise put GEN)_(intelligible name of script giving basic idea what it does)
2) On the begining of each script there will be a few lines of comments describing what does the script do, what objects it affects and what is its purpose. No need to follow all that but do write what you think is necessary for correct understanding of the script.
3) Naming of variables: Just use common sense. It is not neccesary so that the name of variables were 16 characters long, just give some idea what do they do.
4) When changing some variables outside the script please make a comment on this.
5) Keep strict and uniform style of blank spaces at the beginning of the lines inside some conditions, so everybody can track which "end if" belongs to which "if".
Generarily just make sure you make your script in a way in which you would like to find it if you were asked to fix it after five years. I am sure this will be no problem for you.
Thank you for your valuable efforts.
General comment by Stalker
Moderators: Haplo, Lead Developers
-
- Developer
- Posts: 811
- Joined: Thu Aug 21, 2003 10:56 am
- Location: Dreamland
Also, be nice. Post a single one-liner at minimum in your script describing what said script actually does. (if you can fit, which you can, unless you have like an 1100-line script)
ie.
begin SampleScript
;this script is just a sample to show you what this post means
if ( ScripterIQ == 0 )
slapwithtrout 1
endif
if ( ScripterIQ > 0 )
approvescriptidea
endif
End SampleScript
ie.
begin SampleScript
;this script is just a sample to show you what this post means
if ( ScripterIQ == 0 )
slapwithtrout 1
endif
if ( ScripterIQ > 0 )
approvescriptidea
endif
End SampleScript
Last edited by Haplo on Sat May 27, 2006 12:39 am, edited 3 times in total.