Well I figured out a way of using the patch to set the affiliate plan, im sure its not the "correct" way, as I have 0 php knowlege, I just stare at stuff till a solution comes to mind.
Anyways I posted it here
http://forum.x-cart.com/viewtopic.php?p=35631#35631