If your leagues are already done in compadata, it's pretty simple i can help in this post :
In my tutorial i'll take two leagues, for example Polish league (id : 66) and Brazilian League (id : 7).
All you need is to open the settings file in compdata.
Seach for the lines of the id of your higher league (in my example it's 66).
Here is the competition 66 :
1156,asset_id,66
1156,comp_type,LEAGUE
1156,rule_numsubsbench,7
1156,standings_sort,POINTS
1156,standings_sort,H2HPOINTS
1156,standings_sort,H2HGOALDIFF
1156,standings_sort,H2HGOALSFOR
1156,standings_sort,H2HGOALSAWAY
1156,standings_sort,GOALDIFF
1156,standings_sort,GOALSFOR
1157,match_matchsituation,LEAGUE
1157,schedule_year_real,2021
1157,info_prize_money,6490000
1157,info_prize_money_drop,10
1158,num_games,2
1158,info_slot_champ,1
1158,info_color_slot_champ,1
1158,info_color_slot_uecl,2
1158,info_color_slot_uecl,3
You'll need to add at the first line "(number of the line),info_league_releg,(lower league id)"
For me it's :
1156,info_league_releg,7
1156,asset_id,66
1156,comp_type,LEAGUE
1156,rule_numsubsbench,7
1156,standings_sort,POINTS
Now you need to go at the end and before the "info_color_slot" lines put "(line),info_slot_releg,(slot relegated in the league)"
If you want to relegate 3 teams in a 20 teams league you'll have something like this :
1158,num_games,2
1158,info_slot_champ,1
1158,info_slot_releg,18
1158,info_slot_releg,19
1158,info_slot_releg,20
1158,info_color_slot_champ,1
1158,info_color_slot_uecl,2
1158,info_color_slot_uecl,3
Now just add "info_color" lines after the color lines of the league : "(line),info_color_slot_releg,(slot relegated in the league)"
So we have :
1158,num_games,2
1158,info_slot_champ,1
1158,info_slot_releg,18
1158,info_slot_releg,19
1158,info_slot_releg,20
1158,info_color_slot_champ,1
1158,info_color_slot_uecl,2
1158,info_color_slot_uecl,3
1158,info_color_slot_releg,18
1158,info_color_slot_releg,19
1158,info_color_slot_releg,20
Now you can search for the lower league, for me it's id : 7 :
1768,asset_id,7
1768,comp_type,LEAGUE
1768,match_matchsituation,LEAGUE
1768,match_matchimportance,80
1768,standings_sort,POINTS
1768,standings_sort,WINS
1768,standings_sort,GOALDIFF
1768,standings_sort,GOALSFOR
1768,info_prize_money,5283000
1768,info_prize_money_drop,5
1770,num_games,2
1770,info_slot_champ,1
1770,info_color_slot_champ,1
1770,info_color_slot_champ_cup,2
1770,info_color_slot_champ_cup,3
1770,info_color_slot_champ_cup,4
1770,info_color_slot_champ_cup,5
1770,info_color_slot_euro_league,6
1770,info_color_slot_euro_league,7
1770,info_color_slot_euro_league,8
1770,info_color_slot_euro_league,9
Just make the inverse of the id 66 :
First make a line at the beginning with info_league_promo :
1768,info_league_promo,66
1768,asset_id,7
1768,comp_type,LEAGUE
1768,match_matchsituation,LEAGUE
And now promo slots and then colors (just replace 18,19,20 by 1,2,3) :
1770,num_games,2
1770,info_slot_champ,1
1770,info_slot_promo,1
1770,info_slot_promo,2
1770,info_slot_promo,3
1770,info_color_slot_champ,1
1770,info_color_slot_champ_cup,2
1770,info_color_slot_champ_cup,3
1770,info_color_slot_champ_cup,4
1770,info_color_slot_champ_cup,5
1770,info_color_slot_euro_league,6
1770,info_color_slot_euro_league,7
1770,info_color_slot_euro_league,8
1770,info_color_slot_euro_league,9
1770,info_color_slot_promo,1
1770,info_color_slot_promo,2
1770,info_color_slot_promo,3
Save and it's done
the 3 best teams of the lower league will be promoted and the 3 worst of your higher league will be relegated