First, you may want to refer to this if any of the terminology is foreign:http://www.lifeai.com/guide_files/general.html#terms
Here is a description of entity logic when actions are considered in laiUpdate():
1. Variable requirements considered, action only occurs if met
2. Entity requirements considered, entities only considered for roles if met
3. Modification amounts calculated
- starts with raw mod amount
- adjusted by mod influencers.
(Influencers are calculated by first determining how far the stat amount is from the universal stat norm. Once that is obtained, they are divided by the stat norm. For inverse influencers, the relationship is flipped. The norm is divided by the stat amount. Influencers are also scaled by a weight.)
- restricted by stat min/max
- restricted by mod min/max
4. Modification values calculated
- calculate percentage of stat modified
- multiply percentage modified by entity value of stat
- adjusted by mod value influencers
- restricted by mod value min/max
5. Role values calculated
- all of the mod values added together for the role
- entity in a particular role looks at the role values of all roles, scales them according to their value of the entity occupying the role, adds the resulting scaled and polarized role values together to form their final role val.
- restricted by role value min/max
Note: Reviewing this helped me spot an error in the manual. Any file syntax reference to "ENT_VAL" should be "VAL_ENT". This will be corrected in a future release. Please let me know if I should clarify anything.