Talk:Useful Scripts

From GECK

FOSE Scripts

Should we include FOSE scripts? --Illyism 14:23, 24 February 2009 (UTC)

So long as it's made clear that the script requires FOSE, I don't see any problem with using them here. Looking at the script below, I think that changing the GMSTs while in MenuMode 1057 could potentially cause problems. Specifically, if a scripted terminal is placed near enough to a regular terminal that its script will be running while the regular terminal is Activated, the GMSTs will still be changed.
Perhaps a triggerbox could be used instead, so that the GMSTs are changed to and from their default values in OnTriggerEnter and OnTriggerLeave blocks.
Once FOSE makes string variables available, this script should be updated to store the original values and restore them, otherwise it will overwrite any other changes that have been made to the relevant GMSTs.
-- Cipscis 21:04, 24 February 2009 (UTC)

License?

I see that only one script notes the license and in that case it is attribution. For the others should the same be done? I wonder, does this GECK wiki have an license notes attached to submissions? As in does this wiki release all contributions under some license.

Ah I see I was right, from the Geck: General disclaimer: "You are being granted a limited license to copy anything from this site for non-commercial purposes" Warll 04:09, 21 July 2009 (UTC)

All scripts should be clear of any credits, including the script you mentioned. I noted it at the CS Wiki, where Skingrad posted the same script. We're waiting for him to remove the credit-line.
--Qazaaq 21:50, 21 July 2009 (UTC)
Removed the lines also here, but I have a question is this rule just for this wiki, if I remember well in other sites based on wikia there are or were pages with the name of the author Skingrad24 22:03, 21 July 2009 (UTC)
This is a rule specifically for the GECK and the CS Wiki, which are both hosted by Bethesda. The Wikia, which is a fan-created website, has its own rules (I don't know anything about them).
But even if those lines aren't removed there, it may still not be allowed. The rules weren't enforced on the CS Wiki for a while, which resulted in many pages that still contain an author's signature. At the time it wasn't clear that signing articles was against the rules. The same thing may be going on at the Wikia.
Thank you for removing the line and for the scripts.
--Qazaaq 23:27, 21 July 2009 (UTC)

Category

Why are all the scripts placed in only one article? In the CS Wiki there is a category called useful code. There's also one on this Wiki. Can someone consider giving each script its own regular Wiki page and place them in the Category:Useful Code? Darkness X 11:21, 21 October 2009 (UTC)

Iterating through multiple lists

I've a couple of comments about the recently added script, Iterating through multiple lists.

First, I'm a little confused as to why variables are being used for Label and Goto. It is certainly not a requirement to use variables for label IDs. I would recommend just "hard coding" a number to use as each label's ID. For example, instead of:

Label Label1
; ...
Goto Label1

I'd recommend using:

Label 10
; ...
Goto 10

(I tend to use multiples of 10 in my initial write-ups of scripts, as this makes it easier to insert more loops later while maintaining a logical order of label IDs)

More importantly, because labels' IDs cannot be higher than 255 (I thought I remembered this information being available on this wiki, but upon checking it wasn't. I have added it now) this script will no longer work after about 256 iterations, as the label's IDs will be higher than the maximum value of 255.

I'd recommend using something closer to this, based on the template for for loops available on cipscis.com:

ref rOuterList
ref rInnerList
ref rCurrentRef

int iOuterLength
int iInnerLength

int iOuterCount
int iInnerCount

set rOuterList to OuterList
set iOuterLength to ListGetCount rOuterList

set iOuterCount to 0
Label 10
if iOuterCount < iOuterLength

	set rInnerList to ListGetNthForm rOuterList iOuterCount
	set iInnerLength to ListGetCount rInnerList
	set iInnerCount to 0
	Label 20
	if iInnerCount < iInnerLength
		set rCurrentRef to ListGetNthForm rInnerList iInnerCount

		; Do Something with rCurrentRef

		set iInnerCount to iInnerCount + 1
		Goto 20
	endif

	set iOuterCount to iOuterCount + 1
	Goto 10
endif

Milo, please let me know if you have any comments or questions about what I've had to say. My aim is to help you improve your script, rather than replace it with my own. - Cipscis 20:44, 30 March 2011 (UTC)

Personal tools