Bethesda scripters with a sense of humor

Post » Wed Jun 20, 2012 11:31 am

I'm not sure thread is in the right place, but I want to post some funny stuff I found in Bethesda's scripts.
Maybe others can do the same, if they've found any.

Spoiler

; the circle (tm) + kodlak (collect all five)ReferenceAlias property Skjor autoReferenceAlias property Aela autoReferenceAlias property Farkas autoReferenceAlias property Vilkas autoReferenceAlias property Kodlak auto; other jerksReferenceAlias Property Athis autoReferenceAlias Property Njada autoReferenceAlias Property Ria autoReferenceAlias Property Torvar auto; not technically a companion, but he's still coolReferenceAlias Property Eorlund auto

Spoiler

; naughty naughtybool property PlayerThievingAndNotPaying auto conditionalint property PlayerThievingThreshold auto conditional; to shut them up when there are more important things going onReferenceAlias Property GenericDialogueSuppressor1 autoReferenceAlias Property GenericDialogueSuppressor2 autoReferenceAlias Property GenericDialogueSuppressor3 autoReferenceAlias Property GenericDialogueSuppressor4 auto

Spoiler

; Quest Designer needs arrays badly. Quest Designer is about to die.CompanionsRadiantQuest Function GetRadiantQuestFromIndex(int questIndex)	if	 (questIndex == 1)		return CR01	elseif (questIndex == 2)		return CR02	elseif (questIndex == 3)		return CR03	elseif (questIndex == 4)		return CR04	elseif (questIndex == 5)		return CR05	elseif (questIndex == 6)		return CR06	elseif (questIndex == 7)		return CR07	elseif (questIndex == 8)		return CR08	elseif (questIndex == 9)		return CR09	elseif (questIndex == 10)		return CR10	elseif (questIndex == 11)		return CR11	elseif (questIndex == 12)		return CR12	elseif (questIndex == 13)		return CR13	elseif (questIndex == 14)		return CR14	else		return None	endifEndFunctionint Function GetIndexFromRadiantQuest(Quest rQuest)	if	 (rQuest == CR01)		return 1	elseif (rQuest == CR02)		return 2	elseif (rQuest == CR03)		return 3	elseif (rQuest == CR04)		return 4	elseif (rQuest == CR05)		return 5	elseif (rQuest == CR06)		return 6	elseif (rQuest == CR07)		return 7	elseif (rQuest == CR08)		return 8	elseif (rQuest == CR09)		return 9	elseif (rQuest == CR10)		return 10	elseif (rQuest == CR11)		return 11	elseif (rQuest == CR12)		return 12	elseif (rQuest == CR13)		return 13	elseif (rQuest == CR14)		return 14	else		return 0	endifEndFunction

Spoiler

; achievements YAYGame.AddAchievement(9)

Spoiler

; lord, so much duplicated code here... this grew "organically" and is now hideous.;  do not look here for examples of good tidy code

Spoiler

   	 elseif (SkjorNextQuest && SkjorNextQuest != SkjorCurrentQuest)			; I don't even know why this is here anymore, but it is.			SkjorNextQuest.Stop()			SkjorNextQuest = None		elseif (SkjorCurrentQuest && SkjorCurrentQuest.GetStage() >= 200)

Spoiler

	; Mr. Book: SHUT IT DOWN!	; rq.Stop()	rq.IsAccepted = False ; so it can get cleared with the cycle	ReOpenAllRadiantQuests()

Spoiler

;NOTE:;The Civil War has gone through many iterations. There's a lot of obsolete stuff in here from previous iterations where it was more dynamic and free form.;So if you're a modder looking for scripting examples, while there's some interesting things going on in here, the CW scripts are probably not the best place to start. There's a lot of obsolete and deprecated complexity in these systems
User avatar
Monika Krzyzak
 
Posts: 3471
Joined: Fri Oct 13, 2006 11:29 pm

Post » Wed Jun 20, 2012 11:06 pm

I like their function examples, http://www.creationkit.com/IsRunning_-_Actor for instance
if !Forrest.IsRunning()  Debug.Trace("Run, Forrest, Run!")endIf
User avatar
yessenia hermosillo
 
Posts: 3545
Joined: Sat Aug 18, 2007 1:31 pm

Post » Wed Jun 20, 2012 2:48 pm

Yeah, this one is similar:
; Set the empire faction rank for Luke to 0Luke.SetFactionRank(EmpireFaction, 0)
User avatar
GEo LIme
 
Posts: 3304
Joined: Wed Oct 03, 2007 7:18 pm

Post » Wed Jun 20, 2012 12:34 pm

Haha great. I noticed something funny too in the items list, although I realised it's probably unintentional but still, there's a book listed as 'cheap horkers' (which is either not intentional since 'cheap' is a prefix to some of the book names or the book about horkers was made to be a cheap book for this reason)
User avatar
Stacy Hope
 
Posts: 3391
Joined: Thu Jun 22, 2006 6:23 am

Post » Thu Jun 21, 2012 1:21 am

Programmers LOVE making funny comments. And it's common practice to have your code reviewed by a peer, so unless your comment is REALLY funny, it will usually get taken out.

Rarely do you see comments like 'OMG i hate this code so much i just want to die' because that's pretty unprofessional and not enjoyable to read. But a line like:
// Crank up the graphics to level 3//SetRenderingQuality(2)SetRenderingQuality(3)

Will get in the final product %90 of the time
User avatar
i grind hard
 
Posts: 3463
Joined: Sat Aug 18, 2007 2:58 am

Post » Wed Jun 20, 2012 7:21 pm

Here's another from vanilla script:

  ; MARK - there's a playgroup forward in your script here but not in the others.  Hur?  self.PlayGamebryoAnimation("Forward")
User avatar
Ricky Rayner
 
Posts: 3339
Joined: Fri Jul 13, 2007 2:13 am

Post » Wed Jun 20, 2012 8:17 pm

I found this yesterday. It is in the script for the Ohgma Infinium.

int choice = ChoiceMessage.Show()if	 (choice == 0)  ; do nothingelseif (choice == 1)  ; path of might;   Debug.Trace("DA04: Player chose path of might.")  Game.IncrementSkillBy("Smithing", Advancement)  Game.IncrementSkillBy("HeavyArmor", Advancement)  Game.IncrementSkillBy("Block", Advancement)  Game.IncrementSkillBy("TwoHanded", Advancement)  Game.IncrementSkillBy("OneHanded", Advancement)  Game.IncrementSkillBy("Marksman", Advancement)elseif (choice == 2)  ; path of shadow;   Debug.Trace("DA04: Player chose path of shadow.")  Game.IncrementSkillBy("LightArmor", Advancement)  Game.IncrementSkillBy("Sneak", Advancement)  Game.IncrementSkillBy("Lockpicking", Advancement)  Game.IncrementSkillBy("Pickpocket", Advancement)  Game.IncrementSkillBy("Speechcraft", Advancement)  Game.IncrementSkillBy("Alchemy", Advancement)elseif (choice == 3)  ; path of magic;   Debug.Trace("DA04: Player chose path of magic.")  Game.IncrementSkillBy("Illusion", Advancement)  Game.IncrementSkillBy("Conjuration", Advancement)  Game.IncrementSkillBy("Destruction", Advancement)  Game.IncrementSkillBy("Restoration", Advancement)  Game.IncrementSkillBy("Alteration", Advancement)  Game.IncrementSkillBy("Enchanting", Advancement)else  ; WTFendif
User avatar
Darian Ennels
 
Posts: 3406
Joined: Mon Aug 20, 2007 2:00 pm

Post » Thu Jun 21, 2012 12:15 am

Yeah I've found a lot of random funny things throughout the CK that you can't see ingame. They sure do have fun! :D
User avatar
Nymph
 
Posts: 3487
Joined: Thu Sep 21, 2006 1:17 pm

Post » Wed Jun 20, 2012 5:39 pm

From the Werewolf Quest :

    if (power != None)	    ; some players are overly clever and sneak a power equip between casting	    ;  beast form and when we rejigger them there. this will teach them.;		 Debug.Trace("WEREWOLF: " + power + " was equipped; removing.")	    Game.GetPlayer().UnequipSpell(power, 2)    else;		 Debug.Trace("WEREWOLF: No power equipped.")    endif

Ha ha ha !
User avatar
Ron
 
Posts: 3408
Joined: Tue Jan 16, 2007 4:34 am

Post » Wed Jun 20, 2012 8:03 pm

; Set the fan's race to elfAnnoyingFan.SetRace(ElfRace)

Clearly an allusion to the Adoring Fan.
User avatar
darnell waddington
 
Posts: 3448
Joined: Wed Oct 17, 2007 10:43 pm


Return to V - Skyrim