Quote

I tried to change story code in GenericSceneManager and GLO_Origins but nothing happened

Behaviour scripts (*.charScript, *.itemScript, *.gameScript) are loaded and compiled by the game when it starts.

Story/Osiris scripts (*.txt) have to be compiled using the editor before the game starts (into a file called story.div.osi). You will have to wait for the official release before you can do that.

Quote

IF
CharacterUsedSkillOnTarget(_,(CHARACTERGUID)_Origin,"Teleportation_ResurrectScroll",_)
THEN
CharacterDetachFromGroup(_Origin);
CharacterRemoveFromParty(_Origin);


Instead of those two calls, you it will be better to use PROC_GLO_PartyMembers_Remove() when modding the main campaign. That routine handles several additional internal bookkeeping things, such as transferring all story items the dismissed character may be holding.