Jump to content

The Arcane Art of Scripting


madscirat

Recommended Posts

Okay so I am used to knowledge, particularly software knowledge being shrouded in a layer of obfuscation but Oblivion Scripting sure takes the cake. Nothing seems more blatantly obvious than to simply list and define all script commands and yet no source manages to do this. Instead every so called tutorial is so laughable simple that it teaches nothing. If you are in the mood for a good guffaw, for example, you should visit the CSwiki page on scripting spells. It teaches you how to make one spell that removes all of your items............ Unfortunately for those of us who want to do anything useful this isn't very helpful.

 

The best tutorial I have found so far is this one

 

http://www.tesnexus.com/articles/article.php?id=356

 

and even it soon outlives its usefulness and is full of holes. Functions so basic as setting a target other than the player are left out.

 

I did manage to download a list of many scripting commands which I will paste below. If you have commands not on this list please add them and define if you can.

 

Also if anyone knows how to set a %#$#*@)@*^&!!! target for a scripted spell, please explain. I have tried

 

Ref GetTarget

 

Set Ref to <name>

 

But it then refuses to recognize the name. This is so basic, that it really is pathetic no tutorial seems to explain it.

 

**Figured this out. Its

 

Ref Target; outside scripteffectblock

 

Then target can be used in block (ex. target.getactorvalue magicka)

 

Script Functions

 

A

AHammerKey

Abs

Acos

Activate

AddAchievement

AddFlames

AddItem

AddScriptPackage

AddSpell

AddTopic

AdvancePCLevel

AdvancePCSkill

Asin

Atan

Atan2

Autosave

C

CanHaveFlames

CanPayCrimeGold

Cast

ClearOwnership

CloseCurrentOblivionGate

CloseOblivionGate

CompleteQuest

CreateFullActorCopy

D

DeleteFullActorCopy

Disable

DisableLinkedPathPoints

DisablePlayerControls

Dispel

DispelAllSpells

Drop

DropMe

DuplicateAllItems

DuplicateNPCStats

E

Enable

EnableFastTravel

EnableLinkedPathPoints

EnablePlayerControls

EquipItem

EssentialDeathReload

EvaluatePackage

F

ForceActorValue

ForceCloseOblivionGate

ForceFlee

ForceTakeCover

ForceWeather

G

GetActionRef

GetActorValue

GetAlarmed

GetAmountSoldStolen

GetAngle

GetArmorRating

GetArmorRatingUpperBody

GetAttacked

GetBarterGold

GetBaseActorValue

GetButtonPressed

GetClassDefaultMatch

GetClothingValue

GetCombatTarget

GetContainer

GetCrime

GetCrimeGold

GetCrimeKnown

G cont.

GetCurrentAIPackage

GetCurrentAIProcedure

GetCurrentTime

GetCurrentWeatherPercent

GetDayOfWeek

GetDead

GetDeadCount

GetDestroyed

GetDetected

GetDetectionLevel

GetDisabled

GetDisposition

GetDistance

GetDoorDefaultOpen

GetEquipped

GetFactionRank

GetFactionRankDifference

GetFactionReaction

GetFatiguePercentage

GetForceRun

GetForceSneak

GetFriendHit

GetFurnitureMarkerID

GetGameSetting

GetGlobalValue

GetGold

GetHeadingAngle

GetIdleDoneOnce

GetIgnoreFriendlyHits

GetInCell

GetInCellParam

GetInFaction

GetInSameCell

GetInWorldspace

GetInvestmentGold

GetIsAlerted

GetIsClass

GetIsClassDefault

GetIsCreature

GetIsCurrentPackage

GetIsCurrentWeather

GetIsGhost

GetIsID

GetIsPlayableRace

GetIsPlayerBirthsign

GetIsRace

GetIsReference

GetIsSex

GetIsUsedItem

GetIsUsedItemType

GetItemCount

GetKnockedState

GetLOS

GetLevel

GetLockLevel

GetLocked

GetNoRumors

GetOffersServicesNow

GetOpenState

GetPCExpelled

GetPCFactionAttack

GetPCFactionMurder

GetPCFactionSteal

GetPCFactionSubmitAuthority

GetPCFame

G cont.

GetPCInFaction

GetPCInfamy

GetPCIsClass

GetPCIsRace

GetPCIsSex

GetPCMiscStat

GetPCSleepHours

GetPackageTarget

GetParentRef

GetPersuasionNumber

GetPlayerControlsDisabled

GetPlayerHasLastRiddenHorse

GetPlayerInSEWorld

GetPos

GetQuestRunning

GetQuestVariable

GetRandomPercent

GetRestrained

GetScale

GetScriptVariable

GetSecondsPassed

GetSelf

GetShouldAttack

GetSitting

GetSleeping

GetStage

GetStageDone

GetStartingAngle

GetStartingPos

GetTalkedToPC

GetTalkedToPCParam

GetTimeDead

GetTotalPersuasionNumber

GetTrespassWarningLevel

GetUnconscious

GetUsedItemActivate

GetUsedItemLevel

GetVampire

GetWalkSpeed

GetWeaponAnimType

GetWeaponSkillType

GetWindSpeed

GoToJail

H

HasFlames

HasMagicEffect

HasVampireFed

I

IsActionRef

IsActor

IsActorAVictim

IsActorDetected

IsActorEvil

IsActorUsingATorch

IsActorsAIOff

IsAnimPlaying

IsCellOwner

IsCloudy

IsContinuingPackagePCNear

IsCurrentFurnitureObj

IsCurrentFurnitureRef

IsEssential

IsFacingUp

IsGuard

IsHorseStolen

IsIdlePlaying

I

IsInCombat

IsInDangerousWater

IsInInterior

IsInMyOwnedCell

IsLeftUp

IsOwner

IsPCAMurderer

IsPCSleeping

IsPlayerInJail

IsPlayerMovingIntoNewSpace

IsPlayersLastRiddenHorse

IsPleasant

IsRaining

IsRidingHorse

IsRunning

IsShieldOut

IsSneaking

IsSnowing

IsSpellTarget

IsSwimming

IsTalking

IsTimePassing

IsTorchOut

IsTrespassing

IsTurnArrest

IsWaiting

IsWeaponOut

IsXBox

IsYielding

K

Kill

KillAllActors

L

Lock

Look

LoopGroup

M

MenuMode (Function)

Message

MessageBox

ModActorValue

ModAmountSoldStolen

ModBarterGold

ModCrimeGold

ModDisposition

ModFactionRank

ModFactionReaction

ModPCAttribute

ModPCFame

ModPCInfamy

ModPCMiscStat

ModPCSkill

ModScale

MoveTo

MoveToMarker

P

PayFine

PayFineThief

PickIdle

PlaceAtMe

PlayBink

PlayGroup

PlayMagicEffectVisuals

P cont.

PlayMagicShaderVisuals

PlaySound

PlaySound3D

PositionCell

PositionWorld

PreloadMagicEffect

PurgeCellBuffers

PushActorAway

R

RefreshTopicList

ReleaseWeatherOverride

RemoveAllItems

RemoveFlames

RemoveItem

RemoveMe

RemoveScriptPackage

RemoveSpell

Reset3DState

ResetFallDamageTimer

ResetHealth

ResetInterior

Resurrect

Rotate

S

SameFaction

SameFactionAsPC

SameRace

SameRaceAsPC

SameSex

SameSexAsPC

Say

SayTo

ScriptEffectElapsedSeconds

SelectPlayerSpell

SendTrespassAlarm

SetActorAlpha

SetActorFullName

SetActorRefraction

SetActorValue

SetActorsAI

SetAlert

SetAllReachable

SetAllVisible

SetAngle

SetAtStart

SetBarterGold

SetCellFullName

SetCellOwnership

SetCellPublicFlag

SetClass

SetCombatStyle

SetCrimeGold

SetDestroyed

SetDoorDefaultOpen

SetEssential

SetFactionRank

SetFactionReaction

SetForceRun

SetForceSneak

SetGhost

SetIgnoreFriendlyHits

SetInCharGen

S cont.

SetInvestmentGold

SetItemValue

SetLevel

SetNoAvoidance

SetNoRumors

SetOpenState

SetOwnership

SetPCExpelled

SetPCFactionAttack

SetPCFactionMurder

SetPCFactionSteal

SetPCFactionSubmitAuthority

SetPCFame

SetPCInfamy

SetPCSleepHours

SetPackDuration

SetPlayerInSEworld

SetPos

SetQuestObject

SetRestrained

SetRigidBodyMass

SetScale

SetSceneIsComplex

SetShowQuestItems

SetSize

SetStage

SetUnconscious

SetWeather

ShowBirthsignMenu

ShowClassMenu

ShowDialogSubtitles

ShowEnchantment

ShowMap

ShowRaceMenu

ShowSpellMaking

SkipAnim

StartCombat

StartConversation

StartQuest

StopCombat

StopCombatAlarmOnActor

StopLook

StopMagicEffectVisuals

StopMagicShaderVisuals

StopQuest

StopWaiting

StreamMusic

T

This

ToggleActorsAI

TrapUpdate

TriggerHitShader

U

UnequipItem

Unlock

V

VampireFeed

W

Wait

WakeUpPC

WhichServiceMenu

Y

Yield

 

Script Beginnings

 

SCRIPT BEGINNINGS

 

 

GameMode This will be run every frame while the game is in non-menu mode. Most scripts will use this block type exclusively.

MenuMode MenuType (optional) Run every frame while the game is in menu mode.

OnActivate Run once when object is activated.

OnActorEquip ObjectID Run once when the scripted actor equips the specified object.

OnActorUnequip ObjectID Run once when the scripted actor unequips the specified object.

OnAdd ContainerRefID (optional) Run once when object is added to Container's inventory.

OnAlarm CrimeType, Criminal (optional) Run once when the actor receives an alarm for the specified crime committed by Criminal (actor).

OnAlarmVictim CrimeType, Victim (optional) Run once when the actor receives an alarm for the specified crime committed against Victim (actor).

OnDeath ActorID (optional) Run once when actor is killed by ActorID

OnDrop ContainerRefID (optional) Run once when object is dropped from Container.

OnEquip ActorID (optional) Run once when object is equipped by ActorID.

OnHit ActorID (optional) Run once when actor is hit by ActorID

OnHitWith ObjectID (optional) Run once when actor is hit by weapon ObjectID

OnKnockout Run once when actor is knocked out by ActorID

OnLoad Run once when object's 3D is loaded

OnMagicEffectHit EffectID (optional) Run once when the actor is hit by the specified magic effect

OnMurder ActorID (optional) Run once when actor is murdered by ActorID

OnPackageChange PackageID Run once when actor changes from specified package

OnPackageDone PackageID Run once when actor completes specified package

OnPackageStart PackageID Run once when actor starts specified package

OnReset Run once when scripted object's cell is reset

OnSell SellerRefID (optional) Run once when object is sold by specified seller

OnStartCombat TargetActorID (optional) Run once when actor enters combat with TargetActorID

OnTrigger TriggeringRefID (optional) Run once when object is triggered by colliding object

OnTriggerActor TriggeringRefID (optional) Run once when object is triggered by colliding actor

OnTriggerMob TriggeringRefID (optional) Run once when object is triggered by colliding mobile object (actors, arrows, magic projectiles)

OnUnequip ContainerRefID (optional) Run once when object is unequipped by ActorID.

ScriptEffectStart Special block type used only by Magic Effect scripts

ScriptEffectFinish Special block type used only by Magic Effect scripts

ScriptEffectUpdate Special block type used only by Magic Effect scripts

 

 

Oblivion Commands

 

AddDecal -

AddFaceAnimNote (afan) -

Autosave -

BeginTrace (bt) - Creates a trace file (Xenon only)

CenterOnWorld (cow) - [COW worldname -10 5]

ClearAdaptedLight (cal) - Clears the HDR adapted light texture

CloseFile -

CompleteAllQuestStafes (caqs) - Sets all quest stages

DumpTexturePalette (dtp) - Dump texture palette contents to warning file

EnableFast - EnableFastTravel

Flush - Deletes all the actors in High who are not persistant

ForceWeather (fw) - Forces the active weather to the specified type, without transition.

FreezeRenderAccumulation (fra) - only re-render geometry visible during this frame

GetIgnoreFriendlyHits (gifh) -

GetINISetting (getini) -

Help -

KillAllActors (killall) -

LoadGame <filename>

ModScale - Modify the scale of an object

ModWaterShader (mws) - Modifies water shader settings

MoveToQuestTarget (movetoqt) - Move player to current quest target (optional param: target number).

OutputArchiveProfile (oap) - Output Archive profile info to a file

OutputLocalMapPictures (olmp) - Writes out the current local map

OutputMemContexts (omc) - Output Mem Context info to a file

OutputMemStats (oms) - Output Mem Stats info to a file

PickRefByID (prid) - Select a reference by id for the console.

PlayBink - Plays Bink movie file

PlayerSpellBook (psb) - Add all spells to player.

PlayMagicEffectVisuals (pme) -

PlayMagicShaderVisuals (pms) -

PrintAiList (pai) - Printed Ai Lists.

PrintHDRParam (php) - Prints current HDR settings.

PrintNPCDialog (pdialog) - Prints NPC dialog

PurgeCellBuffers (pcb) - Forcibly unloads all unattached cells in cell buffers.

QuitGame (qqq) - Exit game without going through menus.

Refreshini (refinin) - Refresh INI settings from file.

RefreshShaders - Reload HLSL shaders from disk

ReleaseWeatherOverride (rwo) -

ReloadCurrentClimate (rcc) - Reloads values from the current climate

ReloadCurrentWeather (rcw) - Reloads values from the current weather

Reset3DState -

ResetHealth -

ResetMemContexts (rmc) - Reset Max Mem Contexts

RevertWorld (rw) - Revert the world

RunCellTest (rct) - Runs a cell test

RunMemoryPass (rmp) - Runs a cleanup memory pass

Save <filename>

SaveIniFiles (saveini) - Writes all the .ini files.

SetActorAlpha (saa) -

SetActorRefraction (sar) -

SetCameraFOV (fov) - Change the camera's field of view (in deg): default 75

SetClipDist - new clip distance

SetDebugText (sdt) - Sets which debug text is shown.

SetFog -

SetGameSetting (setgs) - CenterOnCell (coc)

SetGamma (sg) - Sets new gamma ramp.

SetHDRParam (shp) -Sets various values for the HDR shader

SetIgnoreFriendlyHits (sifh) -

SetImageSpaceGlow (sisg) -

SetIniSetting (setini) - "setting:category" value

SetLightingPasses (slp) - 4 (0/1) values. amb|diff|tex|spec ex: 1010

SetScale - Set the scale of an object

SetShowQuestItems -

SetSkyParam (ssp) - Sets various values for the sky

SetSTBBColorConstants (sscc) - Show speedtree billboard color tweak constants

SetTargetRefraction (str) - Sets the refractive value of the target

SetTargetRefractionFire (strf) - Sets the refractive fire value of the target

SetTreeMipmapBias (stmb) - Set mipmap LOD bias values for tree billboards.

SetWeather (sw) - Sets the active weather to the specified type

SexChange - Selected npc male become female or female becomes male.

Show Quest Log (sql) -

Show1stPerson (s1st) - Show the 1st person Model from the 3rd person camera. If in 3rd person mode it will show both

ShowFullQuestLog (sfql) - Show all log entries for a single quest

ShowHeadTrackTarget (sheadt)- Show the head track target if set from look function

ShownAnim (sa) - Show Animation and Actor status.

ShowPivot (sp) - Puts a temporary yellow plus at the pivot point of the selected reference.

ShowQuests (sq) - List quests.

ShowQuestTargets (sqt) - Show current quest targets

ShowQuestVars (sqv) - Show quest variables. [e.g. svq QuestID]

ShowRenderPasses (srp) - display render passes for the next frame

ShowScenegraph (ssg) - Create a window with the full game scene graph

ShowSubSpaces (sss) - Temporarily displays subspaces

ShowSubtitle (srp) - show all dialog subtitles (1 shows always, 0 hides always)

ShowVars (sv) - Show variables on object. [e.g. player->sv]

ShowViewerStrings (svs) -

ShowWhoDetectsPlayer (swdp) -

SpeakSound -

StartAllQuests (saq) - Starts all quests

StopMagicEffectVisuals (sme) -

StopMagicShaderVisuals (sms) -

TakeCover - Forces a actor to move away from the target actor for a period of time

TestAllCells (tac) - Test All Cells (0 - stop, 1 - start, 2 - interiors, 3 - current world)

TestCode -

TestLocalMap (tlm) - Simulates the local map. (1 or 0 for FOW on or off)

TestSeenData (tsd) - Visually displays the current seen data

ToggleAI (tai) -

ToggleAiSchedules (tais) -

ToggleBorders (tb) -

ToggleCastShadows (tsh) -

ToggleCellNode (tcn) - Toggle 3D for a Cell child node: 0-Actor, 1-Marker, 2-Land, 3-Water, 4-Static, 5-Active

ToggleCharControllerShape (tccs) - Toggle char controller shape type.

ToggleCollision (tcl) -

ToggleCollisionGeometry (tcg) - Show collision geometry.

ToggleCombatAI (tcai) - Toggles ALL Combat AI

ToggleCombatStats (tcs)

ToggleConversations (tconv) - Toggle conversation stats

ToggleDebugText (tdt) - Show debug numbers on the screen, including FPS.

ToggleDetection (tdetect) -

ToggleDetectionStats (tds) - Show the detection stats of the current seletected Ref.

ToggleEmotions (temo) - Toggle NPC facial emotions.

ToggleFlyCam (tfc) - Toggles the Free Fly camera (UFO cam).

ToggleFogOfWar (tfow) - Turns fog of war on or off

ToggleFullHelp (tfh) - Toggle Full Help

ToggleGodMode (tgm) - Toggle God mode

ToggleGrass (tg) - Toggle grass display.

ToggleGrassUpdate (tgu) -

ToggleHDRDebug (thd) - Toggles HDR debug textures.

ToggleHighProcess (thighprocess) -

ToggleLeaves (tlv) -

ToggleLiteBrite (tlb) - Toggles lite brite render mode.

ToggleLODLand (tll) -

ToggleLowProcess (tlowprocess) -

ToggleMagicStats (tms) -

ToggleMapMarkers (tmm) - Toggle map markers (1 shows all, 0 hides all).

ToggleMaterialGeometry (tmg) - Show material geometry.

ToggleMenus - Hide all the menus. Used for taking screen shots.

ToggleMiddleHighProcess (tmhighprocess) -

ToggleMiddleLowProcess (tmlowprocess) -

ToggleOcclusion (tocc) - toggle occlusion query for geometry

TogglePathGrid (tpg) -

TogglePathLine (tpl) -

ToggleRefractionDebug (trd) - Toggles refraction debug render texture

ToggleSafeZone - Display the television 85% safe zone.

ToggleScripts (tscr) - Turn Script processing on/off

ToggleShadowVolumes float (tsv) -

ToggleSky (ts) -

ToggleTrees (tt) - Turn trees on/off

ToggleWaterRadius (twr) -

ToggleWaterSystem (tws) - Toggles the water system

ToggleWireframe (twf) - Show the world as wireframe.

TriggerHitShader (ths) -

Verbose - Toggle verbose combat/AI messages

WasteMemory (wm) - Allocates some memory (in MB).

WaterDeepColor (deep) - Modifies water deep color

WaterReflectionColor (refl) - Modifies water reflection color

WaterShallowColor (shallow) - Modifies water shallow color

 

 

 

 

Note I have left out names since anyone with half a brain can locate them in the CS

Link to comment
Share on other sites

The CS Wiki maintains a list of all vanilla functions and (most) OBSE functions, all with appropriate syntax and a description etc.

 

But it then refuses to recognize the name. This is so basic, that it really is pathetic no tutorial seems to explain it.

 

**Figured this out. Its

 

Ref Target; outside scripteffectblock

 

Then target can be used in block (ex. target.getactorvalue magicka)

Never forget to declare you variables! :teehee:

Link to comment
Share on other sites

  • 4 years later...

really appreciate this. Surprised it took so long for me to find it.... sort of the 'external' modding process--- data mining. Anyhoo, cheers...

And I want to make pink fireballs, but the magic effects only have spare 'summon' slots so only cast on self...

And if you haven't played in a while, Cinematic HUD really makes dialog look sharp.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...