Category talk:Functions

From the Fallout3 GECK Wiki
Revision as of 18:44, 4 February 2009 by imported>TastyWheat (→‎Functions or Methods)
Jump to navigation Jump to search

Syntax differences

Looking at all the different function pages, one thing I can't help but notice is that, depending on who added the information, many functions seem to have different syntax - especially reference functions. Not only are some reference functions missing their reference syntax entirely, but a lot of them have small inconsistencies as well, for example:

[ActorREF.]GetKillingBlowLimb  
[ActorID|ContainerID.]AddItem ObjectID, Count, MessageHiddenFlag

In these examples, ActorREF and ActorID mean the same thing. This may not be so clear, however, to some people - especially those still new to the syntax used in Fallout 3.

Parameter syntax is also not consistent. While I realise that various different methods can be used (e.g. commas/no commas), I think the Wiki should probably have this standardised as well. Here are some examples of inconsistencies:

[ActorREF].SexChange [0/1]
[ActorREF].SetUnconscious ''0/1''
SetPCYoung 0/1
[ActorID.]UnEquipItem ObjectID NoEquipFlag HideEquipMessage
ShowMessage MessageID, [var1], ..., [var9]

I think it wouldn't be a bad idea to get, if not a completely standardised syntax for use in the Wiki, then at least guidelines in order to reduce possible confusion. If this happened, I'd volunteer to change/add function syntaxes to fit a standard/guidelines.
-- Cipscis 07:58, 15 January 2009 (UTC)

I agree. I'm trying to get into modding but with some of these inconsistencies I'm getting pretty confused. I'm assuming [ActorWhatever.] means an actor object reference. So ActorREF and ContainerREF, when applicable, make the most sense (though I might squabble over the capitalization).
TastyWheat (talk - contribs) 17:26, 4 February 2009 (UTC)
A little while after I made that "post", I noticed this page - Template:Function. It looks like that's the way to go for consistency.
-- Cipscis 21:16, 4 February 2009 (UTC)

Functions or Methods

I'm probably just splitting hairs here, but since most of these "functions" require a preceding object reference doesn't that make these methods instead of functions? Yes, the preceding object reference (i.e. ActorREF) is often optional, making them behave like functions, but they are still associated with an object (the Player in those cases). I know most of you are used to this terminology, but newcomers with programming experience may learn faster if the proper terms were used.
TastyWheat (talk - contribs) 17:49, 4 February 2009 (UTC)

These "Methods" are usually referred to as Reference functions. As stated in the article, reference syntax is optional in reference scripts as if it is absent it is implied that the scripted reference is the calling reference.
-- Cipscis 21:16, 4 February 2009 (UTC)
Far be it from me to correct the official lingo, I just think "method" is more technically correct.
TastyWheat (talk - contribs) 22:44, 4 February 2009 (UTC)