Key point: This framework overwrites a Horizon script. You must not package either script with your patch or future updates / bug fixes will be a nightmare for users.

Introduction

This article will cover the principle of this resource to inform mod authors on why it is needed, how it works and how to use it. The aim of this resource framework is to allow users to separately track mod companions for levels and experience rather than the current base Horizon grouping under mercenary, family, associate etc. This has only been possible because Zaw recently relaxed his stance on people editing his scripts and releasing them. Hopefully this is clear and understandable, if it isn't please leave a comment on which part needs to be explained better or differently.

Process

In base horizon there was a hard limit of 30 companions that could be tracked individually and the system did not easily allow flexibility should users not have all mod companions installed. This framework makes edits to the Z_CompanionManager script, quest and companion menus to increase the number of custom companions and afford flexibility for users to install just the ones they want.

I have replaced several arrays with a new companion data struct that holds the following information for a companion: Companion Reference (the in-game character reference), Companion Keyword (CKW_Piper for example), Companion Name (a string used in some menus), Companion XP, Companion Level and Companion Spec. This allows for an 'addon' style quest record (much like that used for custom weapon and armour patches) to inject companion data into the Z_CompanionManager quest.

To accomodate this change the companion skill menu has been overhauled too. It will now display ten companions at a time with a button to view that companion's data. If the player has more than 10 companions active (i.e gained either one level or some XP) then a button will appear to view the next page listing the next ten companions and so on.

For this system to work there can only be one instance of the companion manager quest, you'll need to direct your users to download the file from this
page. This link is direct to the file to save users from downloading the wrong thing: Custom Companion Framework.

Do not pack any of the scripts with your patches - it will make future updates or fixes a nightmare.


How to setup and use in a patch
Hopefully this is rather simple. Download the Custom Companion Framework from this page and install via Vortex or MO2. It needs to be placed below Horizon.esp but above any patches. Find the HZComp_AddCompanionsTEMPLATE  quest (Fig.1), right-click and copy as new record into your patch. Replace TEMPLATE with the name of your patch for example HZComp_AddCompanions_Ellen. Do not touch anything else in the plugin.

Fig.1 - Companion Framework Overview



Expand the properties and you'll see the struct array property NewCompanionData. A dummy entry referencing Dogmeat is in there as an example and a blank struct too, you can right-click in the right hand section, next to 'Array of Struct', to add additional companions in the same quest. The struct consists of three elements: Companion must point to the companion objectreference (the in-game character, not the base actor form);  CompKW points to the CKW that is on the companion reference; and CompName is a text string that is used in level up notifications and some menus. Fig.2 shows the expanded example struct. Do not touch any other properties except the NewCompanionData one.


Fig.2 - Adder Quest properties and struct.


That's it, do the rest of your balancing as you see fit.

In-game
With the framework installed the following changes should be apparent to the menus accessed via the Field Kit. Fig 3 shows the Companion Skill Menu with the ten active companions listed. The buttons below (only buttons for active companions will show) take you to the detailed page for that companion, the information is the same as in base Horizon but the companion's name is displayed at the top as seen in Fig 4.

Fig.3 - New Style Companion Skill Menu

Fig.4 - New style Companion Data Menu.

Article information

Added on

Edited on

Written by

Sars99

0 comments