These are longstanding bugs I found regarding the scripting engine:
Bug #1
While the player with a companion, any changes to the companion's stats by the script won't be reflected in the Character Stats Editor, nor any changes in the editor are reflected to the scripting engine. Things will be back to normal when the player is no longer with the said companion (after call to endDate()), with any changes by the script is retained, and changes made with the Character Stats Editor is discarded.
Bug #2
Any changes to an Actor's relationship status using relationship functions, e.g. addNpcRelationship(), will only take effect after a script ended. Setting a relationship status, then checking it in the same script will fail / not reflect the updated value. Hence, setting and checking relationships must be split into multiple script, or at least multiple script invocations.
Bug #3
When Actor1 and Actor2 are Siblings, and Actor3 and Actor1 are Cousins, using addNpcRelationship(Cousins, Actor2, Actor3) to set Actor2 as Actor3 cousin, Actor1 and Actor2 will also set as Cousins (Both Actors will have both Siblings and Cousins relationship to each other)
Bug #4
When using AddNpcRelationship(Spouses, Actor1, Actor2) to set Actor1 and Actor2 as married to each other, isMarried() and hasRelationship(Spouses)will only correctly return true for Actor1. For Actor2, both functions return false.
However, getRelatedPerson(Spouses) will return correctly for both Actors, despite what is returned by isMarried() and hasRelationship(Spouses) functions