Hi Cam,
Easy one first, to create an already damaged ship...
Give the ship it's own identifier, i.e. "M.DamagedShip".
Then in the scene init, use the command=
M.DamagedShip:=**;
Where "**" is the level of damage in percentage (be aware that setting this above 75-80% (or maybe a bit less) will probably result in a 'dead' ship!).
Making allies...
If the ships in question are allied at the start of the mission, than it's back to the scene init rule with the commands=
SetRelation(#race_Player,race_ISA,*);
Setrelation(#race_ISA,race_Player,*);
And set '*' to either 1,4 or 5. This will make them all nice and friendly.
You can use these commands during the mission to change the target race relation as well.
Now the really awkward one. I did briefly look into this one a while ago, but it quickly becomes quite a thorny issue.
Here is the code at it's simplest level (useing standard TacticTypes.ini) and it only handles one commando unit at a time...
MACHINE "Boarding"
/////////////
//S:default//
/////////////
STATE Default
RULE event Launched
condition E.ship:race=#race_Player
:action
M.Launcher:=E.ship:owner;
Debug("M.Launcher is", M.Launcher);
Comm:=GetFreeSel();
//SelectBoats(Comm,S.race=#race_Player);
SelectDevices(Comm,M.Launcher,InSet(S.this,25)|InSet(S.this,143));
//S.this:devtype=#weap_cyborg);
Dump(Comm);
M.Comm1:=Pick(Comm);
Debug("Comm1 is", M.Comm1);
:end //end action
END //end rule
RULE event Breached
condition E.Ship:launcherweapon:race=#race_Player&E.Location=E.Ship:launcherweapon:Target
:action
//If our marines board the target, then give us control.
Debug("Marine target is", M.Comm1:target);
M.MTarget:=M.Comm1:Target;
Dump(M.MTarget);
M.MTarget:race:=#race_Player;
Debug(M.Mtarget, "race is", M.MTarget:race);
:end //end action
END //end rule
END //end state
END //end machine
Once your marines board, the ship instantly becomes yours. In order to make this more realsitic (i.e. your marines fight for control of the ship), then you've got to try and script a timer that your marines have to stay aboard and not get wiped out (in original N:TJI, your boarding parties were slowly killed off according to the security settings in the tactictypes.ini).