Category talk:Stage Functions

From the Oblivion ConstructionSet Wiki
Jump to navigation Jump to search

I've started this, and will try to fill it by creating separate articles of the functions found in the Stage function repository. Hopefully the article on the top of the category will remove the need for the simulating new functions article and the category itself will remove the need for the Stage function repository and perhaps the Useful Code and Extra Math Functions categories (though Extra Math Functions, perhaps, ought to be moved into this category.

I've written the article using "Wiki" as the example quest. My personal opinion is that this should be consistent throughout the Wiki, using Wiki as the title for example scripts and quests. Not all may agree with this, so I'm openning that up to discussion. For instance, in the Stage function repository, "f" was used. The reason I prefer to use "Wiki" is because people are less likely to try to use it as their own name - with the stage function repository, I could see hundreds of modders using quest "f" for this. While Oblivion probably will keep the scripts from conflicting, it would make error finding (Quest "f" RIGHT EVAL Expression Error, anyone?) even more difficult than it already is, and I believe modders should be encouraged to use unique identifiers for their scripts, quests, and objects. Where I might use DW to mark off all objects and scripts in my mods, I think the Wiki should use Wiki for all of its.

For now, since I am rewriting the articles above as necessary, I will use Wiki. If someone is opposed to this, (s)he is welcome to argue the point here.--DragoonWraith 19:44, 9 May 2006 (EDT)

Wow, reorganzing and rewriting everything is a LOT of work. Thanks for trying to bring some structure into my wierdness. ;)
I chose "f" as quest name since you have to write "questname." as a prefix in front of every single variable you access in a script and the maximum space available in a stage result script is very limited. even the 4 letters of "wiki" will make some of the bigger scripts exceed the maximum size. Therefore i wouldn't recommend to change it to anything longer. --JustTim 20:28, 9 May 2006 (EDT)
same goes for the names of most variables. they should be as short as possible. thas why i've use "fin" (float input), "fout" (float output), sin, cos, ang, etc...--JustTim 20:37, 9 May 2006 (EDT)


Well, the "Wiki" quest is supposed to be an 'example', specifically designed to not to be used by modders. I recently wrote an absolutely massive menu system for addiktive's Danger Sense mod, and it was nearly 600 (plus comments) lines long. No issue with script length. I highly doubt the extra characters of marginally longer variable names or quest names is going to put any script over the limit. And if it does make the difference, someone could easily do a search&replace in Notepad or something.--DragoonWraith 21:46, 9 May 2006 (EDT)
With normal scripts length is no problem, thats right, but a Stage Rusult Script can contain a maximum number of 1024 characters, which isn't very much. --JustTim 04:27, 10 May 2006 (EDT)
By using fin1-3 as input and fout1-3 as output for all functions it is more organized and valid for everything. if you are a little used to it, by seeing that a function takes 2 float values you instantly know that you've to set fin1 and fin2, call setStage and get your result from fout, regardless of which function you've called. --JustTim 20:37, 9 May 2006 (EDT)
Except most people, I imagine, will not be using fourteen different functions per script. I expect at most four (Square Root, Pythagoras, one of the Sine/Cosine/Tangents, and something else thrown in would be a lot). Therefore, it really doesn't make a difference.
By the way, I have used fin and fout, they're quite useful. I just think that for displaying the functions, they're unnecessary. Maybe an article about their use would be good?--DragoonWraith 21:53, 9 May 2006 (EDT)