You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
openmw-tes3mp/apps/openmw/mwscript/docs/vmformat.txt

460 lines
15 KiB
Plaintext

OpenMW Extensions:
Segment 0:
(not implemented yet)
opcodes 0x20-0x3f unused
Segment 1:
(not implemented yet)
opcodes 0x20-0x3f unused
Segment 2:
(not implemented yet)
opcodes 0x200-0x3ff unused
Segment 3:
op 0x20000: AiTravel
op 0x20001: AiTravel, explicit reference
op 0x20002: AiEscort
op 0x20003: AiEscort, explicit reference
op 0x20004: Lock
op 0x20005: Lock, explicit reference
op 0x20006: PlayAnim
op 0x20007: PlayAnim, explicit reference
op 0x20008: LoopAnim
op 0x20009: LoopAnim, explicit reference
op 0x2000a: Choice
op 0x2000b: PCRaiseRank
op 0x2000c: PCLowerRank
op 0x2000d: PCJoinFaction
op 0x2000e: PCGetRank implicit
op 0x2000f: PCGetRank explicit
op 0x20010: AiWander
op 0x20011: AiWander, explicit reference
op 0x20012: GetPCFacRep
op 0x20013: GetPCFacRep, explicit reference
op 0x20014: SetPCFacRep
op 0x20015: SetPCFacRep, explicit reference
op 0x20016: ModPCFacRep
op 0x20017: ModPCFacRep, explicit reference
op 0x20018: PcExpelled
op 0x20019: PcExpelled, explicit
op 0x2001a: PcExpell
op 0x2001b: PcExpell, explicit
op 0x2001c: PcClearExpelled
op 0x2001d: PcClearExpelled, explicit
op 0x2001e: AIActivate
op 0x2001f: AIActivate, explicit reference
op 0x20020: AiEscortCell
op 0x20021: AiEscortCell, explicit reference
op 0x20022: AiFollow
op 0x20023: AiFollow, explicit reference
op 0x20024: AiFollowCell
op 0x20025: AiFollowCell, explicit reference
op 0x20026: ModRegion
op 0x20027: RemoveSoulGem
op 0x20028: RemoveSoulGem, explicit reference
op 0x20029: PCRaiseRank, explicit reference
op 0x2002a: PCLowerRank, explicit reference
op 0x2002b: PCJoinFaction, explicit reference
op 0x2002c: MenuTest
op 0x2002d: BetaComment
op 0x2002e: BetaComment, explicit reference
op 0x2002f: ShowSceneGraph
op 0x20030: ShowSceneGraph, explicit
opcodes 0x20031-0x3ffff unused
Segment 4:
(not implemented yet)
opcodes 0x200-0x3ff unused
Segment 5:
op 0x2000000: CellChanged
op 0x2000001: Say
op 0x2000002: SayDone
op 0x2000003: StreamMusic
op 0x2000004: PlaySound
op 0x2000005: PlaySoundVP
op 0x2000006: PlaySound3D
op 0x2000007: PlaySound3DVP
op 0x2000008: PlayLoopSound3D
op 0x2000009: PlayLoopSound3DVP
op 0x200000a: StopSound
op 0x200000b: GetSoundPlaying
op 0x200000c: XBox (always 0)
op 0x200000d: OnActivate
op 0x200000e: EnableBirthMenu
op 0x200000f: EnableClassMenu
op 0x2000010: EnableNameMenu
op 0x2000011: EnableRaceMenu
op 0x2000012: EnableStatsReviewMenu
op 0x2000013: EnableInventoryMenu
op 0x2000014: EnableMagicMenu
op 0x2000015: EnableMapMenu
op 0x2000016: EnableStatsMenu
op 0x2000017: EnableRest
op 0x2000018: ShowRestMenu
op 0x2000019: Say, explicit reference
op 0x200001a: SayDone, explicit reference
op 0x200001b: PlaySound3D, explicit reference
op 0x200001c: PlaySound3DVP, explicit reference
op 0x200001d: PlayLoopSound3D, explicit reference
op 0x200001e: PlayLoopSound3DVP, explicit reference
op 0x200001f: StopSound, explicit reference
op 0x2000020: GetSoundPlaying, explicit reference
op 0x2000021: ToggleSky
op 0x2000022: TurnMoonWhite
op 0x2000023: TurnMoonRed
op 0x2000024: GetMasserPhase
op 0x2000025: GetSecundaPhase
op 0x2000026: COC
op 0x2000027-0x200002e: GetAttribute
op 0x200002f-0x2000036: GetAttribute, explicit reference
op 0x2000037-0x200003e: SetAttribute
op 0x200003f-0x2000046: SetAttribute, explicit reference
op 0x2000047-0x200004e: ModAttribute
op 0x200004f-0x2000056: ModAttribute, explicit reference
op 0x2000057-0x2000059: GetDynamic (health, magicka, fatigue)
op 0x200005a-0x200005c: GetDynamic (health, magicka, fatigue), explicit reference
op 0x200005d-0x200005f: SetDynamic (health, magicka, fatigue)
op 0x2000060-0x2000062: SetDynamic (health, magicka, fatigue), explicit reference
op 0x2000063-0x2000065: ModDynamic (health, magicka, fatigue)
op 0x2000066-0x2000068: ModDynamic (health, magicka, fatigue), explicit reference
op 0x2000069-0x200006b: ModDynamic (health, magicka, fatigue)
op 0x200006c-0x200006e: ModDynamic (health, magicka, fatigue), explicit reference
op 0x200006f-0x2000071: GetDynamic (health, magicka, fatigue)
op 0x2000072-0x2000074: GetDynamic (health, magicka, fatigue), explicit reference
op 0x2000075: Activate
op 0x2000076: AddItem
op 0x2000077: AddItem, explicit reference
op 0x2000078: GetItemCount
op 0x2000079: GetItemCount, explicit reference
op 0x200007a: RemoveItem
op 0x200007b: RemoveItem, explicit reference
op 0x200007c: GetAiPackageDone
op 0x200007d: GetAiPackageDone, explicit reference
op 0x200007e-0x2000084: Enable Controls
op 0x2000085-0x200008b: Disable Controls
op 0x200008c: Unlock
op 0x200008d: Unlock, explicit reference
op 0x200008e-0x20000a8: GetSkill
op 0x20000a9-0x20000c3: GetSkill, explicit reference
op 0x20000c4-0x20000de: SetSkill
op 0x20000df-0x20000f9: SetSkill, explicit reference
op 0x20000fa-0x2000114: ModSkill
op 0x2000115-0x200012f: ModSKill, explicit reference
op 0x2000130: ToggleCollision
op 0x2000131: GetInterior
op 0x2000132: ToggleCollsionDebug
op 0x2000133: Journal
op 0x2000134: SetJournalIndex
op 0x2000135: GetJournalIndex
op 0x2000136: GetPCCell
op 0x2000137: GetButtonPressed
op 0x2000138: SkipAnim
op 0x2000139: SkipAnim, expplicit reference
op 0x200013a: AddTopic
op 0x200013b: twf
op 0x200013c: FadeIn
op 0x200013d: FadeOut
op 0x200013e: FadeTo
op 0x200013f: GetCurrentWeather
op 0x2000140: ChangeWeather
op 0x2000141: GetWaterLevel
op 0x2000142: SetWaterLevel
op 0x2000143: ModWaterLevel
op 0x2000144: ToggleWater, twa
op 0x2000145: ToggleFogOfWar (tfow)
op 0x2000146: TogglePathgrid
op 0x2000147: AddSpell
op 0x2000148: AddSpell, explicit reference
op 0x2000149: RemoveSpell
op 0x200014a: RemoveSpell, explicit reference
op 0x200014b: GetSpell
op 0x200014c: GetSpell, explicit reference
op 0x200014d: ModDisposition
op 0x200014e: ModDisposition, explicit reference
op 0x200014f: ForceGreeting
op 0x2000150: ForceGreeting, explicit reference
op 0x2000151: ToggleFullHelp
op 0x2000152: Goodbye
op 0x2000153: DontSaveObject (left unimplemented)
op 0x2000154: ClearForceRun
op 0x2000155: ClearForceRun, explicit reference
op 0x2000156: ForceRun
op 0x2000157: ForceRun, explicit reference
op 0x2000158: ClearForceSneak
op 0x2000159: ClearForceSneak, explicit reference
op 0x200015a: ForceSneak
op 0x200015b: ForceSneak, explicit reference
op 0x200015c: SetHello
op 0x200015d: SetHello, explicit reference
op 0x200015e: SetFight
op 0x200015f: SetFight, explicit reference
op 0x2000160: SetFlee
op 0x2000161: SetFlee, explicit reference
op 0x2000162: SetAlarm
op 0x2000163: SetAlarm, explicit reference
op 0x2000164: SetScale
op 0x2000165: SetScale, explicit reference
op 0x2000166: SetAngle
op 0x2000167: SetAngle, explicit reference
op 0x2000168: GetScale
op 0x2000169: GetScale, explicit reference
op 0x200016a: GetAngle
op 0x200016b: GetAngle, explicit reference
op 0x200016c: user1 (console only, requires --script-console switch)
op 0x200016d: user2 (console only, requires --script-console switch)
op 0x200016e: user3, explicit reference (console only, requires --script-console switch)
op 0x200016f: user3 (implicit reference, console only, requires --script-console switch)
op 0x2000170: user4, explicit reference (console only, requires --script-console switch)
op 0x2000171: user4 (implicit reference, console only, requires --script-console switch)
op 0x2000172: GetStartingAngle
op 0x2000173: GetStartingAngle, explicit reference
op 0x2000174: ToggleVanityMode
op 0x2000175-0x200018B: Get controls disabled
op 0x200018C: GetLevel
op 0x200018D: GetLevel, explicit reference
op 0x200018E: SetLevel
op 0x200018F: SetLevel, explicit reference
op 0x2000190: GetPos
op 0x2000191: GetPosExplicit
op 0x2000192: SetPos
op 0x2000193: SetPosExplicit
op 0x2000194: GetStartingPos
op 0x2000195: GetStartingPosExplicit
op 0x2000196: Position
op 0x2000197: Position Explicit
op 0x2000198: PositionCell
op 0x2000199: PositionCell Explicit
op 0x200019a: PlaceItemCell
op 0x200019b: PlaceItem
op 0x200019c: PlaceAtPc
op 0x200019d: PlaceAtMe
op 0x200019e: PlaceAtMe Explicit
op 0x200019f: GetPcSleep
op 0x20001a0: ShowMap
op 0x20001a1: FillMap
op 0x20001a2: WakeUpPc
op 0x20001a3: GetDeadCount
op 0x20001a4: SetDisposition
op 0x20001a5: SetDisposition, Explicit
op 0x20001a6: GetDisposition
op 0x20001a7: GetDisposition, Explicit
op 0x20001a8: CommonDisease
op 0x20001a9: CommonDisease, explicit reference
op 0x20001aa: BlightDisease
op 0x20001ab: BlightDisease, explicit reference
op 0x20001ac: ToggleCollisionBoxes
op 0x20001ad: SetReputation
op 0x20001ae: ModReputation
op 0x20001af: SetReputation, explicit
op 0x20001b0: ModReputation, explicit
op 0x20001b1: GetReputation
op 0x20001b2: GetReputation, explicit
op 0x20001b3: Equip
op 0x20001b4: Equip, explicit
op 0x20001b5: SameFaction
op 0x20001b6: SameFaction, explicit
op 0x20001b7: ModHello
op 0x20001b8: ModHello, explicit reference
op 0x20001b9: ModFight
op 0x20001ba: ModFight, explicit reference
op 0x20001bb: ModFlee
op 0x20001bc: ModFlee, explicit reference
op 0x20001bd: ModAlarm
op 0x20001be: ModAlarm, explicit reference
op 0x20001bf: GetHello
op 0x20001c0: GetHello, explicit reference
op 0x20001c1: GetFight
op 0x20001c2: GetFight, explicit reference
op 0x20001c3: GetFlee
op 0x20001c4: GetFlee, explicit reference
op 0x20001c5: GetAlarm
op 0x20001c6: GetAlarm, explicit reference
op 0x20001c7: GetLocked
op 0x20001c8: GetLocked, explicit reference
op 0x20001c9: GetPcRunning
op 0x20001ca: GetPcSneaking
op 0x20001cb: GetForceRun
op 0x20001cc: GetForceSneak
op 0x20001cd: GetForceRun, explicit
op 0x20001ce: GetForceSneak, explicit
op 0x20001cf: GetEffect
op 0x20001d0: GetEffect, explicit
op 0x20001d1: GetArmorType
op 0x20001d2: GetArmorType, explicit
op 0x20001d3: GetAttacked
op 0x20001d4: GetAttacked, explicit
op 0x20001d5: HasItemEquipped
op 0x20001d6: HasItemEquipped, explicit
op 0x20001d7: GetWeaponDrawn
op 0x20001d8: GetWeaponDrawn, explicit
op 0x20001d9: GetRace
op 0x20001da: GetRace, explicit
op 0x20001db: GetSpellEffects
op 0x20001dc: GetSpellEffects, explicit
op 0x20001dd: GetCurrentTime
op 0x20001de: HasSoulGem
op 0x20001df: HasSoulGem, explicit
op 0x20001e0: GetWeaponType
op 0x20001e1: GetWeaponType, explicit
op 0x20001e2: GetWerewolfKills
op 0x20001e3: ModScale
op 0x20001e4: ModScale, explicit
op 0x20001e5: SetDelete
op 0x20001e6: SetDelete, explicit
op 0x20001e7: GetSquareRoot
op 0x20001e8: RaiseRank
op 0x20001e9: RaiseRank, explicit
op 0x20001ea: LowerRank
op 0x20001eb: LowerRank, explicit
op 0x20001ec: GetPCCrimeLevel
op 0x20001ed: SetPCCrimeLevel
op 0x20001ee: ModPCCrimeLevel
op 0x20001ef: GetCurrentAIPackage
op 0x20001f0: GetCurrentAIPackage, explicit reference
op 0x20001f1: GetDetected
op 0x20001f2: GetDetected, explicit reference
op 0x20001f3: AddSoulGem
op 0x20001f4: AddSoulGem, explicit reference
op 0x20001f5: unused
op 0x20001f6: unused
op 0x20001f7: PlayBink
op 0x20001f8: Drop
op 0x20001f9: Drop, explicit reference
op 0x20001fa: DropSoulGem
op 0x20001fb: DropSoulGem, explicit reference
op 0x20001fc: OnDeath
op 0x20001fd: IsWerewolf
op 0x20001fe: IsWerewolf, explicit reference
op 0x20001ff: Rotate
op 0x2000200: Rotate, explicit reference
op 0x2000201: RotateWorld
op 0x2000202: RotateWorld, explicit reference
op 0x2000203: SetAtStart
op 0x2000204: SetAtStart, explicit
op 0x2000205: OnDeath, explicit
op 0x2000206: Move
op 0x2000207: Move, explicit
op 0x2000208: MoveWorld
op 0x2000209: MoveWorld, explicit
op 0x200020a: Fall
op 0x200020b: Fall, explicit
op 0x200020c: GetStandingPC
op 0x200020d: GetStandingPC, explicit
op 0x200020e: GetStandingActor
op 0x200020f: GetStandingActor, explicit
op 0x2000210: GetStartingAngle
op 0x2000211: GetStartingAngle, explicit
op 0x2000212: GetWindSpeed
op 0x2000213: HitOnMe
op 0x2000214: HitOnMe, explicit
op 0x2000215: DisableTeleporting
op 0x2000216: EnableTeleporting
op 0x2000217: BecomeWerewolf
op 0x2000218: BecomeWerewolfExplicit
op 0x2000219: UndoWerewolf
op 0x200021a: UndoWerewolfExplicit
op 0x200021b: SetWerewolfAcrobatics
op 0x200021c: SetWerewolfAcrobaticsExplicit
op 0x200021d: ShowVars
op 0x200021e: ShowVarsExplicit
op 0x200021f: ToggleGodMode
op 0x2000220: DisableLevitation
op 0x2000221: EnableLevitation
op 0x2000222: GetLineOfSight
op 0x2000223: GetLineOfSightExplicit
op 0x2000224: ToggleAI
op 0x2000225: unused
op 0x2000226: COE
op 0x2000227: Cast
op 0x2000228: Cast, explicit
op 0x2000229: ExplodeSpell
op 0x200022a: ExplodeSpell, explicit
op 0x200022b: RemoveSpellEffects
op 0x200022c: RemoveSpellEffects, explicit
op 0x200022d: RemoveEffects
op 0x200022e: RemoveEffects, explicit
op 0x200022f: Resurrect
op 0x2000230: Resurrect, explicit
op 0x2000231: GetSpellReadied
op 0x2000232: GetSpellReadied, explicit
op 0x2000233: GetPcJumping
op 0x2000234: ShowRestMenu, explicit
op 0x2000235: GoToJail
op 0x2000236: PayFine
op 0x2000237: PayFineThief
op 0x2000238: GetTarget
op 0x2000239: GetTargetExplicit
op 0x200023a: StartCombat
op 0x200023b: StartCombatExplicit
op 0x200023c: StopCombat
op 0x200023d: StopCombatExplicit
op 0x200023e: GetPcInJail
op 0x200023f: GetPcTraveling
op 0x2000240: onKnockout
op 0x2000241: onKnockoutExplicit
op 0x2000242: ModFactionReaction
op 0x2000243: GetFactionReaction
op 0x2000244: Activate, explicit
op 0x2000245: ClearInfoActor
op 0x2000246: ClearInfoActor, explicit
op 0x2000247: (unused)
op 0x2000248: (unused)
op 0x2000249: OnMurder
op 0x200024a: OnMurder, explicit
op 0x200024b: ToggleMenus
op 0x200024c: Face
op 0x200024d: Face, explicit
op 0x200024e: GetStat (dummy function)
op 0x200024f: GetStat (dummy function), explicit
op 0x2000250: GetCollidingPC
op 0x2000251: GetCollidingPC, explicit
op 0x2000252: GetCollidingActor
op 0x2000253: GetCollidingActor, explicit
op 0x2000254: HurtStandingActor
op 0x2000255: HurtStandingActor, explicit
op 0x2000256: HurtCollidingActor
op 0x2000257: HurtCollidingActor, explicit
op 0x2000258: ClearForceJump
op 0x2000259: ClearForceJump, explicit reference
op 0x200025a: ForceJump
op 0x200025b: ForceJump, explicit reference
op 0x200025c: ClearForceMoveJump
op 0x200025d: ClearForceMoveJump, explicit reference
op 0x200025e: ForceMoveJump
op 0x200025f: ForceMoveJump, explicit reference
op 0x2000260: GetForceJump
op 0x2000261: GetForceJump, explicit reference
op 0x2000262: GetForceMoveJump
op 0x2000263: GetForceMoveJump, explicit reference
op 0x2000264-0x200027b: GetMagicEffect
op 0x200027c-0x2000293: GetMagicEffect, explicit
op 0x2000294-0x20002ab: SetMagicEffect
op 0x20002ac-0x20002c3: SetMagicEffect, explicit
op 0x20002c4-0x20002db: ModMagicEffect
op 0x20002dc-0x20002f3: ModMagicEffect, explicit
op 0x20002f4: ResetActors
op 0x20002f5: ToggleWorld
op 0x20002f6: PCForce1stPerson
op 0x20002f7: PCForce3rdPerson
op 0x20002f8: PCGet3rdPerson
op 0x20002f9: HitAttemptOnMe
op 0x20002fa: HitAttemptOnMe, explicit
op 0x20002fb: AddToLevCreature
op 0x20002fc: RemoveFromLevCreature
op 0x20002fd: AddToLevItem
op 0x20002fe: RemoveFromLevItem
op 0x20002ff: SetFactionReaction
op 0x2000300: EnableLevelupMenu
op 0x2000301: ToggleScripts
op 0x2000302: Fixme
op 0x2000303: Fixme, explicit
op 0x2000304: Show
op 0x2000305: Show, explicit
op 0x2000306: OnActivate, explicit
op 0x2000307: ToggleBorders, tb
opcodes 0x2000308-0x3ffffff unused