Skip to content

ActorVariations

Probably Manuel edited this page Jun 30, 2022 · 1 revision

Actor definitions in Skyrim can reuse a lot of logic by using template actors, especially when combined with a Leveled Character in the inheritance chain. However, the existing functionality is not powerful enough to provide an easy way to separate visual appearances and gameplay behavior to further increase the visual variety of generic actors.

ActorVariations provide a means to solve this problem. Look and Skill templates are defined separately and then merged by the Reqtificator into actors the Skyrim engine can use.

To use this feature you must first enable REQ Tags for your mod and add the REQ:MUTATE tag. After doing so, you can declare your actor variations as leveled characters with a special EditorID to enable this feature.

A leveled character can be declared as actor variation by giving it an EditorID <Prefix>_LChar_Variations_<RecordName>, where <Prefix> should be some common identifier for your mod's records (no underscores) and <RecordName> is the EditorID you'd normally give to the record. Let us consider an example from Requiem: xx8A8BEC <REQ_LChar_Variations_Bandit_Trickster_06>, which defines the boss rank trickster bandits.

Level Count Reference
1 4 0684F6B2 <REQ_LChar_LookTemplate_Race_Argonian_Male> (LVLC)
1 1 0684F6B3 <REQ_LChar_LookTemplate_Race_Khajiit_Female> (LVLC)
1 2 068A14DE <REQ_LChar_LookTemplate_Race_Argonian_Female> (LVLC)
1 2 068A14DF <REQ_LChar_LookTemplate_Race_Khajiit_Male> (LVLC)
1 1 068A14E0 <REQ_LChar_LookTemplate_Race_Imperial_Female> (LVLC)
1 2 068A14E1 <REQ_LChar_LookTemplate_Race_Imperial_Male> (LVLC)
1 3 068A14E6 <REQ_LChar_LookTemplate_Race_Breton_Female> (LVLC)
... ... ... [more look templates] ...
1 1 068A8BE7 <REQ_Actor_Bandit_Trickster_06> (NPC_)

Every NPC_ record found in this list is considered a skill template, while every leveled character is considered as a set of look templates. The actors you use as skill and look templates can inherit from other actors, but not from Leveled Characters.

The Reqtificator will create new actors for each possible combination of the templates. From the look template all data is taken that belongs to "Inherit Traits" flag and the skill template contributes all other data. You can use the count values of the look templates and the level values of the skill templates to weight the spawn ratios in the generated list. The outcome of this operation is then a LeveledCharacter that spawns boss-rank trickster bandits, but with many different visual appearance options. You can then use this list as a template actor for the actors you want to spawn in the world, just like Vanilla Skyrim does with its leveled characters with a few hard-coded bandit variants.

When you look at the actual outcome generated by the Reqtificator, you'll see that there are some additional leveled characters generated. These nested records are only used to avoid some limitations of Skyrim's engine and to optimize the reusability of generated records.