Category talk:Functions

From GECK

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)
Method is typically used to refer to a member function in an object oriented system, but what is the "more correct" term depends on the language. In Java they are methods for sure, but in C++ they are more correctly called member functions.
Anyway, Fallout scripts aren't object oriented at all. The ref.Function args syntax is shorthand for Function args ref, and in fact some functions do not support the ref.Function syntax and instead require use of the Function ref syntax. So, method isn't really accurate here.
--SnakeChomp 23:00, 4 February 2009 (UTC)
"Method" only really applies in a truly Object-Oriented language, where the functions are part of the class. These functions are not - they are functions, and the supplied reference is really just a strangely-indicated argument. It's done for parallelism with OO programming (specifically C++), but since this is not actually C++, the term "Method" does not really apply (though at least the C++ text/class that I had claimed "Methods" and "Member Functions" meant the same thing, though SnakeChomp may know something that I don't). Regardless, calling them Functions has been the custom since Morrowind, and that's not changing now for any reason, even if it's a good one. Too much to change and too many people would be confused.
DragoonWraith · talk · 23:11, 4 February 2009 (UTC)
For all reasonable intents and purposes, method and member function are synonymous. You'll occasionally find a few people online who will give you a hard time using method to talk about C++ functions, but it really doesn't matter which term is used.
--SnakeChomp 23:49, 4 February 2009 (UTC)

Native and Extended Functions

Though it may be a bother, could we please separate out the FOSE functions from the ones included with the GECK, as we did with the CS Wiki? --PoHa! 03:22, 12 August 2009 (UTC)

...wow, really? I would have assumed we would have set that system up from the beginning. Yes, there should be several (as in a lot) of categories, for separating everything out. This is important. As much as you might personally think it's silly (as I do), there are several people who do not wish to use FOSE for whatever reason.
Definitely something that needs to be done post-haste here, guys.
DragoonWraith · talk · 03:25, 12 August 2009 (UTC)
Err... POHA!? As far as I can tell... there are no FOSE functions here. What are you talking about?
Adding the FOSE functions (in their own categories), however, would be an excellent idea.
DragoonWraith · talk · 16:14, 12 August 2009 (UTC)
Some functions, such as Label and Goto, have been added to the wiki. Would it be possible to include a category link in the origin section of the function template?
-- Cipscis 22:25, 12 August 2009 (UTC)
Possible, and a good idea. It won't work for sub-sections, but it will help categorize them so we can add the subsections to them. GeckBot can handle that.
In case you didn't notice, I've added (GECK 1.0) versions of all the scripting categories to all existing functions in the Functions category, using the bot. If we change the template to add the FOSE functions to a FOSE category, I can then use the bot to switch all of them from (GECK 1.0) to (FOSE) instead.
Have any functions been released in later versions of the GECK?
DragoonWraith · talk · 01:39, 13 August 2009 (UTC)
By the way, GeckBot is currently moving all existing FOSE functions (i.e. those with the FOSE1 switch in the Template) from the (GECK 1.0) version of categories to the (FOSE) version. Then you just need to create the various categories (each should be a subcategory of both "Function Types (source)" and "<type> Functions", for both the GECK 1.0 functions and the FOSE functions), and maintain the system in the future.
Using the Template for categorization may work quite well. The idea would be that you list each <type> category once, and it figures out which (GECK or FOSE) sub-category to also add it to. As my comment on the template mentions, however, we'll need some cleverness to make that work.
DragoonWraith · talk · 01:56, 13 August 2009 (UTC)
I know that there was a function (the name escapes me) added by Broken Steel to dynamically remap water types, and I believe some functions (some levelled list functions, I think) were added by other Fallout 3 patches. As far as I know, this page lists all functions present in unpatched Fallout 3 - Fallout 3 Commands, so any functions not listed there have been added by patches. I think only the 1.1.0.35 and Broken Steel (1.5.0.22?) patches added new functions, and the others mostly just made changes to AddAchievement.
-- Cipscis 02:21, 13 August 2009 (UTC)
So we need (GECK 1.1) and (GECK 1.5) categories, too, and we need to find those functions and switch them. I wouldn't really know anything about that, I'm afraid, so I'm going to have to leave that up to you. If there's any list or category of these already (or some way to modify the template to create such a category, like I did for the FOSE functions), let me know and I'll run Geckbot on it.
DragoonWraith · talk · 03:08, 13 August 2009 (UTC)
I tried using the functions not listed on that page that I linked to and they compiled just fine in 1.1. RemapWaterType only compiled in 1.5, so I've added a new origin option to the template and created a page for it. As far as I'm aware, it's the only non-FOSE function added in v1.5 of the GECK.
-- Cipscis 04:41, 13 August 2009 (UTC)
Was the original version of the GECK 1.1.whatever? In that case, I should change all the 1.0 categories to 1.1. Oops. Sorry about that.
DragoonWraith · talk · 16:51, 13 August 2009 (UTC)
Yeah, the initial release of the GECK was 1.1.0.36.
-- Cipscis 00:57, 14 August 2009 (UTC)
OK, fixed that.
DragoonWraith · talk · 18:29, 15 August 2009 (UTC)
Personal tools