Fallout 4
0 of 0

File information

Last updated

Original upload

Created by

Dlinny_Lag

Uploaded by

DlinnyLag

Virus scan

Safe to use

About this mod

F4SE based platform for adding new numeric attributes to the characters

Requirements
Permissions and credits
Changelogs
Additional Attributes


Additional Attributes (AA) is the tool designed to simplify introducing of new attributes for characters. Made with performance in mind.
It is for modders, not for regular players. But it is possible that some players will found usefull attached sample


AA consist of 3 parts:
1) esm file - contains service data required for scripts working
2) F4SE plugin with Papyrus scripts for accessing plugin's functionality
3) API Papyrus scripts

AA provides API for managing character's attributes and attributes changes notifications. It can be used for introducing new game mechanics to the game.


Features

1) Actor initialization with registered attributes. In more flexible way than in Creation Kit. Initial value, initial base-value and minimum value can be defined independently. Initialization with randomized values supported out of box. Built-in (hardcoded) ActorValues are not supported. ActorValues with Damage Is Positive flag intentionally not supported. Value of attribute  can vary in range [min-value, base-value] only. Exceeding these limits will be reflected in notifications. Initialization is applied at first access to attribute when access performed via API provided.

Related API:

AA:AV.RegisterAttribute
AA:AV.Get
AA:AV.GetValues
AA:AV.EnsureInitialized

AA:API.Get


2) Ability to receive attribute (ActorValue) changes notifications. When attribute is changed via provided API then subscribers will recieve notification about change. Increasing/Decreasing based on RestoreValue & DamageValue. Base value is considered as maximum value for attribute and not changed by API. Can be used on any ActorValue, including hardcoded - notifications will be sent for them too. However, ActorValues with DamageIsPositive flag are not supported. 

Related API:

AA:API.Increase
AA:API.Decrease
AA:API.Set

AA:AV.Increase
AA:AV.IncreaseCapped
AA:AV.Decrease
AA:AV.IncreaseCapped
AA:AV.Modify
AA:AV.ModifyCapped
AA:AV.ModifyValues
AA:AV.ModifyValuesCapped
AA:AV.Set
AA:AV.SetValues
AA:AV.SetRandom
AA:AV.SetRandomValues

AA:AVChanges.RegisterForAttributesChanges

Related sample code:

OnIncreased
OnDecreased


3) Any Actor can be supported, not player only. 


4) Time-based changes of attributes in batch. Based on game time, not on real time

Related API:

AA:API.RegisterCalculator
AA:ICalculator 


5) Time-based changes are disabled by default. Specific filter need to be implemented and registered to allow time-based calculations and changes on certain actor(s)

Related API:

AA:API.RegisterActorFilter
AA:IActorFilter


6) Ability to generate unique positive integer number for actor. Such number can be used as timer id, for example.

Related API:

AA:AV.GetUniqueId

7) Ability to generate random values for batch of attributes

Related API:

AA:AV.GenerateRandomValues

8) Ability to receive attribute change notifications in F4SE plugins. See sample.

Code Samples

AASample mod is provided to demonstrate how API could be used. See Download section
It introduces two attributes to the game - Irritation and Patience. They are supposed to be applied to companion.
When a player hits the companion, his/her level of irritation increases, and the moment it reaches its maximum, the level of patience decreases with each hit.
When Patience level lowered below zero companion just leave you without asking.
Irritation decreases over time, Patience - increases.

More code samples could be found in LiP Framework



Source codes

Papyrus scripts sources are available in downloading packages
F4SE plugin source codes are available on GitHub
AA is based on modified F4SE

Documentation

Will be prepared over time. Currently most of information could be obtained from source codes and comments in code



Any thoughts and suggestions are welcome