Jump to content

Exciting news about the new scripting language used in skyrim tesc


Mordyn

Recommended Posts

Posted

Some posts from the official forum:

 

Looks like the UK runtime is the same as the US runtime. Most likely the German no-gore version is different again, though.

 

Time to start turning this in to the "Skyrim Internal Technical Research Discussion" thread. This time around, it looks like we have two totally different scripting engines in the game. One is the classic system used in the previous games, it looks almost exactly the same from a very quick lookthrough. Command dump coming shortlyish.

 

The new one is much more interesting and appears to be called Papyrus or SkyrimVM. We'll probably need to wait for the editor to be released to get any idea about the syntax as the original source code for scripts doesn't appear to be in the .esm (unless they're compressed). However, here's a quick feature rundown from what I can tell. Please take things with a grain of salt for now, this is just a first look.

 

core variable types are float, int, string, and bool

arrays of the above are supported natively

scripts are interpreted as a list of simpler yet much more powerful set of opcodes

if the conditional branch opcodes support negative offsets then loops are trivial to implement (and probably have been)

the new system is object-oriented - all scripts are class instances (UnrealScript influence here)

compiled scripts are stored as separate files, unpack Misc.bsa and look in the scripts folder

classes support inheritance, and there appear to be vm-world classes matching the internal form types

 

 

So overall this is looking very, very good. I need to write something to disassemble the compiled scripts and take a look at the VM runtime, will know more then.

 

It looks like a lot of the basic functionality of OBSE (etc) is present, mainly by it being closer to an "actual" programming language than the previous system, however it looks like there's still a lot that we can do to expand on its functionality. Massive thanks to SmkViper on this, it's looking really nice so far (and thanks for the error messages when the script loader doesn't like something).

 

Partial Papyrus Script Function List (or so it appears):

 

"AddInventoryEventFilter", "ActiveMagicEffect",

"ActiveMagicEffect", "AddInventoryEventFilter",

"Dispel", "ActiveMagicEffect"

"GetBaseObject", "ActiveMagicEffect"

"GetCasterActor", "ActiveMagicEffect"

"GetTargetActor", "ActiveMagicEffect"

"RegisterForAnimationEvent", "ActiveMagicEffect"

"RegisterForLOS", "ActiveMagicEffect"

"RegisterForSingleLOSGain", "ActiveMagicEffect"

"RegisterForSingleLOSLost", "ActiveMagicEffect"

"RegisterForSingleUpdate", "ActiveMagicEffect"

"RegisterForSingleUpdateGameTime", "ActiveMagicEffect"

"RegisterForSleep", "ActiveMagicEffect"

"RegisterForTrackedStatsEvent", "ActiveMagicEffect"

"RegisterForUpdate", "ActiveMagicEffect",

"RegisterForUpdateGameTime", "ActiveMagicEffect",

"RemoveAllInventoryEventFilters", "ActiveMagicEffect",

"ActiveMagicEffect", "RemoveAllInventoryEventFilters",

"RemoveInventoryEventFilter", "ActiveMagicEffect",

"StartObjectProfiling", "ActiveMagicEffect"

"StopObjectProfiling", "ActiveMagicEffect",

"UnregisterForAnimationEvent", "ActiveMagicEffect",

"UnregisterForLOS", "ActiveMagicEffect"

"UnregisterForSleep", "ActiveMagicEffect"

"UnregisterForTrackedStatsEvent", "ActiveMagicEffect"

"UnregisterForUpdate", "ActiveMagicEffect"

"UnregisterForUpdateGameTime", "ActiveMagicEffect"

 

"AddPerk", "Actor"

"AddShout", "Actor"

"AddSpell", "Actor",

"AllowBleedoutDialogue", "Actor"

"AllowPCDialogue", "Actor"

"AttachAshPile", "Actor"

"ClearArrested", "Actor"

"ClearExtraArrows", "Actor",

"ClearKeepOffsetFromActor", "Actor",

"ClearLookAt", "Actor"

"DamageActorValue", "Actor"

"DispelAllSpells", "Actor"

"DispelSpell", "Actor"

"DoCombatSpellApply", "Actor"

"EnableAI", "Actor"

"EquipItem", "Actor"

"EquipShout", "Actor"

"EquipSpell", "Actor"

"EvaluatePackage", "Actor"

"ForceActorValue", "Actor"

"GetActorValue", "Actor"

"GetActorValuePercentage", "Actor"

"GetBaseActorValue", "Actor"

"GetBribeAmount", "Actor"

"GetCrimeFaction", "Actor"

"GetCombatState", "Actor"

"GetCombatTarget", "Actor",

"GetCurrentPackage", "Actor"

"GetDialogueTarget", "Actor"

"GetEquippedShout", "Actor"

"GetEquippedSpell", "Actor",

"GetEquippedWeapon", "Actor"

"GetEquippedShield", "Actor"

"GetEquippedItemType", "Actor"

"GetFactionRank", "Actor",

"GetFactionReaction", "Actor"

"GetFlyingState", "Actor"

"GetGoldAmount", "Actor"

"GetHighestRelationshipRank", "Actor"

"GetKiller", "Actor"

"GetForcedLandingMarker", "Actor"

"GetLevel", "Actor",

"GetLeveledActorBase", "Actor"

"GetLightLevel", "Actor"

"GetLowestRelationshipRank", "Actor"

"GetNoBleedoutRecovery", "Actor"

"GetPlayerControls", "Actor"

"GetRace", "Actor"

"GetRelationshipRank", "Actor"

"GetSitState", "Actor"

"GetSleepState", "Actor"

"GetVoiceRecoveryTime", "Actor"

"HasAssociation", "Actor"

"HasFamilyRelationship", "Actor"

"HasLOS", "Actor"

"HasMagicEffect", "Actor"

"HasMagicEffectWithKeyword", "Actor"

"HasParentRelationship", "Actor"

"HasPerk", "Actor"

"HasSpell", "Actor"

"IsAlarmed", "Actor"

IsAlerted", "Actor"

"IsAllowedToFly", "Actor"

"IsArrested", "Actor"

"IsArrestingTarget", "Actor",

"IsBleedingOut", "Actor",

"IsBribed", "Actor"

"IsChild", "Actor"

"IsCommandedActor", "Actor"

"IsDead", "Actor",

"IsDetectedBy", "Actor"

"IsDoingFavor", "Actor"

"IsEquipped", "Actor",

"IsEssential", "Actor",

"IsFlying", "Actor",

"IsGhost", "Actor",

"IsGuard", "Actor",

"IsHostileToActor", "Actor"

"IsInCombat", "Actor"

"IsInFaction", "Actor"

"IsInKillMove", "Actor"

"IsIntimidated", "Actor"

"IsPlayersLastRiddenHorse", "Actor"

"IsPlayerTeammate", "Actor",

"IsRunning", "Actor",

"IsSneaking", "Actor",

"IsSprinting", "Actor",

"IsTrespassing", "Actor",

"IsUnconscious", "Actor",

"IsWeaponDrawn", "Actor",

"KeepOffsetFromActor", "Actor",

"KillSilent", "Actor",

"Kill", "Actor",

"ModActorValue", "Actor",

"ModFactionRank", "Actor",

"MoveToPackageLocation", "Actor",

"OpenInventory", "Actor",

"PathToReference", "Actor",

"PlayIdle", "Actor",

"PlayIdleWithTarget", "Actor",

"PlaySubGraphAnimation", "Actor",

"RemoveFromFaction", "Actor",

"RemoveFromAllFactions", "Actor",

"RemovePerk", "Actor",

"RemoveShout", "Actor",

"RemoveSpell", "Actor",

"ResetHealthAndLimbs", "Actor",

"Resurrect", "Actor",

"RestoreActorValue", "Actor",

"SendAssaultAlarm", "Actor",

"SendTrespassAlarm", "Actor",

"SetActorValue", "Actor",

"SetAlert", "Actor",

"SetAllowFlying", "Actor",

"SetAlpha", "Actor",

"SetAttackActorOnSight", "Actor",

"SetBribed", "Actor",

"SetCrimeFaction", "Actor",

"SetCriticalStage", "Actor",

"SetDoingFavor", "Actor",

"SetFactionRank", "Actor",

"SetGhost", "Actor",

"SetHeadTracking", "Actor",

"SetForcedLandingMarker", "Actor",

"SetIntimidated", "Actor",

"SetLookAt", "Actor",

"SetNoBleedoutRecovery", "Actor",

"SetNotShowOnStealthMeter", "Actor",

"SetOutfit", "Actor",

"SetPlayerControls", "Actor",

"SetPlayerResistingArrest", "Actor",

"SetPlayerTeammate", "Actor",

"SetRace", "Actor",

"SetRelationshipRank", "Actor",

"SetRestrained", "Actor",

"SetUnconscious", "Actor",

"SetVehicle", "Actor",

"SetVoiceRecoveryTime", "Actor",

"ShowBarterMenu", "Actor",

"ShowGiftMenu", "Actor",

"StartCannibal", "Actor",

"StartCombat", "Actor",

"StartVampireFeed", "Actor",

"StopCombat", "Actor",

"StopCombatAlarm", "Actor",

"TrapSoul", "Actor",

"UnequipAll", "Actor",

"UnequipItem", "Actor",

"UnequipShout", "Actor",

"UnequipSpell", "Actor",

"UnlockOwnedDoorsInCell", "Actor",

"WillIntimidateSucceed", "Actor"

"WornHasKeyword", "Actor"

 

"IsHostile", "Potion",

 

There are at least a few dozen more.

 

This is looking good, really good :cool:

Posted

Well this is good news. But i saddle with newer tes for skyrim any day.. Hope they don't take too long with this..

Posted

The comments from the chief developer sound promising.

 

It would have made me even happier if they said 'we decided to leverage an existing open source programming language' mind.

Posted

There are still some Fallout commands in there which isn't surprising given it is a Gamebyro v3.0. Object orientation programming does sound nice as majority of scripting these days are object orientated so the shift does make it nice to do. It'll be interesting to see what we can do with the Construction Set soon.

Posted

Also shouldn't be surprising to see Fallout commands in there since I'd bet Fallout 4 is made with the same technology.

 

On the other hand, if you look at Fallout, there's a lot of Oblivion stuff in there, like references to LastRiddenHorse.

Posted

Question: does that mean we don't need a script extender anymore?

 

From the big "Coming Soon!" on skse.silverlock.org, I'd guess they don't think so :)

 

Of course, that may from before this latest news.

Posted

It depends. If I understand correctly, there are two scripting languages. One is new and object orientated.

 

OOP languages are not noted for speed. (Instantiating objects take a while. That's why object oriented languages aren't used to write kernels with).

 

I'm guessing the new languages is used to create data structures that the more traditional language then manipulates.

Posted

oh god yes, I've been wanting to get into scripting for a long time now. Once I learn skyrim's OOP language (inevitable, considering how much I like modding) it should be easy for me to learn other ones.

Posted

oh god yes' date=' I've been wanting to get into scripting for a long time now. Once I learn skyrim's OOP language (inevitable, considering how much I like modding) it should be easy for me to learn other ones.

[/quote']

 

Hahah... that's funny. :)

 

The basics may apply, but take it from a long time coder here in many real languages and some game languages: The Gamebryo ones are the worst, and the most different from everything else.

 

Once you've got it under control in Skyrim, you'll be in good shape for it and newer Gamebryo engine games, but don't expect much of what you've learned to translate to other engines. If anything, I suggest learning one of the others, or a regular language, first.

 

This will frustrate you in Gamebryo games because lots of stuff is missing, but it'll let you know *what* is missing -- and if you move on to modding other engines, most of that stuff is not missing. Learning Gamebryo first will sort of hamstring you in other game engines, as you'll try to do things the hard, hackish, Gamebryo way initially I would think.

 

Just $0.02 from a programmer relatively new to Gamebryo, but not new to real languages or engines like Unreal.

Posted

You are right, except that Tes Script is nothing to do with Gambryo. For example, there are Gambryo games that sensibly use Python for scipting (Civ4 and Freedom Force to name but two).

 

The Tes Scripting languages exist because Beth insists on rolling their own rather than using an existing, mature language along with the reduced development time that would entail. Madness to be honest, but that's what they'd rather do it seems.

Posted

No worries, you are not alone.

 

Quite a lot of games use the Gamebryo engine and use it better than Bethesda. One thing that irks me is when people criticize the Gambryo engine, when they should be criticizing Beths USE of it, which no matter how good or bad you think that engine is, Beth could do better with.

 

For example, the Morrowind Executable Patch enables quite a few things the engine supports, that Beth just didn't bother with. Makes the graphics look better without even resorting to MWGE!

 

Edit: In case anyone thinks this was to help performance. No, games released even earlier had these feature turned on because there was NO discernible performance hit. Any possible hit wouldn't be seen if the feature wasn't used anyway, so why the abilities of the engine were deliberately hobbled I do not know.

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

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