It is currently Mon Nov 18, 2024 1:26 pm



Post new topic Reply to topic  [ 5 posts ] 
Author Message
Member
User avatar
 

Team: Resident Evil
Main: Aku'Qa
Level: 2620
Class: Berserker

Joined: Sun Nov 07, 2010 8:08 am
Post The Declaration Hamster!!!
A GUIDE TO DECLARATIONS

- WHAT IS A DECLARATION?

A declaration is a key-value dictionary. It specifies parameters for an effect.
The particular set of parameters it can include depends on the effect. Refer to
the other files in this directory for examples.

- HOW DO DECLARATIONS WORK?

Declarations defined here are loaded when the game starts. They are stored in
a table under the name you give them:

<declaration>
<name>my_first_decl</name>
</declaration>

A declaration can inherit from another declaration, which means it will include
the keys defined in the inherited declaration in addition to its own (and so on
transitively up to a limit of about 64 ancestors).

To inherit from another declaration, use an <inherit> directive:

<declaration>
<name>my_second_decl</name>
<inherit>my_first_decl</inherit>
</declaration>

Any number of <inherit> directives are allowed.

- HOW DO I SPECIFY WHAT KIND OF EFFECT A DECLARATION CREATES?

Inherit from one of the built-in effect names, like "flare_trail_thruster" or
"nebula". Or inherit from another declaration that does. Note, however, that a
declaration need not inherit from anything. It can be used simply to specify a
set of common parameters to mix into other effects via inheritance.

- WHAT ORDER SHOULD DECLARATIONS BE SPECIFIED IN?

It doesn't matter. Inheritance works dynamically. A declaration is expanded when
it is used.

A declaration defined in the server XML can inherit from a declaration defined
in these files without problems. The opposite is also possible: a local
declaration can inherit from one defined on the server. However, the local
declaration will be unexpandable until the client receives its ancestors from
the server and stores them in the declaration table.

- HOW ARE DECLARATIONS TURNED INTO EFFECTS?

Declarations are embedded in space objects, visages and items in the server
XML. When the game sends an object to the client, any attached declarations are
transmitted in a compact form. When the client creates an effect, it looks for a
declaration attached to the subject of the effect.

For example, when the client needs to create a ship thruster, it looks for a
declaration attached to the ship's active engine item and uses it to configure
the particle system.

Environmental effects are created using "environmental" named visages. In this
case the client looks for a declaration attached to the visage to select and
configure the effect.

- HOW DO I USE CLIENT-SIDE DECLARATIONS FROM THE SERVER?

By inheriting them. For example (in the server XML):

<EFFECTDECL TYPE="thruster">
<INHERIT>my_locally_defined_thruster</INHERIT>
</EFFECTDECL>

Since server decls are sent over the network, it is prudent to define large
decls on the client and inherit them in this way, perhaps overriding a few
fields to customize colours or sizes.

- SHOULD I NAME MY DECLARATIONS USING NONSENSICAL ABBREVIATIONS, MIXED CASE,
SPACES AND/OR HUNGARIAN NOTATION?

No. This upsets the declaration hamster.

(`-`;-"```"-;`-`)
\.' KILL './
/ \
; 0 0 ;
/| = = |\
; \ '._Y_.' / ;
; `-._ \|/ _.-' ;
; `"""` ;
; `""-. .-""` ;
/; '--._ \ / _.-- ;\
: `. `/|| ||\` .' :
'. '-._ _.-' .'
(((-'` `"""""` `'-)))

_________________
My Characters (to avoid confusion): Xenophanes, Protagoras, Error Message, Aku'Qa and Unfriendly


Last edited by thijs12b on Thu Feb 02, 2012 2:14 pm, edited 3 times in total.

Thu Feb 02, 2012 2:08 pm
Profile E-mail
User avatar
 

Team: Strawberry Pancakes
Main: playerboy345
Level: 2035
Class: Berserker

Joined: Sat Jul 04, 2009 10:25 am
Location: The Netherlands
Post Re: The Declaration Hamster!!!
Old.

_________________
JeffL wrote:
because we can and it looks really cool

The Voomy One wrote:
Quote:
Runescape, Allows you to change your name every 30 days.


Runescape sucks so it doesnt count :P


Thu Feb 02, 2012 2:09 pm
Profile E-mail
Member
User avatar
 

Team: Resident Evil
Main: Aku'Qa
Level: 2620
Class: Berserker

Joined: Sun Nov 07, 2010 8:08 am
Post Re: The Declaration Hamster!!!
SO IS YOUR FACE

_________________
My Characters (to avoid confusion): Xenophanes, Protagoras, Error Message, Aku'Qa and Unfriendly


Thu Feb 02, 2012 2:11 pm
Profile E-mail
User avatar
 

Team: Eminence Front
Main: Radia
Level: 1101
Class: Speed Demon

Joined: Wed Oct 10, 2007 6:04 pm
Location: q3dm17
Post Re: The Declaration Hamster!!!
I thought this was a documentary on how SS is coded.


I still think it is.

_________________
Jey123456 wrote:
That will happen in a future closer than most futures.
Image
No Context. Ever.
Idaten.


Thu Feb 02, 2012 4:05 pm
Profile WWW
User avatar

Joined: Sat Dec 18, 2010 3:11 pm
Post Re: The Declaration Hamster!!!
Visorak wrote:
I thought this was a documentary on how SS is coded.


I still think it is.



Code:
(`-`;-"```"-;`-`)
\.' KILL './
/ \
; 0 0 ;
/| = = |\
; \ '._Y_.' / ;
; `-._ \|/ _.-' ;
; `"""` ;
; `""-. .-""` ;
/; '--._ \ / _.-- ;\
: `. `/|| ||\` .' :
'. '-._ _.-' .'
(((-'` `"""""` `'-)))


C2 seer mechanics, because they can and it looks cool

_________________
Jey123456 wrote:
back burner is overloaded with stuff right now. but yea its somewhere on there.

landswimmer wrote:
you know that even if you're wrong, they're more wrong. which makes you right.


Thu Feb 02, 2012 9:36 pm
Profile E-mail
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Powered by phpBB © phpBB Group.