Question: Coalitions

I’m working on a multi party america mod and was wondering if anyone knows how I can add coalitions, I know it’s scripting, but is their anything I can do easily (like copy and pasting) to make it work? because Frankly I have no idea how to script besides making base endings, if it would be too hard just be blunt and tell me so

and thanks if you read that and have a good day