Lena’s Companions is a custom companion system with extensive functionality. It uses dedicated companion characters, and as such does not interfere with other companion systems.

The system consists of a master ESM file and a number of ESP files. The master file holds the scripts and common functionality, while the ESP files contain the actual companions. Activating the master file in your load order without any of the companion ESP files will have no effect on your game, because the master file itself does not run anything. This system is nothing without its companions.

Each companion has its own skills, features and quests, they can be simple or complex, it really varies greatly. It is also not required to keep each companion in its own ESP – they can be combined and merged like any other mod. The master file provides a set of scripts and AI packages that can be used for each individual companion, but there is no obligation to use it.

This page describes the functionality provided by the master file. It is available for every companion, but not every companion uses it all, so always check the companion page for particulars.

Basic functionality

The following basic functionality is provided:

  • Recruit and dismiss companions. When dismissed, they return to their homes and their “off-duty” routines.
  • Track each companion on the map with their own quests. Particularly useful when they are off-duty and you want to find them.
  • Access companion’s inventory, also without recruiting them. Weight limit applies – you cannot give them more than they can carry.
  • Companions follow on foot or mounted and sneak with the player.
  • Companions stop combat and catch up if falling behind.
  • Companions’ horses follow their respective owners when the player is riding a horse. Companions can call their horses if the horse is too far away and the companion needs to catch up.
  • When following the player, companions automatically sit down when the player is sitting down, sleep when the player is lying in a bed (use See You Sleep to see the player lie in bed).
  • Companions restore their health and other attributes during sleep.
  • When the player equips a special City Wear token, companions automatically switch from armour to clothes and unequip weapons.
  • Tell companions to wait, relax or pick herbs in the area. Waiting means stand where you left them, relaxing switches them to eating, sleeping and wandering near where you left them, and picking herbs has them go picking herbs for a while, then switch to relaxing.
  • Companions automatically repair and recharge their gear:
    • While sitting down, they repair equipped weapons and armour using repair hammers and level up their armourer skill. Repair hammers get used up in the process the same way as with the player.
    • While sitting down, they recharge equipped weapon using soul gems, picking the best fit for the size of soul from the gems in their inventory. They do not use gems with larger souls than what is needed.
    • Companions continuously recharge their currently equipped staff with a trickle charge based on their Intelligence and Mysticism skill.
    • Note that when the player has the City Wear token equipped, companions unequip their weapons and armour and therefore no repair or recharging can occur.
  • After companions have been waiting or relaxing for a number of days, they quit the player’s party and return home. You have to recruit them again.

Horses

Each companion can have his or her own horse. The horse – if it exists – is included with the companion and is stationed somewhere near the companion’s home. Horses are immortal, and although they do not die, they can be knocked out or run away. If that happens, the companions are able to recall their horses, so after a while things return back to normal.

Companions ride their horses while following the player when the player is also riding a horse. When dismissed, companions ride their horses when they travel.

If a companion does not own a horse, he or she will still try to find one to ride when the player is riding. For example, if there is a horse nearby that is owned by a faction that the companion belongs to, the companion can use that horse. This is standard game behaviour. However, these generic horses may not respond to the companion’s commands the same way as a special companion horse.

Write a letter

Buy a stamp from a general trader and equip it to send a letter to your companion asking to meet the player in a particular city. The companion travels to the destination and waits for you there. You can follow the companion’s travels on the map through their quest marker, but also you will receive a message when the companion arrives at the destination. Where exactly the companion waits and what he or she does while waiting, varies from individual to individual.

The stamps are dedicated to particular companions, and the selection of destinations also varies. It can include cities in Cyrodiil and the Shivering Isles, as well as any new lands if the companions are made for it. Some companions do not offer letter writing at all. Check each companion file for details.

Templates

Much of the setup can be made generic, but some things remain specific to each companion and his horse, in particular where concrete references are involved. To make it easier to create templates and access them from each separate companion plugin, add a template companion NPC and a template companion horse to the master file. Place them into the Companion Tidy cell and set up all template material for them.

When this mod is released, it should come with a template ESP for making new companions. This isn’t the same NPC as the template from the master.

Factions

Basic functionality is based on factions – they govern the selection of appropriate AI packages. The factions are defined in the master file.

  • CompanionPotentialFollowerFaction – identifies NPCs that can be companions. This is the only faction that needs to be added to the companion NPCs. Everything else is done dynamically.
  • CompanionCurrentFaction – the NPC is currently recruited as a companion. Toggles on and off in game.
  • Action factions: each corresponds to specific AI packages. All of these factions are mutually exclusive, or you’ll get conflicts with the AI. When CompanionCurrentFaction is active, one of these factions must also be active.
    • CompanionFollowFaction
    • CompanionWaitFaction
    • CompanionRelaxFaction
    • CompanionPickHerbsFaction
  • Specific factions that can be set when CompanionFollowFaction is active:
    • CompanionFollowMountedFaction when the player is riding a horse.
    • CompanionSitHereFaction when the player is sitting on furniture (as opposed to sitting on a horse).
    • CompanionSleepHereFaction when the player is lying on a bed.
  • Helper factions for playing specific animations:
    • CompanionRepairFaction to play different animations during repair activities.
    • CompanionRechargeFaction to play an animation during recharging with gems.
  • Helper faction for specific behaviour during camping: CompanionCampFaction. This faction is set when relaxing outdoors or in an interior furnished with bedrolls. There is no default AI for this faction, this is for the companions to fill in, if needed. Otherwise standard Relax AI applies.
  • Helper faction to let the companion go home after he is dismissed: CompanionReturnHomeFaction. This is processed within the companion’s personal quest to determine the actual destination and associated AI. It is up to the companion’s quest to reset it.

Dialogue

The dialogue is stored in the Companions quest in the master file. It is voiced using standard Oblivion phrases. Companion plugins can overwrite the responses making them more personal. This quest is always enabled and is run for every NPC that is a member of CompanionPotentialFollowerFaction. It adds the following topics:

  • Join me – if not a member of CompanionCurrentFaction. This recruits the NPC (adds to CompanionCurrentFaction and the CompanionFollowFaction), adds the NPC to the PlayerFaction and makes them ignore friendly hits.
  • Swap items with you – inventory share, for anyone who is in CompanionPotentialFollowerFaction (not just current followers).
  • Wait here – for those in CompanionCurrentFaction but not CompanionWaitFaction. Changes them to CompanionWaitFaction so they use their “Stay here” AI. Note that this can be used not only when the NPC is following, but also from resting or picking herbs. There is no reason not to.
  • Relax here – for those in CompanionCurrentFaction but not CompanionRelaxFaction. Switches them to CompanionRelaxFaction so they use their Relax AI packages.
  • Pick herbs – for those in CompanionCurrentFaction but not CompanionPickHerbsFaction. Switches them to CompanionPickHerbsFaction so they use their Pick Herbs AI.
  • Let’s go – for those in CompanionWaitFaction, CompanionPickHerbsFaction or CompanionRelaxFaction. Changes them to the CompanionFollowFaction and possibly CompanionFollowMountedFaction if the player is riding a horse. They use their Follow AI.
  • Dismiss – for those in CompanionCurrentFaction. Removes them from all active follower factions and adds them to CompanionReturnHomeFaction so that they return to their place of origin and pick up their off-duty routines (if that’s in their AI).

AI packages

Each companion must have several sets of AI packages, some generic and some personal. They must run a generic CompanionNPCScript that would switch flags and factions and prompt them to change packages. Each companion must also have its own personalised quest that allows to track him on the map, but also it allows for personalised processing, additional flags, faction switches and AI.

Each companion must have the following groups of AI packages, in that order (from top to bottom) to guarantee priority:

  1. Generic Companion AI packages from the master file.
  2. Travel packages to every city, riding the horse and leaving it at the stables.
  3. Off-duty schedules for each of the cities.
  4. Default go home mechanism.
  5. Default eat, sleep and wander at current location packages.

Generic Companion AI packages

The framework master file includes the following companion packages to be used when CompanionCurrentFaction is active. They can all be added to the potential companions. If some behaviour is unwanted, the corresponding package can be omitted. Default packages can be replaced by custom packages with the same conditions – the framework never forces packages onto NPCs, it only changes conditions and prompts package re-evaluation. The NPC then selects the appropriate package to execute.

  • A set of packages to run at the current location when the follower is told to relax, including eat, sleep and wander. Run when in CompanionRelaxFaction.
  • A “Stay here” package for waiting. Run when in CompanionWaitFaction.
  • A “Pick herbs” package for harvesting flora around the current location. Run when in CompanionPickHerbsFaction.
  • Four follow packages: “Follow on foot”, “Follow mounted”, “Follow on foot in town” and “Follow mounted in town”. Run when CompanionFollowFaction is active in conjunction with the City Wear token equipped by the player.
  • Two “Sit here” packages – plain and “in town”. For sitting down with the player, bound to CompanionSitHereFaction.
  • “Sleep Here” package for sleeping when the player is lying on a bed – bound to CompanionSleepHereFaction.
  • A special package for stopping combat and catching up when following the player mounted: CompanionFollowFaction is active and the NPC’s horse is closer to him than the player.

Travel packages

When a companion is required to travel to another city, it actually means that he needs to execute three travel packages in the right order.

  1. Package “Walk to horse”: if not near target stables, walk to the horse.
  2. Package “Ride to target stables”: if near horse, travel to target stables, use horse.
  3. Package “Walk to location”: if at target stables, walk to target location.

Destination is set as a value of a variable in the individual companion’s quest and cannot be made generic. It can also be set to 0 to cancel a travel request.

Each companion must have two markers specific to him: target location and target stables. These markers are to be used in the AI packages for changing location, and they are to be moved to the fixed markers by the companion’s quest script when the destination changes. Fixed stable markers are already present in game – horse return markers for each city, plus stables barn marker for the IC stables. Fixed target location markers will be specific to each companion and are to be defined individually.

The first package fires when destination>0. If the destination is the same as current location, that will see the companion go to his horse, think about it and come back, but I choose not to refine this condition because he should not be sent to travel to where he is already. It is not a big deal to walk back and forth a bit.

For the second package the companion’s quest script checks the distance between the NPC and the target stables marker, so that when he arrives, his destination gets reset to 0. This causes the third package to kick in – it checks whether he is at the target stables (distance to stables marker), and then has him walk to the target location marker.

The above means that each companion must have some AI for every city where you want to be able to send him. This can be extended with custom locations, as long as there is a marker for the horse and a target for the companion to go to. Once arrived, packages for that particular location take over.

Example: Lucien Lachance’s schedule for Cheydinhal.

  1. Ride to Cheydinhal stables – target CheydinhalHorseReturnMarker.
  2. Travel to Cheydinhal Sanctuary – target “In Cell”.
  3. Packages for inside the Sanctuary have as condition GetInCell CheydinhalSanctuary, so he stays in that cell until you come to pick him up or until he’s sent elsewhere.
    Note: this is a modified Sanctuary with just a single cell, exactly so it would be easier to design AI packages for it.

Example: Lucien Lachance’s schedule for Anvil.

  1. Ride to Anvil stables – AnvilHorseReturnMarker.
  2. Walk to the Anvil Brotherhood Office – a new cell replacing the Abandoned House. Target: In Cell.
  3. Lucien has a number of packages to execute with GetInCell condition, but he also goes for a walk to the lighthouse. Then he has dinner at the Flowing Bowl and finally he returns to the Brotherhood Office for the night. This is a bit more complicated.
  4. Go for a walk starts on a certain hour when he is at the office, so condition GetInCell AnvilBrotherhoodOffice. He walks to the lighthouse marker. This travel package runs for 4 hours with “Must Complete”, so hopefully he’ll stay there for 4 hours.
  5. The next package is Eat in cell AnvilTheFlowingBowl, timed to start as the previous Travel package ends, and having condition distance to the lighthouse marker < 200.
  6. Return to the Brotherhood Office after dinner is a Travel package timed to start immediately after dinner, target “In Cell”, condition GetInCell AnvilTheFlowingBowl.
  7. When he is back at the Brotherhood Office, his resident packages take over that have as condition GetInCell AnvilBrotherhoodOffice.

Packages for every city

These are optional and can be as simple or as complex as needed. The third travel package sends the companion to some location in the target city, and if no further packages for that city are given, he reverts to the default “do stuff at current location” packages.

Default go home package

This is not a separate package, actually. This can be achieved by setting his destination variable to a particular value, and if the companion has a location outside of a city, then an extra value can be added, with its own custom stables marker and a set of AI packages.

When CompanionReturnHomeFaction is set, the quest must set its own destination variable to the correct value, and that will trigger the right packages.

Default packages for the current location

There are a number of standard default packages for the current location, they can be used here or new ones can be defined. They must be on the bottom of the list so that they would only be chosen if nothing else matches.

Animations

There are a number of idle animations to be had from Nexus distributed in different mods. There are also a lot of animations incorporated in Oblivion that are only used in very specific situations, so you almost never see them. They can be reused to make companions and the player more animated.

Repair animations can be used while a companion is repairing his gear, they are triggered when the companion is sitting down (GetSitting==3) and CompanionRepairFaction is active. I have so far found three suitable ones – sharpen weapon, polish armour (helmet) and use repair hammer. The latter one is standing up, so he stands inside the chair, but his state returned with GetSitting remains the same (3). Multiple animations can be defined for the same conditions plus GetRandomPercent so that they are selected randomly.

Read newspaper animation is good to use when CompanionSitHere is active (or the In Town version). Give it a random flag so that it doesn’t happen every time.

Poses can be potentially used too, for example from Goma Poses, but the problem with them is that they are single static poses and not animations. Besides, many of them are really pretentious and I don’t like them. They are as bad as the Personality Idles animations – although perhaps that mod could be disassembled for something less obtrusive. Kaitzes animations mod has a lot of good stuff, but the mod itself is too extensive and the animations interfere with the followers actually following. With that mod, no one can simply stand or walk, they all have to be “expressive” about it. No.

Write a letter

Add an office of the Black Horse Courier to every city and many major settlements in Cyrodiil and beyond. This can just be combined with one of the general goods stores – add a respawnable vendor chest for each companion’s own scripted stamps. Buy a stamp from the shop keeper, then equip it to send a letter to the companion. The participating traders are:

  • Anvil – Norbert Lelles at Lelles’ Quality Merchandise
  • Bravil – Nilawen at The Fair Deal
  • Bruma – Suurootan at Novaroma
  • Cheydinhal – Borba gra-Uzgash at Borba’s Goods and Stores
  • Chorrol – SeedNeese at Northern Goods and Trade
  • Leyawiin – Gundalas at Best Goods and Guarantees
  • Imperial City – Thoronir at The Copious Coinpurse
  • Skingrad – Gunder at Colovial Traders

Equip the stamp – open a message box with a choice of locations. These must correspond to the list of destinations available for this particular companion. Choose a location, and the destination variable in the companion’s script gets set which causes the target markers to be moved and the companion sets off to travel.

Ideally there should also be a delay between you sending the letter and the companion receiving it, but in the first instance I’ll make it immediate for simplicity.

Player’s Horses

Add a hot key command to call the player’s horse – the last horse that the player has ridden. It is the horse returned by the GetPCLastHorse OBSE function, but it might not be a player-owned horse. Map the key to G.

The horse can either be teleported to the player or forced to run to the player, or may be teleported to some distance away, then let it run to you. The latter is what Command Mount mod is doing. The problem with this is that you don’t know where the horse is being teleported to, or whether it can get out of it. We’ve had troubles in the Jeralls with that, and the horse getting injured as a result and not being able to reach you. On the other hand, letting the horse appear before you is a bit unrealistic… But not really a problem.

It is also possible to teleport all followers’ horses together with the player’s horse. Use the GetFollowers function to get an array of references to followers, then use GetTravelHorse to get references to their horses.

I have considered letting the horse follow the player, and potentially letting the followers’ horses follow the player too, but then you also need a “stop following me” command – and I remember how annoying a horse following you around Skyrim was. That little bit of extra immersion… I am just not sure about it. I don’t want it to be a spell – that’s just too clumsy, it would have to be a hotkey, and I am running out of hotkeys.

Companions’ Horses

In order for a companion to be able to ride a horse, he must own one and the horse must be nearby. The individual companion plugins must include their horses.

Horses: if a follower owns a horse, he can follow mounted, but the horse must be nearby. Also I want the horse to be teleported with Lena’s horse when we fast travel or when Lena calls Roach. Try giving those horses special AI packages and dedicated scripts like this:

  • When the owner NPC is in FollowerFollowMountedFaction but not in combat, make the horse follow the owner. This makes the horse walk up to the owner once he stops combat.
  • A “call horse” travel package for the horse, to be made dependent on a script variable form the NPC script. Allows him to call his horse, and the horse comes running. When this package completes, the “call horse” variable in the owner NPC’s script must be reset. This should be done from the horse’s script with an OnPackageDone block. This does work, although may not be the smart thing to do. If the horse is too far away, just teleport it near the NPC, problem solved.
  • Otherwise make the horse stay put (default horse AI).

Horse AI packages cannot be generic – I can only provide a generic template that cannot be used as such. Each individual companion module must make its own versions of horse AI packages because they are linked to the horse’s owners – these conditions must be filled in with the actual NPC reference, it cannot be done via a script.

Advertisement
Privacy Settings